net/mlx5: Add flow steering actions to fs_cmd shim layer
[sfrench/cifs-2.6.git] / include / linux / mlx5 / fs.h
index 97ec6be62ac4a4582cdccdf6f1b89b924b38ef1c..724d276ea133692c83b1421ef06e6cb4e6b3115e 100644 (file)
@@ -84,6 +84,8 @@ enum {
        FDB_SLOW_PATH,
 };
 
+struct mlx5_pkt_reformat;
+struct mlx5_modify_hdr;
 struct mlx5_flow_table;
 struct mlx5_flow_group;
 struct mlx5_flow_namespace;
@@ -121,7 +123,7 @@ struct mlx5_flow_destination {
                struct {
                        u16             num;
                        u16             vhca_id;
-                       u32             reformat_id;
+                       struct mlx5_pkt_reformat *pkt_reformat;
                        u8              flags;
                } vport;
        };
@@ -195,8 +197,8 @@ enum {
 
 struct mlx5_flow_act {
        u32 action;
-       u32 reformat_id;
-       u32 modify_id;
+       struct mlx5_modify_hdr  *modify_hdr;
+       struct mlx5_pkt_reformat *pkt_reformat;
        uintptr_t esp_id;
        u32 flags;
        struct mlx5_fs_vlan vlan[MLX5_FS_VLAN_DEPTH];
@@ -205,8 +207,6 @@ struct mlx5_flow_act {
 
 #define MLX5_DECLARE_FLOW_ACT(name) \
        struct mlx5_flow_act name = { .action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,\
-                                     .reformat_id = 0, \
-                                     .modify_id = 0, \
                                      .flags =  0, }
 
 /* Single destination per rule.
@@ -236,19 +236,18 @@ u32 mlx5_fc_id(struct mlx5_fc *counter);
 int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
 int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
 
-int mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
-                            u8 namespace, u8 num_actions,
-                            void *modify_actions, u32 *modify_header_id);
+struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
+                                                u8 ns_type, u8 num_actions,
+                                                void *modify_actions);
 void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev,
-                               u32 modify_header_id);
-
-int mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
-                              int reformat_type,
-                              size_t size,
-                              void *reformat_data,
-                              enum mlx5_flow_namespace_type namespace,
-                              u32 *packet_reformat_id);
+                               struct mlx5_modify_hdr *modify_hdr);
+
+struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
+                                                    int reformat_type,
+                                                    size_t size,
+                                                    void *reformat_data,
+                                                    enum mlx5_flow_namespace_type ns_type);
 void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev,
-                                 u32 packet_reformat_id);
+                                 struct mlx5_pkt_reformat *reformat);
 
 #endif