netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-12 10:52 Michal Swiatkowski
  2024-03-18 18:55 ` Simon Horman
  2024-03-25  6:36 ` [Intel-wired-lan] " Buvaneswaran, Sujai
  0 siblings, 2 replies; 8+ messages in thread
From: Michal Swiatkowski @ 2024-03-12 10:52 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev, Michal Swiatkowski, Marcin Szycik, Michal Kubiak

A simple non-tunnel rule (e.g. matching only on destination MAC) in
hardware will be hit only if the packet isn't a tunnel. In software
execution of the same command, the rule will match both tunnel and
non-tunnel packets.

Change the hardware behaviour to match tunnel and non-tunnel packets in
this case. Do this by considering all profiles when adding non-tunnel rule
(rule not added on tunnel, or not redirecting to tunnel).

Example command:
tc filter add dev pf0 ingress protocol ip flower skip_sw action mirred \
	egress redirect dev pr0

It should match also tunneled packets, the same as command with skip_hw
will do in software.

Fixes: 9e300987d4a8 ("ice: VXLAN and Geneve TC support")
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
v1 --> v2:
 * fix commit message sugested by Marcin
---
 drivers/net/ethernet/intel/ice/ice_tc_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
index b890410a2bc0..47f28cd576c6 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
@@ -158,7 +158,7 @@ ice_sw_type_from_tunnel(enum ice_tunnel_type type)
 	case TNL_GTPC:
 		return ICE_SW_TUN_GTPC;
 	default:
-		return ICE_NON_TUN;
+		return ICE_SW_TUN_AND_NON_TUN;
 	}
 }
 
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-10 21:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 10:52 [iwl-net v1] ice: tc: do default match on all profiles Michal Swiatkowski
2024-03-18 18:55 ` Simon Horman
2024-03-25  6:36 ` [Intel-wired-lan] " Buvaneswaran, Sujai
2024-03-29  8:25   ` Michal Swiatkowski
2024-04-01  9:28     ` Buvaneswaran, Sujai
2024-04-05  8:43       ` Michal Swiatkowski
2024-04-10  9:57         ` Michal Swiatkowski
2024-04-10 21:40           ` Tony Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).