ice: allow process VF opcodes in different ways
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Fri, 20 Aug 2021 00:08:51 +0000 (17:08 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 7 Oct 2021 17:41:42 +0000 (10:41 -0700)
commitac19e03ef7809a4e42062da476bd16320262a1de
tree130afaf1d9d628af6e16260c633e86fa0a24c12b
parent37165e3f5664ee901e89ff9c13723c2743c5e47f
ice: allow process VF opcodes in different ways

In switchdev driver shouldn't add MAC, VLAN and promisc
filters on iavf demand but should return success to not
break normal iavf flow.

Achieve that by creating table of functions pointer with
default functions used to parse iavf command. While parse
iavf command, call correct function from table instead of
calling function direct.

When port representors are being created change functions
in table to new one that behaves correctly for switchdev
puprose (ignoring new filters).

Change back to default ops when representors are being
removed.

Co-developed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
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_repr.c
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h