+/*
+ * application wide SA parameters
+ */
+struct app_sa_prm {
+ uint32_t enable; /* use librte_ipsec API for ipsec pkt processing */
+ uint32_t window_size; /* replay window size */
+ uint32_t enable_esn; /* enable/disable ESN support */
+ uint32_t cache_sz; /* per lcore SA cache size */
+ uint64_t flags; /* rte_ipsec_sa_prm.flags */
+};
+
+extern struct app_sa_prm app_sa_prm;
+
+struct flow_info {
+ struct rte_flow *rx_def_flow;
+};
+
+extern struct flow_info flow_info_tbl[RTE_MAX_ETHPORTS];
+
+enum {
+ IPSEC_SESSION_PRIMARY = 0,
+ IPSEC_SESSION_FALLBACK = 1,
+ IPSEC_SESSION_MAX
+};
+
+#define IPSEC_SA_OFFLOAD_FALLBACK_FLAG (1)
+
+static inline struct ipsec_sa *
+ipsec_mask_saptr(void *ptr)
+{
+ uintptr_t i = (uintptr_t)ptr;
+ static const uintptr_t mask = IPSEC_SA_OFFLOAD_FALLBACK_FLAG;
+
+ i &= ~mask;
+
+ return (struct ipsec_sa *)i;
+}
+