net/mlx5: Split FDB fast path prio to multiple namespaces
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / eswitch.c
index ea7dedc2d5adfc48081387619222c8e07da43bd4..d004957328f9ca9daa6b46c375310b1f20d1af31 100644 (file)
@@ -263,7 +263,7 @@ static int esw_create_legacy_fdb_table(struct mlx5_eswitch *esw)
        esw_debug(dev, "Create FDB log_max_size(%d)\n",
                  MLX5_CAP_ESW_FLOWTABLE_FDB(dev, log_max_ft_size));
 
-       root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
+       root_ns = mlx5_get_fdb_sub_ns(dev, 0);
        if (!root_ns) {
                esw_warn(dev, "Failed to get FDB flow namespace\n");
                return -EOPNOTSUPP;
@@ -1198,7 +1198,7 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw,
        if (counter) {
                flow_act.action |= MLX5_FLOW_CONTEXT_ACTION_COUNT;
                drop_ctr_dst.type = MLX5_FLOW_DESTINATION_TYPE_COUNTER;
-               drop_ctr_dst.counter = counter;
+               drop_ctr_dst.counter_id = mlx5_fc_id(counter);
                dst = &drop_ctr_dst;
                dest_num++;
        }
@@ -1285,7 +1285,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw,
        if (counter) {
                flow_act.action |= MLX5_FLOW_CONTEXT_ACTION_COUNT;
                drop_ctr_dst.type = MLX5_FLOW_DESTINATION_TYPE_COUNTER;
-               drop_ctr_dst.counter = counter;
+               drop_ctr_dst.counter_id = mlx5_fc_id(counter);
                dst = &drop_ctr_dst;
                dest_num++;
        }
@@ -1746,7 +1746,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
        esw->enabled_vports = 0;
        esw->mode = SRIOV_NONE;
        esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE;
-       if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, encap) &&
+       if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) &&
            MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap))
                esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_BASIC;
        else