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

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

 



Hi Ricardo,
On Tue, 26 Feb 2019 at 19:57, Ricardo Biehl Pasquali
<pasqualirb@xxxxxxxxx> wrote:
>
> On Mon, Feb 25, 2019 at 05:07:25PM +0100, Michael Kerrisk wrote:
> > On Tue, 5 Feb 2019 at 20:08, Ricardo Biehl Pasquali wrote:
> > > +.BR SO_SELECT_ERR_QUEUE " (since Linux 3.10)"
> > > +.\"    commit 7d4c04fc170087119727119074e72445f2bb192b
> > > +.\"    Author: Keller, Jacob E <jacob.e.keller@xxxxxxxxx>
> > > +Masks
> > > +.B POLLPRI
> > > +with
> > > +.B POLLERR
> > > +event return.
> >
> > What does "Masks... with" mean? It's not clear to me.
>
> Let me rewrite the sentence:
>
>   The flag SO_SELECT_ERR_QUEUE results in poll returning
>   (POLLERR | POLLPRI) whenever it would return POLLERR.
>
> > Does "This was created when" mean "This flag was added when"?
>
> Yes.
>
> > > +.B POLLERR
> > > +wake up depended on requesting
> > > +.B POLLIN
> > > +or
> > > +.BR POLLPRI .
> > > +After the commit 6e5d58fdc9bedd0255a8 ("skbuff: Fix not
> > > +waking applications when errors are enqueued"), introduced
> > > +in Linux 4.16,
> > > +.B POLLERR
> > > +wakes up normally.
> > > +The option has no effect in wake up behavior, all it does
> > > +is masking
> > > +.B POLLPRI
> > > +before poll returns.
> >
> > So, I'm not sure if I quite understand the text above. Do you mean
> > that since Linux 4.16, SO_SELECT_ERR_QUEUE is no longere needed for
> > its original purpose and that now its only effect is to "mask
> > POLLPRI"? (And still, it's not clear to me what "masking POLLPRI"
> > means.)
>
> Ok, let me rewrite everything:
>
>   SO_SELECT_ERR_QUEUE makes poll adding POLLPRI when POLLERR
>   event is returned. It does not affect wake up.
>
>   Background: The flag was added when waking up on POLLERR
>   required requesting POLLIN or POLLPRI. After the commit
>   6e5d58fdc9bedd0255a8 ("skbuff: Fix not waking applications
>   when errors are enqueued"), introduced in Linux 4.16,
>   waking up on POLLERR does not require requesting other
>   events.

Will you write another patch then?

I think the text could also more explicitly point out that
SO_SELECT_ERR_QUEUE is nowadays only required for backwards
compatibility (right?).

> One more thing, the flag's effect seems to apply only for
> some types of socket (perhaps only datagram ones?). Jacob?
> <https://git.kernel.org/pub/scm/linux/kernel/git/davem/
> net.git/diff/?h=7d4c04fc1700>.
>
> The intention is to have a short and simple description that
> explain it all.

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