History

net/mlx5: Add flow steering actions to fs_cmd shim layer

Add flow steering actions: modify header and packet reformat to the fs_cmd shim layer. This allows each namespace to define possibly different functionality for alloc/dealloc action commands.

Maor Gottlieb committed 7 years ago

Commit 2b688ea1 parent a06ebb813 files · +289 −110Browse files

Showing the changes to include/linux (1 of 13 files). Show all

Unified · Split

include/linux/mlx5/fs.h+16−17
@@ -84,6 +84,8 @@ enum { · 83 unmodified lines
84 FDB_SLOW_PATH,84 FDB_SLOW_PATH,
85};85};
86 86
87struct mlx5_pkt_reformat;
88struct mlx5_modify_hdr;
87struct mlx5_flow_table;89struct mlx5_flow_table;
88struct mlx5_flow_group;90struct mlx5_flow_group;
89struct mlx5_flow_namespace;91struct mlx5_flow_namespace;
@@ -121,7 +123,7 @@ struct mlx5_flow_destination { · 31 unmodified lines
121 struct {123 struct {
122 u16 num;124 u16 num;
123 u16 vhca_id;125 u16 vhca_id;
124 u32 reformat_id;126 struct mlx5_pkt_reformat *pkt_reformat;
125 u8 flags;127 u8 flags;
126 } vport;128 } vport;
127 };129 };
@@ -195,8 +197,8 @@ enum { · 67 unmodified lines
195 197
196struct mlx5_flow_act {198struct mlx5_flow_act {
197 u32 action;199 u32 action;
198 u32 reformat_id;200 struct mlx5_modify_hdr *modify_hdr;
199 u32 modify_id;201 struct mlx5_pkt_reformat *pkt_reformat;
200 uintptr_t esp_id;202 uintptr_t esp_id;
201 u32 flags;203 u32 flags;
202 struct mlx5_fs_vlan vlan[MLX5_FS_VLAN_DEPTH];204 struct mlx5_fs_vlan vlan[MLX5_FS_VLAN_DEPTH];
@@ -205,8 +207,6 @@ struct mlx5_flow_act { · 2 unmodified lines
205 207
206#define MLX5_DECLARE_FLOW_ACT(name) \208#define MLX5_DECLARE_FLOW_ACT(name) \
207 struct mlx5_flow_act name = { .action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,\209 struct mlx5_flow_act name = { .action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,\
208 .reformat_id = 0, \
209 .modify_id = 0, \
210 .flags = 0, }210 .flags = 0, }
211 211
212/* Single destination per rule.212/* Single destination per rule.
@@ -236,19 +236,18 @@ u32 mlx5_fc_id(struct mlx5_fc *counter); · 23 unmodified lines
236int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);236int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
237int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);237int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
238 238
239int mlx5_modify_header_alloc(struct mlx5_core_dev *dev,239struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
240 u8 namespace, u8 num_actions,240 u8 ns_type, u8 num_actions,
241 void *modify_actions, u32 *modify_header_id);241 void *modify_actions);
242void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev,242void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev,
243 u32 modify_header_id);243 struct mlx5_modify_hdr *modify_hdr);
244 244
245int mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,245struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
246 int reformat_type,246 int reformat_type,
247 size_t size,247 size_t size,
248 void *reformat_data,248 void *reformat_data,
249 enum mlx5_flow_namespace_type namespace,249 enum mlx5_flow_namespace_type ns_type);
250 u32 *packet_reformat_id);
251void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev,250void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev,
252 u32 packet_reformat_id);251 struct mlx5_pkt_reformat *reformat);
253 252
254#endif253#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t