aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorNick Nunley <nicholasx.d.nunley@intel.com>2010-02-16 20:04:37 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 16:21:37 -0500
commit40e90c26f573fa5082be6e046b346e19ab0cd25f (patch)
tree5c1676d99568fa07ad144a70c57a413ab5de2d5a /drivers/net/igb/igb_main.c
parent717ba0893508c2c8706c1408c152aa6d286d5d80 (diff)
igb: move gso_segs into buffer_info structure
This change moves gso_segs into the buffer_info structure to avoid a possible cache line miss in clean_tx_irq. Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index a1fe581febc0..91c123f9df92 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3641,6 +3641,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb,
3641 } 3641 }
3642 3642
3643 tx_ring->buffer_info[i].skb = skb; 3643 tx_ring->buffer_info[i].skb = skb;
3644 tx_ring->buffer_info[i].gso_segs = skb_shinfo(skb)->gso_segs ?: 1;
3644 tx_ring->buffer_info[first].next_to_watch = i; 3645 tx_ring->buffer_info[first].next_to_watch = i;
3645 3646
3646 return ++count; 3647 return ++count;
@@ -5032,7 +5033,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
5032 if (skb) { 5033 if (skb) {
5033 unsigned int segs, bytecount; 5034 unsigned int segs, bytecount;
5034 /* gso_segs is currently only valid for tcp */ 5035 /* gso_segs is currently only valid for tcp */
5035 segs = skb_shinfo(skb)->gso_segs ?: 1; 5036 segs = buffer_info->gso_segs;
5036 /* multiply data chunks by size of headers */ 5037 /* multiply data chunks by size of headers */
5037 bytecount = ((segs - 1) * skb_headlen(skb)) + 5038 bytecount = ((segs - 1) * skb_headlen(skb)) +
5038 skb->len; 5039 skb->len;