diff options
author | 2017-01-12 13:04:01 +0200 | |
---|---|---|
committer | 2017-01-29 23:01:38 +0200 | |
commit | eff596da48784316ccb83bef82bc1213b512d5e0 (patch) | |
tree | 481f61a103292580d00cb193944da6557aedd9b6 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |
parent | net/mlx5: Change ENOTSUPP to EOPNOTSUPP (diff) | |
download | linux-dev-eff596da48784316ccb83bef82bc1213b512d5e0.tar.xz linux-dev-eff596da48784316ccb83bef82bc1213b512d5e0.zip |
net/mlx5: Return EOPNOTSUPP when failing to get steering name-space
When we fail to retrieve a hardware steering name-space, the returned error
code should say that this operation is not supported. Align the various
places in the driver where this call is made to this convention.
Also, make sure to warn when we fail to retrieve a SW (ANCHOR) name-space.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 0ac7a2fc916c..6346a8f5883b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1822,7 +1822,7 @@ static int create_anchor_flow_table(struct mlx5_flow_steering *steering) struct mlx5_flow_table *ft; ns = mlx5_get_flow_namespace(steering->dev, MLX5_FLOW_NAMESPACE_ANCHOR); - if (!ns) + if (WARN_ON(!ns)) return -EINVAL; ft = mlx5_create_flow_table(ns, ANCHOR_PRIO, ANCHOR_SIZE, ANCHOR_LEVEL, 0); if (IS_ERR(ft)) { |