File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
drivers/net/ethernet/intel/ixgbe Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ struct ixgbe_adapter {
630
630
#define IXGBE_FLAG2_EEE_CAPABLE BIT(14)
631
631
#define IXGBE_FLAG2_EEE_ENABLED BIT(15)
632
632
#define IXGBE_FLAG2_RX_LEGACY BIT(16)
633
+ #define IXGBE_FLAG2_IPSEC_ENABLED BIT(17)
633
634
634
635
/* Tx fast path data */
635
636
int num_tx_queues ;
@@ -782,6 +783,10 @@ struct ixgbe_adapter {
782
783
783
784
#define IXGBE_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */
784
785
u32 * rss_key ;
786
+
787
+ #ifdef CONFIG_XFRM
788
+ struct ixgbe_ipsec * ipsec ;
789
+ #endif /* CONFIG_XFRM */
785
790
};
786
791
787
792
static inline u8 ixgbe_max_rss_indices (struct ixgbe_adapter * adapter )
Original file line number Diff line number Diff line change @@ -50,4 +50,44 @@ enum ixgbe_ipsec_tbl_sel {
50
50
#define IXGBE_RXMOD_DECRYPT 0x00000008
51
51
#define IXGBE_RXMOD_IPV6 0x00000010
52
52
53
+ struct rx_sa {
54
+ struct hlist_node hlist ;
55
+ struct xfrm_state * xs ;
56
+ __be32 ipaddr [4 ];
57
+ u32 key [4 ];
58
+ u32 salt ;
59
+ u32 mode ;
60
+ u8 iptbl_ind ;
61
+ bool used ;
62
+ bool decrypt ;
63
+ };
64
+
65
+ struct rx_ip_sa {
66
+ __be32 ipaddr [4 ];
67
+ u32 ref_cnt ;
68
+ bool used ;
69
+ };
70
+
71
+ struct tx_sa {
72
+ struct xfrm_state * xs ;
73
+ u32 key [4 ];
74
+ u32 salt ;
75
+ bool encrypt ;
76
+ bool used ;
77
+ };
78
+
79
+ struct ixgbe_ipsec_tx_data {
80
+ u32 flags ;
81
+ u16 trailer_len ;
82
+ u16 sa_idx ;
83
+ };
84
+
85
+ struct ixgbe_ipsec {
86
+ u16 num_rx_sa ;
87
+ u16 num_tx_sa ;
88
+ struct rx_ip_sa * ip_tbl ;
89
+ struct rx_sa * rx_tbl ;
90
+ struct tx_sa * tx_tbl ;
91
+ DECLARE_HASHTABLE (rx_sa_list , 10 );
92
+ };
53
93
#endif /* _IXGBE_IPSEC_H_ */
You can’t perform that action at this time.
0 commit comments