ipsec: One DPO per SA
An SA can be used only for ESP or AH nver both, so it needs only one
coresponding DPO.
Type: refactor
Change-Id: I689060f795ee352245a0eaed0890a6b234c63d71
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h
index 969b5d1..53035aa 100644
--- a/src/vnet/ipsec/ipsec_sa.h
+++ b/src/vnet/ipsec/ipsec_sa.h
@@ -71,8 +71,6 @@
IPSEC_PROTOCOL_ESP = 1
} ipsec_protocol_t;
-#define IPSEC_N_PROTOCOLS (IPSEC_PROTOCOL_ESP+1)
-
#define IPSEC_KEY_MAX_LEN 128
typedef struct ipsec_key_t_
{
@@ -124,6 +122,7 @@
u32 last_seq;
u32 last_seq_hi;
u64 replay_window;
+ dpo_id_t dpo;
vnet_crypto_key_index_t crypto_key_index;
vnet_crypto_key_index_t integ_key_index;
@@ -131,8 +130,6 @@
vnet_crypto_op_id_t crypto_dec_op_id:16;
vnet_crypto_op_id_t integ_op_id:16;
- dpo_id_t dpo[IPSEC_N_PROTOCOLS];
-
/* data accessed by dataplane code should be above this comment */
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);