From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: steffen.klassert@secunet.com, sd@queasysnail.net,
Florian Westphal <fw@strlen.de>
Subject: [PATCH ipsec-next v2 0/5] xfrm: remove xfrm replay indirections
Date: Fri, 18 Jun 2021 15:51:55 +0200 [thread overview]
Message-ID: <20210618135200.14420-1-fw@strlen.de> (raw)
This is v2 of an older patchset that got stuck in backlog hell. Changes:
- drop bogus "get rid of duplicated notification code" patch. As noted
by Sabrina it does change behavior.
- fix a compiler warning in patch 2.
ipsec.c selftest passes.
The xfrm replay logic is implemented via indirect calls.
xfrm_state struct holds a pointer to a
'struct xfrm_replay', which is one of several replay protection
backends.
XFRM then invokes the backend via state->repl->callback().
Due to retpoline all indirect calls have become a lot more
expensive. Fortunately, there are no 'replay modules', all are available
for direct calls.
This series removes the 'struct xfrm_replay' and adds replay
functions that can be called instead of the redirection.
Example:
- err = x->repl->overflow(x, skb);
+ err = xfrm_replay_overflow(x, skb);
Instead of a pointer to a struct with function pointers, xfrm_state
now holds an enum that tells the replay core what kind of replay
test is to be done.
Florian Westphal (5):
xfrm: replay: avoid xfrm replay notify indirection
xfrm: replay: remove advance indirection
xfrm: replay: remove recheck indirection
xfrm: replay: avoid replay indirection
xfrm: replay: remove last replay indirection
include/net/xfrm.h | 29 ++++---
net/xfrm/xfrm_input.c | 6 +-
net/xfrm/xfrm_output.c | 2 +-
net/xfrm/xfrm_replay.c | 171 +++++++++++++++++++++++++----------------
net/xfrm/xfrm_state.c | 2 +-
5 files changed, 123 insertions(+), 87 deletions(-)
--
2.31.1
next reply other threads:[~2021-06-18 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 13:51 Florian Westphal [this message]
2021-06-18 13:51 ` [PATCH ipsec-next v2 1/5] xfrm: replay: avoid xfrm replay notify indirection Florian Westphal
2021-06-18 13:51 ` [PATCH ipsec-next v2 2/5] xfrm: replay: remove advance indirection Florian Westphal
2021-06-18 13:51 ` [PATCH ipsec-next v2 3/5] xfrm: replay: remove recheck indirection Florian Westphal
2021-06-18 13:51 ` [PATCH ipsec-next v2 4/5] xfrm: replay: avoid replay indirection Florian Westphal
2021-06-18 13:52 ` [PATCH ipsec-next v2 5/5] xfrm: replay: remove last " Florian Westphal
2021-06-22 7:07 ` [PATCH ipsec-next v2 0/5] xfrm: remove xfrm replay indirections Steffen Klassert
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=20210618135200.14420-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=sd@queasysnail.net \
--cc=steffen.klassert@secunet.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).