Thread (9 messages) flat view 9 messages, 2 authors, 2020-06-24
STALE2255d

Revision v1 of 3 in this series.

Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v2 [diff vs current]

[PATCH ipsec-next 0/6] xfrm: remove xfrm replay indirections

From: Florian Westphal <fw@strlen.de>
Date: 2020-06-23 19:48:59

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, 124 insertions(+), 104 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help