[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5978c86-5271-4699-bb7d-92e3f2e2b9be@oracle.com>
Date: Mon, 1 Sep 2025 15:29:49 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: Jeremy Kerr <jk@...econstruct.com.au>, matt@...econstruct.com.au,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, netdev@...r.kernel.org
Cc: alok.a.tiwari@...cle.com
Subject: Re: [QUERY] mctp: getsockopt unknown option return code -EINVAL
On 9/1/2025 12:54 PM, Jeremy Kerr wrote:
> Hi Alok,
>
>> Would it be ideal to return -ENOPROTOOPT instead of -EINVAL in
>> mctp_getsockopt() when an option is unrecognized?
>> This would match the behavior of mctp_setsockopt() and follow the
>> standard kernel socket API convention for unknown options.
>
> Yes, I think this makes sense, and probably extended to the level !=
> SOL_MCTP checks too.
>
> Is there a particular path you're looking at here?
>
> Cheers,
>
>
> Jeremy
Thanks Jeremy.
I was not looking at a specific path, I just noticed the inconsistency
in the return codes between getsockopt and setsockopt.
Extending this to the level != SOL_MCTP case would also require changes
in the mctp_setsockopt() API.
Would it be better to handle that in a separate patch? For now,
I can limit this change to mctp_getsockopt() as "returning -ENOPROTOOPT
instead of -EINVAL".
Also, would it be fine if I send this patch to [net-next] without a
Fixes tag?
Thanks,
Alok
Powered by blists - more mailing lists