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
8484 FDB_SLOW_PATH,
8585 };
8686
87+struct mlx5_pkt_reformat;
88+struct mlx5_modify_hdr;
8789 struct mlx5_flow_table;
8890 struct mlx5_flow_group;
8991 struct mlx5_flow_namespace;
@@ -121,7 +123,7 @@ struct mlx5_flow_destination { · 31 unmodified lines
121123 struct {
122124 u16 num;
123125 u16 vhca_id;
124− u32 reformat_id;
126+ struct mlx5_pkt_reformat *pkt_reformat;
125127 u8 flags;
126128 } vport;
127129 };
@@ -195,8 +197,8 @@ enum { · 67 unmodified lines
195197
196198 struct mlx5_flow_act {
197199 u32 action;
198− u32 reformat_id;
199− u32 modify_id;
200+ struct mlx5_modify_hdr *modify_hdr;
201+ struct mlx5_pkt_reformat *pkt_reformat;
200202 uintptr_t esp_id;
201203 u32 flags;
202204 struct mlx5_fs_vlan vlan[MLX5_FS_VLAN_DEPTH];
@@ -205,8 +207,6 @@ struct mlx5_flow_act { · 2 unmodified lines
205207
206208 #define MLX5_DECLARE_FLOW_ACT(name) \
207209 struct mlx5_flow_act name = { .action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,\
208− .reformat_id = 0, \
209− .modify_id = 0, \
210210 .flags = 0, }
211211
212212 /* Single destination per rule.
@@ -236,19 +236,18 @@ u32 mlx5_fc_id(struct mlx5_fc *counter); · 23 unmodified lines
236236 int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
237237 int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
238238
239−int mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
240− u8 namespace, u8 num_actions,
241− void *modify_actions, u32 *modify_header_id);
239+struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
240+ u8 ns_type, u8 num_actions,
241+ void *modify_actions);
242242 void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev,
243− u32 modify_header_id);
244−
245−int mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
246− int reformat_type,
247− size_t size,
248− void *reformat_data,
249− enum mlx5_flow_namespace_type namespace,
250− u32 *packet_reformat_id);
243+ struct mlx5_modify_hdr *modify_hdr);
244+
245+struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
246+ int reformat_type,
247+ size_t size,
248+ void *reformat_data,
249+ enum mlx5_flow_namespace_type ns_type);
251250 void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev,
252− u32 packet_reformat_id);
251+ struct mlx5_pkt_reformat *reformat);
253252
254253 #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