diff options
author | 2018-01-15 16:41:22 +0300 | |
---|---|---|
committer | 2018-01-16 14:40:01 -0500 | |
commit | 9ec03bf63965c970f1b750d4adbea88c8363b03b (patch) | |
tree | b1cff77e0cd7e44e657940e19769303e244977cc /drivers/net/ethernet/aquantia | |
parent | net: aquantia: Prepend hw access functions declarations with prefix (diff) | |
download | linux-9ec03bf63965c970f1b750d4adbea88c8363b03b.tar.gz linux-9ec03bf63965c970f1b750d4adbea88c8363b03b.tar.bz2 linux-9ec03bf63965c970f1b750d4adbea88c8363b03b.zip |
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.c | 4 |
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: |