* [PATCH net] r8152: fix tx packets accounting
@ 2018-02-26 3:12 Eric Dumazet
2018-02-27 2:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2018-02-26 3:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Hayes Wang
From: Eric Dumazet <edumazet@google.com>
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>
---
drivers/net/usb/r8152.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 958b2e8b90f689249abfea6c713e491300a7dc94..86f7196f9d91fbf55c791fff88687a43518d66d8 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] r8152: fix tx packets accounting
2018-02-26 3:12 [PATCH net] r8152: fix tx packets accounting Eric Dumazet
@ 2018-02-27 2:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-02-27 2:02 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, hayeswang
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 25 Feb 2018 19:12:10 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> 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>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-27 2:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 3:12 [PATCH net] r8152: fix tx packets accounting Eric Dumazet
2018-02-27 2:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).