1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2017 Oracle and/or its affiliates. All rights reserved. */
4 #ifndef _IXGBE_IPSEC_H_
5 #define _IXGBE_IPSEC_H_
7 #define IXGBE_IPSEC_MAX_SA_COUNT 1024
8 #define IXGBE_IPSEC_MAX_RX_IP_COUNT 128
9 #define IXGBE_IPSEC_BASE_RX_INDEX 0
10 #define IXGBE_IPSEC_BASE_TX_INDEX IXGBE_IPSEC_MAX_SA_COUNT
11 #define IXGBE_IPSEC_AUTH_BITS 128
13 #define IXGBE_RXTXIDX_IPS_EN 0x00000001
14 #define IXGBE_RXIDX_TBL_SHIFT 1
15 enum ixgbe_ipsec_tbl_sel
{
17 ips_rx_spi_tbl
= 0x02,
18 ips_rx_key_tbl
= 0x03,
21 #define IXGBE_RXTXIDX_IDX_SHIFT 3
22 #define IXGBE_RXTXIDX_READ 0x40000000
23 #define IXGBE_RXTXIDX_WRITE 0x80000000
25 #define IXGBE_RXMOD_VALID 0x00000001
26 #define IXGBE_RXMOD_PROTO_ESP 0x00000004
27 #define IXGBE_RXMOD_DECRYPT 0x00000008
28 #define IXGBE_RXMOD_IPV6 0x00000010
29 #define IXGBE_RXTXMOD_VF 0x00000020
32 struct hlist_node hlist
;
33 struct xfrm_state
*xs
;
51 struct xfrm_state
*xs
;
60 struct ixgbe_ipsec_tx_data
{
69 struct rx_ip_sa
*ip_tbl
;
72 DECLARE_HASHTABLE(rx_sa_list
, 10);
83 #endif /* _IXGBE_IPSEC_H_ */