From patchwork Mon Nov 27 03: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: 169954 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2820310vqx; Sun, 26 Nov 2023 19:05:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGh6o4mqNWiy0ZNGGulZzFwuGuGWfdEcmpt4qbnwEyzDR4X9wnY2Kmykg2c/q/FxYX2tvMx X-Received: by 2002:a17:902:d50d:b0:1cf:c3f7:7d51 with SMTP id b13-20020a170902d50d00b001cfc3f77d51mr4533065plg.49.1701054313112; Sun, 26 Nov 2023 19:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701054313; cv=none; d=google.com; s=arc-20160816; b=qKLWWje6JCz/7dbCIXfrx7vWiIUxVlmoOt9IQEzkxGmErttErymt34umqV8VJEiGg+ op2CBgcxdWs3F0Fp2YXN3nfnSwUy8x6MfAEmAhnUU2UDxBYvlRNwvwSK1sLWtwpcvJyL bmeLPEp14NXC9Ef2pdq3+3hJpspNv2MWp5OwyzafdJpJYE8hkNz4HJgdEgThIoqLo7FY wWAi6lHyId6PF3oRbXUvu6LVws//nRp7tFy79vUE+d6X87gV5sLIHtVoTM75niWHCIBM 5yhoql3EIhsu40QYSpXEb1eERd/NiwNA8JAgF9YeDwrwmd7WVqZhqK6tNiXAev2joyiD n0bw== 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=WcDrKRjqUrcAIdLxBWMn+hsszMFmnWYRxi7ZDSGeMD0=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=MrcZkSvzev6rODpSM6abTzmL2MRYWm/fVYE4wqDLxHIvUOuwXllK8aesJqVRBYHXC7 LF6lytnnOG3KYy6vag1L89cpb6kkdL1OfYgQSy04CIorbPSWsr767S6OccUx5vUJ1eSu c6gw6W5wVZXCikAP5rrT8MK9s8ESm7XCer0qFp7dYVlXX23ljLQ/76TCR7qlEjIbIWP4 o0KV3cAF4kGStOwHqpZ0tf2bQ99muFOgzCwfRg7AkkiNHPzCZ8knGVKMw4rED7qsRCx2 yGMhwQp06B6HKGoRiS0HsVzXzxMhQmMsy2vy6HgcTCHUEXkRn9BlqNLLIenYXY2DtXh4 iSOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=EGrWtLmS; 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 n3-20020a170903110300b001c774a25b3bsi8863932plh.233.2023.11.26.19.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:05:13 -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=EGrWtLmS; 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 BC797805B2CF; Sun, 26 Nov 2023 19:05:05 -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 S231905AbjK0DE4 (ORCPT + 99 others); Sun, 26 Nov 2023 22:04:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbjK0DEz (ORCPT ); Sun, 26 Nov 2023 22:04:55 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78629111; Sun, 26 Nov 2023 19:05:01 -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 3AR34rcP009930; Sun, 26 Nov 2023 19:04:53 -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=WcDrKRjqUrcAIdLxBWMn+hsszMFmnWYRxi7ZDSGeMD0=; b=EGrWtLmST9YXJr2bcdpfz5WJvms3fzKjsJq3gwirUdikKqxB6KsxKovZgVPJWkdpdNae wyizL4rVOSSrVIPl+Iob9oqMyg6iELmkJDuOEK0bEl4VBsVAs2LVH3ZiQ+ojwvLn55Iu Eue5fez9joqnkxFl2NTg3DPi7BJ7Qgs1pWYjhuDiVInZ32pK9ChW9BVy8j03wQUR5Oof 0TED99C1a151YB46ae89pUhS8mFDEV61TMphVQqcHkz2E/ItLQ9UK4Uv4iW+eQfBydY4 gjpWlEib4CVNx4jyOPding8MYmtrD7YFFc3HuLWABGJbhUBW9SZRvUpskI02pzTG44rv 8A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ukhauk4v7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Nov 2023 19: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; Sun, 26 Nov 2023 19:04:43 -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; Sun, 26 Nov 2023 19:04:43 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id BEC933F7080; Sun, 26 Nov 2023 19:04:40 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net v2 PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled Date: Mon, 27 Nov 2023 08:34:31 +0530 Message-ID: <20231127030435.17278-2-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127030435.17278-1-gakula@marvell.com> References: <20231127030435.17278-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ss-fdjBNT7lNsY5n89Sby6tqoX73nxi8 X-Proofpoint-GUID: ss-fdjBNT7lNsY5n89Sby6tqoX73nxi8 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-26_25,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 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]); Sun, 26 Nov 2023 19:05:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783684727320527969 X-GMAIL-MSGID: 1783684727320527969 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 Mon Nov 27 03: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: 169956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2820366vqx; Sun, 26 Nov 2023 19:05:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAXi7EfxTEYAdYJ4n0OJa9WYQPO9r2nStrxld/Mzbv7sR6g9QplMLmx7Mz1kDjFB5LO2UX X-Received: by 2002:a05:6808:199d:b0:3b8:42ca:5e71 with SMTP id bj29-20020a056808199d00b003b842ca5e71mr13832280oib.47.1701054322978; Sun, 26 Nov 2023 19:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701054322; cv=none; d=google.com; s=arc-20160816; b=DF22Ax4k7F4pVOcePiRHYBFIDIPxNceSuRm66JqmAHlFDfr3HUl2V4cndXJo5vXQGB v3Y9dXPAHMknBZtqkhtSJu5DgV17xy8RgD7tK2FI4aekw0ym6Ux36n4FvUeUPugBRrI0 6lKNLyBV27EUMJmyXZfzRayoRmmlXTD7C7E2Y1a2tVja4X1xTzK89DTrnA6RDb3r8wjN rgts6tdKqaqw6crJmzpvm/MmY+13//KpPLPOb8pL85ytceKQ+ymUEtDxzVkXZXo16xFC mq7lsHnsFy0un3n1EZsfuvX2gb5PI+y25jTDQMZu5z1Ok1jBjpiVaVi/kraPeWmRdKru 0JvQ== 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=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=tbIYkx4IpyGHOg/VZqgZk4M81zuG2WVsYBN8PIJHM0TI01QgXmSysbTY9NgwlmydSv KQOBfBdZLhJJF3ranuF+VDQj0EuuR/5Rk04NgiQaBJFs1t83Z9WIiiJbZQOTjoborbJF 2gCNAo6WKM5yZF9/2pLN0y7uZsTc4T2Co7wOpB0+jdr2oc0tYSpeA5vJBhANcYPS2WiT WD+58+T6NEL1OD7Pj5Z3QKOs3OykNyfIAst0S0TvnuyPFiH2OKoo3Zfcbc7bW8gKGtGV KBOZ2sFjtdHiJUPnhRXB0zuBVm20nf6lKPJB2eBhk4dsYMmpAv2so088024ngfQL/hvn N9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GwHoFZix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s12-20020a65644c000000b005c21538543esi8434555pgv.433.2023.11.26.19.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:05:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GwHoFZix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id B9868806A61F; Sun, 26 Nov 2023 19:05:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232033AbjK0DFG (ORCPT + 99 others); Sun, 26 Nov 2023 22:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231926AbjK0DFC (ORCPT ); Sun, 26 Nov 2023 22:05:02 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C3712F; Sun, 26 Nov 2023 19:05:08 -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 3AR0QDe5014892; Sun, 26 Nov 2023 19:05:01 -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=GwHoFZixRvwM2Zw4YosZjOciUyCtE+puDCPwGeb0gIjEocZ9oW+xGMv/tdO9KmarayAY 7wbCUAwKkjv4NtqS6pcgKrQSfyi0EsJB5OCKAxouuF88vdBP5laTts45pbGvcr5MTIgd wYmpUjELeToFOJs5Q+7UCUgwG7wJOCnaFf4lJPH2H3RPKyIk6kxqMt6q8hPju66gu8HO LtvhK9U8/G6aFvJeEzHHSRJubl6SFXMmulftwiJZf822N0SmXDovsfc3/bf23/LGE8nH L69nm5VsDMCHBG9VgLFKvOaf85C7RMkHCBKNd4iwGVRqqjwPFvpSXRdS0Q+5dsZcBhPe EQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ukf5x3bk4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Nov 2023 19:05:01 -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; Sun, 26 Nov 2023 19:04:47 -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; Sun, 26 Nov 2023 19:04:47 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 687F53F7090; Sun, 26 Nov 2023 19:04:44 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net v2 PATCH 2/5] octeontx2-af: Fix mcs sa cam entries size Date: Mon, 27 Nov 2023 08:34:32 +0530 Message-ID: <20231127030435.17278-3-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127030435.17278-1-gakula@marvell.com> References: <20231127030435.17278-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: JYQyFbmy0ZwP2Vo4mwf0Zi-Q68pdVYaY X-Proofpoint-ORIG-GUID: JYQyFbmy0ZwP2Vo4mwf0Zi-Q68pdVYaY 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-26_25,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sun, 26 Nov 2023 19:05:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783684737733388383 X-GMAIL-MSGID: 1783684737733388383 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 Mon Nov 27 03: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: 169957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2820423vqx; Sun, 26 Nov 2023 19:05:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlz7iWHl07uKmwJFSLz1Fg2H0vAE1egqLgh2K83BDzjU8NMSNyAGGiChzjeYPtqy8JwEcS X-Received: by 2002:a17:90b:3b92:b0:285:a72f:966f with SMTP id pc18-20020a17090b3b9200b00285a72f966fmr5681965pjb.46.1701054332532; Sun, 26 Nov 2023 19:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701054332; cv=none; d=google.com; s=arc-20160816; b=Ph/cYqx4NU6XbsIhhO9M//LdIZDiVHBtq58KZcdk9qn96MOdourq3xsyT6Uy1SFv1n 8Ivk4O+eLEzQ3rLXayMpYr4M3dStPsq/KusaWVgCAOiY8EyZEFArO83wku5YCahK5IZp VRN4kf+8WfWjbPIl6acyzwl4h9j2Do3YdEQPHpLaloFc/YuHrMD/IR62uZaKVTHsaeYG PvvPCr1pHd1vVRetFvU2dmcTpRimvHdVtkcGVzLRYoH6I36aw6jsvD66FEAHgxvKr6zL XWVuABKlaKZthDxM67dSljbxw7DcNeB8YmF1pLgkf4rRS2R6Z4rjYdY6aRTG/ZNt28Zk fG9Q== 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=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=vAMx+F52M1w2lJhQXwRM4sG7HVRjbkOz0i/CJ1gpjPJAeVOXMwKp68QjhckD91khSk Uap6JaVLiaXbMVB9HGzr82nLAMgs4Fq3RD1yWwfD1cnmHeF0GIGlIYdgPmEgEPt2HMPR zZXb4m89cdKM3ZiTpFtE925wKWMeEkEc4VsutRZLELkLVXefmSCX96KcKb31POKEGfgH 6Z7VlVJYE114Gn32dN1plOvBPXi16D1vGby0/BRPsybxIxGeAcD8/QQhToyy0X4e8INX L3+WIBzWgcqkLK8anWT8KcE6WR5b5Q5/yDuN/BswDMqoY3hwOedlkYYPDt6E80eU6gey mHdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=dFX2NTTR; 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 m11-20020a63ed4b000000b00578a44df6c1si8945690pgk.640.2023.11.26.19.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:05:32 -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=dFX2NTTR; 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 1F14C803C47F; Sun, 26 Nov 2023 19:05:28 -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 S231905AbjK0DFM (ORCPT + 99 others); Sun, 26 Nov 2023 22:05:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231986AbjK0DFD (ORCPT ); Sun, 26 Nov 2023 22:05:03 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A943135; Sun, 26 Nov 2023 19:05:08 -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 3AR0QDe7014892; Sun, 26 Nov 2023 19:05:02 -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=dFX2NTTRCGudkCr/yyKBpz0osW5IZKsLu3K2ovlVgYBpQEJj52Sya0YbTDvQIw8/5FTY gyiz17bjoNrr/C93ihJ2qSTKQnPjf+N1reBstzSeFXL0YgIPZcXaTBCeGmJmV/6NI2Yg IvmCR86QpBRF7HB8IDe4tSqHK9SiuOpVSdKyjckVic7ze5R7anNwMG6cHGpLyEAL9/vH F0RjKSCOnVlNVNCjshjM1VpH0QMjTldcnuE8esyAFPE6dMPecgQo6aKz1Hjfb3XePqhw 9JEtvRw9cgkropSGpRfY0Lsg9tgSI2VZdqAyjVD6M/dS73QQfzZ0MzbcYHm7IuMyHpwP 7w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ukf5x3bk4-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Nov 2023 19:05:02 -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; Sun, 26 Nov 2023 19:04:51 -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; Sun, 26 Nov 2023 19:04:51 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 1AB0B3F7080; Sun, 26 Nov 2023 19:04:47 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net v2 PATCH 3/5] octeontx2-af: Fix mcs stats register address Date: Mon, 27 Nov 2023 08:34:33 +0530 Message-ID: <20231127030435.17278-4-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127030435.17278-1-gakula@marvell.com> References: <20231127030435.17278-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: EZmBIFe8iC5NLKICKsJJV8VZMdxuwG58 X-Proofpoint-ORIG-GUID: EZmBIFe8iC5NLKICKsJJV8VZMdxuwG58 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-26_25,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 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]); Sun, 26 Nov 2023 19:05:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783684748183647930 X-GMAIL-MSGID: 1783684748183647930 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 Mon Nov 27 03: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: 169958 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2820429vqx; Sun, 26 Nov 2023 19:05:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUY92E4YWppnN0rEMkLuAKogSWNmIU2ZJ6/3xAwW6zqZYhfWuclEUg6r5EWnq1YgEM7Yt6 X-Received: by 2002:a05:6808:21a2:b0:3b8:3ed6:c468 with SMTP id be34-20020a05680821a200b003b83ed6c468mr12884564oib.58.1701054334003; Sun, 26 Nov 2023 19:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701054333; cv=none; d=google.com; s=arc-20160816; b=OPEh50z3Pre797EQcPJiJo+FhBNXm5BWSSU/4vD4qzVkfX21CDdmz2NqkGrO8e3kV3 Jsater8slm04kSjqLKre8k5550De635COLsJu80tHWV96FwgOADGQDyr0YfdzJcyPwX9 zRujYcYdWHuS1nJzoxtO+HZv29yuODa1ZJjr266+f50qfniB+c7BxpwPznRkAuseBcDE 8qamTAMCeHRVAddocEAS9D6jqbnlJjtlpHbixp+7iK/ZDdmkhlbxqn8YtqUODAbWpRAK Wd3E2rZyCOU7GdsrmmRhwImuJyfFKthBWUYCDi4WXulMaPaCY0PwGqvIzjTTqXh37zcP sihA== 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=s27OucWU3fOscbVAX3ldp1gFzf1mDvkwTDGgwv9Qvbc=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=TmW5pb07dm8u7m2El4y0OpHJyHcbLe4hX39lTXudBcO9MrZ5G8fK1mbfii0cKsUWCM CSaymhw2DRsKrClODsRCkMa3KKtTzetugeKXuCOTrbQD0VNOlmZU7Ye8TnE4bP0mxt2R NNealw3UTpBEjeJj9rud+QQp5J5rKAsiOtIdozZvcxR2qS1onU0hEjEwnT8ybM8/v6vh vmEwIDm1vm7zztjiuYXtVsoizX4Q2bUvdeGZf064EnG0GfHNSmf6UVabm2PTIoXUTc7E r2qviASNSiGkVhUXZ/2i1/PNSmCObSlYZcgDLLvJf+5uA4J6NhENAenSuMBNWYOshLEI Lu5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=IB4sEvZU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id by5-20020a056a02058500b005c24221b37esi9803861pgb.600.2023.11.26.19.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:05:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=IB4sEvZU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id B08D8806A631; Sun, 26 Nov 2023 19:05:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232340AbjK0DFR (ORCPT + 99 others); Sun, 26 Nov 2023 22:05:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbjK0DFD (ORCPT ); Sun, 26 Nov 2023 22:05:03 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80076124; Sun, 26 Nov 2023 19:05:09 -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 3AR0QDe9014892; Sun, 26 Nov 2023 19:05:04 -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=s27OucWU3fOscbVAX3ldp1gFzf1mDvkwTDGgwv9Qvbc=; b=IB4sEvZU74KHeBCSfus5Sh32l7dl0EI82Oc8GQTiQrtqcXI2WEC+vgBpAs5acK1PmWa1 57x7Wew0mN98XbpJBVlggM758L5Hlek0eokYECY8X1Z/frnMmh9TBPsFwbnn0fXsaf8M +HKfiSFFd+N4cRVCCkbkH3NiWh5N4zDkjja6IAaFazvW8SzL1/1+b9Lp3Zei0cIlRUf7 AvwsXsZKxBY2ObcAeTzhLkNUB9ake75G8awFp0BB1+Ptfc00N43WAoG3C80Ki/IjspS/ kA3suAsdIkKOh+eN4XzaoQHD3/xFWNAzf/RHRudk2ETF2Br4X9PbSsFCvunLChiCyjy1 gQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ukf5x3bk4-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Nov 2023 19:05:03 -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; Sun, 26 Nov 2023 19:04:54 -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; Sun, 26 Nov 2023 19:04:54 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id B78633F7090; Sun, 26 Nov 2023 19:04:51 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net v2 PATCH 4/5] octeontx2-af: Add missing mcs flr handler call Date: Mon, 27 Nov 2023 08:34:34 +0530 Message-ID: <20231127030435.17278-5-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127030435.17278-1-gakula@marvell.com> References: <20231127030435.17278-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: wNHzfbdQuQluqmq4T-0QZmOmOzDkV0GM X-Proofpoint-ORIG-GUID: wNHzfbdQuQluqmq4T-0QZmOmOzDkV0GM 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-26_25,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sun, 26 Nov 2023 19:05:30 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783684749439106114 X-GMAIL-MSGID: 1783684749439106114 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 Mon Nov 27 03:04:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 169955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2820330vqx; Sun, 26 Nov 2023 19:05:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUs/thFe7M63ZR2upd3xcw80e4OEaeIzBjDl+WZVarxaa+nlu3EGmpt6vTI7SRmqeTWaaO X-Received: by 2002:a17:902:c40d:b0:1cf:59ad:9637 with SMTP id k13-20020a170902c40d00b001cf59ad9637mr20086590plk.22.1701054316441; Sun, 26 Nov 2023 19:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701054316; cv=none; d=google.com; s=arc-20160816; b=1HXO8s/fFt9upbz7zW8Y71YmsdtsnksyCHmcxHFokTSdFG3Jh4I50GZMKifYvwRAmt aaDMB68y4kLdGdBuemfAYwRCGnL611FgcSBnWwAeZyU8hl7Zdk9lFi9R2HclaGzb5iJc ihns+vuYEpnZNZex7jNZ+G472ASQbrIOVLsDTEGCIypG5yJmEtp5M8Yj6DLyAkXQA6cB 99VHIgcWA4fju1PZaGyxctJIb82PYV7XPbbx2C47E88KH+dSWlm7OcGHYiji2smp+Dgv FkKX0rRBZYkLmcEG2FcXVqKmNLZkc8RAUb61s+40guQO/FqXADaB+m/h9BPO1ZgazD7s btoQ== 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=h/R/dVUGgxW3ENwZfZqJ0RIXBUZJtaPBzkXTFm9h7lY=; fh=wPv/fmS7iNNmCH0mdUKjkT6XsNx1nMbXFeqwvq2D6q0=; b=Kmf+CuSBg8UtmovTJzJuCBgjCi9v8FGQ1qSGmhEsKZSjVKgTqoyBVybTACRsGpJ27u k96bwsHMDrSfUYJZRXOKgcXIwWEaqy6DrXvqPUJDy8t6EwfHXCCTfprjYli0LiE/jGg5 qBj01vcK46rXEBm2YrJoJn7j1EK6yGm8g0n+K3RbLmAhxELBe+mw4M7Lh2pfTqzGryZu c858UCxoJFof//1r6E6D9kGxWC0f+kZvW5hCtQrxsHCWMthaZYfS2f3QbOM4S0YeYwUK 2uyR5WYpttd+0Lfsuy8JbvbgRq/Y5wGJ9H0doHNdH0er49lcckzBU7UNuErui5eu1L7i amTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=aA8LJwFe; 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 k28-20020a63ba1c000000b005ae05010bc4si8721518pgf.235.2023.11.26.19.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:05:16 -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=aA8LJwFe; 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 E0C8E80657CE; Sun, 26 Nov 2023 19:05:14 -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 S232065AbjK0DFE (ORCPT + 99 others); Sun, 26 Nov 2023 22:05:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231923AbjK0DFC (ORCPT ); Sun, 26 Nov 2023 22:05:02 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3458111; Sun, 26 Nov 2023 19:05:07 -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 3AQMgDf8013706; Sun, 26 Nov 2023 19:05:01 -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=h/R/dVUGgxW3ENwZfZqJ0RIXBUZJtaPBzkXTFm9h7lY=; b=aA8LJwFe0V/m9ivVvRlOO8OmLjtTyDekuVBa4CbqeMa9S7YPAykn2ixGZsUQvtJrSzCD Hx1nobL9WPNH0tgPDijawhyEfBH9Np4O9gjkxNtVcspM+vhWmcV6bdND8JKI0fSlsG+d oF+mNKd4rupV2OSmxOspenRLp+kOUSlA9s4o+NmMTNyYhLiyTOmC3v78uVYklRyqs5LV W4+oLWnyU00lxnGKLNVFX2GaXCREcv1fkN8zYyX9TIS+zHzhUbdY/73p8K/hfoCBISX6 FAylLWnrapJMRxzF1WsWEiJEanIgtYaXf5K6bcD63dB0FvOpj9owKzg9cCYk6SRBuDmR QA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ukf5x3bm7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Nov 2023 19:05:00 -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; Sun, 26 Nov 2023 19:04:58 -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; Sun, 26 Nov 2023 19:04:58 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 6A2C83F7080; Sun, 26 Nov 2023 19:04:55 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net v2 PATCH 5/5] octeontx2-af: Update Tx link register range Date: Mon, 27 Nov 2023 08:34:35 +0530 Message-ID: <20231127030435.17278-6-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127030435.17278-1-gakula@marvell.com> References: <20231127030435.17278-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: cKfJYs99TnZuIPhDApsUyfbNlHPn67AC X-Proofpoint-ORIG-GUID: cKfJYs99TnZuIPhDApsUyfbNlHPn67AC 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-26_25,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 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]); Sun, 26 Nov 2023 19:05:15 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783684730807523409 X-GMAIL-MSGID: 1783684730807523409 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 --- v1-v2: Fixed autor name. 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} } }, };