netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Willem de Bruijn <willemb@google.com>
Subject: [PATCH net-next 0/6] sock cookie initializers
Date: Fri,  6 Jul 2018 10:12:53 -0400	[thread overview]
Message-ID: <20180706141259.29295-1-willemdebruijn.kernel@gmail.com> (raw)

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

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

-- 
2.18.0.399.gad0ab374a1-goog

             reply	other threads:[~2018-07-06 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 14:12 Willem de Bruijn [this message]
2018-07-06 14:12 ` [PATCH net-next 1/6] ipv4: ipcm_cookie initializers Willem de Bruijn
2018-07-06 14:12 ` [PATCH net-next 2/6] ipv6: ipcm6_cookie initializer Willem de Bruijn
2018-07-06 14:12 ` [PATCH net-next 3/6] sock: sockc cookie initializer Willem de Bruijn
2018-07-06 14:12 ` [PATCH net-next 4/6] ipv6: fold sockcm_cookie into ipcm6_cookie Willem de Bruijn
2018-07-06 14:12 ` [PATCH net-next 5/6] ip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6 Willem de Bruijn
2018-07-06 14:12 ` [PATCH net-next 6/6] ip: unconditionally set cork gso_size Willem de Bruijn
2018-07-06 17:19 ` [PATCH net-next 0/6] sock cookie initializers Jesus Sanchez-Palencia
2018-07-06 18:00   ` Willem de Bruijn
2018-07-07  1:59 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180706141259.29295-1-willemdebruijn.kernel@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).