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
@@ -158,7 +158,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
|
||||
vlan_id = vlan_tci & VLAN_VID_MASK;
|
||||
|
||||
rcu_read_lock();
|
||||
vlan_dev = __find_vlan_dev(dev, vlan_id);
|
||||
vlan_dev = vlan_find_dev(dev, vlan_id);
|
||||
|
||||
/* If the VLAN device is defined, we use it.
|
||||
* If not, and the VID is 0, it is a 802.1p packet (not
|
||||
|
||||
Reference in New Issue
Block a user