From patchwork Fri Dec 8 09:27:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 175695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5339986vqy; Fri, 8 Dec 2023 01:28:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVis4TXoSi3YNV//s+JaPlGyfxm7BOtUb54qSkqC8inaI/gQuQTgQZmF6xSzwBzeGMLXJB X-Received: by 2002:a17:90b:118f:b0:286:6cc1:5fdb with SMTP id gk15-20020a17090b118f00b002866cc15fdbmr3535291pjb.94.1702027706427; Fri, 08 Dec 2023 01:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702027706; cv=none; d=google.com; s=arc-20160816; b=p+a3o3USDbmnW9dDCP0BByVuuVPAuqY8uFGIfMmbtB37V0CFGJ5Wjf6Fv3fe3C/orF d0IS91C2pXIWDShuSTxSh9GccDZxp2Jj812A07m9xXNHpImsNGgtTHHBgbfXxefitRH9 QDeHk9NWBTjuQnCZJrXXNI3p6l2vyiurlZxLP115Y9MteK90E+ieIQ1cZiW1zoExMPVj FnEWHVfWf8TU6WKj9hFvIaT6lKJBaMDns0gxODXKZofLgCtbKs7/zVXiTihU1n30DO8O HGUonKMt7PNsHFefliKTGe3/89ZPR7wFiQB/KV6412NQCut7nMaHpf8gqh6MOclg1hLW rL6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=/SbDv81f8aUiAQr9WB+KgRejK4bzCZNzWZChpeYFMdQ=; fh=+k3MSxe8bGu7+vpCqCHH3WWBYVLMuN2nEavX9/ZyOOI=; b=VivbMIUQIHrVABVxcNUJ4YNuBxzlt8lJsGEGVJ80+KP7G+PFNMdgICaMPcBWK4hAND Pr/v4gt2tU/jwv2erVmhzOrEKWdheUxNnf1x+Q+vtLJwHPEVOVNL8J8KrWD8XvOXFzjE PJCrqyDwhXZF/Y4Dxk9aT6Bx68QSypX8edTzasr9jITNDxxaqQnec27LBN+EoOduNO4V JlMyI0Ov6SlOeZmF4L69EqN2e+hmmY7DKCH5kdJ7scfq6ogyR+A50t+l3ZFaCsAOos8+ R1Jkkz1OKWYA5X2mzuBT/ztfKnjKuzfui+8zkeg/TgwPsmFDomjdh7bLE6mvTOpfHMvz H/gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Mg2s7S0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ep15-20020a17090ae64f00b0028656e422f2si2719537pjb.55.2023.12.08.01.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:28:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Mg2s7S0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3DDD080ECF34; Fri, 8 Dec 2023 01:28:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235865AbjLHJ2M (ORCPT + 99 others); Fri, 8 Dec 2023 04:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235849AbjLHJ2K (ORCPT ); Fri, 8 Dec 2023 04:28:10 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C92CB172E; Fri, 8 Dec 2023 01:28:14 -0800 (PST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B81KRK0028755; Fri, 8 Dec 2023 01:28:01 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=/SbDv81f8aUiAQr9WB+KgRejK4bzCZNzWZChpeYFMdQ=; b=Mg2s7S0AgHZg+UZ8F7cZgKwQNBAdpQZlye56Mx9YFtrg0eOsy+TWqoYNBgm9HOokcjik FDIsraN7ggk/i34x5t6g0c3DpkfYQKBLg9GeouXDvEAIqvaxNgLkKqAW0nPw61gjFrYW EDVgT8pcl8QP6LC7Pgkz7Vu6RiW1KhlbY5h26UkE3hpDTcNfgErDweDUBmZsRLb5CjQu M2idBUC/naRGAucUc7xma37m0OSUx+Zd4Sd5XoGygvvxKra+IVxmXl9ZzEgmOVhUUcPZ jC7xAyHaCOBmij90UmJxVmqKjtjipXcUwuv8Axd8eQk4o8KXdThfV0ES8ATEBssCcQAK og== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uubddcfuk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 01:28:01 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 8 Dec 2023 01:27:59 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 8 Dec 2023 01:27:59 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 4E1BB3F7050; Fri, 8 Dec 2023 01:27:55 -0800 (PST) From: Hariprasad Kelam To: , CC: , , , , , , , , , , Subject: [net] octeontx2-af: Fix pause frame configuration Date: Fri, 8 Dec 2023 14:57:54 +0530 Message-ID: <20231208092754.23462-1-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Hso7myGnRPfBIIAZF8GX1tvom3R3czf0 X-Proofpoint-GUID: Hso7myGnRPfBIIAZF8GX1tvom3R3czf0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_04,2023-12-07_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 01:28:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784705404750299550 X-GMAIL-MSGID: 1784705404750299550 The current implementation's default Pause Forward setting is causing unnecessary network traffic. This patch disables Pause Forward to address this issue. Fixes: 1121f6b02e7a ("octeontx2-af: Priority flow control configuration support") Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c index af21e2030cff..4728ba34b0e3 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c @@ -373,6 +373,11 @@ void rpm_lmac_pause_frm_config(void *rpmd, int lmac_id, bool enable) cfg |= RPMX_MTI_MAC100X_COMMAND_CONFIG_TX_P_DISABLE; rpm_write(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG, cfg); + /* Disable forward pause to driver */ + cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG); + cfg &= ~RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_FWD; + rpm_write(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG, cfg); + /* Enable channel mask for all LMACS */ if (is_dev_rpm2(rpm)) rpm_write(rpm, lmac_id, RPM2_CMR_CHAN_MSK_OR, 0xffff); @@ -616,12 +621,10 @@ int rpm_lmac_pfc_config(void *rpmd, int lmac_id, u8 tx_pause, u8 rx_pause, u16 p if (rx_pause) { cfg &= ~(RPMX_MTI_MAC100X_COMMAND_CONFIG_RX_P_DISABLE | - RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_IGNORE | - RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_FWD); + RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_IGNORE); } else { cfg |= (RPMX_MTI_MAC100X_COMMAND_CONFIG_RX_P_DISABLE | - RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_IGNORE | - RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_FWD); + RPMX_MTI_MAC100X_COMMAND_CONFIG_PAUSE_IGNORE); } if (tx_pause) {