1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015-2020
8 #include <rte_ethdev.h>
9 #include <rte_ethdev_core.h>
10 #include <rte_security.h>
12 #define IPSRXMOD_VALID 0x00000001
13 #define IPSRXMOD_PROTO 0x00000004
14 #define IPSRXMOD_DECRYPT 0x00000008
15 #define IPSRXMOD_IPV6 0x00000010
17 #define IPSEC_MAX_RX_IP_COUNT 128
18 #define IPSEC_MAX_SA_COUNT 1024
20 enum txgbe_operation {
21 TXGBE_OP_AUTHENTICATED_ENCRYPTION,
22 TXGBE_OP_AUTHENTICATED_DECRYPTION
26 * Generic IP address structure
27 * TODO: Find better location for this rte_net.h possibly.
34 /**< IP Address Type - IPv4/IPv6 */
42 /** inline crypto private session structure */
43 struct txgbe_crypto_session {
44 enum txgbe_operation op;
52 struct rte_eth_dev *dev;
53 } __rte_cache_aligned;
55 struct txgbe_crypto_rx_ip_table {
59 struct txgbe_crypto_rx_sa_table {
66 struct txgbe_crypto_tx_sa_table {
72 struct txgbe_crypto_rx_ip_table rx_ip_tbl[IPSEC_MAX_RX_IP_COUNT];
73 struct txgbe_crypto_rx_sa_table rx_sa_tbl[IPSEC_MAX_SA_COUNT];
74 struct txgbe_crypto_tx_sa_table tx_sa_tbl[IPSEC_MAX_SA_COUNT];
77 #endif /*TXGBE_IPSEC_H_*/