aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-04-07 15:48:33 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-12 17:15:19 -0400
commitbcc6d47903612c3861201cc3a866fb604f26b8b2 (patch)
treebd02aeaa18984de46d09a1cb41b1f5e09ec89dbb /net/core/dev.c
parent143780c6562080c1117cd9197ee1b33c0d838376 (diff)
net: vlan: make non-hw-accel rx path similar to hw-accel
Now there are 2 paths for rx vlan frames. When rx-vlan-hw-accel is enabled, skb is untagged by NIC, vlan_tci is set and the skb gets into vlan code in __netif_receive_skb - vlan_hwaccel_do_receive. For non-rx-vlan-hw-accel however, tagged skb goes thru whole __netif_receive_skb, it's untagged in ptype_base hander and reinjected This incosistency is fixed by this patch. Vlan untagging happens early in __netif_receive_skb so the rest of code (ptype_all handlers, rx_handlers) see the skb like it was untagged by hw. Signed-off-by: Jiri Pirko <jpirko@redhat.com> v1->v2: remove "inline" from vlan_core.c functions Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 95897ff3a76f..d1aebf7c6494 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3130,6 +3130,12 @@ another_round:
3130 3130
3131 __this_cpu_inc(softnet_data.processed); 3131 __this_cpu_inc(softnet_data.processed);
3132 3132
3133 if (skb->protocol == cpu_to_be16(ETH_P_8021Q)) {
3134 skb = vlan_untag(skb);
3135 if (unlikely(!skb))
3136 goto out;
3137 }
3138
3133#ifdef CONFIG_NET_CLS_ACT 3139#ifdef CONFIG_NET_CLS_ACT
3134 if (skb->tc_verd & TC_NCLS) { 3140 if (skb->tc_verd & TC_NCLS) {
3135 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); 3141 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
@@ -3177,7 +3183,7 @@ ncls:
3177 ret = deliver_skb(skb, pt_prev, orig_dev); 3183 ret = deliver_skb(skb, pt_prev, orig_dev);
3178 pt_prev = NULL; 3184 pt_prev = NULL;
3179 } 3185 }
3180 if (vlan_hwaccel_do_receive(&skb)) { 3186 if (vlan_do_receive(&skb)) {
3181 ret = __netif_receive_skb(skb); 3187 ret = __netif_receive_skb(skb);
3182 goto out; 3188 goto out;
3183 } else if (unlikely(!skb)) 3189 } else if (unlikely(!skb))