mbox series

[v2,net-next,0/8] tcp: Clean up and refactor cookie_v[46]_check().

Message ID 20231125011638.72056-1-kuniyu@amazon.com (mailing list archive)
Headers show
Series tcp: Clean up and refactor cookie_v[46]_check(). | expand

Message

Kuniyuki Iwashima Nov. 25, 2023, 1:16 a.m. UTC
This is a preparation series for upcoming arbitrary SYN Cookie
support with BPF. [0]

There are slight differences between cookie_v[46]_check().  Such a
discrepancy caused an issue in the past, and BPF SYN Cookie support
will add more churn.

The primary purpose of this series is to clean up and refactor
cookie_v[46]_check() to minimise such discrepancies and make the
BPF series easier to review.

[0]: https://lore.kernel.org/netdev/20231121184245.69569-1-kuniyu@amazon.com/


Changes:
  v2:
    Patch 7: Remove duplicated treq->syn_tos init (Simon Horman)

  v1: https://lore.kernel.org/netdev/20231123012521.62841-1-kuniyu@amazon.com/


Kuniyuki Iwashima (8):
  tcp: Clean up reverse xmas tree in cookie_v[46]_check().
  tcp: Cache sock_net(sk) in cookie_v[46]_check().
  tcp: Clean up goto labels in cookie_v[46]_check().
  tcp: Don't pass cookie to __cookie_v[46]_check().
  tcp: Don't initialise tp->tsoffset in tcp_get_cookie_sock().
  tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().
  tcp: Factorise cookie-independent fields initialisation in
    cookie_v[46]_check().
  tcp: Factorise cookie-dependent fields initialisation in
    cookie_v[46]_check()

 include/linux/netfilter_ipv6.h   |   8 +-
 include/net/tcp.h                |  22 ++--
 include/net/tcp_ao.h             |   6 +-
 net/core/filter.c                |  15 +--
 net/ipv4/syncookies.c            | 215 ++++++++++++++++---------------
 net/ipv4/tcp_ao.c                |  16 ++-
 net/ipv6/syncookies.c            | 108 +++++++---------
 net/netfilter/nf_synproxy_core.c |   4 +-
 8 files changed, 198 insertions(+), 196 deletions(-)

Comments

Eric Dumazet Nov. 28, 2023, 10:16 a.m. UTC | #1
On Sat, Nov 25, 2023 at 2:16 AM Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
>
> This is a preparation series for upcoming arbitrary SYN Cookie
> support with BPF. [0]
>
> There are slight differences between cookie_v[46]_check().  Such a
> discrepancy caused an issue in the past, and BPF SYN Cookie support
> will add more churn.
>
> The primary purpose of this series is to clean up and refactor
> cookie_v[46]_check() to minimise such discrepancies and make the
> BPF series easier to review.
>
> [0]: https://lore.kernel.org/netdev/20231121184245.69569-1-kuniyu@amazon.com/
>

I am back to wrk, and will review this series today, thanks !