diff options
author | Igor Russkikh <igor.russkikh@aquantia.com> | 2018-01-15 14:41:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-16 20:40:01 +0100 |
commit | 9ec03bf63965c970f1b750d4adbea88c8363b03b (patch) | |
tree | b1cff77e0cd7e44e657940e19769303e244977cc | |
parent | net: aquantia: Prepend hw access functions declarations with prefix (diff) | |
download | linux-9ec03bf63965c970f1b750d4adbea88c8363b03b.tar.xz 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>
-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: |