forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> v1->v2: remove "inline" from vlan_core.c functions Signed-off-by: David S. Miller <[email protected]>
- Loading branch information
Showing
6 changed files
with
99 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,6 @@ const char vlan_version[] = DRV_VERSION; | |
static const char vlan_copyright[] = "Ben Greear <[email protected]>"; | ||
static const char vlan_buggyright[] = "David S. Miller <[email protected]>"; | ||
|
||
static struct packet_type vlan_packet_type __read_mostly = { | ||
.type = cpu_to_be16(ETH_P_8021Q), | ||
.func = vlan_skb_recv, /* VLAN receive method */ | ||
}; | ||
|
||
/* End of global variables definitions. */ | ||
|
||
static void vlan_group_free(struct vlan_group *grp) | ||
|
@@ -684,7 +679,6 @@ static int __init vlan_proto_init(void) | |
if (err < 0) | ||
goto err4; | ||
|
||
dev_add_pack(&vlan_packet_type); | ||
vlan_ioctl_set(vlan_ioctl_handler); | ||
return 0; | ||
|
||
|
@@ -705,8 +699,6 @@ static void __exit vlan_cleanup_module(void) | |
|
||
unregister_netdevice_notifier(&vlan_notifier_block); | ||
|
||
dev_remove_pack(&vlan_packet_type); | ||
|
||
unregister_pernet_subsys(&vlan_net_ops); | ||
rcu_barrier(); /* Wait for completion of call_rcu()'s */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters