Skip to content

Commit 4c27bf3

Browse files
Eric Dumazetdavem330
authored andcommitted
r8152: fix tx packets accounting
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. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4e99477 commit 4c27bf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg)
17941794

17951795
tx_data += len;
17961796
agg->skb_len += len;
1797-
agg->skb_num++;
1797+
agg->skb_num += skb_shinfo(skb)->gso_segs ?: 1;
17981798

17991799
dev_kfree_skb_any(skb);
18001800

0 commit comments

Comments
 (0)