Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
>> > + if (flags & MSG_PEEK && *off >= 0) { >> > + peek_at_off = true; >> > + _off = *off; >> > + } >> >> I think that unlikely() will fit the above condition > Sounds good. Doesn't the compiler implicitly mark branches as unlikely if they do not have an else clause?

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
On Thu, Aug 17, 2017 at 10:11 PM, Matthew Dawson wrote: > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > headers from UDP packets before queueing"), when udp packets are being > peeked the requested extra offset is always 0 as there is no need to skip > the udp header. How

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
On Fri, Aug 18, 2017 at 1:42 PM, Paolo Abeni wrote: > On Fri, 2017-08-18 at 12:39 -0400, Matthew Dawson wrote: >> On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: >> > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: >> > > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Paolo Abeni
On Fri, 2017-08-18 at 12:39 -0400, Matthew Dawson wrote: > On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: > > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: > > > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c > > > index 7b52a380d710..be8982b4f8c0 100644 > > > --- a/

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Matthew Dawson
On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: > > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > > headers from UDP packets before queueing"), when udp packets are being > > peeked the requested extra

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Paolo Abeni
On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > headers from UDP packets before queueing"), when udp packets are being > peeked the requested extra offset is always 0 as there is no need to skip > the udp header. How

[PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-17 Thread Matthew Dawson
Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove headers from UDP packets before queueing"), when udp packets are being peeked the requested extra offset is always 0 as there is no need to skip the udp header. However, when the offset is 0 and the next skb is of length 0, it is