From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 3/8] net/mlx5: E-Switch, Err when retrieving steering name-space fails
Date: Fri, 27 Jan 2017 22:38:38 +0200 [thread overview]
Message-ID: <20170127203843.3206-4-saeedm@mellanox.com> (raw)
In-Reply-To: <20170127203843.3206-1-saeedm@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Make sure to return error when we failed retrieving the FDB steering
name space. Also, while around, correctly print the error when mode
change revert fails in the warning message.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 5803216157cf..c61bca138e65 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -424,6 +424,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) {
esw_warn(dev, "Failed to get FDB flow namespace\n");
+ err = -EOPNOTSUPP;
goto ns_err;
}
@@ -655,7 +656,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw)
esw_warn(esw->dev, "Failed setting eswitch to offloads, err %d\n", err);
err1 = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY);
if (err1)
- esw_warn(esw->dev, "Failed setting eswitch back to legacy, err %d\n", err);
+ esw_warn(esw->dev, "Failed setting eswitch back to legacy, err %d\n", err1);
}
if (esw->offloads.inline_mode == MLX5_INLINE_MODE_NONE) {
if (mlx5_eswitch_inline_mode_get(esw,
--
2.11.0
next prev parent reply other threads:[~2017-01-27 21:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 20:38 [pull request][net 0/8] Mellanox mlx5 fixes 2017-01-27 Saeed Mahameed
2017-01-27 20:38 ` [net 1/8] net/mlx5: Change ENOTSUPP to EOPNOTSUPP Saeed Mahameed
2017-01-27 20:38 ` [net 2/8] net/mlx5: Return EOPNOTSUPP when failing to get steering name-space Saeed Mahameed
2017-01-27 20:38 ` Saeed Mahameed [this message]
2017-01-27 20:38 ` [net 4/8] net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy Saeed Mahameed
2017-01-27 20:38 ` [net 5/8] net/mlx5e: Support TC encapsulation offloads with upper devices Saeed Mahameed
2017-01-27 20:38 ` [net 6/8] net/mlx5e: Modify TIRs hash only when it's needed Saeed Mahameed
2017-01-27 20:38 ` [net 7/8] net/mlx5e: Fix update of hash function/key via ethtool Saeed Mahameed
2017-01-27 21:50 ` Tom Herbert
2017-01-28 11:06 ` Saeed Mahameed
2017-01-27 20:38 ` [net 8/8] net/mlx5e: Check ets capability before ets query FW command Saeed Mahameed
2017-01-29 20:57 ` [pull request][net 0/8] Mellanox mlx5 fixes 2017-01-27 Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127203843.3206-4-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox