Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Florian Westphal <fw@strlen.de>,
	Eric Dumazet <edumazet@google.com>,
	linux-security-module@vger.kernel.org, selinux@vger.kernel.org
Subject: [PATCH RFC 0/9] sk_buff: optimize layout for GRO
Date: Wed, 21 Jul 2021 18:44:32 +0200	[thread overview]
Message-ID: <cover.1626879395.git.pabeni@redhat.com> (raw)

This is a very early draft - in a different world would be
replaced by hallway discussion at in-person conference - aimed at
outlining some ideas and collect feedback on the overall outlook.
There are still bugs to be fixed, more test and benchmark need, etc.

There are 3 main goals:
- [try to] avoid the overhead for uncommon conditions at GRO time
  (patches 1-4)
- enable backpressure for the veth GRO path (patches 5-6)
- reduce the number of cacheline used by the sk_buff lifecycle
  from 4 to 3, at least in some common scenarios (patches 1,7-9).
  The idea here is avoid the initialization of some fields and
  control their validity with a bitmask, as presented by at least
  Florian and Jesper in the past.

The above requires a bit of code churn in some places and, yes,
a few new bits in the sk_buff struct (using some existing holes)

Paolo Abeni (9):
  sk_buff: track nfct status in newly added skb->_state
  sk_buff: track dst status in skb->_state
  sk_buff: move the active_extensions into the state bitfield
  net: optimize GRO for the common case.
  skbuff: introduce has_sk state bit.
  veth: use skb_prepare_for_gro()
  sk_buff: move inner header fields after tail
  sk_buff: move vlan field after tail.
  sk_buff: access secmark via getter/setter

 drivers/net/veth.c               |   2 +-
 include/linux/skbuff.h           | 117 ++++++++++++++++++++++---------
 include/net/dst.h                |   3 +
 include/net/sock.h               |   9 +++
 net/core/dev.c                   |  31 +++++---
 net/core/skbuff.c                |  40 +++++++----
 net/netfilter/nfnetlink_queue.c  |   6 +-
 net/netfilter/nft_meta.c         |   6 +-
 net/netfilter/xt_CONNSECMARK.c   |   8 +--
 net/netfilter/xt_SECMARK.c       |   2 +-
 security/apparmor/lsm.c          |  15 ++--
 security/selinux/hooks.c         |  10 +--
 security/smack/smack_lsm.c       |   4 +-
 security/smack/smack_netfilter.c |   4 +-
 14 files changed, 175 insertions(+), 82 deletions(-)

-- 
2.26.3


             reply	other threads:[~2021-07-21 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 16:44 Paolo Abeni [this message]
2021-07-21 18:15 ` Casey Schaufler
2021-07-22  7:10   ` Paolo Abeni
2021-07-22 16:04     ` Casey Schaufler
2021-07-22 16:57       ` Paolo Abeni
2021-07-22 18:41         ` Paul Moore
2021-07-24 18:51           ` Florian Westphal
2021-07-25 14:57             ` Paul Moore
2021-07-25 16:25               ` Florian Westphal
2021-07-25 21:53                 ` Casey Schaufler
2021-07-25 22:52                   ` Florian Westphal
2021-07-26 15:13                     ` Casey Schaufler
2021-07-27  2:51                       ` Paul Moore
2021-07-28 16:21                         ` Paolo Abeni

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=cover.1626879395.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=selinux@vger.kernel.org \
    --subject='Re: [PATCH RFC 0/9] sk_buff: optimize layout for GRO' \
    /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

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