]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5: E-Switch, add a new prio to be used by the RDMA side
authorMark Bloch <markb@mellanox.com>
Thu, 28 Mar 2019 13:27:32 +0000 (15:27 +0200)
committerLeon Romanovsky <leonro@mellanox.com>
Wed, 10 Apr 2019 06:29:11 +0000 (09:29 +0300)
Create a new prio in the FDB, it will be used when inserting steering rules
into the FDB from the RDMA side. We create a new PRIO so rules from the
net side and rules from the RDMA side won't be inserted to the same PRIO,
each side has it's own sandbox to play in.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
include/linux/mlx5/fs.h

index 8b96f71332d8299a10f24f4db12acd7325ab5b2a..72d42cc3487ade227e2eb90fe7871fdf4eb1d1cb 100644 (file)
@@ -2478,6 +2478,13 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
        if (!steering->fdb_sub_ns)
                return -ENOMEM;
 
+       maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_BYPASS_PATH,
+                                 1);
+       if (IS_ERR(maj_prio)) {
+               err = PTR_ERR(maj_prio);
+               goto out_err;
+       }
+
        levels = 2 * FDB_MAX_PRIO * (FDB_MAX_CHAIN + 1);
        maj_prio = fs_create_prio_chained(&steering->fdb_root_ns->ns,
                                          FDB_FAST_PATH,
index 3eeb041543174fd57da7a7f8498b94a09644a9b7..fd91df3a4e095d5486f4cf90d6508c5708677f7b 100644 (file)
@@ -76,6 +76,7 @@ enum mlx5_flow_namespace_type {
 };
 
 enum {
+       FDB_BYPASS_PATH,
        FDB_FAST_PATH,
        FDB_SLOW_PATH,
 };