ice: don't set VF VLAN caps in switchdev
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Mon, 25 Apr 2022 06:27:55 +0000 (08:27 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 8 Jun 2022 15:47:50 +0000 (08:47 -0700)
commitcede04b35258faaa5acc3932ac07ab855d59e5f3
treeb3fa8fa76492c354203e4cb33ba771942d40f689
parentda6e113ff010815fdd21ee1e9af2e8d179a2680f
ice: don't set VF VLAN caps in switchdev

In switchdev mode any VLAN manipulation from VF side isn't allowed.
In order to prevent parsing VLAN commands don't set VF VLAN caps.
This will result in removing VLAN specific opcodes from allowlist.
If VF send any VLAN specific opcode PF driver will answer with not
supported error.

With this approach VF driver know that VLAN caps aren't supported so it
shouldn't send VLAN specific opcodes. Thanks to that, some ugly errors
will not show up in dmesg (ex. on creating VFs in switchdev mode
there are errors about not supported VLAN insertion and stripping)

Move setting VLAN caps to separate function, including
switchdev mode specific code.

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl.c