[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF=yD-LfPvX--7Y79LD_8jmnxPh8yK8fEukhVNA+HBpR6e09-w@mail.gmail.com>
Date: Mon, 18 Feb 2019 11:04:40 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Alexey Kodanev <alexey.kodanev@...cle.com>
Cc: Network Development <netdev@...r.kernel.org>,
Petr Vorel <pvorel@...e.cz>, David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY
On Mon, Feb 18, 2019 at 6:35 AM Alexey Kodanev
<alexey.kodanev@...cle.com> wrote:
>
> On 15.02.2019 19:58, Willem de Bruijn wrote:
> > On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev
> > <alexey.kodanev@...cle.com> wrote:
> >>
> >> For unsupported protocols, setsockopt() with SO_ZEROCOPY
> >> option sets errno to ENOTSUPP(524). But this number is
> >> not defined anywhere in the include/uapi/ headers.
> >>
> >> To make sure userspace sees the known number, replace
> >> ENOTSUPP(524) with EOPNOTSUPP(95).
> >>
> >> Fixes: 76851d1212c1 ("sock: add SOCK_ZEROCOPY sockopt")
> >> Signed-off-by: Alexey Kodanev <alexey.kodanev@...cle.com>
> >> Reported-by: Petr Vorel <pvorel@...e.cz>
> >
> > This code has been there since 4.14. I think it's too late to change
> > system call behavior.
> >
>
> 'ENOTSUPP' define is solely for an internal usage, it may be replaced
> with another one or the number associated with it may be changed one day,
> implicitly changing the behavior of setsockopt().
I understand, and this was an error on my part.
But I'm afraid that it is already used by other interfaces, as well.
And indeed in that capacity expected by tests. See for instance
tools/testing/selftests/bpf/test_sock_addr.c
Powered by blists - more mailing lists