]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net/mlx5: Add support for more namespaces when allocating modify header
authorMark Bloch <markb@mellanox.com>
Tue, 28 Aug 2018 11:18:43 +0000 (14:18 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Wed, 5 Sep 2018 04:57:23 +0000 (07:57 +0300)
There are RX and TX flow steering namespaces with different number of
actions. Initialize them accordingly.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

index 37bea30b68acf9ee22a94f1b4ab1a98d07da4a2a..9ae777e565293770a58e12632789d5d9bcd8a08c 100644 (file)
@@ -667,9 +667,14 @@ int mlx5_modify_header_alloc(struct mlx5_core_dev *dev,
                table_type = FS_FT_FDB;
                break;
        case MLX5_FLOW_NAMESPACE_KERNEL:
+       case MLX5_FLOW_NAMESPACE_BYPASS:
                max_actions = MLX5_CAP_FLOWTABLE_NIC_RX(dev, max_modify_header_actions);
                table_type = FS_FT_NIC_RX;
                break;
+       case MLX5_FLOW_NAMESPACE_EGRESS:
+               max_actions = MLX5_CAP_FLOWTABLE_NIC_TX(dev, max_modify_header_actions);
+               table_type = FS_FT_NIC_TX;
+               break;
        default:
                return -EOPNOTSUPP;
        }