Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY

2019-02-18 Thread Willem de Bruijn
On Mon, Feb 18, 2019 at 6:35 AM Alexey Kodanev wrote: > > On 15.02.2019 19:58, Willem de Bruijn wrote: > > On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev > > wrote: > >> > >> For unsupported protocols, setsockopt() with SO_ZEROCOPY > >> option sets errno to ENOTSUPP(524). But this number is > >>

Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY

2019-02-18 Thread Alexey Kodanev
On 15.02.2019 19:58, Willem de Bruijn wrote: > On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev > 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

Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY

2019-02-15 Thread Petr Vorel
Hi, > On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev > 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

Re: [PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY

2019-02-15 Thread Willem de Bruijn
On Fri, Feb 15, 2019 at 11:51 AM Alexey Kodanev 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

[PATCH net] sock: return uapi errno in sock_setsockopt() for SO_ZEROCOPY

2019-02-15 Thread Alexey Kodanev
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