[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30c45fd5-9725-405b-9ff6-39db994d07d0@redhat.com>
Date: Tue, 15 Apr 2025 16:46:30 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>, Cong Wang <xiyou.wangcong@...il.com>
Cc: Toke Høiland-Jørgensen <toke@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Simon Horman <horms@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] tc: Return an error if filters try to attach too
many actions
On 4/14/25 11:24 PM, Jakub Kicinski wrote:
> On Mon, 14 Apr 2025 14:03:31 -0700 Cong Wang wrote:
>>>> I wonder ENOSPC is a better errno than EINVAL here?
>>>
>>> I think EINVAL is fine, it's the generic "netlink says no" error code.
>>> The string error should be clear enough.
>>
>> IMHO, EINVAL is abused (which is probably why we introduced extack). I
>> prefer to find a better errno than EINVAL whenever possible.
>>
>> Extack is available but it is mostly for human to read, not technically
>> an API for programs to interpret.
>
> How is user space going to interpret the error code here?
> Seems to me that'd mean the user space is both aware of the limit
> and yet trying to send more actions.
FWIW I don't see much value in a more specific error code here. An
application will likely bail the current operation and the end-user will
have to look into the extack to pick enough details on what was possibly
wrong.
/P
Powered by blists - more mailing lists