diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 3bccdd12a264..94a1feddeb49 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -225,7 +225,10 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | netif_rx(skb); | 228 | if (unlikely(netif_rx(skb) == NET_RX_DROP)) { |
229 | if (rx_stats) | ||
230 | rx_stats->rx_dropped++; | ||
231 | } | ||
229 | rcu_read_unlock(); | 232 | rcu_read_unlock(); |
230 | return NET_RX_SUCCESS; | 233 | return NET_RX_SUCCESS; |
231 | 234 | ||
@@ -843,13 +846,15 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st | |||
843 | accum.rx_packets += rxpackets; | 846 | accum.rx_packets += rxpackets; |
844 | accum.rx_bytes += rxbytes; | 847 | accum.rx_bytes += rxbytes; |
845 | accum.rx_multicast += rxmulticast; | 848 | accum.rx_multicast += rxmulticast; |
846 | /* rx_errors is an ulong, not protected by syncp */ | 849 | /* rx_errors, rx_dropped are ulong, not protected by syncp */ |
847 | accum.rx_errors += p->rx_errors; | 850 | accum.rx_errors += p->rx_errors; |
851 | accum.rx_dropped += p->rx_dropped; | ||
848 | } | 852 | } |
849 | stats->rx_packets = accum.rx_packets; | 853 | stats->rx_packets = accum.rx_packets; |
850 | stats->rx_bytes = accum.rx_bytes; | 854 | stats->rx_bytes = accum.rx_bytes; |
851 | stats->rx_errors = accum.rx_errors; | 855 | stats->rx_errors = accum.rx_errors; |
852 | stats->multicast = accum.rx_multicast; | 856 | stats->multicast = accum.rx_multicast; |
857 | stats->rx_dropped = accum.rx_dropped; | ||
853 | } | 858 | } |
854 | return stats; | 859 | return stats; |
855 | } | 860 | } |