netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>,
	"Parav Pandit" <parav@nvidia.com>, Roi Dayan <roid@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [net v2 5/7] net/mlx5: E-switch, Avoid extack error log for disabled vport
Date: Thu, 5 Nov 2020 12:21:27 -0800	[thread overview]
Message-ID: <20201105202129.23644-6-saeedm@nvidia.com> (raw)
In-Reply-To: <20201105202129.23644-1-saeedm@nvidia.com>

From: Parav Pandit <parav@nvidia.com>

When E-switch vport is disabled, querying its hardware address is
unsupported.
Avoid setting extack error log message in such case.

Fixes: f099fde16db3 ("net/mlx5: E-switch, Support querying port function mac address")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 6e6a9a563992..e8e6294c7cca 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1902,8 +1902,6 @@ int mlx5_devlink_port_function_hw_addr_get(struct devlink *devlink,
 		ether_addr_copy(hw_addr, vport->info.mac);
 		*hw_addr_len = ETH_ALEN;
 		err = 0;
-	} else {
-		NL_SET_ERR_MSG_MOD(extack, "Eswitch vport is disabled");
 	}
 	mutex_unlock(&esw->state_lock);
 	return err;
-- 
2.26.2


  parent reply	other threads:[~2020-11-05 20:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 20:21 [pull request][net v2 0/7] mlx5 fixes 2020-11-03 Saeed Mahameed
2020-11-05 20:21 ` [net v2 1/7] net/mlx5e: Fix modify header actions memory leak Saeed Mahameed
2020-11-07 20:50   ` patchwork-bot+netdevbpf
2020-11-05 20:21 ` [net v2 2/7] net/mlx5e: Protect encap route dev from concurrent release Saeed Mahameed
2020-11-05 20:21 ` [net v2 3/7] net/mlx5e: Use spin_lock_bh for async_icosq_lock Saeed Mahameed
2020-11-05 20:21 ` [net v2 4/7] net/mlx5: Fix deletion of duplicate rules Saeed Mahameed
2020-11-05 20:21 ` Saeed Mahameed [this message]
2020-11-05 20:21 ` [net v2 6/7] net/mlx5e: Fix VXLAN synchronization after function reload Saeed Mahameed
2020-11-05 20:21 ` [net v2 7/7] net/mlx5e: Fix incorrect access of RCU-protected xdp_prog Saeed Mahameed
2020-11-07 20:41 ` [pull request][net v2 0/7] mlx5 fixes 2020-11-03 Jakub Kicinski

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=20201105202129.23644-6-saeedm@nvidia.com \
    --to=saeedm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@nvidia.com \
    --cc=roid@nvidia.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;
as well as URLs for NNTP newsgroup(s).