From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1105A0C46; Mon, 27 Sep 2021 19:58:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 414ED410DC; Mon, 27 Sep 2021 19:58:53 +0200 (CEST) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by mails.dpdk.org (Postfix) with ESMTP id 6B8D140E3C; Mon, 27 Sep 2021 19:58:52 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.14.7/8.14.7) with ESMTP id 18RHwmfI023087; Mon, 27 Sep 2021 10:58:49 -0700 From: Rahul Lakkireddy To: dev@dpdk.org Cc: nikhil.vasoya@chelsio.com, stable@dpdk.org Date: Mon, 27 Sep 2021 23:26:30 +0530 Message-Id: <1632765390-15457-1-git-send-email-rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 Subject: [dpdk-dev] [PATCH] net/cxgbe: avoid sending link params change from VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nikhil Vasoya VFs are not allowed to change physical link params when a port module change is detected. The firmware already returns appropriate permission error when VF tries to change physical link params. But, make sure to avoid sending the command to firmware from VF in the first place and prevent flooding firmware debug logs with permission errors. Fixes: a83041b1e998 ("net/cxgbe: rework and simplify link handling") Cc: stable@dpdk.org Signed-off-by: Nikhil Vasoya Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/base/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index b60bcdc3bc..cdcd7e5510 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -4597,7 +4597,7 @@ static void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) t4_os_link_changed(adapter, pi->pidx); } - if (mod_changed) { + if (mod_changed != 0 && is_pf4(adapter) != 0) { u32 mod_caps = lc->admin_caps; int ret; -- 2.27.0