net/mlx5: Split FDB fast path prio to multiple namespaces
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / fs_core.h
index a06f83c0c2b654d1475888fbc8088659f186fd2c..b51ad217da32d608a95a16909fd5577174a755d0 100644 (file)
 #include <linux/rhashtable.h>
 #include <linux/llist.h>
 
+/* FS_TYPE_PRIO_CHAINS is a PRIO that will have namespaces only,
+ * and those are in parallel to one another when going over them to connect
+ * a new flow table. Meaning the last flow table in a TYPE_PRIO prio in one
+ * parallel namespace will not automatically connect to the first flow table
+ * found in any prio in any next namespace, but skip the entire containing
+ * TYPE_PRIO_CHAINS prio.
+ *
+ * This is used to implement tc chains, each chain of prios is a different
+ * namespace inside a containing TYPE_PRIO_CHAINS prio.
+ */
+
 enum fs_node_type {
        FS_TYPE_NAMESPACE,
        FS_TYPE_PRIO,
+       FS_TYPE_PRIO_CHAINS,
        FS_TYPE_FLOW_TABLE,
        FS_TYPE_FLOW_GROUP,
        FS_TYPE_FLOW_ENTRY,
@@ -73,6 +85,7 @@ struct mlx5_flow_steering {
        struct kmem_cache               *ftes_cache;
        struct mlx5_flow_root_namespace *root_ns;
        struct mlx5_flow_root_namespace *fdb_root_ns;
+       struct mlx5_flow_namespace      **fdb_sub_ns;
        struct mlx5_flow_root_namespace **esw_egress_root_ns;
        struct mlx5_flow_root_namespace **esw_ingress_root_ns;
        struct mlx5_flow_root_namespace *sniffer_tx_root_ns;