summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aquantia
diff options
context:
space:
mode:
authorIgor Russkikh <igor.russkikh@aquantia.com>2018-01-15 16:41:22 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-16 14:40:01 -0500
commit9ec03bf63965c970f1b750d4adbea88c8363b03b (patch)
treeb1cff77e0cd7e44e657940e19769303e244977cc /drivers/net/ethernet/aquantia
parent8e1c072fcbeae2d74ad5eea31b52a88fdcddc074 (diff)
downloadlinux-9ec03bf63965c970f1b750d4adbea88c8363b03b.tar.bz2
net: aquantia: Fix internal stats calculation on rx
skb len should be fetched before gro_receive - otherwise we may get wrong or even outdated skb data. Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
index 519ca6534b85..0be6a11370bb 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
@@ -279,10 +279,10 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
skb_record_rx_queue(skb, self->idx);
- napi_gro_receive(napi, skb);
-
++self->stats.rx.packets;
self->stats.rx.bytes += skb->len;
+
+ napi_gro_receive(napi, skb);
}
err_exit: