Skip to contentSkip to conversation

r8152: fix tx packets accounting

PATCH Applied Eric Dumazet 2 participants 2 messages Feb 26, 2018 – Feb 27, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8152: fix tx packets accounting

From: Eric Dumazet <[email protected]>

r8152 driver handles TSO packets (limited to ~16KB) quite well, but pretends each TSO logical packet is a single packet on the wire.

There is also some error since headers are accounted once, but error rate is small enough that we do not care.

---
 drivers/net/usb/r8152.c |    2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/r8152.c +1 -1
index 958b2e8b90f689249abfea6c713e491300a7dc94..86f7196f9d91fbf55c791fff88687a43518d66d8 100644
@@ -1794,7 +1794,7 @@ static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg)
 
 		tx_data += len;
 		agg->skb_len += len;
-		agg->skb_num++;
+		agg->skb_num += skb_shinfo(skb)->gso_segs ?: 1;
 
 		dev_kfree_skb_any(skb);
 
maintainer Applied
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Sun, 25 Feb 2018 19:12:10 -0800

Quoted 9 lines

From: Eric Dumazet <[email protected]>

r8152 driver handles TSO packets (limited to ~16KB) quite well, but pretends each TSO logical packet is a single packet on the wire.

There is also some error since headers are accounted once, but error rate is small enough that we do not care.

Applied, thanks Eric.