From patchwork Thu Nov 23 05:59:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 168714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp242929vqx; Wed, 22 Nov 2023 22:01:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IESYcqOMkK8DoESm7w4vLOCGPyrdEoYRmWzrmqdHyL8giW7d1dCyUlBzJVoTD0EtsSCVJ5x X-Received: by 2002:a05:6a00:398d:b0:6cb:e246:93ec with SMTP id fi13-20020a056a00398d00b006cbe24693ecmr2090134pfb.15.1700719270882; Wed, 22 Nov 2023 22:01:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700719270; cv=none; d=google.com; s=arc-20160816; b=XPzzHfGXMk4a3OHE0z6R9HWql9FceRO4jrXkD7mV+ATOS+NhykgVoVE/9DQib4GeYv 8yh4XN8JdCdqrb32AJUY8KxP/iPDuHW9eVtf5Xmm94p2Xh5tYKYy3GIhxysY1zut8+4r ExuHicXpZ3w9gjNSPnizF32ldYd/qPVCz2hkkJJ+hhCL1pKUio/xuzY3HbfAGGVQ50u8 bpa9GvIOK8KKi17WGdo8VJHYF5bx3x652ZIk1Gv9PrvnvpONBYoI0b4R7fqhiaz7ijcn gvPkdm45LrHjFqF8eD5LGqyMc8ddF50qt/MLyptERbhbxZOAzqYT0W1glLXiWPQdEw/t yDNA== 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=Shfdd1FRIYY9DyDUUL7HqPZc2T+g2sS06985Xg0t1a0=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=U6IIM+vBvaBdeq8ydWz/yWu7VBGrK31GOwGmSRaQtcziWiZ2TTxZDVjAxQxRduqZNV SY3SAa2CUr2fzPoDvHYnw2C6hE0XSF0wDQIJy3P+f65iLIAX/LncnjDM3AJXINLp4haK 0BYzTj6AkqJFWXcU3enrHw5Z9PbMP/a9xQeTbPzv5EfQKXKxMSGZGPJv4hav0pJkD9UT i+aptLdUNWmIiihGdWXsm4WCVIkfBadtOP3FqFsgg8HwV8eBgb5oQKNa0hhWCdi1ZvX9 tcynre3PVHJ9hfjLMo5OrzlZKsSJSeMEE9JGwQ87n0Al/Z3yzoJqSOkqVDHdc32016gN FbpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=YxoGyCwo; 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 l27-20020a63ba5b000000b005c219456791si683306pgu.322.2023.11.22.22.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:01:10 -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=YxoGyCwo; 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 8C3D683B3619; Wed, 22 Nov 2023 22:01:07 -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 S1344740AbjKWGAs (ORCPT + 99 others); Thu, 23 Nov 2023 01:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344722AbjKWGAn (ORCPT ); Thu, 23 Nov 2023 01:00:43 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 367111B3; Wed, 22 Nov 2023 22:00:49 -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 3AN5YmaI022778; Wed, 22 Nov 2023 22:00:42 -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=Shfdd1FRIYY9DyDUUL7HqPZc2T+g2sS06985Xg0t1a0=; b=YxoGyCwomdcyPcghYA2JjkRd62Xq3270y1MLS+1e80VTzOBCNqeD46pBpiIorDYhKXGb WnHprAAc3PFveV7KtLdiZ2mOKs43m8/1MSUlVvfKZcuPvHrT0zczmE6fmkFcmBUjlvBs ld8c1kA3bDUdHW3t8snaTvFDqsPS6hJMTYjzoRcgXDTjGnY60eCa7MzRzYJ/zBx+gpgj QQsCN7B82ONSoPm5F/gT497sGa8CxXWwYuHD5DPFsCuS0izVsyMkHEABCO/io3ClQY0l GUqgsbXq8ybtDyf8XBPNXQNyxXPizpl5nhgZCc8lAZqSf1L1dfOuBHa0tVWW74unl9Z0 qA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn1xm0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:00:41 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 22 Nov 2023 21:59:49 -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, 22 Nov 2023 21:59:49 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id C37243F7089; Wed, 22 Nov 2023 21:59:46 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled Date: Thu, 23 Nov 2023 11:29:37 +0530 Message-ID: <20231123055941.19430-2-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123055941.19430-1-gakula@marvell.com> References: <20231123055941.19430-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: uy_JcDecd5saW0drr9VY9Xw1u53tKP3b X-Proofpoint-GUID: uy_JcDecd5saW0drr9VY9Xw1u53tKP3b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_03,2023-11-22_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, 22 Nov 2023 22:01:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783333409688277562 X-GMAIL-MSGID: 1783333409688277562 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 23c2f2ed2fb8..3d286631a011 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 23 05:59:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 168717 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp244299vqx; Wed, 22 Nov 2023 22:03:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzjc8K63QhfWTllCAq7q7JxvJZn5qb3mswtprx8MCA1e5I1KS7+XKens5k580Xin66X1dN X-Received: by 2002:a17:902:da89:b0:1cf:6945:7586 with SMTP id j9-20020a170902da8900b001cf69457586mr5404107plx.9.1700719435071; Wed, 22 Nov 2023 22:03:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700719435; cv=none; d=google.com; s=arc-20160816; b=KlMg6ORKy2iA/xHh2B7cLxQdt5/h6xErPUQrCW4rlyb1D31hh6yel4iXlc1L4smeam qwdNzOkpqnyYSiBu054jxJZgDC1C8gmSa37GNSrWt7Jkw6WBRSoZqq8xBaiUBqW1En3P SalnroqrOU5ZwDnSuBs7Ah9b8IYpjtLn7fEj2JDO9CeS3dl4BcM1oAQQYIoOnwdba9W5 osXNhZGpqT45l9gS/0O8f7F45TZ6chsgTzOHlZ2BjE1e+IYhLcGHXWPDdlCA8tQYPpYy HQUReyVyyd3sV8EpaxoBJLiWAJK8PTLcrSPZO7RJ9zvM2aE2gYG0bH114TPpsZATjIGw EdeA== 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=cA2CrzkhdXsdPvJ+ZwsbisJGDq0YtoxmmcwR7wtlfsc=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=lvA/pgvGdH7FUlFDZItfipryk7i3E+N3YQlnhY4Qf6iMTiaW9I70u/IVCWXxbff5oK jkb8UZndvKmgOaeqWwEDAwBNpFKf3cYSlsEVbhNBoxoYYLW6VtgA7l+w8cEqAovBJDY4 av0jP5fVCpM/7Iv4SHP5JFpU/zvDjc3Ap4dvcWK6ee0Ba9DbwWVi9Mcpvj2fLmVjc+Lp C/fXaF5cnG5sipfEAxnUnCtvH1pnI+CMfIX2BTDjCgrA1cqorwwLEsr5PM/dbdko+WW/ BN54Ik3C9YyO0dPwL73+UKpIwyaL62RjPEiCIx9r3kWduM/4t1Po1oyfGLZv4o0y/ksK zHPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Xq9dsMPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id jc3-20020a17090325c300b001ca30930778si491370plb.71.2023.11.22.22.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:03:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Xq9dsMPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 183AD80C0A5C; Wed, 22 Nov 2023 22:00:59 -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 S1344735AbjKWGAp (ORCPT + 99 others); Thu, 23 Nov 2023 01:00:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344727AbjKWGAn (ORCPT ); Thu, 23 Nov 2023 01:00:43 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C3A1B6; Wed, 22 Nov 2023 22:00:49 -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 3AN5YoMb023177; Wed, 22 Nov 2023 22:00:43 -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=cA2CrzkhdXsdPvJ+ZwsbisJGDq0YtoxmmcwR7wtlfsc=; b=Xq9dsMPVxVHhKaUa2Ow5CCxcl8YAJumX23ciaxyRQbXFSjskdreSGTSHwW77KTASbHwy h6gXxnEdZ35U8VMGjiZGr5pieqK1Kk8Y75E295TMNQ3k7yaFfSp/T5bqi9UJQV2rbstV nSm8xOo6bvdEJY4WXe3f0o2gz9jHlUJ3euEZmGxzs9taH98p7R6gSOwGmcchEz7YViqp IG7NdFDLY9rm1mJxlu4+ALcggEbjBGjfCTtd4rcwohTKYv1gPHFWUusYvSV1D9TNj3t2 Uig2CQcR9TFOSa9WvNQzio3k7MDQmnHSgeIQXPGSPRGoHqY+wp/0mWDYD+dCvCQ0wxjA Dw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn1xkc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:00:43 -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, 22 Nov 2023 21:59:53 -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, 22 Nov 2023 21:59:53 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 672793F7067; Wed, 22 Nov 2023 21:59:50 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH 2/5] octeontx2-af: Fix mcs sa cam entries size Date: Thu, 23 Nov 2023 11:29:38 +0530 Message-ID: <20231123055941.19430-3-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123055941.19430-1-gakula@marvell.com> References: <20231123055941.19430-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: MHvwRKMcfDa4X0KVXwrWE2qStlhTzdLF X-Proofpoint-GUID: MHvwRKMcfDa4X0KVXwrWE2qStlhTzdLF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_03,2023-11-22_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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]); Wed, 22 Nov 2023 22:01:00 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783333582360779478 X-GMAIL-MSGID: 1783333582360779478 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 --- 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 23 05:59:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 168715 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp243015vqx; Wed, 22 Nov 2023 22:01:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNQYbY/sUlVpEPAjwmrw3mIWw1uMQXGpnUINqR0YxIqCOuEYtcaJrnocIOBvtQoekUqjf2 X-Received: by 2002:a05:6a00:1c9b:b0:692:b6e8:ce88 with SMTP id y27-20020a056a001c9b00b00692b6e8ce88mr4298944pfw.17.1700719278783; Wed, 22 Nov 2023 22:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700719278; cv=none; d=google.com; s=arc-20160816; b=lzhYcpS6N2jt7s87j3usKlmPQuOtPQws4eO4sXz2MFBKhDoieqsKkvQBh4NyU8WTN+ 4dOnSji9zkbg+tmkYQTW8UDzRkG3NuNfGLQHmn2LBaTXSPtOAIobunAikD5tvMUCPGEw 1r0W26sadVRcc+/7plKw/WVtV7TDnbtgs54jNHVNRoOXLZdp+rp2N3F7cUYht7TZuN0j XZSGsEa+sRkV3Joi848LHObOtCv69rpGGg2l8+jiGCH/Nc2HORH9jy3ou4iiMepirJp9 LVDxnKLc6nOMbvNL4gq02D5YDxum5mckkutQuRljZWh2gOHcqWenQKANe/V88aMVuQjj kHUg== 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=kM3BU7BmXAvWkQp+dGqrdOyFofGDsnc5M3Efwgf8NdE=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=ckzvoPep6B8Ne15NauFEG1HKa7Jh6yd0tk7Z/aVZ0jYkxPyqeSdktfEwT3RG2PM3dH dhpQLmXQjM/p2HFChjZVSMl0ft5BJaZZoYHWLOBPUS4SU5zu1K12IFzTav4QlQ+JpfKz GWThFsCRAC9vVlsJ8oMp3a3Jd94Nt4zC6thByZS1mWmJ1Xo33P4eQuBca5XnsXd2/cGY ZB3L22DwfuBBuTrTVI5mRJ26NpMOAG+JQRSd9Bb3wfc93NBDDR1QlexzgohhyVr5juWI GuxtQniRh/z9up95MkJXVHaE1GnoszM4qHAAg+qryMOqf43H2CrZjxInOWeqzRDxHiHV kqaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=I0wtuJku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id j9-20020a056a00174900b006cbab77d0easi612357pfc.162.2023.11.22.22.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:01:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=I0wtuJku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 25A9E807CB72; Wed, 22 Nov 2023 22:01:15 -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 S1344789AbjKWGA6 (ORCPT + 99 others); Thu, 23 Nov 2023 01:00:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344731AbjKWGAq (ORCPT ); Thu, 23 Nov 2023 01:00:46 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8151B6; Wed, 22 Nov 2023 22:00:52 -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 3AN5YmaQ022778; Wed, 22 Nov 2023 22:00: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=kM3BU7BmXAvWkQp+dGqrdOyFofGDsnc5M3Efwgf8NdE=; b=I0wtuJku19iLqhPBQLvFaC1GtlLsgXYjzLQoNCLHjYAe0DxQ0XfzlNN1z2Llu9poU9VW wVbX94K5jJymUF9MDzKP87Bn/z1/BRMTA7fiHSp0pboshcqxdJx7kf3ie6BRVho3ZpDx ALquT8Ae15ck7Up/enFA0FvpjzWc3HreX/nVu4zz0hs87B3PdY7p45dbQo3p8aw5WDBA XSl+dLdPz9d3mCtcLZ0CtRhhT9SxwZuwdALl/USZARMD/e6LdSv25XPWxfSLIWE/IrZ8 uoqlT1zkWDillfqAVrXyg307daHjn9d0Kr8lgbEGAGy7zxf1k0Me4VmeMDyExSHye7Xr NA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn1xm0-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:00:46 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 22 Nov 2023 21:59:57 -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, 22 Nov 2023 21:59:57 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 135A73F7088; Wed, 22 Nov 2023 21:59:53 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH 3/5] octeontx2-af: Fix mcs stats register address Date: Thu, 23 Nov 2023 11:29:39 +0530 Message-ID: <20231123055941.19430-4-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123055941.19430-1-gakula@marvell.com> References: <20231123055941.19430-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: wT6ECuTrFEa1d7aZZSif7bjQrNFo2Rbi X-Proofpoint-GUID: wT6ECuTrFEa1d7aZZSif7bjQrNFo2Rbi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_03,2023-11-22_01,2023-05-22_02 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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, 22 Nov 2023 22:01:15 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783333418773710468 X-GMAIL-MSGID: 1783333418773710468 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 --- .../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 23 05:59:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 168716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp243052vqx; Wed, 22 Nov 2023 22:01:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhxR/4bow/UH2lxjgNaJMldMUwr299TuLG10sVhZaJM5G00sQdsw7LUr5wkKgVwcOXdPkS X-Received: by 2002:a05:6808:d48:b0:3b8:456a:d4ba with SMTP id w8-20020a0568080d4800b003b8456ad4bamr3225740oik.44.1700719282687; Wed, 22 Nov 2023 22:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700719282; cv=none; d=google.com; s=arc-20160816; b=O0AEWwgAeQIkRZqjvpaqMnlwYGUvGGwu6fhIerBJ5JNSVbKHHNA1b45vqvf2NN7iIG X3LvwmVgqipJiiGaJex79TBtEzwXUuXOMID3L3/lV5lCe8PCR+E9UiAykA2du3f1LDpm G5WWogRmHC4UuLwnH5A9+Glma8gIC0GA2Zv8FkkUGXu9G1vgpUGLVMVqFETscVnYZUF4 ecH2KBTQVm4/6agD6Gzf4V31NcUKuESUGD0L9uMHVQRF9Gsx14yckqOpQRIbu1VaysTj BaPkLTdzNLv/4WEvprelxwYfcHawMbAMSbpEencdmwfEr92AbFX3TrmgVReBcNcDmjt9 WnhA== 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=20w8+xsUpn+mENMXqGWsHU036g/l6onOP9fm5MMMsxc=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=PImS2kVcr9S+DXPVUDkADQ7ry9f8qtxQk6MpdSuSqVr1r5lY/e67pxqjmopbA4ay4A M0x6UK9GI95ZLTkVNbfLZs+FV00+vd5OgpcrLJfFjSVHKLyUIKJP+vokII3/Zrxj4VMm x87FcyAM2wulQlWQHlhzNqoy8TUHr3hRn70LHikhN08Cpowe3EOIG8p7XqIN/rhDwzpk YOUH6xkuAFYlACXjJnY7G2nNkLHwCJF8B+o+A6VuovnoQgq2iPtDbpEqheOSdk5P3nFe BYg2CObdQe8KuGGIWoJ9TqYqfo2CNAl7k9X2QC5o/v39esPpqF2dTeCocBDNmtkKsqJ1 bSVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=jOd5+j1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id e31-20020a63545f000000b005c21363f9b0si634216pgm.766.2023.11.22.22.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=jOd5+j1F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 90962807CB71; Wed, 22 Nov 2023 22:01:19 -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 S1344763AbjKWGAx (ORCPT + 99 others); Thu, 23 Nov 2023 01:00:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344704AbjKWGAo (ORCPT ); Thu, 23 Nov 2023 01:00:44 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E726B1BF; Wed, 22 Nov 2023 22:00:50 -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 3AN5YoMd023177; Wed, 22 Nov 2023 22:00:45 -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=20w8+xsUpn+mENMXqGWsHU036g/l6onOP9fm5MMMsxc=; b=jOd5+j1F1j/iWDGRqewtRRMsKlt0IwirH/URmeIkPitRNynsvp689HADhyyvWn+1Mmfs NrbvjW03mdRO2G3O8nphKdIXnNCMZlyAngx6jmFiL4xOAeRZbnhPPIACISF1/GI9GfhA EaK0NYo/DyMioNw1Z9JCff0xQUSSrhVwRZAzXtaRw62B32my/XKo+6qcJnVKrLrvSJiu x2j0ouXUBffnYSgehjKYOjkUI6Zg7tZbKBr1xkyt+6mKN1ffW9hsiWGvmyFZfrLJlCaX 8/rqgKE+EfFiuPtAbE1kVAPNRsGdK4k2D93KxnT7SsV1viwJCHQh+usuP8f92KyopnjB 7Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn1xkc-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:00:44 -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, 22 Nov 2023 22:00:00 -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, 22 Nov 2023 22:00:00 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id A98293F7067; Wed, 22 Nov 2023 21:59:57 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH 4/5] octeontx2-af: Add missing mcs flr handler call Date: Thu, 23 Nov 2023 11:29:40 +0530 Message-ID: <20231123055941.19430-5-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123055941.19430-1-gakula@marvell.com> References: <20231123055941.19430-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 435nKjoVN6bfwZ7YZmT-KZhy7wd10U7V X-Proofpoint-GUID: 435nKjoVN6bfwZ7YZmT-KZhy7wd10U7V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_03,2023-11-22_01,2023-05-22_02 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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, 22 Nov 2023 22:01:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783333422223284609 X-GMAIL-MSGID: 1783333422223284609 If mcs resources are attached to PF/VF. These resources need to be freed on FLR. This patch add mssing 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 --- 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 23 05:59:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 168718 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp244320vqx; Wed, 22 Nov 2023 22:03:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGITWk5hJX2yrzWl9Edgot5aB27LLtwjqkF344B/kN8kZX/gxWBRzAI4HkiFrSnKIk+tEZv X-Received: by 2002:a05:6a20:7f91:b0:187:29f9:e12e with SMTP id d17-20020a056a207f9100b0018729f9e12emr2463824pzj.29.1700719437843; Wed, 22 Nov 2023 22:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700719437; cv=none; d=google.com; s=arc-20160816; b=iY7TpdWIR9Ca2hruJhwCWkEJnleZqyJl2Dt6qU3frsCzNSVAY08zMStCDLrDCMA8TD mubp5iuq9uciekG9horLqnDeHEb8RMehiZd/Mz65d+DX83jZKmxDM9xaNz9LK6d1s7m2 OzgjkVZ5J1y7ne9f1CsxofcIITG/HNg9DK/1nAOInKe/PU3RbJsP3wEiDmsCpOXGnu2Z UXAez/u9icpg2K2+x2sVCKzrPe+AUrhHCdXapELiDJLszVbVjxJFPexHNmK5bt+swGof c7Go6iGaXiVgxiEC+SZ5BhohNWPUSfxsIPHFo5CfZ5xXoJV8VUi2yAvx9Ea8kHXDUHYL ZCbg== 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=7LIJqeeeavxIJlfUGC585oLZh9zz+F/+//rd+x9PIUE=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=rYOKVtiGgU8N7sO7NUFZTQaLjT84Qn7TaD0zYf6hP5u6oKRxqL4hfsTH+gT+1yQmgX dVMeGM2ORP/aUPWhx8H8wlDJmvJW55nbS9bkTH7OW2EaDBtgJCFYZeAHewwTSDUh2MEP 6bicEv2eEdHjiSg+E1ZiqZoOLq5Uv7ftQJsGEO7DYodxAd+88bSu7rdVhNQMKUlE574+ TJIHR/z2TM4BjjAw5+KVvRv/ki9PyhJoDSvJrqTmisIh3j2xyVxqecTdauZU6h7i1xf2 2JibirQyUlWKWY1sjAl5EizPOGM7av4qFYxHivE+UTZqJfUlWvNBkdH+dC2YNh/eOzwp ehGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=M9nsJaVY; 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 z22-20020a63c056000000b005be1e55546esi694099pgi.51.2023.11.22.22.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:03:57 -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=M9nsJaVY; 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 EB79981DA3A2; Wed, 22 Nov 2023 22:01:34 -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 S1344742AbjKWGBE (ORCPT + 99 others); Thu, 23 Nov 2023 01:01:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344741AbjKWGAs (ORCPT ); Thu, 23 Nov 2023 01:00:48 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F7A9A; Wed, 22 Nov 2023 22:00:54 -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 3AN5YoMi023177; Wed, 22 Nov 2023 22:00:49 -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=7LIJqeeeavxIJlfUGC585oLZh9zz+F/+//rd+x9PIUE=; b=M9nsJaVYy0FuGTD6QQQfksTdUkhG/U+l0LhF3dKeJ1FCHiIMHsyJ15BegLfyQn2xgMAo eMxBYFPPtI1adqrsK/gWc9M/K2YZYKnMihn5UoqUo6r0Phsdf2s2IcFMxrZTXk/CDgPo ZcLgA9hhjJgNFMMEU6uHX8I0kU488IQ9+flJ7q/r7IPQbuH5Ugg49jVyiRbZ/Fs6ToHP Gn8kFiRWORDpem45qm2+3FiMG4/WvYRcFmeC8xBLPKue8hiDyD2m94c1i+1Pn0PF68lu I1A+Iw0Iczfma/MK1Uk8MQ+ya63BQo4bp+ZPs/meKubFedLtHw0bwsKZPASGsnu7A9qH 6w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn1xkc-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:00:49 -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, 22 Nov 2023 22:00:05 -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, 22 Nov 2023 22:00:06 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 561403F708C; Wed, 22 Nov 2023 22:00:01 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH 5/5] octeontx2-af: Update Tx link register range Date: Thu, 23 Nov 2023 11:29:41 +0530 Message-ID: <20231123055941.19430-6-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123055941.19430-1-gakula@marvell.com> References: <20231123055941.19430-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: OOuhbsZQ-kWSDUyPfSIj2UyNxsME2ovc X-Proofpoint-GUID: OOuhbsZQ-kWSDUyPfSIj2UyNxsME2ovc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_03,2023-11-22_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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]); Wed, 22 Nov 2023 22:01:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783333585294624313 X-GMAIL-MSGID: 1783333585294624313 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 --- 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} } }, };