Skip to content

sock cookie initializers

Willem de Bruijn netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ipv4: ipcm_cookie initializersinclude/net/ip.h net/ipv4/icmp.c net/ipv4/ip_output.c +3 more+21 -390 replies
2/6ipv6: ipcm6_cookie initializerinclude/net/ipv6.h net/ipv6/icmp.c net/ipv6/ping.c +3 more+25 -180 replies
3/6sock: sockc cookie initializerinclude/net/sock.h net/ipv4/tcp.c net/packet/af_packet.c+10 -70 replies
4/6ipv6: fold sockcm_cookie into ipcm6_cookieinclude/net/ipv6.h include/net/transp_v6.h net/ipv6/datagram.c +8 more+31 -490 replies
5/6ip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6include/net/ip.h net/ipv4/ip_output.c net/ipv4/ping.c +3 more+10 -180 replies
6/6ip: unconditionally set cork gso_sizenet/ipv4/ip_output.c net/ipv6/ip6_output.c+2 -40 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJesus Sanchez-Palencia
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH net-next 0/6] sock cookie initializers

From: Willem de Bruijn <[email protected]>

Recent UDP GSO and SO_TXTIME features added new fields to cookie structs.

When adding a field, all sites where a struct is initialized have to be updated, which is a lot of boilerplate. Alternatively, a field can be initialized selectively, but this is fragile. I introduced a bug in udp gso where an uninitialized field was read. See also fix commit ("9887cba19978 ip: limit use of gso_size to udp").

Introduce initializers for structs ipcm(6)_cookie and sockc_cookie.

patch 1..3 do exactly this.
patch 4..5 make ipv4 and ipv6 handle cookies the same way and
remove some boilerplate in doing so.
patch 6 removes the udp gso branch that needed the above fix

Willem de Bruijn (6):
ipv4: ipcm_cookie initializers
ipv6: ipcm6_cookie initializer
sock: sockc cookie initializer
ipv6: fold sockcm_cookie into ipcm6_cookie
ip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6
ip: unconditionally set cork gso_size

 include/net/ip.h         | 16 ++++++++++++++-
 include/net/ipv6.h       | 26 ++++++++++++++++++++----
 include/net/sock.h       |  6 ++++++
 include/net/transp_v6.h  |  3 +--
 net/ipv4/icmp.c          | 11 ++--------
 net/ipv4/ip_output.c     | 12 ++++-------
 net/ipv4/ping.c          | 11 +---------
 net/ipv4/raw.c           | 11 +---------
 net/ipv4/tcp.c           |  2 +-
 net/ipv4/udp.c           | 12 +----------
 net/ipv6/datagram.c      |  4 ++--
 net/ipv6/icmp.c          | 14 ++++---------
 net/ipv6/ip6_flowlabel.c |  3 +--
 net/ipv6/ip6_output.c    | 43 +++++++++++++++++-----------------------
 net/ipv6/ipv6_sockglue.c |  3 +--
 net/ipv6/ping.c          |  7 ++-----
 net/ipv6/raw.c           | 15 +++++---------
 net/ipv6/udp.c           | 14 +++++--------
 net/l2tp/l2tp_ip6.c      | 10 +++-------
 net/packet/af_packet.c   |  9 +++------
 20 files changed, 98 insertions(+), 134 deletions(-)
Signature · 1 line
2.18.0.399.gad0ab374a1-goog