netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/5] tcp: add skb->sk to more control packets
@ 2024-10-10 17:48 Eric Dumazet
  2024-10-10 17:48 ` [PATCH v3 net-next 1/5] net: add TIME_WAIT logic to sk_to_full_sk() Eric Dumazet
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Eric Dumazet @ 2024-10-10 17:48 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Martin KaFai Lau, Kuniyuki Iwashima, Neal Cardwell, Brian Vazquez,
	netdev, eric.dumazet, Eric Dumazet

Currently, TCP can set skb->sk for a variety of transmit packets.

However, packets sent on behalf of a TIME_WAIT sockets do not
have an attached socket.

Same issue for RST packets.

We want to change this, in order to increase eBPF program
capabilities.

This is slightly risky, because various layers could
be confused by TIME_WAIT sockets showing up in skb->sk.

v3: also changed sk_const_to_full_sk() to address CI splat in XFRM
Link: https://netdev-3.bots.linux.dev/vmksft-nf-dbg/results/804321/21-conntrack-vrf-sh/stderr
v2: audited all sk_to_full_sk() users and addressed Martin feedback.

Eric Dumazet (5):
  net: add TIME_WAIT logic to sk_to_full_sk()
  net_sched: sch_fq: prepare for TIME_WAIT sockets
  net: add skb_set_owner_edemux() helper
  ipv6: tcp: give socket pointer to control skbs
  ipv4: tcp: give socket pointer to control skbs

 include/linux/bpf-cgroup.h |  2 +-
 include/net/inet_sock.h    |  8 ++++++--
 include/net/ip.h           |  3 ++-
 include/net/sock.h         | 19 +++++++++++++++++++
 net/core/filter.c          |  6 +-----
 net/core/sock.c            |  9 +++------
 net/ipv4/ip_output.c       |  5 ++++-
 net/ipv4/tcp_ipv4.c        |  4 ++--
 net/ipv4/tcp_output.c      |  2 +-
 net/ipv6/tcp_ipv6.c        |  3 +++
 net/sched/sch_fq.c         |  3 ++-
 11 files changed, 44 insertions(+), 20 deletions(-)

-- 
2.47.0.rc1.288.g06298d1525-goog


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-10-15  1:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 17:48 [PATCH v3 net-next 0/5] tcp: add skb->sk to more control packets Eric Dumazet
2024-10-10 17:48 ` [PATCH v3 net-next 1/5] net: add TIME_WAIT logic to sk_to_full_sk() Eric Dumazet
2024-10-11 23:20   ` Kuniyuki Iwashima
2024-10-12  3:32   ` Martin KaFai Lau
2024-10-14 14:01   ` Brian Vazquez
2024-10-14 14:27     ` Eric Dumazet
2024-10-14 15:08       ` Brian Vazquez
     [not found]       ` <CAMzD94TytK5RfDvLKXfxR7nys=voptywE3_3zSFymXNCky0AsQ@mail.gmail.com>
2024-10-14 15:23         ` Eric Dumazet
2024-10-14 15:39           ` Brian Vazquez
2024-10-10 17:48 ` [PATCH v3 net-next 2/5] net_sched: sch_fq: prepare for TIME_WAIT sockets Eric Dumazet
2024-10-11 23:25   ` Kuniyuki Iwashima
2024-10-14 14:05   ` Brian Vazquez
2024-10-10 17:48 ` [PATCH v3 net-next 3/5] net: add skb_set_owner_edemux() helper Eric Dumazet
2024-10-11 23:29   ` Kuniyuki Iwashima
2024-10-14 14:20   ` Brian Vazquez
2024-10-14 14:23     ` Eric Dumazet
2024-10-14 14:34       ` Brian Vazquez
2024-10-10 17:48 ` [PATCH v3 net-next 4/5] ipv6: tcp: give socket pointer to control skbs Eric Dumazet
2024-10-11 23:32   ` Kuniyuki Iwashima
2024-10-14 14:22   ` Brian Vazquez
2024-10-10 17:48 ` [PATCH v3 net-next 5/5] ipv4: " Eric Dumazet
2024-10-11 23:41   ` Kuniyuki Iwashima
2024-10-14 14:23   ` Brian Vazquez
2024-10-15  1:00 ` [PATCH v3 net-next 0/5] tcp: add skb->sk to more control packets patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).