diff options
| author | Gal Pressman <gal@nvidia.com> | 2026-05-04 21:37:00 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-07 04:38:57 +0300 |
| commit | de58db5f0d950c56f2fe488d04fdf376dd5ad2a6 (patch) | |
| tree | 52e4b48e94bb456b9720c73c69706561621d1a13 | |
| parent | fea3521e043fa1388ec909205687db7d4b0c57ec (diff) | |
| download | linux-de58db5f0d950c56f2fe488d04fdf376dd5ad2a6.tar.xz | |
net/mlx5e: Count full skb length in TSO byte counters
The tso_bytes and tso_inner_bytes counters currently subtract the header
length from skb->len, counting only the payload. This is confusing and
doesn't align with the behavior of other _bytes counters in the driver.
Report the full skb length to align with this expectation.
This also makes our behavior consistent with the netdev stats API and
virtio spec definition.
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260504183704.272322-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index 9f0272649fa1..0b5e600e4a6a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -164,14 +164,14 @@ mlx5e_tx_get_gso_ihs(struct mlx5e_txqsq *sq, struct sk_buff *skb) else ihs = skb_inner_tcp_all_headers(skb); stats->tso_inner_packets++; - stats->tso_inner_bytes += skb->len - ihs; + stats->tso_inner_bytes += skb->len; } else { if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) ihs = skb_transport_offset(skb) + sizeof(struct udphdr); else ihs = skb_tcp_all_headers(skb); stats->tso_packets++; - stats->tso_bytes += skb->len - ihs; + stats->tso_bytes += skb->len; } return ihs; |
