aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
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 a1fe581febc..91c123f9df9 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;