Merge branch 'ct-offload' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed...
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx5 / core / fs_core.c
index 2660ffa..bd0b2e4 100644 (file)
 #define ANCHOR_NUM_PRIOS 1
 #define ANCHOR_MIN_LEVEL (BY_PASS_MIN_LEVEL + 1)
 
-#define OFFLOADS_MAX_FT 1
+#define OFFLOADS_MAX_FT 2
 #define OFFLOADS_NUM_PRIOS 2
 #define OFFLOADS_MIN_LEVEL (ANCHOR_MIN_LEVEL + OFFLOADS_NUM_PRIOS)
 
@@ -145,7 +145,7 @@ static struct init_tree_node {
                           ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
                                  ADD_MULTIPLE_PRIO(LAG_NUM_PRIOS,
                                                    LAG_PRIO_NUM_LEVELS))),
-                 ADD_PRIO(0, OFFLOADS_MIN_LEVEL, 0, {},
+                 ADD_PRIO(0, OFFLOADS_MIN_LEVEL, 0, FS_CHAINING_CAPS,
                           ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
                                  ADD_MULTIPLE_PRIO(OFFLOADS_NUM_PRIOS,
                                                    OFFLOADS_MAX_FT))),
@@ -2700,6 +2700,17 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
                goto out_err;
        }
 
+       /* We put this priority last, knowing that nothing will get here
+        * unless explicitly forwarded to. This is possible because the
+        * slow path tables have catch all rules and nothing gets passed
+        * those tables.
+        */
+       maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_PER_VPORT, 1);
+       if (IS_ERR(maj_prio)) {
+               err = PTR_ERR(maj_prio);
+               goto out_err;
+       }
+
        set_prio_attrs(steering->fdb_root_ns);
        return 0;