]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ice: support egress drop rules on PF
authorLarysa Zaremba <larysa.zaremba@intel.com>
Fri, 14 Feb 2025 08:50:39 +0000 (09:50 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 11 Apr 2025 16:47:43 +0000 (09:47 -0700)
commit40f42dc1cbb6b5841eb350fc81a5c26f9aa5b420
treef4b102b5c2b6aa8a1210bc527ca043d36f3b6b84
parent5787179c5183c99d9d2d49818186d43c49d6cc04
ice: support egress drop rules on PF

tc clsact qdisc allows us to add offloaded egress rules with commands such
as the following one:

tc filter add dev <ifname> egress protocol lldp flower skip_sw action drop

Support the egress rule drop action when added to PF, with a few caveats:
* in switchdev mode, all PF traffic has to go uplink with an exception for
  LLDP that can be delegated to a single VSI at a time
* in legacy mode, we cannot delegate LLDP functionality to another VSI, so
  such packets from PF should not be blocked.

Also, simplify the rule direction logic, it was previously derived from
actions, but actually can be inherited from the tc block (and flipped in
case of port representors).

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_eswitch.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_repr.c
drivers/net/ethernet/intel/ice/ice_tc_lib.c
drivers/net/ethernet/intel/ice/ice_tc_lib.h
drivers/net/ethernet/intel/ice/ice_txrx.c