[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLo7xoB3NR-0goSH+buLZ2ekXPBUCGWLOSMWGLDfHL5ug@mail.gmail.com>
Date: Thu, 14 Dec 2023 17:20:43 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
Kuniyuki Iwashima <kuni1840@...il.com>, bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v6 bpf-next 2/6] tcp: Move skb_steal_sock() to request_sock.h
On Thu, Dec 14, 2023 at 4:55 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> We will support arbitrary SYN Cookie with BPF.
>
> If BPF prog validates ACK and kfunc allocates a reqsk, it will
> be carried to TCP stack as skb->sk with req->syncookie 1.
>
> In skb_steal_sock(), we need to check inet_reqsk(sk)->syncookie
> to see if the reqsk is created by kfunc. However, inet_reqsk()
> is not available in sock.h.
>
> Let's move skb_steal_sock() to request_sock.h.
>
> While at it, we refactor skb_steal_sock() so it returns early if
> skb->sk is NULL to minimise the following patch.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists