vlan: Avoid hash table lookup to find group.
A struct net_device always maps to zero or one vlan groups and we always know the device when we are looking up a group. We currently do a hash table lookup on the device to find the group but it is much simpler to just store a pointer. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7b9c609037
commit
65ac6a5fa6
@@ -942,7 +942,10 @@ struct net_device {
|
||||
|
||||
|
||||
/* Protocol specific pointers */
|
||||
|
||||
|
||||
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
|
||||
struct vlan_group *vlgrp; /* VLAN group */
|
||||
#endif
|
||||
#ifdef CONFIG_NET_DSA
|
||||
void *dsa_ptr; /* dsa specific data */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user