Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

enic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Pirko and committed by
David S. Miller
6ede746b c74ea2f7

+6 -27
-1
drivers/net/enic/enic.h
··· 94 94 ____cacheline_aligned struct vnic_wq wq[ENIC_WQ_MAX]; 95 95 spinlock_t wq_lock[ENIC_WQ_MAX]; 96 96 unsigned int wq_count; 97 - struct vlan_group *vlan_group; 98 97 u16 loop_enable; 99 98 u16 loop_tag; 100 99
+6 -26
drivers/net/enic/enic_main.c
··· 1029 1029 } 1030 1030 } 1031 1031 1032 - /* rtnl lock is held */ 1033 - static void enic_vlan_rx_register(struct net_device *netdev, 1034 - struct vlan_group *vlan_group) 1035 - { 1036 - struct enic *enic = netdev_priv(netdev); 1037 - enic->vlan_group = vlan_group; 1038 - } 1039 - 1040 1032 /* netif_tx_lock held, BHs disabled */ 1041 1033 static void enic_tx_timeout(struct net_device *netdev) 1042 1034 { ··· 1256 1264 1257 1265 skb->dev = netdev; 1258 1266 1259 - if (vlan_stripped) { 1267 + if (vlan_stripped) 1268 + __vlan_hwaccel_put_tag(skb, vlan_tci); 1260 1269 1261 - if (netdev->features & NETIF_F_GRO) 1262 - vlan_gro_receive(&enic->napi[q_number], 1263 - enic->vlan_group, vlan_tci, skb); 1264 - else 1265 - vlan_hwaccel_receive_skb(skb, 1266 - enic->vlan_group, vlan_tci); 1267 - 1268 - } else { 1269 - 1270 - if (netdev->features & NETIF_F_GRO) 1271 - napi_gro_receive(&enic->napi[q_number], skb); 1272 - else 1273 - netif_receive_skb(skb); 1274 - 1275 - } 1270 + if (netdev->features & NETIF_F_GRO) 1271 + napi_gro_receive(&enic->napi[q_number], skb); 1272 + else 1273 + netif_receive_skb(skb); 1276 1274 } else { 1277 1275 1278 1276 /* Buffer overflow ··· 2106 2124 .ndo_set_multicast_list = enic_set_rx_mode, 2107 2125 .ndo_set_mac_address = enic_set_mac_address_dynamic, 2108 2126 .ndo_change_mtu = enic_change_mtu, 2109 - .ndo_vlan_rx_register = enic_vlan_rx_register, 2110 2127 .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, 2111 2128 .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, 2112 2129 .ndo_tx_timeout = enic_tx_timeout, ··· 2127 2146 .ndo_set_rx_mode = enic_set_rx_mode, 2128 2147 .ndo_set_multicast_list = enic_set_rx_mode, 2129 2148 .ndo_change_mtu = enic_change_mtu, 2130 - .ndo_vlan_rx_register = enic_vlan_rx_register, 2131 2149 .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, 2132 2150 .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, 2133 2151 .ndo_tx_timeout = enic_tx_timeout,