OSDN Git Service

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)
commitd4bc4e2d6b57712206abfc4e7751ff629b713070
treecd00498fa4e411fb57e2e303b39d3d09c82001b3
parent9164f761c99493a947dcbf3889a157943b46e738
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