net/mlx5: missing error code in esw_create_offloads_fdb_table()
Subsystems (5)
PATCH 1/1 net/mlx5: missing error code in esw_create_offloads_fdb_table()
We accidentally return success when we had intended to return an error code.
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1 -0
@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) root_ns =mlx5_get_flow_namespace (dev,MLX5_FLOW_NAMESPACE_FDB );if (!root_ns) { + err = -EINVAL ;esw_warn (dev,"Failed to get FDB flow namespace\n" ); goto ns_err; }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) · line 189
Quoted 7 lines
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) root_ns =mlx5_get_flow_namespace (dev,MLX5_FLOW_NAMESPACE_FDB );if (!root_ns) { + err = -EINVAL ;esw_warn (dev,"Failed to get FDB flow namespace\n" ); goto ns_err; }
Hi,
Thanks for the patch.
I'm not sure EINVAL is the right error here though. Maybe -ENOTSUPP is a bit more appropriate here.
Regards,
Matan
Quoted 2 lines · Matan Barak
I'm not sure EINVAL is the right error here though. Maybe
-ENOTSUPPis a bit more appropriate here.
I agree, Dan, can you please change to be along Matan's suggestion?
Or.
Quoted 5 lines · Or Gerlitz
Quoted 2 lines · Matan Barak
I'm not sure EINVAL is the right error here though. Maybe
-ENOTSUPPis a bit more appropriate here.I agree, Dan, can you please change to be along Matan's suggestion?
Or,
Dan already did it before Matan's response and we have very vivid discussion about it [1].
[1] http://marc.info/?t=146841063000002&r=1&w=2
Quoted 7 lines
Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>
Thanks Dan,
Quoted 14 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>---
v2: return-ENOTSUPPinstead --EINVALdrivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) · line 189
Quoted 7 lines
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) root_ns =mlx5_get_flow_namespace (dev,MLX5_FLOW_NAMESPACE_FDB );if (!root_ns) { + err = -ENOTSUPP ;esw_warn (dev,"Failed to get FDB flow namespace\n" ); goto ns_err; }
Thanks.
Quoted 7 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>---
v2: return-ENOTSUPPinstead --EINVAL
I'm a little bit confused. Why did you prefer ENOTSUPP over EOPNOTSUPP?
Thanks.
A message that is not in the archive (sent off-list or not yet received): 20160713130459.GF10079-2ukJVAZIZ/[email protected]
Quoted 10 lines · Leon Romanovsky
Quoted 7 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>---
v2: return-ENOTSUPPinstead --EINVALI'm a little bit confused. Why did you prefer ENOTSUPP over EOPNOTSUPP?
According to [1], it fits our case better - operation is valid and make sense, but isn't supported.
[1] https://lists.gnu.org/archive/html/bug-glibc/2002-08/msg00017.html
Quoted 3 lines
Thanks.
Quoted 11 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>v2: return
-ENOTSUPPinstead --EINVALdrivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) · line 186
Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) root_ns =mlx5_get_flow_namespace (dev,MLX5_FLOW_NAMESPACE_FDB );if (!root_ns) { + err = -ENOTSUPP ;
Did you mean ENOTSUP?
I thought ENOTSUPP was not to be used outside NFS, and isn't properly exported to userspace..
$ find /usr/include -name "*errno*" | xargs grep 524
Jason
Quoted 19 lines · Jason Gunthorpe
Quoted 11 lines · Dan Carpenter
We accidentally return success when we had intended to return an error code.
Fixes 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')Signed-off-by Dan Carpenter <[email protected]>v2: return
-ENOTSUPPinstead --EINVALdrivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.cdrivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) · line 186
Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1
-0@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) root_ns =mlx5_get_flow_namespace (dev,MLX5_FLOW_NAMESPACE_FDB );if (!root_ns) { + err = -ENOTSUPP ;Did you mean ENOTSUP?
Quoted 4 lines
I thought ENOTSUPP was not to be used outside NFS, and isn't properly exported to userspace..
$ find /usr/include -name "*errno*" | xargs grep 524
I asked similar question [1] with different return value in reply to this patch.
[1] http://marc.info/?l=linux-netdev&m=146843171508230&w=2
Quoted 6 lines
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html