]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Disallow VF VLAN opcodes if VLAN offloads disabled
authorBrett Creeley <brett.creeley@intel.com>
Fri, 8 Nov 2019 14:23:19 +0000 (06:23 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Nov 2019 21:06:34 +0000 (13:06 -0800)
commit7c1d16c30438e135bf84d073518a104fa063ad2c
treecd00498fa4e411fb57e2e303b39d3d09c82001b3
parent60fbc12dd95f673c067643c26170e9192a8ecfb3
ice: Disallow VF VLAN opcodes if VLAN offloads disabled

Currently if the host disables VLAN offloads on the VF by
not setting the VIRTCHNL_VF_OFFLOAD_VLAN capability bit
we will still honor VF VLAN configuration messages over
VIRTCHNL. These messages (i.e. enable/disable VLAN stripping
and VLAN filtering) should be blocked when the feature
is not supported. Fix that by adding a helper function to
determine if the VF is allowed to do VLAN operations based
on the host's VF configuration.

Also, mirror the VF communicated capabilities in the host's
VF configuration.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c