diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 3bccdd12a264..14e3d1fa07a0 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -158,7 +158,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
158 | vlan_id = vlan_tci & VLAN_VID_MASK; | 158 | vlan_id = vlan_tci & VLAN_VID_MASK; |
159 | 159 | ||
160 | rcu_read_lock(); | 160 | rcu_read_lock(); |
161 | vlan_dev = __find_vlan_dev(dev, vlan_id); | 161 | vlan_dev = vlan_find_dev(dev, vlan_id); |
162 | 162 | ||
163 | /* If the VLAN device is defined, we use it. | 163 | /* If the VLAN device is defined, we use it. |
164 | * If not, and the VID is 0, it is a 802.1p packet (not | 164 | * If not, and the VID is 0, it is a 802.1p packet (not |
@@ -177,8 +177,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
177 | } else { | 177 | } else { |
178 | skb->dev = vlan_dev; | 178 | skb->dev = vlan_dev; |
179 | 179 | ||
180 | rx_stats = per_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats, | 180 | rx_stats = this_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats); |
181 | smp_processor_id()); | 181 | |
182 | u64_stats_update_begin(&rx_stats->syncp); | 182 | u64_stats_update_begin(&rx_stats->syncp); |
183 | rx_stats->rx_packets++; | 183 | rx_stats->rx_packets++; |
184 | rx_stats->rx_bytes += skb->len; | 184 | rx_stats->rx_bytes += skb->len; |
@@ -226,12 +226,14 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
226 | } | 226 | } |
227 | 227 | ||
228 | netif_rx(skb); | 228 | netif_rx(skb); |
229 | |||
229 | rcu_read_unlock(); | 230 | rcu_read_unlock(); |
230 | return NET_RX_SUCCESS; | 231 | return NET_RX_SUCCESS; |
231 | 232 | ||
232 | err_unlock: | 233 | err_unlock: |
233 | rcu_read_unlock(); | 234 | rcu_read_unlock(); |
234 | err_free: | 235 | err_free: |
236 | atomic_long_inc(&dev->rx_dropped); | ||
235 | kfree_skb(skb); | 237 | kfree_skb(skb); |
236 | return NET_RX_DROP; | 238 | return NET_RX_DROP; |
237 | } | 239 | } |
@@ -843,7 +845,7 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st | |||
843 | accum.rx_packets += rxpackets; | 845 | accum.rx_packets += rxpackets; |
844 | accum.rx_bytes += rxbytes; | 846 | accum.rx_bytes += rxbytes; |
845 | accum.rx_multicast += rxmulticast; | 847 | accum.rx_multicast += rxmulticast; |
846 | /* rx_errors is an ulong, not protected by syncp */ | 848 | /* rx_errors is ulong, not protected by syncp */ |
847 | accum.rx_errors += p->rx_errors; | 849 | accum.rx_errors += p->rx_errors; |
848 | } | 850 | } |
849 | stats->rx_packets = accum.rx_packets; | 851 | stats->rx_packets = accum.rx_packets; |