• Gal Pressman's avatar
    net/mlx5e: Count LRO packets correctly · 8ab7e2ae
    Gal Pressman authored
    RX packets statistics ('rx_packets' counter) used to count LRO 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 'rx_lro_packets'
    counter existence.
    
    Before, ethtool showed:
    $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets"
         rx_packets: 435277
         rx_lro_packets: 35847
         rx_packets_phy: 1935066
    
    Now, we will see the more logical statistics:
    $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets"
         rx_packets: 1935066
         rx_lro_packets: 35847
         rx_packets_phy: 1935066
    
    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>
    8ab7e2ae
en_rx.c 26.2 KB