From patchwork Tue Dec 5 08:04:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3276560vqy; Tue, 5 Dec 2023 00:05:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfX21HTnq3ZnVer4kyXpmZCA9ufaJoK2SwQ9+qdSpsj+HMyfcR830w+JydCFnQ/fMkq++W X-Received: by 2002:a17:90a:2aca:b0:286:6cc0:b90c with SMTP id i10-20020a17090a2aca00b002866cc0b90cmr568457pjg.67.1701763526932; Tue, 05 Dec 2023 00:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763526; cv=none; d=google.com; s=arc-20160816; b=N3sf8mwAoXevRGoD2RXoPMcM2mClvtIg5HzLKd9Cbz72xHe+lTdCXS+vT3uyylIBQn S2bTkaBJ6k00QGSnCjead6WUGPpuEVyZmZdZe4E8ojSrkr77sbphsZUpX8pSZwxJ6hXE jsUl5rYRfYanGXOXG/hYmkwRGOTF1tkqxzRKgpJ1Z8Gw27cirQZRa/uD1o1oVxXWd9+4 TefpecYvL8ITAw8AFW1HeBe+sbO1OX3/PVe5PsoGZiSq8K4hTa3f9O4NFfv+/7LwufEj 7HSGMXtVM68jd5ycx+jACZiaF1nXz37H0uVThOexw2Ng1ZBl+KwjWFE3FsaOqn2+N89I T8/g== 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=4/EJjnZQiTFxwclrmIru9Na3yETFt2PBTXVIDWgANy8=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=odSlJfhNv0VVYDRrm8jxYBNAMwziyZqVgDOvMxapwQCsN7p9pqWb4Gn5/w1A63idkB etK5xJLseDOvXbCgsT+/LIRfTsZe6HnBkj5GAkqrxPNVwLxF7P4F5zO/718+4h4/A+pA OaH9nxBcQprKJ0DCogt4O+hRMTpr7GyqSK/3wNHOAeYNnNzW218TjaDvw6Zzl7DvSiNV IPIyBewGDW8qRc1L/T7gATM6jnEcfuFg/Gxs8alrcek+EiZ/B7nOtFFknsk5Bmbvz7zJ /VhM3Wou2o0UcS0jxCsEMUH1qrKjIPCcLMBNkFwZy4McgR3d/p2CKwunaYzDjcyJTYrK xLfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=L1joF3ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b3-20020a17090a990300b0028573fb25b9si9192031pjp.135.2023.12.05.00.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:05:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=L1joF3ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 5507380A3644; Tue, 5 Dec 2023 00:05:05 -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 S1344770AbjLEIEx (ORCPT + 99 others); Tue, 5 Dec 2023 03:04:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344708AbjLEIEs (ORCPT ); Tue, 5 Dec 2023 03:04:48 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24213182; Tue, 5 Dec 2023 00:04:53 -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 3B56OiaW010820; Tue, 5 Dec 2023 00:04: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=4/EJjnZQiTFxwclrmIru9Na3yETFt2PBTXVIDWgANy8=; b=L1joF3jucX9h61VhEQfxnCVPLJu8mjkGxM44O/68LKNJwFyPoe5zz2RWYqxKtE696SE7 DJ+aboV8jDFR7Oyx+j2KST1CsoRNw2DuBYzl4CcVCUsAILsNXvzKDDFXI8nocWxPPdDF Yq2EWlBOR7bFkBfGU2wHvErXawKaCCyQ/CLSlKtPai+6HIcXNmbKmXKFzOjCFLEQEEwb Ikrjb+5+7riyNRl/N32XnZxDL5yS+8rwunMdLJYMWk9cxNGuFfKTvXdBvbyyeqw58rTV tOAlcPh3QUle+ZyIysthjzpCpQ+FhlJfRj9rwLyrDlTXS1gz3UVkqzc0UiyUDm35oQj4 Zw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ur4yrrq4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 00:04: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; Tue, 5 Dec 2023 00:04:43 -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; Tue, 5 Dec 2023 00:04:43 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 4EE133F70A9; Tue, 5 Dec 2023 00:04:40 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v4 PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled Date: Tue, 5 Dec 2023 13:34:30 +0530 Message-ID: <20231205080434.27604-2-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231205080434.27604-1-gakula@marvell.com> References: <20231205080434.27604-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: zPJpKYa0quyVhPdgOiiNuY1z453BKYbc X-Proofpoint-ORIG-GUID: zPJpKYa0quyVhPdgOiiNuY1z453BKYbc 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-05_03,2023-12-04_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]); Tue, 05 Dec 2023 00:05:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784428392150947153 X-GMAIL-MSGID: 1784428392150947153 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 --- v3-v4: Used FIELD_PREP macro and proper data types. drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 14 +++++++++++++- drivers/net/ethernet/marvell/octeontx2/af/mcs.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 ++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 1 + 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c index c43f19dfbd74..bd87507cf8ea 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; @@ -1436,7 +1447,7 @@ static int mcs_x2p_calibration(struct mcs *mcs) return err; } -static void mcs_set_external_bypass(struct mcs *mcs, u8 bypass) +static void mcs_set_external_bypass(struct mcs *mcs, bool bypass) { u64 val; @@ -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..f927cc61dfd2 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; + bool 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..cce2806aaa50 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; + u8 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..4227ebb4a758 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 |= FIELD_PREP(NIX_AF_LINKX_MCS_CNT_MASK, nix_hw->cc_mcs_cnt); link = iter + slink; nix_hw->tx_credits[link] = tx_credits; diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h index b42e631e52d0..18c1c9f361cc 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h @@ -437,6 +437,7 @@ #define NIX_AF_LINKX_BASE_MASK GENMASK_ULL(11, 0) #define NIX_AF_LINKX_RANGE_MASK GENMASK_ULL(19, 16) +#define NIX_AF_LINKX_MCS_CNT_MASK GENMASK_ULL(33, 32) /* SSO */ #define SSO_AF_CONST (0x1000) From patchwork Tue Dec 5 08:04:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173776 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3276542vqy; Tue, 5 Dec 2023 00:05:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF09c8awF5lIoR3irPGgUDdHOH560MG2yrW5xL+IkXsoYO/n1YyQhemtBiEh4qLPnSYGGPx X-Received: by 2002:a17:902:8d87:b0:1d0:8be8:bb6f with SMTP id v7-20020a1709028d8700b001d08be8bb6fmr1244959plo.38.1701763525217; Tue, 05 Dec 2023 00:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763525; cv=none; d=google.com; s=arc-20160816; b=uID0iy9sq6VlVv4/WA209Dy/G+ixqOsBeNVegAKXAJoEX++H/Hb2ducFAFq4eHSDiv y8c4PovwxX3az7zuKUgg0YY4qbT1aVYsyZqfV9COlPJJCs9GfEMvNu9x0ZT0Zwvvaahn w4c6Pb1Kvg3IUrePj3TfdhqYcAW/ihlfMfbor/wE9d78BSBb4yFig/e3gmqYx1dW9Sfh ES9ryk9o/7nxXeEq9Skx4m+gNMvkM0695i8Cnn6rPQctHus/SO5zNdKOep59Q5LHlonr DCVxe0Rg/SM6ebdNUhTvU0Cp3qRF3eoqc6azPu269jBMWY/i7JH3OLF2Ujd8AcQ4XhaD 13PQ== 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=p83/G2sGN8yS6iGLNhSbWRDwg+AGWDpviLwOjaU9qlmc7Gg8FaBj+rxCiLjP86XP6F jdLfuvvOR6wCoc+ROXaFfJoa8KEoNohNkyXz9LqIliVXH/C9C3nnYXtlA3nVMb8d9eLk hbrOJDm+Y5cDuRBvKTr+nik/iNF7MxARpCyd4ELlSRljUU63hi1lMt8lgYkPXnvQ2a/c bb4Zl9i0UDZtBbMRjq5KtVF+LfS/bXtufamArhXHICg8iPtpf4hIl/OBJv4xVJ8QXDyS YbFF7MR3/h3SZNw8h22sw0ZcDee2OgGYbqL8M+CJvCcFU7XFkqLQN5Y4eYp/PVSZdjOE /eSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=dCBP0ZjC; 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 s17-20020a170902a51100b001d0a9fd5f77si2706988plq.624.2023.12.05.00.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:05:25 -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=dCBP0ZjC; 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 BEC1F80916B1; Tue, 5 Dec 2023 00:05:06 -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 S231722AbjLEIE4 (ORCPT + 99 others); Tue, 5 Dec 2023 03:04:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344765AbjLEIEx (ORCPT ); Tue, 5 Dec 2023 03:04:53 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4069D18B; Tue, 5 Dec 2023 00:04:57 -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 3B56OhYJ010808; Tue, 5 Dec 2023 00:04:50 -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=dCBP0ZjC8aNxrVcBEkaR+M2sFaOseTOSuy8C4JrFlmB+5l2rJrfklAITjApeS2QDK+u7 dsuLAwSWn02J33pfnzht3N35wTXR8yKC35lN1yJZhznmIWMl8JjQ+qOeEwRTyNL8jHRX 0He4+tzHDR9OOlb2PBchgNzxy9nlZdzdDHEb9vtJ/YQflrnQNQlyPMTbWgI9HeTt8uFE ak3InvzUlVrLz1eBj9kibnNgq3yChbV6KKqTrDHbgFHPdQslrCHvVYiIzkh6KA6MYXIW q3p3RX12Z1T6O811BnKmVqzYDVV/QdC+QxPTc/QxCwx0a/33IBxldB18pM8hIC9dowok aw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ur4yrrq4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 00:04:50 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 5 Dec 2023 00:04:48 -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; Tue, 5 Dec 2023 00:04:48 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 815CE3F70A6; Tue, 5 Dec 2023 00:04:44 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v4 PATCH 2/5] octeontx2-af: Fix mcs sa cam entries size Date: Tue, 5 Dec 2023 13:34:31 +0530 Message-ID: <20231205080434.27604-3-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231205080434.27604-1-gakula@marvell.com> References: <20231205080434.27604-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: pRBXSOufZGn4a9gYFu7Dx5SGjRzxHkvO X-Proofpoint-ORIG-GUID: pRBXSOufZGn4a9gYFu7Dx5SGjRzxHkvO 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-05_03,2023-12-04_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]); Tue, 05 Dec 2023 00:05:06 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784428390605456870 X-GMAIL-MSGID: 1784428390605456870 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 Tue Dec 5 08:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3277162vqy; Tue, 5 Dec 2023 00:06:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRUxWjJSegyinz2dQcf5ssAFNNfVr5ndBMsrtfaHL2Wv0VjO7WdbwGxrh0HMTRmmK2I+XE X-Received: by 2002:a05:6a00:3903:b0:6ce:3c1e:743f with SMTP id fh3-20020a056a00390300b006ce3c1e743fmr1037990pfb.41.1701763608062; Tue, 05 Dec 2023 00:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763608; cv=none; d=google.com; s=arc-20160816; b=dlXo88e5koqYo2PNj3Xwtx/gQbSFDJouqKaYOeYZnK49pXCH9nZoR8Yhqctxsvk74a jxUUnXkeuaVTfgr2VelNY4TcfCLn/LDbRxyd9YjaQ6Uaqh+lgArajxrgz1OKooL3/zWd ZEZUqLDGNX2na4atFND2i33X0gPkYhiBD8i50bJgeiUIwRaQy7KL7lNGFXhQt3yga1R6 RKs/NNVxNXJYrzSh5gHW1/zDIamOGArN1c6NXbTJMD44SLMLr2L0XAFmxQO10GAYFAPm uBdQ5drRPXZuGDlm5C8aHnp9u0ceE/cqkbd1+dK4Z+7P0PRcYQb2UrbAgIDzxwYRvILv cuiA== 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=aWngtRDxPwzlvoiaiZGqPUHzdIBT5rG+oxF0CqsGxLE=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=KTTxvjMySnmbIYyatutkhcaRSTA7h7G2K5LozQ+2unWPO3tKUUo2IaVqRr0K5c3n7Y EzlWFEGiZGqYv8vwKyTAf/aDHYyfF0PeyZMtUElxKSUZZYvKAecJt+KL6Fsoyl1P2b5z wbgsmfe4EBy/NNHpNfzEW0jAdnUp8IhZmNlrfWDjWe3GeeL3r3VEib1Mn9M3zSLAvYdw 0OcUZcdtjMaw3nuBka8dWojTRBexlM3wPyaMu1B9MnL2+zscaeRgCccerMUZHz15iLjw hl3xrTGrvt4xEFoU3oZLireU1I6PSHx8mmlUKwZrFx32xLpgLFF78RZ71KOK2FEBAi9N bcXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=TpbewK1Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u16-20020a056a00125000b006ce08cdaf39si6539042pfi.386.2023.12.05.00.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:06:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=TpbewK1Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id A7663807B48E; Tue, 5 Dec 2023 00:05:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235572AbjLEIFX (ORCPT + 99 others); Tue, 5 Dec 2023 03:05:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376355AbjLEIE7 (ORCPT ); Tue, 5 Dec 2023 03:04:59 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE48719F; Tue, 5 Dec 2023 00:05:04 -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 3B4NxDqJ021827; Tue, 5 Dec 2023 00:04:54 -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=aWngtRDxPwzlvoiaiZGqPUHzdIBT5rG+oxF0CqsGxLE=; b=TpbewK1YrFCAA81Fr1IwuDUjqX/iKS6P6MWrcwciMtS2UVOmpCiri0rYx7Rz0IPmvwAZ 2xGfW6IMFezoqemlegvEwPsEQVNLe2M/YxfJmBr6NyXVDioWGUo2iMEGIyPgckj0vqMK UN+8YyofTM3Nb+3704juQ83kubKklMe73r5Kv/ZmnVhxz4bO6Gzf6dvndNwcUZGFUY2z OJ3rX9WXk7Fvfb6Ip5c+BAbDOJaG7nXPRDl8bZOe+j4Jgkk0WABo4Qs3w0rT2ofFZylk uia2JLUUswlWZkIvRyKSGVr9UIAEqYJGWlGrOIhaEQKrInxCOt20py8s3Uwzfndw9I2A yg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3usrx3h83p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 00:04:53 -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; Tue, 5 Dec 2023 00:04:52 -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; Tue, 5 Dec 2023 00:04:52 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id BD2E03F70A9; Tue, 5 Dec 2023 00:04:48 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v4 PATCH 3/5] octeontx2-af: Fix mcs stats register address Date: Tue, 5 Dec 2023 13:34:32 +0530 Message-ID: <20231205080434.27604-4-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231205080434.27604-1-gakula@marvell.com> References: <20231205080434.27604-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: HA4Ffe0DlSZOAxNc1k_3j8p1m5dVr0Sz X-Proofpoint-ORIG-GUID: HA4Ffe0DlSZOAxNc1k_3j8p1m5dVr0Sz 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-05_03,2023-12-04_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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 00:05:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784428477082251895 X-GMAIL-MSGID: 1784428477082251895 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 bd87507cf8ea..c1775bd01c2b 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 Tue Dec 5 08:04:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3276715vqy; Tue, 5 Dec 2023 00:05:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpW0KPNT+ZVYNC64vYK++mtNyUAiPUmw/5MqSs1QGLEaF1tN1x5SpZW6FSRAUgVksrGTBo X-Received: by 2002:a17:902:e892:b0:1d0:b095:9ab0 with SMTP id w18-20020a170902e89200b001d0b0959ab0mr1891166plg.105.1701763545453; Tue, 05 Dec 2023 00:05:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763545; cv=none; d=google.com; s=arc-20160816; b=V5BzhOy7TuLbJruD3Iak9gFIvnxO+OrIfIIRFV2eZms2oieYjsxFJz0qbGNaoANBbY ulfLoamKMGvNefu5fNeasB8UvQ+PNB8LmQjDfgBfUEqGmIBsAFWuDhPWI0okpYKOcLzT ep4SB+BO7dy9nGaW5R5ftTfyKbMrQaNe4neDS5yxsd1eu/pj3hiwWzvqbw1lr15pWAz8 i5ay8WesjJZ5URWS1ngA68+QwcB14LHCg5VuyypMV0iy3ScVdJ8OUvYV2QVbHNML9Oll QVbppADgpTp9t19XFNXPYhmxSWIxuoyHpdjmmRahxktGsBZAuiKXaleW6WIg1d3ip7qJ oz5A== 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=cpu74fKMW0DTq/GMU//ItdeUtHkkNpXJJ0gkywxMXBU=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=nMFMhYV0cchNk6goZ46L/MW+oo4boZS7MAdwdm5RtB3GoWkHlEXv+h9FunOZ5h/BUr c2+Za2vQzv3ZAVvCxOrUz7rHshWgog1QmR/4BrJ3iG+GqnbuJqHCdqhTLMSkQzG2WVoB ClYPCnIlKCMcbfzs+pIRgJH0NAHhGTeGnzX8/6gtHplCZi+0jGwsBrS20dq/D3X+cFFs sChfu1NrDeQwhIqu8UfZ0v9sQUEVYqKlXTh0NfWn/FdhSZx1F7cssu1kYLTRkHjnT3MT WISdXK5T6Tz0zgGkI1VWHS0hZ6lEHYPjg1CrDmnIiZIYyRAhTmMg3fYqkGxNgWY2Pjgy 27kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=hgwAJeVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x24-20020a170902b41800b001cc53dbf53dsi8903827plr.648.2023.12.05.00.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:05:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=hgwAJeVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 8214380A9AB6; Tue, 5 Dec 2023 00:05:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235478AbjLEIFT (ORCPT + 99 others); Tue, 5 Dec 2023 03:05:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346380AbjLEIE7 (ORCPT ); Tue, 5 Dec 2023 03:04:59 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0DBA1B2; Tue, 5 Dec 2023 00:05:04 -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 3B56OghX010788; Tue, 5 Dec 2023 00:04:59 -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=cpu74fKMW0DTq/GMU//ItdeUtHkkNpXJJ0gkywxMXBU=; b=hgwAJeVJYYD55lDLTDXM2RnWwvoqbsLPyVZkm2ij/Ht+7cQxLVPi1YrJActKzSduCukS jFtn08jYImKA7aOJssZoGd1flIh8jDippE6uD6o9xTq14TY/w8byC77aHwXMJz5/niJi tcwQt4YrflWj7mUs29Kp4E+VCwKhzIHhacYs3E5PjjLsvleAHLf9oePofrBtNasB1/Vj uoLSMPgBg98wCTCgA/MCC2X16hT3zbBRPvnTaiaeSfh6Zynr7qJ+ZycMhIcoANt6mOG2 NfOwtEXa9GiNR6OZbRvUhX/Cs08Ld1G/xT9A0rqChkynGbLJn1YIn6zvW0sp6PWJ7AA7 Xw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ur4yrrq4w-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 00:04:59 -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; Tue, 5 Dec 2023 00:04:56 -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; Tue, 5 Dec 2023 00:04:56 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id EFF7B3F70A6; Tue, 5 Dec 2023 00:04:52 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v4 PATCH 4/5] octeontx2-af: Add missing mcs flr handler call Date: Tue, 5 Dec 2023 13:34:33 +0530 Message-ID: <20231205080434.27604-5-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231205080434.27604-1-gakula@marvell.com> References: <20231205080434.27604-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: RN41f7qEnVFQRrIZGXm0tsISjsoeHmuq X-Proofpoint-ORIG-GUID: RN41f7qEnVFQRrIZGXm0tsISjsoeHmuq 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-05_03,2023-12-04_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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 00:05:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784428411490393202 X-GMAIL-MSGID: 1784428411490393202 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 --- 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 Tue Dec 5 08:04:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3276792vqy; Tue, 5 Dec 2023 00:05:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2/WHQwcxgduHjvt81BlDuFCx/BQIwkhj97omFN5aUgwjM4n9fggDJr8571DBNc4A38CIM X-Received: by 2002:a17:902:b90a:b0:1cf:d07c:27f8 with SMTP id bf10-20020a170902b90a00b001cfd07c27f8mr1699113plb.28.1701763558697; Tue, 05 Dec 2023 00:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763558; cv=none; d=google.com; s=arc-20160816; b=J8v4aKX50NzxaA1D8Sqw3sPdODD5riC0JxzTtxE5QX6jWUKGubEJwAM7iuoZQAxkDo lsfiak0aqzGyebkQQI5taJ4OPn82gGXBEVwRbBne8RkgIpnDcdGLbPIYXng5oXfBi8Rn 3YZkjQZCZPt7g9jKO1Ttl1acqK6IaHd/xBggJdm1fp03F3ogMH2pMtFFEQctlFfCen6f o1EvuL4Kr+4t+ie4QIqVlknA0bL8VI+2Q60wNfJSM4DNq5UZ65KBV+XImwOtIRlB7SJU aLlSFmIdsWe6+99Nwa7xkXb27TrziwgR81Kiy8L3DcSn6ZE8JPlNijb+Dt01MbKTNoA4 y36w== 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=Dx0gx1f5zgEAAtyzobujfKwCVMccnDdfV2I2H2Pq+A32GT6F0GZQcYhsEAlviRlfdp 5CEtehNyJ+KoajfyUePYc6eS1xT2nyi+KyCy46Wwkg6AR9VzhufHeaAWbqTCuq8zNfEG 5qTi3YYl1QfZ/uhjQsKd0cSP3i4A51Z/4mDC4a/u0l+RWn5GzE9vU2O9ItnjJmU3s15e jRUVsHKoIXE4qabMmifs8b6Nd/+GBcpDkPYo32PWt42bGDcZ8gSJrKku23VxY5GpG4CK O1xPQCH/Mxc8crr7o610LeCYq8CKWqGyNQ7Ayn1fdBX+HaPvThXNWNeUZCjyAiVfr3qH 2udg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=kzGwi7Oc; 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 ik26-20020a170902ab1a00b001c9b15bf936si6730207plb.220.2023.12.05.00.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:05:58 -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=kzGwi7Oc; 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 2FBB6807D8C6; Tue, 5 Dec 2023 00:05:47 -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 S1346315AbjLEIFb (ORCPT + 99 others); Tue, 5 Dec 2023 03:05:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235015AbjLEIFQ (ORCPT ); Tue, 5 Dec 2023 03:05:16 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C080D72; Tue, 5 Dec 2023 00:05:09 -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 3B56Oi4d010811; Tue, 5 Dec 2023 00:05:03 -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=kzGwi7OcU1a7WAj6+x9HvDoaErE1hNmCxPT/g884XR09pwPec9W5KEWaBDHdfwtJpOTc ppTKCJm0ohkKWUay00IH6g5p3I5vbZYuWXrdbS5n//Hp9KB/s/Jswh+yrGnaY33kiz6J hTKOM6g89APK3Z4ceopdvWEFsUjXqHElwhk8FwKoEoNK96cI1BFcV+NTYF3IGhIxpfMG 7iGbPKRsHxHUk3nYUvXqidw6Ozy3OTTHHj5IwleKmyIqSRRutGSxXbBr2QbSbdwVm/0K uQSEXluQNCnYW8F8XM+U5D9hrQgEIM0a5kcTc1+N6eTe03P2vgMGSbXrdF5BRa81BaJh HQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ur4yrrq5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 00:05:03 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 5 Dec 2023 00:05:00 -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; Tue, 5 Dec 2023 00:05:01 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 3A36A3F70A7; Tue, 5 Dec 2023 00:04:56 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net v4 PATCH 5/5] octeontx2-af: Update Tx link register range Date: Tue, 5 Dec 2023 13:34:34 +0530 Message-ID: <20231205080434.27604-6-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231205080434.27604-1-gakula@marvell.com> References: <20231205080434.27604-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: Q9Kw8iawJNIHns5tXgFjEyiHO7WnmqXC X-Proofpoint-ORIG-GUID: Q9Kw8iawJNIHns5tXgFjEyiHO7WnmqXC 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-05_03,2023-12-04_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]); Tue, 05 Dec 2023 00:05:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784428425493311707 X-GMAIL-MSGID: 1784428425493311707 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 --- 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} } }, };