Thread (31 messages) 31 messages, 5 authors, 2017-08-17

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

flat view

From: Thiago Macieira <hidden>
Date: 2017-08-14 16:07:06

On Monday, 14 August 2017 08:03:50 PDT Willem de Bruijn wrote:
quoted
I'm actually surprised that only unix sockets can have negative values. 
Is
there a reason for that?  I had assumed that sk_set_peek_off would allow
negative values as the code already has to support negative values due to
what the initial value is.
A negative initial value indicates that PEEK_OFF is disabled. It only
makes sense to peek from a positive offset from the start of the data.
But here's a question: if the peek offset is equal to the length, should the 
reading return an empty datagram? This would indicate to the caller that there 
was a datagram there, which was skipped over.

That's how we deal with empty datagrams anyway.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help