Patch "net/mlx5e: Count GSO packets correctly" has been added to the 4.10-stable tree
This is a note to let you know that I've just added the patch titled
net/mlx5e: Count GSO packets correctly
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5e-count-gso-packets-correctly.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Mar 27 18:18:08 CEST 2017
From: Gal Pressman <[email protected]>
Date: Tue, 21 Mar 2017 15:59:18 +0200
Subject: net/mlx5e: Count GSO packets correctly
From: Gal Pressman <[email protected]>
[ Upstream commit d3a4e4da54c7adb420d5f48e89be913b14bdeff1 ]
TX packets statistics ('tx_packets' counter) used to count GSO packets as one, even though it contains multiple segments.
This patch will increment the counter by the number of segments, and align the driver with the behavior of other drivers in the stack.
Note that no information is lost in this patch due to 'tx_tso_packets' counter existence.
Before, ethtool showed:
$ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets"
tx_packets: 61340
tx_tso_packets: 60954
tx_packets_phy: 2451115Now, we will see the more logical statistics:
$ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets"
tx_packets: 2451115
tx_tso_packets: 60954
tx_packets_phy: 2451115--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +3 -2
@@ -272,15 +272,18 @@ static netdev_tx_t mlx5e_sq_xmit(struct sq->stats.tso_bytes += skb->len - ihs; } + sq->stats.packets +=skb_shinfo (skb)->gso_segs; num_bytes = skb->len + (skb_shinfo (skb)->gso_segs -1 ) * ihs; }else { bf = sq->bf_budget && !skb->xmit_more && !skb_shinfo (skb)->nr_frags; ihs =mlx5e_get_inline_hdr_size (sq, skb, bf); + sq->stats.packets++; num_bytes = max_t(unsigned int, skb->len, ETH_ZLEN); } + sq->stats.bytes += num_bytes; wi->num_bytes = num_bytes;if (skb_vlan_tag_present (skb)) {
@@ -377,8 +380,6 @@ static netdev_tx_t mlx5e_sq_xmit(structif (bf) sq->bf_budget--; - sq->stats.packets++; - sq->stats.bytes += num_bytes;return NETDEV_TX_OK ; dma_unmap_wqe_err:
Patches currently in stable-queue which might be from [email protected] are
queue-4.10/net-mlx5e-count-gso-packets-correctly.patch queue-4.10/net-mlx5e-count-lro-packets-correctly.patch