On Mon, Aug 14, 2017 at 2:33 PM, Thiago Macieira
[off-list ref] wrote:
On Monday, 14 August 2017 11:25:23 PDT Willem de Bruijn wrote:
quoted
quoted
Do applications using SOCK_DGRAM rely on the behaviour of skipping over
datagrams that are too short?
It is established behavior. It cannot be ruled out that an application
somewhere depends on it.
Understood.
By the way, what were the usecases for the peek offset feature?
The idea was to be able to peek at application headers of upper
layer protocols and multiplex messages among threads. It proved
so complex even for UDP that we did not attempt the same feature
for TCP. Also, KCM implements demultiplexing using eBPF today.
Also, do they apply to non-peeking recv?
Reading at an offset is not implemented. Especially for RPC over
TCP, reading at an offset could make sense. Say, if a message
is received completely, but it is head-of-line blocked behind
another that has a hole. Here, too, KCM is an alternative.