netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipsec-next v2 0/6] xfrm: remove xfrm replay indirections
@ 2020-06-24  8:07 Florian Westphal
  2020-06-24  8:07 ` [PATCH ipsec-next v2 1/6] xfrm: replay: avoid xfrm replay notify indirection Florian Westphal
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Florian Westphal @ 2020-06-24  8:07 UTC (permalink / raw)
  To: steffen.klassert; +Cc: netdev

v2: fix unitialized variable buf reported by kbuild robot.

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 (6):
      xfrm: replay: avoid xfrm replay notify indirection
      xfrm: replay: get rid of duplicated notification code
      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 | 189 +++++++++++++++++++++++++++----------------------
 net/xfrm/xfrm_state.c  |   2 +-
 5 files changed, 125 insertions(+), 103 deletions(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-25 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-24  8:07 [PATCH ipsec-next v2 0/6] xfrm: remove xfrm replay indirections Florian Westphal
2020-06-24  8:07 ` [PATCH ipsec-next v2 1/6] xfrm: replay: avoid xfrm replay notify indirection Florian Westphal
2020-06-24  8:08 ` [PATCH ipsec-next v2 2/6] xfrm: replay: get rid of duplicated notification code Florian Westphal
2020-06-25  7:07   ` Sabrina Dubroca
2020-06-25 10:09     ` Florian Westphal
2020-06-24  8:08 ` [PATCH ipsec-next v2 3/6] xfrm: replay: remove advance indirection Florian Westphal
2020-06-24  8:08 ` [PATCH ipsec-next v2 4/6] xfrm: replay: remove recheck indirection Florian Westphal
2020-06-24  8:08 ` [PATCH ipsec-next v2 5/6] xfrm: replay: avoid replay indirection Florian Westphal
2020-06-24  8:08 ` [PATCH ipsec-next v2 6/6] xfrm: replay: remove last " Florian Westphal

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