Skip to content

net: deduplicate cookie logic

Willem de Bruijn netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 0 repliesApplied 7/7
  2. v27 patches 10 repliesSuperseded
  3. v17 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- rebase, no code changes
- commit messages: apply Reviewed-by from v2 (David Ahern)
- commit messages: move changelog below --- (Paolo Abeni)

Patches in v3 All 7 applied

#Subject and filesSizeRepliesApplied
1/7tcp: only initialize sockcm tsflags fieldnet/ipv4/tcp.c+1 -10 repliesApplied
2/7net: initialize mark in sockcm_initinclude/net/sock.h net/can/raw.c net/packet/af_packet.c+6 -60 repliesApplied
3/7ipv4: initialize inet socket cookies with sockcm_initinclude/net/ip.h+2 -30 repliesApplied
4/7ipv4: remove get_rttosinclude/net/ip.h net/ipv4/ping.c net/ipv4/raw.c +1 more+12 -170 repliesApplied
5/7icmp: reflect tos through ip cookie rather than updating inet_sknet/ipv4/icmp.c+2 -40 repliesApplied
6/7ipv6: replace ipcm6_init calls with ipcm6_init_skinclude/net/ipv6.h net/ipv6/raw.c net/ipv6/udp.c +1 more+3 -290 repliesApplied
7/7ipv6: initialize inet socket cookies with sockcm_initinclude/net/ipv6.h net/ipv6/ping.c net/ipv6/raw.c +1 more+5 -120 repliesApplied

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchDavid Ahern
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/7] net: deduplicate cookie logic

From: Willem de Bruijn <[email protected]>

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.

v2->v3:
- rebase, no code changes
- commit messages: apply Reviewed-by from v2 (David Ahern)
- commit messages: move changelog below --- (Paolo Abeni)
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(-)
Signature · 1 line
2.48.1.601.g30ceb7b040-goog