summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@oracle.com>2017-12-20 02:59:56 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-01-23 20:11:27 +0300
commit34c822e2fb105599d3e7dffd4f2f3a5953cfefb3 (patch)
tree9d62313bb222ea042ad4ab7069f638ba378ba32a /drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h
parent49a94d74d9489647dfc3449ee135af4bf8fab2c1 (diff)
downloadlinux-34c822e2fb105599d3e7dffd4f2f3a5953cfefb3.tar.xz
ixgbe: add ipsec data structures
Set up the data structures to be used by the ipsec offload. Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h
index 8fe8289d3eee..da3ce7849e85 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h
@@ -50,4 +50,44 @@ enum ixgbe_ipsec_tbl_sel {
#define IXGBE_RXMOD_DECRYPT 0x00000008
#define IXGBE_RXMOD_IPV6 0x00000010
+struct rx_sa {
+ struct hlist_node hlist;
+ struct xfrm_state *xs;
+ __be32 ipaddr[4];
+ u32 key[4];
+ u32 salt;
+ u32 mode;
+ u8 iptbl_ind;
+ bool used;
+ bool decrypt;
+};
+
+struct rx_ip_sa {
+ __be32 ipaddr[4];
+ u32 ref_cnt;
+ bool used;
+};
+
+struct tx_sa {
+ struct xfrm_state *xs;
+ u32 key[4];
+ u32 salt;
+ bool encrypt;
+ bool used;
+};
+
+struct ixgbe_ipsec_tx_data {
+ u32 flags;
+ u16 trailer_len;
+ u16 sa_idx;
+};
+
+struct ixgbe_ipsec {
+ u16 num_rx_sa;
+ u16 num_tx_sa;
+ struct rx_ip_sa *ip_tbl;
+ struct rx_sa *rx_tbl;
+ struct tx_sa *tx_tbl;
+ DECLARE_HASHTABLE(rx_sa_list, 10);
+};
#endif /* _IXGBE_IPSEC_H_ */