All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-12 10:52 ` Michal Swiatkowski
  0 siblings, 0 replies; 15+ 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] 15+ messages in thread

* [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-12 10:52 ` Michal Swiatkowski
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-03-12 10:52 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev, Marcin Szycik, Michal Kubiak, Michal Swiatkowski

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] 15+ messages in thread

* Re: [iwl-net v1] ice: tc: do default match on all profiles
  2024-03-12 10:52 ` [Intel-wired-lan] " Michal Swiatkowski
@ 2024-03-18 18:55   ` Simon Horman
  -1 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2024-03-18 18:55 UTC (permalink / raw)
  To: Michal Swiatkowski; +Cc: intel-wired-lan, netdev, Marcin Szycik, Michal Kubiak

On Tue, Mar 12, 2024 at 11:52:59AM +0100, Michal Swiatkowski wrote:
> 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>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-18 18:55   ` Simon Horman
  0 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2024-03-18 18:55 UTC (permalink / raw)
  To: Michal Swiatkowski; +Cc: netdev, Marcin Szycik, intel-wired-lan, Michal Kubiak

On Tue, Mar 12, 2024 at 11:52:59AM +0100, Michal Swiatkowski wrote:
> 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>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-03-12 10:52 ` [Intel-wired-lan] " Michal Swiatkowski
@ 2024-03-25  6:36   ` Buvaneswaran, Sujai
  -1 siblings, 0 replies; 15+ messages in thread
From: Buvaneswaran, Sujai @ 2024-03-25  6:36 UTC (permalink / raw)
  To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Marcin Szycik, Kubiak, Michal

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Michal Swiatkowski
> Sent: Tuesday, March 12, 2024 4:23 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Marcin Szycik <marcin.szycik@linux.intel.com>;
> Kubiak, Michal <michal.kubiak@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
> 
> 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(-)
> 
Hi,

We are seeing error while adding HW tc rules on PF with the latest net-queue patches. This issue is blocking the validation of latest net-queue Switchdev patches.

+ tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action mirred egress redirect dev eth0
Error: ice: Unable to add filter due to error.
We have an error talking to the kernel
+ tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action mirred egress redirect dev eth1
Error: ice: Unable to add filter due to error.
We have an error talking to the kernel

Thanks,
Sujai B

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

* RE: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-25  6:36   ` Buvaneswaran, Sujai
  0 siblings, 0 replies; 15+ messages in thread
From: Buvaneswaran, Sujai @ 2024-03-25  6:36 UTC (permalink / raw)
  To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Marcin Szycik, Kubiak, Michal

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Michal Swiatkowski
> Sent: Tuesday, March 12, 2024 4:23 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Marcin Szycik <marcin.szycik@linux.intel.com>;
> Kubiak, Michal <michal.kubiak@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
> 
> 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(-)
> 
Hi,

We are seeing error while adding HW tc rules on PF with the latest net-queue patches. This issue is blocking the validation of latest net-queue Switchdev patches.

+ tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action mirred egress redirect dev eth0
Error: ice: Unable to add filter due to error.
We have an error talking to the kernel
+ tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action mirred egress redirect dev eth1
Error: ice: Unable to add filter due to error.
We have an error talking to the kernel

Thanks,
Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-03-25  6:36   ` Buvaneswaran, Sujai
@ 2024-03-29  8:25     ` Michal Swiatkowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-03-29  8:25 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: netdev@vger.kernel.org, Marcin Szycik,
	intel-wired-lan@lists.osuosl.org, Kubiak, Michal

On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> > Michal Swiatkowski
> > Sent: Tuesday, March 12, 2024 4:23 PM
> > To: intel-wired-lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org; Marcin Szycik <marcin.szycik@linux.intel.com>;
> > Kubiak, Michal <michal.kubiak@intel.com>; Michal Swiatkowski
> > <michal.swiatkowski@linux.intel.com>
> > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
> > 
> > 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(-)
> > 
> Hi,
> 
> We are seeing error while adding HW tc rules on PF with the latest net-queue patches. This issue is blocking the validation of latest net-queue Switchdev patches.
> 
> + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action mirred egress redirect dev eth0
> Error: ice: Unable to add filter due to error.
> We have an error talking to the kernel
> + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action mirred egress redirect dev eth1
> Error: ice: Unable to add filter due to error.
> We have an error talking to the kernel

Hi,

The same command is working fine on my setup. I suspect that it isn't
related to this patch. The change is only in command validation, there
is no functional changes here that can cause error during adding filters
which previously was working fine.

Can you share more information about the setup? It was the first filter
added on the PF? Did you do sth else before checking tc?

Thanks,
Michal
> 
> Thanks,
> Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-03-29  8:25     ` Michal Swiatkowski
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-03-29  8:25 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Marcin Szycik, Kubiak, Michal

On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> > Michal Swiatkowski
> > Sent: Tuesday, March 12, 2024 4:23 PM
> > To: intel-wired-lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org; Marcin Szycik <marcin.szycik@linux.intel.com>;
> > Kubiak, Michal <michal.kubiak@intel.com>; Michal Swiatkowski
> > <michal.swiatkowski@linux.intel.com>
> > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
> > 
> > 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(-)
> > 
> Hi,
> 
> We are seeing error while adding HW tc rules on PF with the latest net-queue patches. This issue is blocking the validation of latest net-queue Switchdev patches.
> 
> + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action mirred egress redirect dev eth0
> Error: ice: Unable to add filter due to error.
> We have an error talking to the kernel
> + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action mirred egress redirect dev eth1
> Error: ice: Unable to add filter due to error.
> We have an error talking to the kernel

Hi,

The same command is working fine on my setup. I suspect that it isn't
related to this patch. The change is only in command validation, there
is no functional changes here that can cause error during adding filters
which previously was working fine.

Can you share more information about the setup? It was the first filter
added on the PF? Did you do sth else before checking tc?

Thanks,
Michal
> 
> Thanks,
> Sujai B

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

* RE: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-03-29  8:25     ` Michal Swiatkowski
@ 2024-04-01  9:28       ` Buvaneswaran, Sujai
  -1 siblings, 0 replies; 15+ messages in thread
From: Buvaneswaran, Sujai @ 2024-04-01  9:28 UTC (permalink / raw)
  To: Michal Swiatkowski
  Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Marcin Szycik, Kubiak, Michal

> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Friday, March 29, 2024 1:56 PM
> To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> profiles
> 
> On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > -----Original Message-----
> > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > Of Michal Swiatkowski
> > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > To: intel-wired-lan@lists.osuosl.org
> > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > <michal.swiatkowski@linux.intel.com>
> > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > all profiles
> > >
> > > 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(-)
> > >
> > Hi,
> >
> > We are seeing error while adding HW tc rules on PF with the latest net-
> queue patches. This issue is blocking the validation of latest net-queue
> Switchdev patches.
> >
> > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > + mirred egress redirect dev eth0
> > Error: ice: Unable to add filter due to error.
> > We have an error talking to the kernel
> > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > + mirred egress redirect dev eth1
> > Error: ice: Unable to add filter due to error.
> > We have an error talking to the kernel
> 
> Hi,
> 
> The same command is working fine on my setup. I suspect that it isn't related
> to this patch. The change is only in command validation, there is no
> functional changes here that can cause error during adding filters which
> previously was working fine.
> 
> Can you share more information about the setup? It was the first filter added
> on the PF? Did you do sth else before checking tc?

Hi Michal,
I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
'Script A' from below link.
https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/

This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.

Thanks,
Sujai B
> 
> Thanks,
> Michal
> >
> > Thanks,
> > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-04-01  9:28       ` Buvaneswaran, Sujai
  0 siblings, 0 replies; 15+ messages in thread
From: Buvaneswaran, Sujai @ 2024-04-01  9:28 UTC (permalink / raw)
  To: Michal Swiatkowski
  Cc: netdev@vger.kernel.org, Marcin Szycik,
	intel-wired-lan@lists.osuosl.org, Kubiak, Michal

> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Friday, March 29, 2024 1:56 PM
> To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> profiles
> 
> On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > -----Original Message-----
> > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > Of Michal Swiatkowski
> > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > To: intel-wired-lan@lists.osuosl.org
> > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > <michal.swiatkowski@linux.intel.com>
> > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > all profiles
> > >
> > > 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(-)
> > >
> > Hi,
> >
> > We are seeing error while adding HW tc rules on PF with the latest net-
> queue patches. This issue is blocking the validation of latest net-queue
> Switchdev patches.
> >
> > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > + mirred egress redirect dev eth0
> > Error: ice: Unable to add filter due to error.
> > We have an error talking to the kernel
> > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > + mirred egress redirect dev eth1
> > Error: ice: Unable to add filter due to error.
> > We have an error talking to the kernel
> 
> Hi,
> 
> The same command is working fine on my setup. I suspect that it isn't related
> to this patch. The change is only in command validation, there is no
> functional changes here that can cause error during adding filters which
> previously was working fine.
> 
> Can you share more information about the setup? It was the first filter added
> on the PF? Did you do sth else before checking tc?

Hi Michal,
I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
'Script A' from below link.
https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/

This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.

Thanks,
Sujai B
> 
> Thanks,
> Michal
> >
> > Thanks,
> > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-04-01  9:28       ` Buvaneswaran, Sujai
@ 2024-04-05  8:43         ` Michal Swiatkowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-04-05  8:43 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Marcin Szycik, Kubiak, Michal

On Mon, Apr 01, 2024 at 09:28:30AM +0000, Buvaneswaran, Sujai wrote:
> > -----Original Message-----
> > From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > Sent: Friday, March 29, 2024 1:56 PM
> > To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> > Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> > <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> > Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> > profiles
> > 
> > On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > > -----Original Message-----
> > > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > > Of Michal Swiatkowski
> > > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > > To: intel-wired-lan@lists.osuosl.org
> > > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > > <michal.swiatkowski@linux.intel.com>
> > > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > > all profiles
> > > >
> > > > 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(-)
> > > >
> > > Hi,
> > >
> > > We are seeing error while adding HW tc rules on PF with the latest net-
> > queue patches. This issue is blocking the validation of latest net-queue
> > Switchdev patches.
> > >
> > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > > + mirred egress redirect dev eth0
> > > Error: ice: Unable to add filter due to error.
> > > We have an error talking to the kernel
> > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > > + mirred egress redirect dev eth1
> > > Error: ice: Unable to add filter due to error.
> > > We have an error talking to the kernel
> > 
> > Hi,
> > 
> > The same command is working fine on my setup. I suspect that it isn't related
> > to this patch. The change is only in command validation, there is no
> > functional changes here that can cause error during adding filters which
> > previously was working fine.
> > 
> > Can you share more information about the setup? It was the first filter added
> > on the PF? Did you do sth else before checking tc?
> 
> Hi Michal,
> I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
> 'Script A' from below link.
> https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/
> 
> This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.
> 

I tried script from the link and it is working. I am aware of the
problem when the same rule is being added with different destination.
Are you sure there are no more exsisting rule before calling the script?
In the script VFs are removed, but PF qdisc isn't removed. Old rule can
exsist there. I suggest to add sth like, before adding new qdiscs:
$tc qdisc del dev $PF1 ingress

I tested on 6.9.0-rc1+ kernel.

Thanks,
Michal
> Thanks,
> Sujai B
> > 
> > Thanks,
> > Michal
> > >
> > > Thanks,
> > > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-04-05  8:43         ` Michal Swiatkowski
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-04-05  8:43 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: netdev@vger.kernel.org, Marcin Szycik,
	intel-wired-lan@lists.osuosl.org, Kubiak, Michal

On Mon, Apr 01, 2024 at 09:28:30AM +0000, Buvaneswaran, Sujai wrote:
> > -----Original Message-----
> > From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > Sent: Friday, March 29, 2024 1:56 PM
> > To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> > Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> > <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> > Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> > profiles
> > 
> > On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > > -----Original Message-----
> > > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > > Of Michal Swiatkowski
> > > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > > To: intel-wired-lan@lists.osuosl.org
> > > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > > <michal.swiatkowski@linux.intel.com>
> > > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > > all profiles
> > > >
> > > > 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(-)
> > > >
> > > Hi,
> > >
> > > We are seeing error while adding HW tc rules on PF with the latest net-
> > queue patches. This issue is blocking the validation of latest net-queue
> > Switchdev patches.
> > >
> > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > > + mirred egress redirect dev eth0
> > > Error: ice: Unable to add filter due to error.
> > > We have an error talking to the kernel
> > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > > + mirred egress redirect dev eth1
> > > Error: ice: Unable to add filter due to error.
> > > We have an error talking to the kernel
> > 
> > Hi,
> > 
> > The same command is working fine on my setup. I suspect that it isn't related
> > to this patch. The change is only in command validation, there is no
> > functional changes here that can cause error during adding filters which
> > previously was working fine.
> > 
> > Can you share more information about the setup? It was the first filter added
> > on the PF? Did you do sth else before checking tc?
> 
> Hi Michal,
> I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
> 'Script A' from below link.
> https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/
> 
> This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.
> 

I tried script from the link and it is working. I am aware of the
problem when the same rule is being added with different destination.
Are you sure there are no more exsisting rule before calling the script?
In the script VFs are removed, but PF qdisc isn't removed. Old rule can
exsist there. I suggest to add sth like, before adding new qdiscs:
$tc qdisc del dev $PF1 ingress

I tested on 6.9.0-rc1+ kernel.

Thanks,
Michal
> Thanks,
> Sujai B
> > 
> > Thanks,
> > Michal
> > >
> > > Thanks,
> > > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-04-05  8:43         ` Michal Swiatkowski
@ 2024-04-10  9:57           ` Michal Swiatkowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-04-10  9:57 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Marcin Szycik, Kubiak, Michal

On Fri, Apr 05, 2024 at 10:43:04AM +0200, Michal Swiatkowski wrote:
> On Mon, Apr 01, 2024 at 09:28:30AM +0000, Buvaneswaran, Sujai wrote:
> > > -----Original Message-----
> > > From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > > Sent: Friday, March 29, 2024 1:56 PM
> > > To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> > > Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> > > <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> > > Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> > > profiles
> > > 
> > > On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > > > -----Original Message-----
> > > > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > > > Of Michal Swiatkowski
> > > > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > > > To: intel-wired-lan@lists.osuosl.org
> > > > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > > > <michal.swiatkowski@linux.intel.com>
> > > > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > > > all profiles
> > > > >
> > > > > 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(-)
> > > > >
> > > > Hi,
> > > >
> > > > We are seeing error while adding HW tc rules on PF with the latest net-
> > > queue patches. This issue is blocking the validation of latest net-queue
> > > Switchdev patches.
> > > >
> > > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > > > + mirred egress redirect dev eth0
> > > > Error: ice: Unable to add filter due to error.
> > > > We have an error talking to the kernel
> > > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > > > + mirred egress redirect dev eth1
> > > > Error: ice: Unable to add filter due to error.
> > > > We have an error talking to the kernel
> > > 
> > > Hi,
> > > 
> > > The same command is working fine on my setup. I suspect that it isn't related
> > > to this patch. The change is only in command validation, there is no
> > > functional changes here that can cause error during adding filters which
> > > previously was working fine.
> > > 
> > > Can you share more information about the setup? It was the first filter added
> > > on the PF? Did you do sth else before checking tc?
> > 
> > Hi Michal,
> > I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
> > 'Script A' from below link.
> > https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/
> > 
> > This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.
> > 
> 
> I tried script from the link and it is working. I am aware of the
> problem when the same rule is being added with different destination.
> Are you sure there are no more exsisting rule before calling the script?
> In the script VFs are removed, but PF qdisc isn't removed. Old rule can
> exsist there. I suggest to add sth like, before adding new qdiscs:
> $tc qdisc del dev $PF1 ingress
> 
> I tested on 6.9.0-rc1+ kernel.
> 

I have found the problem. I was using different DDP package.

The problem is with lack of free indexes in profiles when matching is
done on both tunnel and not tunnel packet (so all profiles are
considered). For now please Tony remove it from next-queue. I am trying
to figure out how to implement matching on all profiles using less
indexes. If I find the correct way I will submit new patch.

Thanks

> Thanks,
> Michal
> > Thanks,
> > Sujai B
> > > 
> > > Thanks,
> > > Michal
> > > >
> > > > Thanks,
> > > > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
@ 2024-04-10  9:57           ` Michal Swiatkowski
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Swiatkowski @ 2024-04-10  9:57 UTC (permalink / raw)
  To: Buvaneswaran, Sujai
  Cc: netdev@vger.kernel.org, Marcin Szycik,
	intel-wired-lan@lists.osuosl.org, Kubiak, Michal

On Fri, Apr 05, 2024 at 10:43:04AM +0200, Michal Swiatkowski wrote:
> On Mon, Apr 01, 2024 at 09:28:30AM +0000, Buvaneswaran, Sujai wrote:
> > > -----Original Message-----
> > > From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > > Sent: Friday, March 29, 2024 1:56 PM
> > > To: Buvaneswaran, Sujai <sujai.buvaneswaran@intel.com>
> > > Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Marcin Szycik
> > > <marcin.szycik@linux.intel.com>; Kubiak, Michal <michal.kubiak@intel.com>
> > > Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all
> > > profiles
> > > 
> > > On Mon, Mar 25, 2024 at 06:36:56AM +0000, Buvaneswaran, Sujai wrote:
> > > > > -----Original Message-----
> > > > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > > > > Of Michal Swiatkowski
> > > > > Sent: Tuesday, March 12, 2024 4:23 PM
> > > > > To: intel-wired-lan@lists.osuosl.org
> > > > > Cc: netdev@vger.kernel.org; Marcin Szycik
> > > > > <marcin.szycik@linux.intel.com>; Kubiak, Michal
> > > > > <michal.kubiak@intel.com>; Michal Swiatkowski
> > > > > <michal.swiatkowski@linux.intel.com>
> > > > > Subject: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on
> > > > > all profiles
> > > > >
> > > > > 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(-)
> > > > >
> > > > Hi,
> > > >
> > > > We are seeing error while adding HW tc rules on PF with the latest net-
> > > queue patches. This issue is blocking the validation of latest net-queue
> > > Switchdev patches.
> > > >
> > > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:01 skip_sw action
> > > > + mirred egress redirect dev eth0
> > > > Error: ice: Unable to add filter due to error.
> > > > We have an error talking to the kernel
> > > > + tc filter add dev ens5f0np0 ingress protocol ip prio 1 flower
> > > > + src_mac b4:96:91:9f:65:58 dst_mac 52:54:00:00:16:02 skip_sw action
> > > > + mirred egress redirect dev eth1
> > > > Error: ice: Unable to add filter due to error.
> > > > We have an error talking to the kernel
> > > 
> > > Hi,
> > > 
> > > The same command is working fine on my setup. I suspect that it isn't related
> > > to this patch. The change is only in command validation, there is no
> > > functional changes here that can cause error during adding filters which
> > > previously was working fine.
> > > 
> > > Can you share more information about the setup? It was the first filter added
> > > on the PF? Did you do sth else before checking tc?
> > 
> > Hi Michal,
> > I have used the setup with latest upstream dev-queue kernel and this issue is observed while adding HW tc rules on PF using
> > 'Script A' from below link.
> > https://edc.intel.com/content/www/us/en/design/products/ethernet/appnote-e810-eswitch-switchdev-mode-config-guide/script-a-switchdev-mode-with-linux-bridge-configuration/
> > 
> > This issue is reproducible on two of our setups with latest upstream kernel - 6.9.0-rc1+. Please check and let me know if more information is needed.
> > 
> 
> I tried script from the link and it is working. I am aware of the
> problem when the same rule is being added with different destination.
> Are you sure there are no more exsisting rule before calling the script?
> In the script VFs are removed, but PF qdisc isn't removed. Old rule can
> exsist there. I suggest to add sth like, before adding new qdiscs:
> $tc qdisc del dev $PF1 ingress
> 
> I tested on 6.9.0-rc1+ kernel.
> 

I have found the problem. I was using different DDP package.

The problem is with lack of free indexes in profiles when matching is
done on both tunnel and not tunnel packet (so all profiles are
considered). For now please Tony remove it from next-queue. I am trying
to figure out how to implement matching on all profiles using less
indexes. If I find the correct way I will submit new patch.

Thanks

> Thanks,
> Michal
> > Thanks,
> > Sujai B
> > > 
> > > Thanks,
> > > Michal
> > > >
> > > > Thanks,
> > > > Sujai B

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

* Re: [Intel-wired-lan] [iwl-net v1] ice: tc: do default match on all profiles
  2024-04-10  9:57           ` Michal Swiatkowski
  (?)
@ 2024-04-10 21:40           ` Tony Nguyen
  -1 siblings, 0 replies; 15+ messages in thread
From: Tony Nguyen @ 2024-04-10 21:40 UTC (permalink / raw)
  To: Michal Swiatkowski, Buvaneswaran, Sujai
  Cc: netdev@vger.kernel.org, Marcin Szycik,
	intel-wired-lan@lists.osuosl.org, Kubiak, Michal



On 4/10/2024 2:57 AM, Michal Swiatkowski wrote:
> For now please Tony remove it from next-queue. I am trying
> to figure out how to implement matching on all profiles using less
> indexes. If I find the correct way I will submit new patch.

Patch has been dropped.

Thanks,
Tony

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

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

Thread overview: 15+ 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-12 10:52 ` [Intel-wired-lan] " Michal Swiatkowski
2024-03-18 18:55 ` Simon Horman
2024-03-18 18:55   ` [Intel-wired-lan] " Simon Horman
2024-03-25  6:36 ` Buvaneswaran, Sujai
2024-03-25  6:36   ` Buvaneswaran, Sujai
2024-03-29  8:25   ` Michal Swiatkowski
2024-03-29  8:25     ` Michal Swiatkowski
2024-04-01  9:28     ` Buvaneswaran, Sujai
2024-04-01  9:28       ` Buvaneswaran, Sujai
2024-04-05  8:43       ` Michal Swiatkowski
2024-04-05  8:43         ` Michal Swiatkowski
2024-04-10  9:57         ` Michal Swiatkowski
2024-04-10  9:57           ` Michal Swiatkowski
2024-04-10 21:40           ` Tony Nguyen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.