Re: [PATCH v2] socket.7: Add description of SO_SELECT_ERR_QUEUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ricardo,

On 6/24/19 3:40 AM, Ricardo Biehl Pasquali wrote:
> Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@xxxxxxxxx>
> ---
>  man7/socket.7 | 26 ++++++++++++++++++++++----
>  1 file changed, 22 insertions(+), 4 deletions(-)
> 
> Jonathan, can you help to reach Michael or review yourself?
> Sorry for bothering you.
> 
> It's the fourth time I'm sending this.
> First time was on 2019-02-28.

Sorry -- I've not had a lot of cycles to spare for man-pages of late.

> version 2: Rewrite the description for greater clarity.
> 
> diff --git a/man7/socket.7 b/man7/socket.7
> index b8d053dfe..b43075185 100644
> --- a/man7/socket.7
> +++ b/man7/socket.7
> @@ -49,10 +49,6 @@
>  .\"	commit a8fc92778080c845eaadc369a0ecf5699a03bef0
>  .\"	Author: Pavel Emelyanov <xemul@xxxxxxxxxxxxx>
>  .\"
> -.\" SO_SELECT_ERR_QUEUE (3.10)
> -.\"	commit 7d4c04fc170087119727119074e72445f2bb192b
> -.\"	Author: Keller, Jacob E <jacob.e.keller@xxxxxxxxx>
> -.\"
>  .\" SO_MAX_PACING_RATE (3.13)
>  .\"	commit 62748f32d501f5d3712a7c372bbb92abc7c62bc7
>  .\"	Author: Eric Dumazet <edumazet@xxxxxxxxxx>
> @@ -869,6 +865,28 @@ Indicates that an unsigned 32-bit value ancillary message (cmsg)
>  should be attached to received skbs indicating
>  the number of packets dropped by the socket since its creation.
>  .TP
> +.BR SO_SELECT_ERR_QUEUE " (since Linux 3.10)"
> +.\"	commit 7d4c04fc170087119727119074e72445f2bb192b
> +.\"	Author: Keller, Jacob E <jacob.e.keller@xxxxxxxxx>
> +Makes poll adding
> +.B POLLPRI
> +when
> +.B POLLERR
> +event is returned. It does not affect wake up.
> +.IP
> +Background: The flag was added when waking up on
> +.B POLLERR
> +required requesting
> +.B POLLIN
> +or
> +.B POLLPRI.
> +After the commit 6e5d58fdc9bedd0255a8 ("skbuff: Fix not
> +waking applications when errors are enqueued"), introduced
> +in Linux 4.16, waking up on
> +.B POLLERR
> +does not require requesting other events. The flag is kept
> +only for backwards compatibility.
> +.TP
>  .B SO_SNDBUF
>  Sets or gets the maximum socket send buffer in bytes.
>  The kernel doubles this value (to allow space for bookkeeping overhead)

Thanks for the patch. But your text doesn't quite capture the idea
in this commit message:

commit 7d4c04fc170087119727119074e72445f2bb192b
Author: Keller, Jacob E <jacob.e.keller@xxxxxxxxx>
Date:   Thu Mar 28 11:19:25 2013 +0000

What would you think of something like this:
       SO_SELECT_ERR_QUEUE (since Linux 3.10)
              When this option is set on a socket, an error condition  on
              a socket causes notification not only via the exceptfds set
              of select(2).  Similarly, poll(2) also  returns  a  POLLPRI
              whenever an POLLERR event is returned.

              Background:  this  option  was  added  when waking up on an
              error condition occurred occured only via the  readfds  and
              writefds  sets of select(2).  The option was added to allow
              monitoring for error conditions via the exceptfds  argument
              without simultaneously having to receive notifications (via
              readfds) for regular data that can be read from the socket.
              After changes in Linux 4.16, in Linux 4.16, the use of this
              flag to achieve the desired notifications is no longer nec‐
              essary.  This option is nevertheless retained for backwards
              compatibility.

?

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux