aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/fs.h
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2015-12-10 17:12:44 +0200
committerDavid S. Miller <davem@davemloft.net>2015-12-12 00:15:24 -0500
commit86d722ad2c3bd2f0536b196b7fd67ae2a7e2a492 (patch)
tree47690b3e2490ac45a9c15abc7a73f36124611f6e /include/linux/mlx5/fs.h
parentnet/mlx5_core: Flow steering tree initialization (diff)
downloadlinux-dev-86d722ad2c3bd2f0536b196b7fd67ae2a7e2a492.tar.xz
linux-dev-86d722ad2c3bd2f0536b196b7fd67ae2a7e2a492.zip
net/mlx5: Use flow steering infrastructure for mlx5_en
Expose the new flow steering API and remove the old one. Few changes are required: 1. The Ethernet flow steering follows the existing implementation, but uses the new steering API. The old flow steering implementation is removed. 2. Move the E-switch FDB management to use the new API. 3. When driver is loaded call to mlx5_init_fs which initialize the flow steering tree structure, open namespaces for NIC receive and for E-switch FDB. 4. Call to mlx5_cleanup_fs when the driver is unloaded. Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/linux/mlx5/fs.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 16ae5233dc7b..bc7ad019afde 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -33,6 +33,7 @@
#ifndef _MLX5_FS_
#define _MLX5_FS_
+#include <linux/mlx5/driver.h>
#include <linux/mlx5/mlx5_ifc.h>
#define MLX5_FS_DEFAULT_FLOW_TAG 0x0
@@ -43,6 +44,9 @@ enum mlx5_flow_namespace_type {
};
struct mlx5_flow_table;
+struct mlx5_flow_group;
+struct mlx5_flow_rule;
+struct mlx5_flow_namespace;
struct mlx5_flow_destination {
enum mlx5_flow_destination_type type;
@@ -52,4 +56,38 @@ struct mlx5_flow_destination {
u32 vport_num;
};
};
+
+struct mlx5_flow_namespace *
+mlx5_get_flow_namespace(struct mlx5_core_dev *dev,
+ enum mlx5_flow_namespace_type type);
+
+struct mlx5_flow_table *
+mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
+ int prio,
+ int num_flow_table_entries);
+int mlx5_destroy_flow_table(struct mlx5_flow_table *ft);
+
+/* inbox should be set with the following values:
+ * start_flow_index
+ * end_flow_index
+ * match_criteria_enable
+ * match_criteria
+ */
+struct mlx5_flow_group *
+mlx5_create_flow_group(struct mlx5_flow_table *ft, u32 *in);
+void mlx5_destroy_flow_group(struct mlx5_flow_group *fg);
+
+/* Single destination per rule.
+ * Group ID is implied by the match criteria.
+ */
+struct mlx5_flow_rule *
+mlx5_add_flow_rule(struct mlx5_flow_table *ft,
+ u8 match_criteria_enable,
+ u32 *match_criteria,
+ u32 *match_value,
+ u32 action,
+ u32 flow_tag,
+ struct mlx5_flow_destination *dest);
+void mlx5_del_flow_rule(struct mlx5_flow_rule *fr);
+
#endif