aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-25 19:12:10 -0800
committerDavid S. Miller <davem@davemloft.net>2018-02-26 21:01:53 -0500
commit4c27bf3c5b7434ccb9ab962301da661c26b467a4 (patch)
tree8ecd3a18210ffd4e8796eda1ea2a293ef1c4d988 /drivers/net/usb
parentip_tunnel: Do not use mark in skb by default (diff)
downloadlinux-dev-4c27bf3c5b7434ccb9ab962301da661c26b467a4.tar.xz
linux-dev-4c27bf3c5b7434ccb9ab962301da661c26b467a4.zip
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>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/r8152.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 958b2e8b90f6..86f7196f9d91 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -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);