diff options
author | Igor Russkikh <igor.russkikh@aquantia.com> | 2018-01-15 08:41:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-16 14:40:01 -0500 |
commit | 9ec03bf63965c970f1b750d4adbea88c8363b03b (patch) | |
tree | b1cff77e0cd7e44e657940e19769303e244977cc | |
parent | 8e1c072fcbeae2d74ad5eea31b52a88fdcddc074 (diff) |
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, | |||
279 | 279 | ||
280 | skb_record_rx_queue(skb, self->idx); | 280 | skb_record_rx_queue(skb, self->idx); |
281 | 281 | ||
282 | napi_gro_receive(napi, skb); | ||
283 | |||
284 | ++self->stats.rx.packets; | 282 | ++self->stats.rx.packets; |
285 | self->stats.rx.bytes += skb->len; | 283 | self->stats.rx.bytes += skb->len; |
284 | |||
285 | napi_gro_receive(napi, skb); | ||
286 | } | 286 | } |
287 | 287 | ||
288 | err_exit: | 288 | err_exit: |