diff -u linux-4.4.0/debian/changelog linux-4.4.0/debian/changelog --- linux-4.4.0/debian/changelog +++ linux-4.4.0/debian/changelog @@ -1,3 +1,13 @@ +linux (4.4.0-22.40~ubuntu1) xenial; urgency=low + + [ Ivan Suzdal] + + * LP: #1582328 + - e1000: Double Tx descriptors needed check for 82544 + - e1000: Do not overestimate descriptor counts in Tx pre-check + + -- Ivan Suzdal Mon, 16 May 2016 16:44:54 +0000 + linux (4.4.0-22.40) xenial; urgency=low [ Kamal Mostafa ] only in patch2: unchanged: --- linux-4.4.0.orig/.pc/.quilt_patches +++ linux-4.4.0/.pc/.quilt_patches @@ -0,0 +1 @@ +debian/patches only in patch2: unchanged: --- linux-4.4.0.orig/.pc/.quilt_series +++ linux-4.4.0/.pc/.quilt_series @@ -0,0 +1 @@ +series only in patch2: unchanged: --- linux-4.4.0.orig/.pc/.version +++ linux-4.4.0/.pc/.version @@ -0,0 +1 @@ +2 only in patch2: unchanged: --- linux-4.4.0.orig/debian/patches/0001-e1000-double-check-for-82544.patch +++ linux-4.4.0/debian/patches/0001-e1000-double-check-for-82544.patch @@ -0,0 +1,35 @@ +Index: linux-4.4.0/drivers/net/ethernet/intel/e1000/e1000_main.c +=================================================================== +--- linux-4.4.0.orig/drivers/net/ethernet/intel/e1000/e1000_main.c ++++ linux-4.4.0/drivers/net/ethernet/intel/e1000/e1000_main.c +@@ -3256,12 +3256,29 @@ static netdev_tx_t e1000_xmit_frame(stru + nr_frags, mss); + + if (count) { ++ /* The descriptors needed is higher than other Intel drivers ++ * due to a number of workarounds. The breakdown is below: ++ * Data descriptors: MAX_SKB_FRAGS + 1 ++ * Context Descriptor: 1 ++ * Keep head from touching tail: 2 ++ * Workarounds: 3 ++ */ ++ int desc_needed = MAX_SKB_FRAGS + 7; ++ + netdev_sent_queue(netdev, skb->len); + skb_tx_timestamp(skb); + + e1000_tx_queue(adapter, tx_ring, tx_flags, count); ++ ++ /* 82544 potentially requires twice as many data descriptors ++ * in order to guarantee buffers don't end on evenly-aligned ++ * dwords ++ */ ++ if (adapter->pcix_82544) ++ desc_needed += MAX_SKB_FRAGS + 1; ++ + /* Make sure there is space in the ring for the next send. */ +- e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); ++ e1000_maybe_stop_tx(netdev, tx_ring, desc_needed); + + if (!skb->xmit_more || + netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) { only in patch2: unchanged: --- linux-4.4.0.orig/debian/patches/0002-e1000-do-not-overestimate-descriptor-counts-in-Tx-pre-check.patch +++ linux-4.4.0/debian/patches/0002-e1000-do-not-overestimate-descriptor-counts-in-Tx-pre-check.patch @@ -0,0 +1,13 @@ +Index: linux-4.4.0/drivers/net/ethernet/intel/e1000/e1000_main.c +=================================================================== +--- linux-4.4.0.orig/drivers/net/ethernet/intel/e1000/e1000_main.c ++++ linux-4.4.0/drivers/net/ethernet/intel/e1000/e1000_main.c +@@ -3106,7 +3106,7 @@ static int e1000_maybe_stop_tx(struct ne + return __e1000_maybe_stop_tx(netdev, size); + } + +-#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1) ++#define TXD_USE_COUNT(S, X) (((S) + ((1 << (X)) - 1)) >> (X)) + static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, + struct net_device *netdev) + { only in patch2: unchanged: --- linux-4.4.0.orig/debian/patches/series +++ linux-4.4.0/debian/patches/series @@ -0,0 +1,2 @@ +0001-e1000-double-check-for-82544.patch +0002-e1000-do-not-overestimate-descriptor-counts-in-Tx-pre-check.patch