1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
8 #define IPSEC_MAX_HDR_SIZE 64
9 #define IPSEC_MAX_IV_SIZE 16
10 #define IPSEC_MAX_IV_QWORD (IPSEC_MAX_IV_SIZE / sizeof(uint64_t))
12 /* padding alignment for different algorithms */
14 IPSEC_PAD_DEFAULT = 4,
15 IPSEC_PAD_AES_CBC = IPSEC_MAX_IV_SIZE,
16 IPSEC_PAD_AES_GCM = IPSEC_PAD_DEFAULT,
17 IPSEC_PAD_NULL = IPSEC_PAD_DEFAULT,
20 /* these definitions probably has to be in rte_crypto_sym.h */
30 #ifdef __SIZEOF_INT128__
41 __extension__ uint64_t window[0];
45 uint64_t type; /* type of given SA */
46 uint64_t udata; /* user defined */
47 uint32_t size; /* size of given sa object */
49 /* sqn calculations related */
54 uint16_t bucket_index_mask;
56 /* template for crypto op fields */
58 union sym_op_ofslen cipher;
59 union sym_op_ofslen auth;
62 uint8_t proto; /* next proto */
68 uint8_t iv_ofs; /* offset for algo-specific IV inside crypto op */
72 /* template for tunnel header */
73 uint8_t hdr[IPSEC_MAX_HDR_SIZE];
76 * sqn and replay window
80 struct replay_sqn *inb;
83 } __rte_cache_aligned;
86 ipsec_sa_pkt_func_select(const struct rte_ipsec_session *ss,
87 const struct rte_ipsec_sa *sa, struct rte_ipsec_sa_pkt_func *pf);