aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c11
-rw-r--r--net/core/ethtool.c30
-rw-r--r--net/core/flow.c4
3 files changed, 31 insertions, 14 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a3d8d44cb7f4..26755dd40daa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3580,8 +3580,15 @@ ncls:
3580 } 3580 }
3581 } 3581 }
3582 3582
3583 if (vlan_tx_nonzero_tag_present(skb)) 3583 if (unlikely(vlan_tx_tag_present(skb))) {
3584 skb->pkt_type = PACKET_OTHERHOST; 3584 if (vlan_tx_tag_get_id(skb))
3585 skb->pkt_type = PACKET_OTHERHOST;
3586 /* Note: we might in the future use prio bits
3587 * and set skb->priority like in vlan_do_receive()
3588 * For the time being, just ignore Priority Code Point
3589 */
3590 skb->vlan_tci = 0;
3591 }
3585 3592
3586 /* deliver only exact match when indicated */ 3593 /* deliver only exact match when indicated */
3587 null_or_dev = deliver_exact ? skb->dev : NULL; 3594 null_or_dev = deliver_exact ? skb->dev : NULL;
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index ab5fa6336c84..78e9d9223e40 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -279,11 +279,16 @@ static u32 __ethtool_get_flags(struct net_device *dev)
279{ 279{
280 u32 flags = 0; 280 u32 flags = 0;
281 281
282 if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO; 282 if (dev->features & NETIF_F_LRO)
283 if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) flags |= ETH_FLAG_RXVLAN; 283 flags |= ETH_FLAG_LRO;
284 if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) flags |= ETH_FLAG_TXVLAN; 284 if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
285 if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE; 285 flags |= ETH_FLAG_RXVLAN;
286 if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH; 286 if (dev->features & NETIF_F_HW_VLAN_CTAG_TX)
287 flags |= ETH_FLAG_TXVLAN;
288 if (dev->features & NETIF_F_NTUPLE)
289 flags |= ETH_FLAG_NTUPLE;
290 if (dev->features & NETIF_F_RXHASH)
291 flags |= ETH_FLAG_RXHASH;
287 292
288 return flags; 293 return flags;
289} 294}
@@ -295,11 +300,16 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data)
295 if (data & ~ETH_ALL_FLAGS) 300 if (data & ~ETH_ALL_FLAGS)
296 return -EINVAL; 301 return -EINVAL;
297 302
298 if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO; 303 if (data & ETH_FLAG_LRO)
299 if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_CTAG_RX; 304 features |= NETIF_F_LRO;
300 if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_CTAG_TX; 305 if (data & ETH_FLAG_RXVLAN)
301 if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE; 306 features |= NETIF_F_HW_VLAN_CTAG_RX;
302 if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH; 307 if (data & ETH_FLAG_TXVLAN)
308 features |= NETIF_F_HW_VLAN_CTAG_TX;
309 if (data & ETH_FLAG_NTUPLE)
310 features |= NETIF_F_NTUPLE;
311 if (data & ETH_FLAG_RXHASH)
312 features |= NETIF_F_RXHASH;
303 313
304 /* allow changing only bits set in hw_features */ 314 /* allow changing only bits set in hw_features */
305 changed = (features ^ dev->features) & ETH_ALL_FEATURES; 315 changed = (features ^ dev->features) & ETH_ALL_FEATURES;
diff --git a/net/core/flow.c b/net/core/flow.c
index 7102f166482d..dfa602ceb8cd 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -403,7 +403,7 @@ void flow_cache_flush_deferred(void)
403 schedule_work(&flow_cache_flush_work); 403 schedule_work(&flow_cache_flush_work);
404} 404}
405 405
406static int __cpuinit flow_cache_cpu_prepare(struct flow_cache *fc, int cpu) 406static int flow_cache_cpu_prepare(struct flow_cache *fc, int cpu)
407{ 407{
408 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu); 408 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
409 size_t sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc); 409 size_t sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc);
@@ -421,7 +421,7 @@ static int __cpuinit flow_cache_cpu_prepare(struct flow_cache *fc, int cpu)
421 return 0; 421 return 0;
422} 422}
423 423
424static int __cpuinit flow_cache_cpu(struct notifier_block *nfb, 424static int flow_cache_cpu(struct notifier_block *nfb,
425 unsigned long action, 425 unsigned long action,
426 void *hcpu) 426 void *hcpu)
427{ 427{