From patchwork Thu Nov 5 20:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 322248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F21B8C55178 for ; Thu, 5 Nov 2020 20:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9238B20867 for ; Thu, 5 Nov 2020 20:22:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="aRhx4Rgs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732523AbgKEUWQ (ORCPT ); Thu, 5 Nov 2020 15:22:16 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:19757 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732511AbgKEUWN (ORCPT ); Thu, 5 Nov 2020 15:22:13 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 05 Nov 2020 12:22:17 -0800 Received: from sx1.mtl.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 5 Nov 2020 20:22:12 +0000 From: Saeed Mahameed To: Jakub Kicinski CC: , "David S. Miller" , "Parav Pandit" , Roi Dayan , Saeed Mahameed 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 Message-ID: <20201105202129.23644-6-saeedm@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201105202129.23644-1-saeedm@nvidia.com> References: <20201105202129.23644-1-saeedm@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604607737; bh=j7LWYgUNBaxUHkIVrP5NdUjX6NIjV8mO/ie4oV5iAeA=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=aRhx4RgsHCqYt5rYyv8P6WB64bIBAA4QSlvk1trWsFVRmCLh6uicMeZclCJQvPi0G JvjwYdXzjDNjP0ewZz23HhomoISuKYeY/SF1qbIh6Hjm5obBP+NkezYm2fYueVQNlw 6n+IU80be3ebGx+SvVg8e4elI20zukzlGzwsB4PQov1Wbgj5FufJZdpUjNdrqe+AnA h8oDCFCpQb4xyWq808cmiW2nB2CBKEUXrvONB7foTqUbcj8J3523nnDU/ODz0WyEFV AWgOWPeTXdhsw3qABVWC5kFwNgrOJWYr2cuA3HUGrRRJxG0eAGBWzgMWwtjcnrR05a QgQStmESXdnWQ== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Parav Pandit 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 Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- 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;