From patchwork Thu Nov 30 07:58:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 171766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp220666vqy; Wed, 29 Nov 2023 23:59:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFA6a4YhdErDPbex0CtYFqmSf+s+PkeunCIHNrOnQP5k4vGWUJjXK1KU7aQnNZ8v1xTEeqJ X-Received: by 2002:a05:6a21:7894:b0:18b:a5ab:bb0b with SMTP id bf20-20020a056a21789400b0018ba5abbb0bmr19171444pzc.62.1701331147530; Wed, 29 Nov 2023 23:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331147; cv=none; d=google.com; s=arc-20160816; b=rUz4WsOihfTKzgS59QlYa5878hVlfVg7xBIoNVnyZn/aEp7cr1T+Bs2My6+NxGKOgL TtuohtQ4zwIIapPhCz/HG+5jUbwLDpe/ggCU0d3u/LRQTxgsqG8bauP5ECElwBTJlc9S pKIouN6ucw23B8tIicWVba8B9fKB5rbVMv16bLrSUCrk6IotwGwVARjHk8A7sBiN6yOB 64tJPFROsqd5tIRzP09nDtqVHOpyzp7/VKGxhdn661j8ZWn2TlpzW9l+r31s8iA3F3E5 8MTe6l9DSHa3ui5Y/s3iCF+ikzR+rUyrWU1loffggFaOAwzrY+zVknIsv3VuRdNIEcqr WQBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xBb0zP+jC7WG2SgjUMoJSzShTKpjS48I1uiIsLvToHM=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=uX+GT459W1qlHIyshLak1RSpJ6OvSQu93kzyI/95u3Fz1Ecb0ZRP35ZUH/ZdzBmbM+ 1D0mzfNtmYIOB7IULpj/vgjY/Qp6LsQqfOC83rBSLholk9PJa6E1C6QYDsi+3hazumbv 6PQITIiuQoO1feE6PzJCKjyHe4/Bfhaj8NG1bv3xDsisFGToQoNL9F/iL4V/gIuGmWjg HEi1+PV+Fh0dzifBTnwUG+ZPwM/N82XJXMZDVE3sKXTsWorXvMIn4okCYNxm/nwsebp5 hssfLbGqIt/guiKH+sHE525Ldv7q9s1N0D7toU8YwCZZEg8whNtAVtQtF3f+7D8MmsWn ClRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=C24f2woc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id v9-20020a170902b7c900b001cfd8c9c4e6si608504plz.601.2023.11.29.23.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=C24f2woc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id BE07E8039D34; Wed, 29 Nov 2023 23:59:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344786AbjK3H6i (ORCPT + 99 others); Thu, 30 Nov 2023 02:58:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344773AbjK3H6g (ORCPT ); Thu, 30 Nov 2023 02:58:36 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CD210C9; Wed, 29 Nov 2023 23:58:41 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU7M5to028224; Wed, 29 Nov 2023 23:58:29 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=xBb0zP+jC7WG2SgjUMoJSzShTKpjS48I1uiIsLvToHM=; b=C24f2woct3PSqrapOAGw+hSViY40Icz0SRHYGNOZPOu4Bub56q7Z7DpIewm70jq8P6bv hOz2DirRI1SYOCEg0Y+D1QhY1DxUZDCcqeeUS//oZ/nbQFy8xsdtP0M32z142VZ/pwM7 QB1T8OeTqm6Q80eXHomUk14g4N3MF9WCdNjrXdG2DNx7gxQwRRAnpEZjhlgl/VE9BiMD /Uw3x1aKkkaR2S4XbZS45ja2SOH9wWgVwX6z2ORvg+vkJnevVrVrpCt17eq8lwFXyZAY 3idc6lgBJByF2yi1yqmO3BBvPJhaVoHrfMv2xPIns7RxiTAGrPX7g1BAmqkJpnqncGZB Ow== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3upc1v2hyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 23:58:29 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Nov 2023 23:58:27 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 29 Nov 2023 23:58:27 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id E00503F704B; Wed, 29 Nov 2023 23:58:23 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v3 PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled Date: Thu, 30 Nov 2023 13:28:14 +0530 Message-ID: <20231130075818.18401-2-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231130075818.18401-1-gakula@marvell.com> References: <20231130075818.18401-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 5JFtjLrtMidqZDqxjwRTww0aVdcc8gja X-Proofpoint-ORIG-GUID: 5JFtjLrtMidqZDqxjwRTww0aVdcc8gja 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-11-30_05,2023-11-29_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:59:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783975009508608580 X-GMAIL-MSGID: 1783975009508608580 From: Nithin Dabilpuram When MCS external bypass is disabled, MCS returns additional 2 credits(32B) for every packet Tx'ed on LMAC. To account for these extra credits, NIX_AF_TX_LINKX_NORM_CREDIT.CC_MCS_CNT needs to be configured as otherwise NIX Tx credits would overflow and will never be returned to idle state credit count causing issues with credit control and MTU change. This patch fixes the same by configuring CC_MCS_CNT at probe time for MCS enabled SoC's Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic") Signed-off-by: Nithin Dabilpuram Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Reviewed-by: Wojciech Drewek --- drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 12 ++++++++++++ drivers/net/ethernet/marvell/octeontx2/af/mcs.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 ++++++++ 4 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c index c43f19dfbd74..d6effbe46208 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c @@ -1219,6 +1219,17 @@ struct mcs *mcs_get_pdata(int mcs_id) return NULL; } +bool is_mcs_bypass(int mcs_id) +{ + struct mcs *mcs_dev; + + list_for_each_entry(mcs_dev, &mcs_list, mcs_list) { + if (mcs_dev->mcs_id == mcs_id) + return mcs_dev->bypass; + } + return true; +} + void mcs_set_port_cfg(struct mcs *mcs, struct mcs_port_cfg_set_req *req) { u64 val = 0; @@ -1447,6 +1458,7 @@ static void mcs_set_external_bypass(struct mcs *mcs, u8 bypass) else val &= ~BIT_ULL(6); mcs_reg_write(mcs, MCSX_MIL_GLOBAL, val); + mcs->bypass = bypass; } static void mcs_global_cfg(struct mcs *mcs) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.h b/drivers/net/ethernet/marvell/octeontx2/af/mcs.h index 0f89dcb76465..ccd43c3f3460 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.h @@ -149,6 +149,7 @@ struct mcs { u16 num_vec; void *rvu; u16 *tx_sa_active; + u8 bypass; }; struct mcs_ops { @@ -206,6 +207,7 @@ void mcs_get_custom_tag_cfg(struct mcs *mcs, struct mcs_custom_tag_cfg_get_req * int mcs_alloc_ctrlpktrule(struct rsrc_bmap *rsrc, u16 *pf_map, u16 offset, u16 pcifunc); int mcs_free_ctrlpktrule(struct mcs *mcs, struct mcs_free_ctrl_pkt_rule_req *req); int mcs_ctrlpktrule_write(struct mcs *mcs, struct mcs_ctrl_pkt_rule_write_req *req); +bool is_mcs_bypass(int mcs_id); /* CN10K-B APIs */ void cn10kb_mcs_set_hw_capabilities(struct mcs *mcs); diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h index c4d999ef5ab4..9887edccadf7 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h @@ -345,6 +345,7 @@ struct nix_hw { struct nix_txvlan txvlan; struct nix_ipolicer *ipolicer; u64 *tx_credits; + u64 cc_mcs_cnt; }; /* RVU block's capabilities or functionality, diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c index c112c71ff576..daafce5fef46 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c @@ -12,6 +12,7 @@ #include "rvu_reg.h" #include "rvu.h" #include "npc.h" +#include "mcs.h" #include "cgx.h" #include "lmac_common.h" #include "rvu_npc_hash.h" @@ -4389,6 +4390,12 @@ static void nix_link_config(struct rvu *rvu, int blkaddr, SDP_HW_MAX_FRS << 16 | NIC_HW_MIN_FRS); } + /* Get MCS external bypass status for CN10K-B */ + if (mcs_get_blkcnt() == 1) { + /* Adjust for 2 credits when external bypass is disabled */ + nix_hw->cc_mcs_cnt = is_mcs_bypass(0) ? 0 : 2; + } + /* Set credits for Tx links assuming max packet length allowed. * This will be reconfigured based on MTU set for PF/VF. */ @@ -4412,6 +4419,7 @@ static void nix_link_config(struct rvu *rvu, int blkaddr, tx_credits = (lmac_fifo_len - lmac_max_frs) / 16; /* Enable credits and set credit pkt count to max allowed */ cfg = (tx_credits << 12) | (0x1FF << 2) | BIT_ULL(1); + cfg |= (nix_hw->cc_mcs_cnt << 32); link = iter + slink; nix_hw->tx_credits[link] = tx_credits; From patchwork Thu Nov 30 07:58:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 171765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp220665vqy; Wed, 29 Nov 2023 23:59:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhpsjZ6v9MskjrdEK+X/0ltX5i37mFNs0XQtZ4brOecMgotK0gmeMcZ3s1xNtuVT4Wre6K X-Received: by 2002:a05:6a20:7f98:b0:189:baaa:23e7 with SMTP id d24-20020a056a207f9800b00189baaa23e7mr28870814pzj.40.1701331147515; Wed, 29 Nov 2023 23:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331147; cv=none; d=google.com; s=arc-20160816; b=Kab7JmM+Tgn1DWqwkqnKtoXVXvcSsq0EdXKVydHXt6vNlW/qXE2MHXeXaNPuY3Jl2h 3DfJc4+Lj45FeUwohqMN01LiavixFnkhaOuF52kU3Cn21hG1tX0V1QsKSDpUI0FF3TK6 EzWAZ5S463E5Lknq9WHqNXcaGFfJcd8RdTxhUXkxBD0f65mZfzjxCba2RehgoB4OG4CC ogkRoPL4+hZq9ZwX+6smrNx9HWSobePofkNypTHt5R533YygBVjWUQSpFH1HasAiYxjp 1W0kbkH6c59VbunXWXjtB/G053e35T+gAyZ7GT1I6Og+/5/hzFbhc+HXvPecSeP2RxYO 3H5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=w6KvSFjmYmnKUl+4DYgSmLN/LV4utOciJLD5bCbmYHo=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=XRZKH8uE4OkrixN1Shcknu3NJH0V8BpM6wS69szxBNJhB824PYW1oPAVdUrVNmoTNX cFx9JOVvSZfv1CI5YKnh8J1WquB93KWBpGbcr59DJ54jSq8CKspjrV1csfm9T3zHmMaK 2gHFkOuEo+1s6n1FtJrkzvmihSox4Of5AmFrLSJTs4+ZAOUJx0ZWNYFVmNWkZRhUIlRq 11s8Udx6VCAhQKr5IXDTcldYJFd6K9JstVauWPwLkZQjILZa1w9Zs0BRTlOuZ0qyHYeC 7YOGLRbdcWJLdSS9pCHiCt8Dz98ylbKfkUvga6SO4UlXEv79Q2Mo6YZQ2MHy4bOlvP8X 6b9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=DNrz249x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x28-20020a634a1c000000b00585a5e9a965si776868pga.161.2023.11.29.23.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=DNrz249x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 705F2804EE66; Wed, 29 Nov 2023 23:59:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344731AbjK3H6d (ORCPT + 99 others); Thu, 30 Nov 2023 02:58:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344719AbjK3H6c (ORCPT ); Thu, 30 Nov 2023 02:58:32 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8A2A3; Wed, 29 Nov 2023 23:58:38 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU7NER1027662; Wed, 29 Nov 2023 23:58:33 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=w6KvSFjmYmnKUl+4DYgSmLN/LV4utOciJLD5bCbmYHo=; b=DNrz249xa/pVTvuee6x20b9dhBYF1pl8BZ37/eVURo/CkzpAVQz6PIen6KC2nsWO+c6A pyQH1NkqEa97Ey5mCBNGwb5FkDOEL16xFLjITGy/GnACHvCdS82xXvcigq8JSkGI0QEC fCStx7G9XBimv6ILNZC6hnZFp8arHahEmdchaRJh8jTb4pzitNHLwhhayQrc4jlvkbyq jsR9g8NV4DH45A2sC3PL+Ctp0cxoE+HuIa8GY0o+V1sad0A4q74Z83rxdxX+dzhtgPeB 9a3045GTqCJmI9h0d5yd626Gsaa9MsZ9797XKnnGG3gmG7czHkFCwdwGGFubcmWe85rj oA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3upc1v2hyu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 23:58:33 -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; Wed, 29 Nov 2023 23:58:31 -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; Wed, 29 Nov 2023 23:58:31 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 0EA6E3F7044; Wed, 29 Nov 2023 23:58:27 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v3 PATCH 2/5] octeontx2-af: Fix mcs sa cam entries size Date: Thu, 30 Nov 2023 13:28:15 +0530 Message-ID: <20231130075818.18401-3-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231130075818.18401-1-gakula@marvell.com> References: <20231130075818.18401-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: oQNxiL4JNiyNpS35ro75VEZcBEh7VomU X-Proofpoint-ORIG-GUID: oQNxiL4JNiyNpS35ro75VEZcBEh7VomU 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-11-30_05,2023-11-29_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:59:01 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783975009330119380 X-GMAIL-MSGID: 1783975009330119380 On latest silicon versions SA cam entries increased to 256. This patch fixes the datatype of sa_entries in mcs_hw_info struct to u16 to hold 256 entries. Fixes: 080bbd19c9dd ("octeontx2-af: cn10k: mcs: Add mailboxes for port related operations") Signed-off-by: Geetha sowjanya Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h index 6845556581c3..5df42634ceb8 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h @@ -1945,7 +1945,7 @@ struct mcs_hw_info { u8 tcam_entries; /* RX/TX Tcam entries per mcs block */ u8 secy_entries; /* RX/TX SECY entries per mcs block */ u8 sc_entries; /* RX/TX SC CAM entries per mcs block */ - u8 sa_entries; /* PN table entries = SA entries */ + u16 sa_entries; /* PN table entries = SA entries */ u64 rsvd[16]; }; From patchwork Thu Nov 30 07:58:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 171763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp220663vqy; Wed, 29 Nov 2023 23:59:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHY+Jq9EtSNKxSl4HAhJgNxMxyGW96afczRsfpqc/BWmyywwkaOc+Hc7u3EOCcYDEzBureY X-Received: by 2002:a17:90b:350d:b0:285:b6b1:a2d6 with SMTP id ls13-20020a17090b350d00b00285b6b1a2d6mr16605315pjb.33.1701331147524; Wed, 29 Nov 2023 23:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331147; cv=none; d=google.com; s=arc-20160816; b=fQzHFMpSzCUf1FXt8yjU24K8dlQKauXAUrJ9ZPhxmVom8B3/+9g6dxGEIzYqHSN5N/ Gf5pNGa5uOg9MPKREx5bLpK/9Wmr9K4D7kmA5q4Ba5TcAfj8KUI8jw9d96tuLDZp7Jwq KEypBQN2OkWdFvSnH6JS8G3vthJcBCtb+At1VhPDnf0QD1masWi4GprvJ2LNORXclgvQ 0+dQyqd87eGytG9aBRiL6Ltd9R6/KoSJDxWe7V7vrMxov2n+JxACKi4h5NTaetrwfbV3 t/8kkDM+BXXcNbET46P9IRRGqwkvnNNYQpYtICWszcLTEOJPmVbpGDZyGB2y5IkxB+9n qIbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tLffYGulcEiDS391uyT0+s5E4ygqi5Ia3Ebu69zKUgs=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=GfGRoLCNwc/uiU2xo6DZou696248gIWqg8VqVuxwm4RmyaLFvy/pCe8E63D2tsJ5Wa G08KSNYWm6N5K31Y2rftQiXd2HBBxoVZRIUGnDaL7qA2iuD/1NQiPgpQLbNyRh1K21he uROJnEaqEXKf3xn7wFzS99TUaOUGNiz56uH+a+KNi5gBwdm/fHc+O8K2fdGsAtVSVRLC FjszlyBXpBUYkuG7sYBznHrd4SKEyM7RpPIBXMw5DhTorVBfbNv8ZpauXWB4tChUfiNa T9wGCVEufzxFidoxhvqQ9syx+6nh9GunbFNdnI2PSb6ljlAdQQ0Yhxch4oVuGmdPnS1L bp+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=cxOp0FXF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x12-20020a17090a9dcc00b00283a1123a02si3078089pjv.96.2023.11.29.23.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=cxOp0FXF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 4A462826E6A3; Wed, 29 Nov 2023 23:59:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344794AbjK3H6m (ORCPT + 99 others); Thu, 30 Nov 2023 02:58:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344776AbjK3H6g (ORCPT ); Thu, 30 Nov 2023 02:58:36 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1BF810DB; Wed, 29 Nov 2023 23:58:42 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU7iiqT027731; Wed, 29 Nov 2023 23:58:37 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=tLffYGulcEiDS391uyT0+s5E4ygqi5Ia3Ebu69zKUgs=; b=cxOp0FXFKn6N/qdriN6HpcuDz+3xPXs0Hsne3iMBtNd4SSGJwj8U3U0RY4g+67aUtAoe Hpto+86PKNymML1DQarJfb5XC2OxkcWvxCNxFTM65xGOs3alRCnKJ/ekISSiVgnG8kuD 5rdx0vPRpp1jvE2f6Oj+xXz97slO+wty1AhCV8plQTM8Q4e2GJNYEIXT0rUIr7Sys/nb KysYjL1w+BehuEy45rO9u9mDIn2Jh87Pk1+TbGPfQKeD/ltXjC+4Z0W7mn+gsE12sXDx k2AIXyvJZtZlUMzQ3yykeilafO54gnBcbe6dU6V2NV3fgdVOqeW0gyDN094jBI+Oc9wc 2w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3upc1v2j04-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 23:58:37 -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; Wed, 29 Nov 2023 23:58:35 -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; Wed, 29 Nov 2023 23:58:35 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 3ADAB3F704B; Wed, 29 Nov 2023 23:58:31 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v3 PATCH 3/5] octeontx2-af: Fix mcs stats register address Date: Thu, 30 Nov 2023 13:28:16 +0530 Message-ID: <20231130075818.18401-4-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231130075818.18401-1-gakula@marvell.com> References: <20231130075818.18401-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 45peGFP5N_EqUQGWVLahSNq7H19lU2lH X-Proofpoint-ORIG-GUID: 45peGFP5N_EqUQGWVLahSNq7H19lU2lH 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-11-30_05,2023-11-29_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:59:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783975009495864238 X-GMAIL-MSGID: 1783975009495864238 This patch adds the miss mcs stats register for mcs supported platforms. Fixes: 9312150af8da ("octeontx2-af: cn10k: mcs: Support for stats collection") Signed-off-by: Geetha sowjanya Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman --- .../net/ethernet/marvell/octeontx2/af/mcs.c | 4 +-- .../ethernet/marvell/octeontx2/af/mcs_reg.h | 31 ++++++++++++++++--- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c index d6effbe46208..d4a4e4c837ec 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c @@ -117,7 +117,7 @@ void mcs_get_rx_secy_stats(struct mcs *mcs, struct mcs_secy_stats *stats, int id reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYTAGGEDCTLX(id); stats->pkt_tagged_ctl_cnt = mcs_reg_read(mcs, reg); - reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDORNOTAGX(id); + reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDX(id); stats->pkt_untaged_cnt = mcs_reg_read(mcs, reg); reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYCTLX(id); @@ -215,7 +215,7 @@ void mcs_get_sc_stats(struct mcs *mcs, struct mcs_sc_stats *stats, reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSCNOTVALIDX(id); stats->pkt_notvalid_cnt = mcs_reg_read(mcs, reg); - reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSCUNCHECKEDOROKX(id); + reg = MCSX_CSE_RX_MEM_SLAVE_INPKTSSCUNCHECKEDX(id); stats->pkt_unchecked_cnt = mcs_reg_read(mcs, reg); if (mcs->hw->mcs_blks > 1) { diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_reg.h b/drivers/net/ethernet/marvell/octeontx2/af/mcs_reg.h index f3ab01fc363c..f4c6de89002c 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_reg.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_reg.h @@ -810,14 +810,37 @@ offset = 0x9d8ull; \ offset; }) +#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCUNCHECKEDX(a) ({ \ + u64 offset; \ + \ + offset = 0xee80ull; \ + if (mcs->hw->mcs_blks > 1) \ + offset = 0xe818ull; \ + offset += (a) * 0x8ull; \ + offset; }) + +#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDX(a) ({ \ + u64 offset; \ + \ + offset = 0xa680ull; \ + if (mcs->hw->mcs_blks > 1) \ + offset = 0xd018ull; \ + offset += (a) * 0x8ull; \ + offset; }) + +#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCLATEORDELAYEDX(a) ({ \ + u64 offset; \ + \ + offset = 0xf680ull; \ + if (mcs->hw->mcs_blks > 1) \ + offset = 0xe018ull; \ + offset += (a) * 0x8ull; \ + offset; }) + #define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSCDECRYPTEDX(a) (0xe680ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSCVALIDATEX(a) (0xde80ull + (a) * 0x8ull) -#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDORNOTAGX(a) (0xa680ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYNOTAGX(a) (0xd218 + (a) * 0x8ull) -#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDX(a) (0xd018ull + (a) * 0x8ull) -#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCUNCHECKEDOROKX(a) (0xee80ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYCTLX(a) (0xb680ull + (a) * 0x8ull) -#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCLATEORDELAYEDX(a) (0xf680ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INPKTSSAINVALIDX(a) (0x12680ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INPKTSSANOTUSINGSAERRORX(a) (0x15680ull + (a) * 0x8ull) #define MCSX_CSE_RX_MEM_SLAVE_INPKTSSANOTVALIDX(a) (0x13680ull + (a) * 0x8ull) From patchwork Thu Nov 30 07:58:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 171764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp220664vqy; Wed, 29 Nov 2023 23:59:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIOtQEOimOPmJU42eCiDP5urPpHFcSDUAUge2PjkZsSHZDMfSh/VYQG9nfAk3Zmi5EGCDY X-Received: by 2002:a17:90b:1a89:b0:285:93ef:115d with SMTP id ng9-20020a17090b1a8900b0028593ef115dmr29291040pjb.4.1701331147511; Wed, 29 Nov 2023 23:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331147; cv=none; d=google.com; s=arc-20160816; b=I+UZUFPqnyzMifmGUO2EXJlDgamG4q3bBjqkfxGpHam/SNOjca7uPLD+9EqdtP07nw XDuXdZ8oHqM43nlXH3orQJHvvEg/s+J+bHkBRQ2Ai97zV+on1mJjV32zpPWembx/c5w+ 146HtJeRKBmeAk6cIeUxb1H2Mmi/Ofude6Rsjr5/XcR+Ux0BfmlTQkJ3r2VoxtJIGBpW RvEUTGLcW+LWiXUr3MmQJDuq94UdcIk8NKN9vLHnDHOngNBVd0fr4PYF8YUcqOFz9IS4 TqTaCcxvpJi/SOrNphIRhYG/WOtnV+9r94/7ymxbvOS0WGRM5ZfcSryVh8xYecGcJ2De vWcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pqgT8/te6zTWsZfVion+jdpco4hDORcq6oDMHSPiFJM=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=DTGoe4etXnUfVVnqU2IVrEKQ9JeeFwTyPTpwWgZYZWOi5xdeezUiKXlKIXx49JKH1h SKTWVEegIrnRyyBlTX+OFCU9i5tm1FcBkvbn/Qf2E9uz6kqEpAVuVNthUIoI1jWo/agT HVdoYdlFAzL9f/osvSuBuY5LT2S4EBiBiAlsMwxSAfb8sY8KOomMylNjpaw5s9FVUONZ CCjJbVm5PBbHNblxz9Q8HncOpB35AMleUUi9FnKTuuCiXELwC5tMzANQ5eV59o+toxtq s//vvB0AQ8e7myjQl6VpRl/7aNREwACfAyoilyP1cfEiV/kF3css7Gm8rlkDWwYpaZbQ /drw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CqeTgPiH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f12-20020a17090ab94c00b0028513871956si812408pjw.73.2023.11.29.23.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CqeTgPiH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 0CBD480C9223; Wed, 29 Nov 2023 23:59:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbjK3H6y (ORCPT + 99 others); Thu, 30 Nov 2023 02:58:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344820AbjK3H6p (ORCPT ); Thu, 30 Nov 2023 02:58:45 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 024411709; Wed, 29 Nov 2023 23:58:46 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU78Xpd027659; Wed, 29 Nov 2023 23:58:41 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=pqgT8/te6zTWsZfVion+jdpco4hDORcq6oDMHSPiFJM=; b=CqeTgPiH+k9H6NAt9s+j7RmOHK8Ll/+sZC+mgtp3iR5WfTKQCtSQgR3EqyaWLU4jlOTQ LDDG3e9Ju0kDjdxayJkWqSi/FlYGWl+x2LLuezMAJaem0+1aoxrAgnUaozmtoKP138Qk fWUPLbR+Mz6HVQX6vc9HM7APe51kGcsBvdrMuwCMJbaHaFZl+hzUx4oIfA8UJafFDM15 4/foMoCP9alMrBc/altmtXNapuPkQuFqogd8VrR/lwla8FKOrhJJzOU+QIzSZdTYB9o+ L0jUEKDkzIa3ipsKrbsy9quU+GcAPCY1EDAlXEXRpon17ioBJ7OtNQECiMzh3YRTGTjl Sg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3upc1v2j09-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 23:58:41 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Nov 2023 23:58:40 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 29 Nov 2023 23:58:40 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 5D4323F7044; Wed, 29 Nov 2023 23:58:36 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v3 PATCH 4/5] octeontx2-af: Add missing mcs flr handler call Date: Thu, 30 Nov 2023 13:28:17 +0530 Message-ID: <20231130075818.18401-5-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231130075818.18401-1-gakula@marvell.com> References: <20231130075818.18401-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 1AGVGIdDU1rdU7UcRjgOsLd9DqTx9lqP X-Proofpoint-ORIG-GUID: 1AGVGIdDU1rdU7UcRjgOsLd9DqTx9lqP 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-11-30_05,2023-11-29_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:59:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783975009209558028 X-GMAIL-MSGID: 1783975009209558028 If mcs resources are attached to PF/VF. These resources need to be freed on FLR. This patch add missing mcs flr call on PF FLR. Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic") Signed-off-by: Geetha sowjanya Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman --- v2-v3: Fixed typo error in commit message. drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index 22c395c7d040..731bb82b577c 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -2631,6 +2631,9 @@ static void __rvu_flr_handler(struct rvu *rvu, u16 pcifunc) rvu_npc_free_mcam_entries(rvu, pcifunc, -1); rvu_mac_reset(rvu, pcifunc); + if (rvu->mcs_blk_cnt) + rvu_mcs_flr_handler(rvu, pcifunc); + mutex_unlock(&rvu->flr_lock); } From patchwork Thu Nov 30 07:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 171767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp220796vqy; Wed, 29 Nov 2023 23:59:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlon8IDlgyHIRJxsbCaSLWr+0xqmAI23VFRytWh4hn+R1V+PgTxZYl9nqL3qzkJYmCqRwg X-Received: by 2002:a17:903:2352:b0:1cf:e028:4161 with SMTP id c18-20020a170903235200b001cfe0284161mr11493999plh.15.1701331166888; Wed, 29 Nov 2023 23:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331166; cv=none; d=google.com; s=arc-20160816; b=F8wAS+QCr3V8IH79Sz74Ps97BdB0j84Ln+rb/pt68rLLncdhwgD4qrz0dDSt2vIwPK gkXvD1ZF0VKUKIr+VQ9Iaovjm9ZU7N90tbQXOn5otzfkpPVecWheqDsYIfDpZd9AWCp8 RSwh9TCdeq1+Hxpjr6xVpkjqZeDNBUCTRLSE6pxnsFU274A5Rrs+/gLwYtAtbsmHrhJz d3ZfGxtjloax8KH6XRfR5serTD/JuWrVSB5JVMmxe9qyfPE/OI9jLH6hkg0ojqc1gf3h TPQI0KdPWaw1al2PHNbA12R3K8wwRnXkkBxcf8Mrix48yLV8S+SSchc+sWiFZGHNXvoF n5eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BnBnwUIi1lFAm060BvEP3AMsH0MfpESXX1EZeTkIRYo=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=uLnOBRxi/OvWk/8UE0kPKZZwQzsZtfg2OLNY38V3XlS2DEWIX3p1APW6K3MW7YddZE Uc42mFGA2W8Hhc1Jn2FfjplBtIjGc8h6sCklQnqlAfb3nYytj+tbXq482mz1SHHWM3zM TH3ODu+PqnA9pqvdDJ1Qn2nyaybUWBQEIeb08lyQ30EzPEcqTOxrVZqBIkObnsPz1uLw 2N+1/ANKvGE7C1KASVwKl7tiZypvjeQg/3gBxCIYwzdmB2W1uu0sHABuHKZBqRA0+e+f OZaapQISNBVXJXX2XK7WVqqxi102FyZK2PR4zaZJOUo0EAl1QXZ4YSS4491A8kB7/Xv9 R3dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=P5QGpF70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j5-20020a170902690500b001cf7c82c00asi655946plk.499.2023.11.29.23.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=P5QGpF70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 4A8F5822719A; Wed, 29 Nov 2023 23:59:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235054AbjK3H67 (ORCPT + 99 others); Thu, 30 Nov 2023 02:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344822AbjK3H6v (ORCPT ); Thu, 30 Nov 2023 02:58:51 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40C2010E3; Wed, 29 Nov 2023 23:58:51 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU7iiqV027731; Wed, 29 Nov 2023 23:58:46 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=BnBnwUIi1lFAm060BvEP3AMsH0MfpESXX1EZeTkIRYo=; b=P5QGpF70wlONSZ/Ed+VY+BoYyJExHZVcZj9sGKcgl4/dgDmwoyfef5JMxAUjlLCi1+3S oBlYjkg6rtDWMixqWdIgxaHUWpQ6m+QSFFPlnX1f2dV6bhh78it+4/CWBT84ROc6Txmp /RGkZwRbQLNw0K7pkYj7dNoR91W2GVM1rXjYZxMAY38NLkjwp9tKXTSJryxzrY2zhl/Q XujlB0oIhk23Ru2JOXn9qC10I6+lw4mJS7Q6hiEWUhGjySAbcSqOshrtnTcgPPu2hkAN 1K21MoVMvwFjInSjyqVrAmhuizwMN4JjHh1RuCttiypJb9kaOjjUcKUuFPj/m7SFD82P Ew== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3upc1v2j0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 23:58:45 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Nov 2023 23:58:44 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 29 Nov 2023 23:58:44 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 8A1455B6937; Wed, 29 Nov 2023 23:58:40 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v3 PATCH 5/5] octeontx2-af: Update Tx link register range Date: Thu, 30 Nov 2023 13:28:18 +0530 Message-ID: <20231130075818.18401-6-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231130075818.18401-1-gakula@marvell.com> References: <20231130075818.18401-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: JBI1NGPbBEzD5yBTMd8Ez-jyJkUoJSPH X-Proofpoint-ORIG-GUID: JBI1NGPbBEzD5yBTMd8Ez-jyJkUoJSPH 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-11-30_05,2023-11-29_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:59:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783975029889121851 X-GMAIL-MSGID: 1783975029889121851 From: Rahul Bhansali On new silicons the TX channels for transmit level has increased. This patch fixes the respective register offset range to configure the newly added channels. Fixes: b279bbb3314e ("octeontx2-af: NIX Tx scheduler queue config support") Signed-off-by: Rahul Bhansali Signed-off-by: Geetha sowjanya Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.c index b3150f053291..d46ac29adb96 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.c @@ -31,8 +31,8 @@ static struct hw_reg_map txsch_reg_map[NIX_TXSCH_LVL_CNT] = { {NIX_TXSCH_LVL_TL4, 3, 0xFFFF, {{0x0B00, 0x0B08}, {0x0B10, 0x0B18}, {0x1200, 0x12E0} } }, {NIX_TXSCH_LVL_TL3, 4, 0xFFFF, {{0x1000, 0x10E0}, {0x1600, 0x1608}, - {0x1610, 0x1618}, {0x1700, 0x17B0} } }, - {NIX_TXSCH_LVL_TL2, 2, 0xFFFF, {{0x0E00, 0x0EE0}, {0x1700, 0x17B0} } }, + {0x1610, 0x1618}, {0x1700, 0x17C8} } }, + {NIX_TXSCH_LVL_TL2, 2, 0xFFFF, {{0x0E00, 0x0EE0}, {0x1700, 0x17C8} } }, {NIX_TXSCH_LVL_TL1, 1, 0xFFFF, {{0x0C00, 0x0D98} } }, };