diff options
-rw-r--r-- | drivers/net/igb/igb.h | 1 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h index 8f07bc0a1d4c..7854b66648c7 100644 --- a/drivers/net/igb/igb.h +++ b/drivers/net/igb/igb.h | |||
@@ -141,6 +141,7 @@ struct igb_buffer { | |||
141 | u16 length; | 141 | u16 length; |
142 | u16 next_to_watch; | 142 | u16 next_to_watch; |
143 | u16 mapped_as_page; | 143 | u16 mapped_as_page; |
144 | u16 gso_segs; | ||
144 | }; | 145 | }; |
145 | /* RX */ | 146 | /* RX */ |
146 | struct { | 147 | struct { |
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; |