ice: ndo_setup_tc implementation for PF
authorKiran Patil <kiran.patil@intel.com>
Fri, 6 Aug 2021 08:49:05 +0000 (10:49 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 11 Oct 2021 16:03:04 +0000 (09:03 -0700)
commit0d08a441fb1a5c4fdfa3f5fe2f2eb2f620f5b20d
tree27173e722fbeabbc47f2e8e542a1513472d49d2c
parent572b820dfa61fc23b5ba59fd5baa92cd1ec2bacb
ice: ndo_setup_tc implementation for PF

Implement ndo_setup_tc net device callback for TC HW offload on PF device.

ndo_setup_tc provides support for HW offloading various TC filters.
Add support for configuring the following filter with tc-flower:
- default L2 filters (src/dst mac addresses, ethertype, VLAN)
- variations of L3, L3+L4, L2+L3+L4 filters using advanced filters
(including ipv4 and ipv6 addresses).

Allow for adding/removing TC flows when PF device is configured in
eswitch switchdev mode. Two types of actions are supported at the
moment: FLOW_ACTION_DROP and FLOW_ACTION_REDIRECT.

Co-developed-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
Signed-off-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@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/Makefile
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_tc_lib.c [new file with mode: 0644]
drivers/net/ethernet/intel/ice/ice_tc_lib.h [new file with mode: 0644]