[PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed

From: Madalin Bucur
Date: Wed Mar 14 2018 - 09:39:01 EST


From: Camelia Groza <camelia.groza@xxxxxxx>

Signed-off-by: Camelia Groza <camelia.groza@xxxxxxx>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 3e83d79..76b3c9e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2321,8 +2321,10 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,

skb_len = skb->len;

- if (unlikely(netif_receive_skb(skb) == NET_RX_DROP))
+ if (unlikely(netif_receive_skb(skb) == NET_RX_DROP)) {
+ percpu_stats->rx_dropped++;
return qman_cb_dqrr_consume;
+ }

percpu_stats->rx_packets++;
percpu_stats->rx_bytes += skb_len;
--
2.1.0