]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: setup VLANs for l2 accelerated macvlan interfaces
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 12 Apr 2018 18:15:54 +0000 (11:15 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 9 May 2018 14:12:03 +0000 (07:12 -0700)
commit39c5323badcfb9af637e1286f33db3d566ddfd53
treeae3a893f5e6ce86d75f6a3e007416d085581a3b6
parent2beb941bfa99087766d9a2649e1ff56c42c3aa87
fm10k: setup VLANs for l2 accelerated macvlan interfaces

We have support for accelerating macvlan devices via the
.ndo_dfwd_add_station() netdev op. These accelerated macvlan MAC
addresses are stored in the l2_accel structure, separate from the
unicast or multicast address lists.

If a VLAN is added on top of the macvlan device by the stack, traffic
will not properly flow to the macvlan. This occurs because we fail to
setup the VLANs for l2_accel MAC addresses.

In the non-offloaded case the MAC address is added to the unicast
address list, and thus the normal setup for enabling VLANs works as
expected.

We also need to add VLANs marked from .ndo_vlan_rx_add_vid() into the
l2_accel MAC addresses. Otherwise, VLAN traffic will not properly be
received by the VLAN devices attached to the offloaded macvlan devices.

Fix this by adding necessary logic to setup VLANs not only for the
unicast and multicast addresses, but also the l2_accel list. We need
similar logic in dfwd_add_station, dfwd_del_station, fm10k_update_vid,
and fm10k_restore_rx_state.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c