liquidio: Corrected Rx bytes counting
authorIntiyaz Basha <intiyaz.basha@cavium.com>
Sat, 3 Mar 2018 02:29:04 +0000 (18:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Mar 2018 15:21:29 +0000 (10:21 -0500)
Corrected stats mismatch between Host Tx and its peer Rx stats

Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com>
Acked-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_core.c

index 32ae63b6f20e1eb3c94291c63b7f33d83a044a94..8b1ee83134e3168bd2829db6879845ae0e1cf682 100644 (file)
@@ -571,7 +571,8 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
 
                napi_gro_receive(napi, skb);
 
-               droq->stats.rx_bytes_received += len;
+               droq->stats.rx_bytes_received += len -
+                       rh->r_dh.len * BYTES_PER_DHLEN_UNIT;
                droq->stats.rx_pkts_received++;
        } else {
                recv_buffer_free(skb);