netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] net: deduplicate cookie logic
@ 2025-02-12  2:09 Willem de Bruijn
  2025-02-12  2:09 ` [PATCH net-next v2 1/7] tcp: only initialize sockcm tsflags field Willem de Bruijn
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Willem de Bruijn @ 2025-02-12  2:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, edumazet, pabeni, dsahern, horms, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

Reuse standard sk, ip and ipv6 cookie init handlers where possible.

Avoid repeated open coding of the same logic.
Harmonize feature sets across protocols.
Make IPv4 and IPv6 logic more alike.
Simplify adding future new fields with a single init point.

v1->v2:
  - limit INET_DSCP_MASK to routing
  - remove no longer used local variable (fix build warning)

Willem de Bruijn (7):
  tcp: only initialize sockcm tsflags field
  net: initialize mark in sockcm_init
  ipv4: initialize inet socket cookies with sockcm_init
  ipv4: remove get_rttos
  icmp: reflect tos through ip cookie rather than updating inet_sk
  ipv6: replace ipcm6_init calls with ipcm6_init_sk
  ipv6: initialize inet socket cookies with sockcm_init

 include/net/ip.h       | 16 +++++-----------
 include/net/ipv6.h     | 11 ++---------
 include/net/sock.h     |  1 +
 net/can/raw.c          |  2 +-
 net/ipv4/icmp.c        |  6 ++----
 net/ipv4/ping.c        |  6 +++---
 net/ipv4/raw.c         |  6 +++---
 net/ipv4/tcp.c         |  2 +-
 net/ipv4/udp.c         |  6 +++---
 net/ipv6/ping.c        |  3 ---
 net/ipv6/raw.c         | 15 +++------------
 net/ipv6/udp.c         | 10 +---------
 net/l2tp/l2tp_ip6.c    |  8 +-------
 net/packet/af_packet.c |  9 ++++-----
 14 files changed, 30 insertions(+), 71 deletions(-)

-- 
2.48.1.502.g6dc24dfdaf-goog


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

end of thread, other threads:[~2025-02-14 22:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12  2:09 [PATCH net-next v2 0/7] net: deduplicate cookie logic Willem de Bruijn
2025-02-12  2:09 ` [PATCH net-next v2 1/7] tcp: only initialize sockcm tsflags field Willem de Bruijn
2025-02-12  2:09 ` [PATCH net-next v2 2/7] net: initialize mark in sockcm_init Willem de Bruijn
2025-02-13 14:48   ` Paolo Abeni
2025-02-13 15:35     ` Willem de Bruijn
2025-02-13 18:12       ` Paolo Abeni
2025-02-12  2:09 ` [PATCH net-next v2 3/7] ipv4: initialize inet socket cookies with sockcm_init Willem de Bruijn
2025-02-12  2:09 ` [PATCH net-next v2 4/7] ipv4: remove get_rttos Willem de Bruijn
2025-02-13 15:10   ` Paolo Abeni
2025-02-13 16:23     ` Willem de Bruijn
2025-02-13 16:29       ` Willem de Bruijn
2025-02-13 17:23       ` Paolo Abeni
2025-02-12  2:09 ` [PATCH net-next v2 5/7] icmp: reflect tos through ip cookie rather than updating inet_sk Willem de Bruijn
2025-02-12  2:09 ` [PATCH net-next v2 6/7] ipv6: replace ipcm6_init calls with ipcm6_init_sk Willem de Bruijn
2025-02-12  2:09 ` [PATCH net-next v2 7/7] ipv6: initialize inet socket cookies with sockcm_init Willem de Bruijn
2025-02-12 20:11 ` [PATCH net-next v2 0/7] net: deduplicate cookie logic David Ahern
2025-02-14 21:06 ` Jakub Kicinski
2025-02-14 22:34   ` Willem de Bruijn

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).