• Gal Pressman's avatar
    net/mlx5e: Count GSO packets correctly · d3a4e4da
    Gal Pressman authored
    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: 2451115
    
    Now, 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
    
    Fixes: e586b3b0 ("net/mlx5: Ethernet Datapath files")
    Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
    Cc: kernel-team@fb.com
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d3a4e4da
en_tx.c 14.1 KB