67 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright(c) 2018 Oracle and/or its affiliates. All rights reserved. */3 4#ifndef _IXGBEVF_IPSEC_H_5#define _IXGBEVF_IPSEC_H_6 7#define IXGBE_IPSEC_MAX_SA_COUNT 10248#define IXGBE_IPSEC_BASE_RX_INDEX 09#define IXGBE_IPSEC_BASE_TX_INDEX IXGBE_IPSEC_MAX_SA_COUNT10#define IXGBE_IPSEC_AUTH_BITS 12811 12#define IXGBE_RXMOD_VALID 0x0000000113#define IXGBE_RXMOD_PROTO_ESP 0x0000000414#define IXGBE_RXMOD_DECRYPT 0x0000000815#define IXGBE_RXMOD_IPV6 0x0000001016 17struct rx_sa {18 struct hlist_node hlist;19 struct xfrm_state *xs;20 __be32 ipaddr[4];21 u32 key[4];22 u32 salt;23 u32 mode;24 u32 pfsa;25 bool used;26 bool decrypt;27};28 29struct rx_ip_sa {30 __be32 ipaddr[4];31 u32 ref_cnt;32 bool used;33};34 35struct tx_sa {36 struct xfrm_state *xs;37 u32 key[4];38 u32 salt;39 u32 pfsa;40 bool encrypt;41 bool used;42};43 44struct ixgbevf_ipsec_tx_data {45 u32 flags;46 u16 trailer_len;47 u16 pfsa;48};49 50struct ixgbevf_ipsec {51 u16 num_rx_sa;52 u16 num_tx_sa;53 struct rx_sa *rx_tbl;54 struct tx_sa *tx_tbl;55 DECLARE_HASHTABLE(rx_sa_list, 10);56};57 58struct sa_mbx_msg {59 __be32 spi;60 u8 dir;61 u8 proto;62 u16 family;63 __be32 addr[4];64 u32 key[5];65};66#endif /* _IXGBEVF_IPSEC_H_ */67