]> 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)
commitc50f44ca8e4259b614407047bd7be43e4904dc20
treecd00498fa4e411fb57e2e303b39d3d09c82001b3
parent5e4ce1057d144c00d164c8b4e252947af06ad272
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