ipsec: bind an SA to a worker 64/18664/15
authorNeale Ranns <nranns@cisco.com>
Tue, 2 Apr 2019 08:13:33 +0000 (08:13 +0000)
committerDamjan Marion <dmarion@me.com>
Tue, 17 Dec 2019 17:57:24 +0000 (17:57 +0000)
commitf62a8c013c6e22c012b9d7df2ef463a6370cf1ce
tree0448d4b53340b84e1a8aca87ec57133c503026da
parentf2bde7ac51123a0a46334b4ec55e2aceae031db7
ipsec: bind an SA to a worker

the sequence number increment and the anti-replay window
checks must be atomic. Given the vector nature of VPP we
can't simply use atomic increments for sequence numbers,
since a vector on thread 1 with lower sequence numbers could
be 'overtaken' by packets on thread 2 with higher sequence
numbers.
The anti-replay logic requires a critical section, not just
atomics, and we don't want that.
So when the SA see the first packet it is bound to that worker
all subsequent packets, that arrive on a different worker,
are subject to a handoff.

Type: feature

Change-Id: Ia20a8645fb50622ea6235ab015a537f033d531a4
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/CMakeLists.txt
src/vnet/ipsec/ah_decrypt.c
src/vnet/ipsec/ah_encrypt.c
src/vnet/ipsec/esp_decrypt.c
src/vnet/ipsec/esp_encrypt.c
src/vnet/ipsec/ipsec.c
src/vnet/ipsec/ipsec.h
src/vnet/ipsec/ipsec_format.c
src/vnet/ipsec/ipsec_handoff.c [new file with mode: 0644]
src/vnet/ipsec/ipsec_sa.c
src/vnet/ipsec/ipsec_sa.h