* [PATCH iwl-next] ice: improve error message for insufficient filter space
@ 2025-03-14 8:11 Martyna Szapar-Mudlaw
2025-03-19 12:17 ` Simon Horman
2025-04-11 10:44 ` Buvaneswaran, Sujai
0 siblings, 2 replies; 5+ messages in thread
From: Martyna Szapar-Mudlaw @ 2025-03-14 8:11 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, Martyna Szapar-Mudlaw, Michal Swiatkowski
When adding a rule to switch through tc, if the operation fails
due to not enough free recipes (-ENOSPC), provide a clearer
error message: "Unable to add filter: insufficient space available."
This improves user feedback by distinguishing space limitations from
other generic failures.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
---
drivers/net/ethernet/intel/ice/ice_tc_lib.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
index ea39b999a0d0..5acfa72fe7d8 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
@@ -846,6 +846,9 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr)
NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter because it already exist");
ret = -EINVAL;
goto exit;
+ } else if (ret == -ENOSPC) {
+ NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter: insufficient space available.");
+ goto exit;
} else if (ret) {
NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter due to error");
goto exit;
@@ -1071,6 +1074,10 @@ ice_add_tc_flower_adv_fltr(struct ice_vsi *vsi,
"Unable to add filter because it already exist");
ret = -EINVAL;
goto exit;
+ } else if (ret == -ENOSPC) {
+ NL_SET_ERR_MSG_MOD(tc_fltr->extack,
+ "Unable to add filter: insufficient space available.");
+ goto exit;
} else if (ret) {
NL_SET_ERR_MSG_MOD(tc_fltr->extack,
"Unable to add filter due to error");
--
2.47.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH iwl-next] ice: improve error message for insufficient filter space
2025-03-14 8:11 [PATCH iwl-next] ice: improve error message for insufficient filter space Martyna Szapar-Mudlaw
@ 2025-03-19 12:17 ` Simon Horman
2025-04-01 9:49 ` [Intel-wired-lan] " Buvaneswaran, Sujai
2025-04-11 10:44 ` Buvaneswaran, Sujai
1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2025-03-19 12:17 UTC (permalink / raw)
To: Martyna Szapar-Mudlaw; +Cc: intel-wired-lan, netdev, Michal Swiatkowski
On Fri, Mar 14, 2025 at 09:11:11AM +0100, Martyna Szapar-Mudlaw wrote:
> When adding a rule to switch through tc, if the operation fails
> due to not enough free recipes (-ENOSPC), provide a clearer
> error message: "Unable to add filter: insufficient space available."
>
> This improves user feedback by distinguishing space limitations from
> other generic failures.
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for insufficient filter space
2025-03-19 12:17 ` Simon Horman
@ 2025-04-01 9:49 ` Buvaneswaran, Sujai
2025-04-03 9:51 ` Szapar-Mudlaw, Martyna
0 siblings, 1 reply; 5+ messages in thread
From: Buvaneswaran, Sujai @ 2025-04-01 9:49 UTC (permalink / raw)
To: Simon Horman, Martyna Szapar-Mudlaw
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Michal Swiatkowski
Hi,
I tried to add tc rules to the HW beyond the maximum limit and still noticing the below error message instead of error message mentioned in the patch.
[root@dell-cnv-sut ~]# tc filter add dev ens5f0np0 ingress protocol ip prio 0 flower skip_sw dst_mac 00:f0:01:00:00:0E action mirred egress redirect dev ens5f0npf0vf0
Error: ice: Unable to add filter due to error.
We have an error talking to the kernel
[root@dell-cnv-sut ~]# tc filter show dev ens5f0np0 root | grep -c in_hw
16306
Please check it.
Thanks,
Sujai B
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Simon Horman
> Sent: Wednesday, March 19, 2025 5:48 PM
> To: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Michal
> Swiatkowski <michal.swiatkowski@linux.intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for
> insufficient filter space
>
> On Fri, Mar 14, 2025 at 09:11:11AM +0100, Martyna Szapar-Mudlaw wrote:
> > When adding a rule to switch through tc, if the operation fails due to
> > not enough free recipes (-ENOSPC), provide a clearer error message:
> > "Unable to add filter: insufficient space available."
> >
> > This improves user feedback by distinguishing space limitations from
> > other generic failures.
> >
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > Signed-off-by: Martyna Szapar-Mudlaw
> > <martyna.szapar-mudlaw@linux.intel.com>
>
> Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for insufficient filter space
2025-04-01 9:49 ` [Intel-wired-lan] " Buvaneswaran, Sujai
@ 2025-04-03 9:51 ` Szapar-Mudlaw, Martyna
0 siblings, 0 replies; 5+ messages in thread
From: Szapar-Mudlaw, Martyna @ 2025-04-03 9:51 UTC (permalink / raw)
To: Buvaneswaran, Sujai, Simon Horman
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Michal Swiatkowski
Hi Sujai,
I reverified the issue, and with the patch, I am now getting the correct
error about insufficient space, when attempting to add to many rules.
The error you’re encountering might be caused by a different issue.
Could you please test it again or send me offline the set of rules you
are adding? It seems to be working fine on my side.
Regards,
Martyna
On 4/1/2025 11:49 AM, Buvaneswaran, Sujai wrote:
> Hi,
>
> I tried to add tc rules to the HW beyond the maximum limit and still noticing the below error message instead of error message mentioned in the patch.
>
> [root@dell-cnv-sut ~]# tc filter add dev ens5f0np0 ingress protocol ip prio 0 flower skip_sw dst_mac 00:f0:01:00:00:0E action mirred egress redirect dev ens5f0npf0vf0
> Error: ice: Unable to add filter due to error.
> We have an error talking to the kernel
>
> [root@dell-cnv-sut ~]# tc filter show dev ens5f0np0 root | grep -c in_hw
> 16306
>
> Please check it.
>
> Thanks,
> Sujai B
>
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
>> Simon Horman
>> Sent: Wednesday, March 19, 2025 5:48 PM
>> To: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
>> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Michal
>> Swiatkowski <michal.swiatkowski@linux.intel.com>
>> Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for
>> insufficient filter space
>>
>> On Fri, Mar 14, 2025 at 09:11:11AM +0100, Martyna Szapar-Mudlaw wrote:
>>> When adding a rule to switch through tc, if the operation fails due to
>>> not enough free recipes (-ENOSPC), provide a clearer error message:
>>> "Unable to add filter: insufficient space available."
>>>
>>> This improves user feedback by distinguishing space limitations from
>>> other generic failures.
>>>
>>> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>>> Signed-off-by: Martyna Szapar-Mudlaw
>>> <martyna.szapar-mudlaw@linux.intel.com>
>>
>> Reviewed-by: Simon Horman <horms@kernel.org>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for insufficient filter space
2025-03-14 8:11 [PATCH iwl-next] ice: improve error message for insufficient filter space Martyna Szapar-Mudlaw
2025-03-19 12:17 ` Simon Horman
@ 2025-04-11 10:44 ` Buvaneswaran, Sujai
1 sibling, 0 replies; 5+ messages in thread
From: Buvaneswaran, Sujai @ 2025-04-11 10:44 UTC (permalink / raw)
To: Martyna Szapar-Mudlaw, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Michal Swiatkowski
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Martyna Szapar-Mudlaw
> Sent: Friday, March 14, 2025 1:41 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Martyna Szapar-Mudlaw <martyna.szapar-
> mudlaw@linux.intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next] ice: improve error message for
> insufficient filter space
>
> When adding a rule to switch through tc, if the operation fails due to not
> enough free recipes (-ENOSPC), provide a clearer error message: "Unable to
> add filter: insufficient space available."
>
> This improves user feedback by distinguishing space limitations from other
> generic failures.
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-
> mudlaw@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_tc_lib.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-11 10:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 8:11 [PATCH iwl-next] ice: improve error message for insufficient filter space Martyna Szapar-Mudlaw
2025-03-19 12:17 ` Simon Horman
2025-04-01 9:49 ` [Intel-wired-lan] " Buvaneswaran, Sujai
2025-04-03 9:51 ` Szapar-Mudlaw, Martyna
2025-04-11 10:44 ` Buvaneswaran, Sujai
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).