Skip to content

net: introduce noref sk

Paolo Abeni netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: add support for noref skb->skinclude/linux/skbuff.h net/core/sock.c+36 -03 replies
2/5net: allow early demux to fetch noref socketnet/ipv4/ip_input.c net/ipv4/ipmr.c net/ipv4/netfilter/nf_dup_ipv4.c +3 more+41 -51 reply
3/5udp: do not touch socket refcount in early demuxnet/ipv4/udp.c net/ipv6/udp.c+16 -120 replies
4/5net: add simple socket-like dst cache helpersinclude/net/dst.h net/core/dst.c+28 -00 replies
5/5udp: perform full socket lookup in early demuxinclude/linux/udp.h net/ipv4/udp.c net/ipv6/udp.c+38 -830 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/5] net: introduce noref sk

This series introduce the infrastructure to store inside the skb a socket pointer without carrying a refcount to the socket.

Such infrastructure is then used in the network receive path - and specifically the early demux operation.

This allows the UDP early demux to perform a full lookup for UDP sockets, with many benefits:

- the UDP early demux code is now much simpler
- the early demux does not hit any performance penalties in case of UDP hash table collision - previously the early demux performed a partial, unsuccesful, lookup
- early demux is now operational also for unconnected sockets.

This infrastrcture will be used in follow-up series to allow dst caching for unconnected UDP sockets, and than to extend the same features to TCP listening sockets.

Paolo Abeni (5):
net: add support for noref skb->sk
net: allow early demux to fetch noref socket
udp: do not touch socket refcount in early demux
net: add simple socket-like dst cache helpers
udp: perform full socket lookup in early demux

 include/linux/skbuff.h           | 30 +++++++++++++++
 include/linux/udp.h              |  2 +
 include/net/dst.h                | 12 ++++++
 net/core/dst.c                   | 16 ++++++++
 net/core/sock.c                  |  6 +++
 net/ipv4/ip_input.c              | 12 ++++++
 net/ipv4/ipmr.c                  | 18 +++++++--
 net/ipv4/netfilter/nf_dup_ipv4.c |  3 ++
 net/ipv4/udp.c                   | 80 ++++++++++++++++------------------------
 net/ipv6/ip6_input.c             |  7 +++-
 net/ipv6/netfilter/nf_dup_ipv6.c |  3 ++
 net/ipv6/udp.c                   | 67 ++++++++++-----------------------
 net/netfilter/nf_queue.c         |  3 ++
 13 files changed, 159 insertions(+), 100 deletions(-)
Signature · 1 line
2.13.5