.. | .. |
---|
75 | 75 | u64 ipsec_cmd_drop; |
---|
76 | 76 | }; |
---|
77 | 77 | |
---|
| 78 | +struct mlx5e_accel_fs_esp; |
---|
| 79 | +struct mlx5e_ipsec_tx; |
---|
| 80 | + |
---|
78 | 81 | struct mlx5e_ipsec { |
---|
79 | 82 | struct mlx5e_priv *en_priv; |
---|
80 | 83 | DECLARE_HASHTABLE(sadb_rx, MLX5E_IPSEC_SADB_RX_BITS); |
---|
.. | .. |
---|
84 | 87 | struct mlx5e_ipsec_sw_stats sw_stats; |
---|
85 | 88 | struct mlx5e_ipsec_stats stats; |
---|
86 | 89 | struct workqueue_struct *wq; |
---|
| 90 | + struct mlx5e_accel_fs_esp *rx_fs; |
---|
| 91 | + struct mlx5e_ipsec_tx *tx_fs; |
---|
87 | 92 | }; |
---|
88 | 93 | |
---|
89 | 94 | struct mlx5e_ipsec_esn_state { |
---|
90 | 95 | u32 esn; |
---|
91 | 96 | u8 trigger: 1; |
---|
92 | 97 | u8 overlap: 1; |
---|
| 98 | +}; |
---|
| 99 | + |
---|
| 100 | +struct mlx5e_ipsec_rule { |
---|
| 101 | + struct mlx5_flow_handle *rule; |
---|
| 102 | + struct mlx5_modify_hdr *set_modify_hdr; |
---|
93 | 103 | }; |
---|
94 | 104 | |
---|
95 | 105 | struct mlx5e_ipsec_sa_entry { |
---|
.. | .. |
---|
102 | 112 | void *hw_context; |
---|
103 | 113 | void (*set_iv_op)(struct sk_buff *skb, struct xfrm_state *x, |
---|
104 | 114 | struct xfrm_offload *xo); |
---|
| 115 | + u32 ipsec_obj_id; |
---|
| 116 | + struct mlx5e_ipsec_rule ipsec_rule; |
---|
105 | 117 | }; |
---|
106 | 118 | |
---|
107 | 119 | void mlx5e_ipsec_build_inverse_table(void); |
---|
108 | 120 | int mlx5e_ipsec_init(struct mlx5e_priv *priv); |
---|
109 | 121 | void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv); |
---|
110 | 122 | void mlx5e_ipsec_build_netdev(struct mlx5e_priv *priv); |
---|
111 | | - |
---|
112 | | -int mlx5e_ipsec_get_count(struct mlx5e_priv *priv); |
---|
113 | | -int mlx5e_ipsec_get_strings(struct mlx5e_priv *priv, uint8_t *data); |
---|
114 | | -void mlx5e_ipsec_update_stats(struct mlx5e_priv *priv); |
---|
115 | | -int mlx5e_ipsec_get_stats(struct mlx5e_priv *priv, u64 *data); |
---|
116 | 123 | |
---|
117 | 124 | struct xfrm_state *mlx5e_ipsec_sadb_rx_lookup(struct mlx5e_ipsec *dev, |
---|
118 | 125 | unsigned int handle); |
---|
.. | .. |
---|
134 | 141 | |
---|
135 | 142 | static inline void mlx5e_ipsec_build_netdev(struct mlx5e_priv *priv) |
---|
136 | 143 | { |
---|
137 | | -} |
---|
138 | | - |
---|
139 | | -static inline int mlx5e_ipsec_get_count(struct mlx5e_priv *priv) |
---|
140 | | -{ |
---|
141 | | - return 0; |
---|
142 | | -} |
---|
143 | | - |
---|
144 | | -static inline int mlx5e_ipsec_get_strings(struct mlx5e_priv *priv, |
---|
145 | | - uint8_t *data) |
---|
146 | | -{ |
---|
147 | | - return 0; |
---|
148 | | -} |
---|
149 | | - |
---|
150 | | -static inline void mlx5e_ipsec_update_stats(struct mlx5e_priv *priv) |
---|
151 | | -{ |
---|
152 | | -} |
---|
153 | | - |
---|
154 | | -static inline int mlx5e_ipsec_get_stats(struct mlx5e_priv *priv, u64 *data) |
---|
155 | | -{ |
---|
156 | | - return 0; |
---|
157 | 144 | } |
---|
158 | 145 | |
---|
159 | 146 | #endif |
---|