Message ID | 20090213041804.3848.73723.stgit@lost.foo-projects.org |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2009-02-12 at 20:18 -0800, Jeff Kirsher wrote: > From: Alexander Duyck <alexander.h.duyck@intel.com> > > This patch combines a pair of if statements into one and adds a line to > update netdev->last_rx. [...] You shouldn't need to update last_rx any more: commit 6cf3f41e6c08bca6641a695449791c38a25f35ff Author: Jay Vosburgh <fubar@us.ibm.com> Date: Mon Nov 3 18:16:50 2008 -0800 bonding, net: Move last_rx update into bonding recv logic The only user of the net_device->last_rx field is bonding. This patch adds a conditional update of last_rx to the bonding special logic in skb_bond_should_drop, causing last_rx to only be updated when the ARP monitor is running. This frees network device drivers from the necessity of updating last_rx, which can have cache line thrash issues. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Ben.
From: Ben Hutchings <bhutchings@solarflare.com> Date: Fri, 13 Feb 2009 13:23:23 +0000 > On Thu, 2009-02-12 at 20:18 -0800, Jeff Kirsher wrote: > > From: Alexander Duyck <alexander.h.duyck@intel.com> > > > > This patch combines a pair of if statements into one and adds a line to > > update netdev->last_rx. > [...] > > You shouldn't need to update last_rx any more: > > commit 6cf3f41e6c08bca6641a695449791c38a25f35ff > Author: Jay Vosburgh <fubar@us.ibm.com> > Date: Mon Nov 3 18:16:50 2008 -0800 > > bonding, net: Move last_rx update into bonding recv logic Right. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 5a6bcef..712cfd6 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -2981,9 +2981,9 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb, if (tso) tx_flags |= IGB_TX_FLAGS_TSO; - else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags)) - if (skb->ip_summed == CHECKSUM_PARTIAL) - tx_flags |= IGB_TX_FLAGS_CSUM; + else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags) && + (skb->ip_summed == CHECKSUM_PARTIAL)) + tx_flags |= IGB_TX_FLAGS_CSUM; igb_tx_queue_adv(adapter, tx_ring, tx_flags, igb_tx_map_adv(adapter, tx_ring, skb, first), @@ -3886,6 +3886,7 @@ send_up: igb_receive_skb(rx_ring, staterr, rx_desc, skb); + netdev->last_rx = jiffies; next_desc: rx_desc->wb.upper.status_error = 0;