@@ -4028,6 +4028,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
bool deliver_exact = false;
int ret = NET_RX_DROP;
__be16 type;
+ bool prevent_drop_cnt_inc = false;
net_timestamp_check(!netdev_tstamp_prequeue, skb);
@@ -4098,6 +4099,7 @@ ncls:
if (pt_prev) {
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = NULL;
+ prevent_drop_cnt_inc = true;
}
if (vlan_do_receive(&skb))
goto another_round;
@@ -4160,8 +4162,10 @@ ncls:
ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
} else {
drop:
- if (!deliver_exact)
- atomic_long_inc(&skb->dev->rx_dropped);
+ if (!deliver_exact) {
+ if (!prevent_drop_cnt_inc)
+ atomic_long_inc(&skb->dev->rx_dropped);
+ }
else
atomic_long_inc(&skb->dev->rx_nohandler);
kfree_skb(skb);