Skip to content

Ability to peek full socket queue

Pavel Emelyanov netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6datagram: Factor out sk queue referencingnet/core/datagram.c+5 -42 replies
2/6datagram: Add offset argument to __skb_recv_datagraminclude/linux/skbuff.h net/core/datagram.c net/ipv4/udp.c +1 more+18 -132 replies
3/6skb: Add skb_peek_next helperinclude/linux/skbuff.h+18 -02 replies
4/6sock: Introduce the SO_PEEK_OFF sock optioninclude/asm-generic/socket.h include/linux/net.h include/net/sock.h +1 more+40 -02 replies
5/6unix: Support peeking offset for datagram and seqpacket socketsnet/unix/af_unix.c+25 -52 replies
6/6unix: Support peeking offset for stream socketsnet/unix/af_unix.c+18 -22 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchEric Dumazet
1/6A-b
2/6A-b
3/6A-b
4/6
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/6] Ability to peek full socket queue

Hi.

This is an attempt to implement the ability to read socket's queue without removing skbs from it. Using MSG_PEEK doesn't work for unix sockets, both dgram and stream.

The proposal is to implement the SO_PEEK_OFF sockopt which specifies an offset in bytes where to start peeking the data from.

I've already sent an example of how this can look, and since nobody objected about the concept itself, here's the "official" v1. This includes all the unix socket types and (hopefully) addresses locking issues David pointed out.