ipsec: rework SA replay window/SQN for MT environment
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Thu, 10 Jan 2019 21:06:31 +0000 (21:06 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 Jan 2019 15:57:22 +0000 (16:57 +0100)
commitc0308cd895542bb9957971f1be081ee2d64c1316
tree85bbea30faf5e3fc8234762b104beb5be3abe29f
parent4d7ea3e1459b7df218534eb802c13f89ff867c54
ipsec: rework SA replay window/SQN for MT environment

With these changes functions:
  - rte_ipsec_pkt_crypto_prepare
  - rte_ipsec_pkt_process
 can be safely used in MT environment, as long as the user can guarantee
 that they obey multiple readers/single writer model for SQN+replay_window
 operations.
 To be more specific:
 for outbound SA there are no restrictions.
 for inbound SA the caller has to guarantee that at any given moment
 only one thread is executing rte_ipsec_pkt_process() for given SA.
 Note that it is caller responsibility to maintain correct order
 of packets to be processed.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
lib/librte_ipsec/ipsec_sqn.h
lib/librte_ipsec/rte_ipsec_sa.h
lib/librte_ipsec/sa.c
lib/librte_ipsec/sa.h