From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5AD19A0558; Mon, 5 Sep 2022 15:33:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF4C84282B; Mon, 5 Sep 2022 15:32:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5FC5942825 for ; Mon, 5 Sep 2022 15:32:51 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 285DJX3M031629 for ; Mon, 5 Sep 2022 06:32:50 -0700 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-transfer-encoding : content-type; s=pfpt0220; bh=bogWLp1U8Uzh02vSS5LJIK5QFh0Qpfr5lHbL90XFD7Y=; b=LVqQNnSfWRWFsD9IQiXcf4vUpquyxByFylsABo9XqDnRcDX/8vcAFce/BYF8+u0T+qhF kpQumILWYjqbcfn+FET0kxZtw/SA0gQaWAuqvntPzrD0ObIAoBaRb+taqzMB4t1wEEyI l9PaTmY6J/KJvWzELbV2TcEOai1sEpzwJY/5UYqlxXzhdnwxEyyZMMWhDNmGUeREQ8ov IcuMDIh7GoMU1IwRFRbbVqDWkKOhHNcX5/8RYtwiZRZPGKdwFHsJw442RnICvyW/iK0q eidSEMfeeDp8CHG+mJxKNS6CgFnbl21dni5wpbwsEGPAIAVizmuKt3EvPfuAj8iCqm8F QA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jc6epngd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 05 Sep 2022 06:32:50 -0700 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.18; Mon, 5 Sep 2022 06:32:48 -0700 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.18 via Frontend Transport; Mon, 5 Sep 2022 06:32:48 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id AFAA45E686D; Mon, 5 Sep 2022 06:32:46 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 06/31] common/cnxk: limit meta aura workaround to CN10K A0 Date: Mon, 5 Sep 2022 19:02:03 +0530 Message-ID: <20220905133228.818616-6-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905133228.818616-1-ndabilpuram@marvell.com> References: <20220809184908.24030-1-ndabilpuram@marvell.com> <20220905133228.818616-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: f8tk3DKCEx6zD7TmhTxlD8kzCG-LXeov X-Proofpoint-GUID: f8tk3DKCEx6zD7TmhTxlD8kzCG-LXeov X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-05_09,2022-09-05_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Limit meta aura workaround to CN10K A0. Also other NIX and Inline related Erratas applicable for CN10K A1. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_errata.h | 7 +++++++ drivers/common/cnxk/roc_nix_inl.c | 10 ++++++---- drivers/net/cnxk/cnxk_ethdev.c | 3 ++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/common/cnxk/roc_errata.h b/drivers/common/cnxk/roc_errata.h index f04829736b..8dc372f956 100644 --- a/drivers/common/cnxk/roc_errata.h +++ b/drivers/common/cnxk/roc_errata.h @@ -80,6 +80,13 @@ roc_errata_nix_has_perf_issue_on_stats_update(void) /* Errata IPBUCPT-38726, IPBUCPT-38727 */ static inline bool roc_errata_cpt_hang_on_x2p_bp(void) +{ + return roc_model_is_cn10ka_a0() || roc_model_is_cn10ka_a1(); +} + +/* IPBUNIXRX-40400 */ +static inline bool +roc_errata_nix_no_meta_aura(void) { return roc_model_is_cn10ka_a0(); } diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c index 7da89382e9..603551bf83 100644 --- a/drivers/common/cnxk/roc_nix_inl.c +++ b/drivers/common/cnxk/roc_nix_inl.c @@ -627,18 +627,18 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq) inl_rq->first_skip = rq->first_skip; inl_rq->later_skip = rq->later_skip; inl_rq->lpb_size = rq->lpb_size; - inl_rq->lpb_drop_ena = true; inl_rq->spb_ena = rq->spb_ena; inl_rq->spb_aura_handle = rq->spb_aura_handle; inl_rq->spb_size = rq->spb_size; - inl_rq->spb_drop_ena = !!rq->spb_ena; - if (!roc_model_is_cn9k()) { + if (roc_errata_nix_no_meta_aura()) { uint64_t aura_limit = roc_npa_aura_op_limit_get(inl_rq->aura_handle); uint64_t aura_shift = plt_log2_u32(aura_limit); uint64_t aura_drop, drop_pc; + inl_rq->lpb_drop_ena = true; + if (aura_shift < 8) aura_shift = 0; else @@ -653,12 +653,14 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq) roc_npa_aura_drop_set(inl_rq->aura_handle, aura_drop, true); } - if (inl_rq->spb_ena) { + if (roc_errata_nix_no_meta_aura() && inl_rq->spb_ena) { uint64_t aura_limit = roc_npa_aura_op_limit_get(inl_rq->spb_aura_handle); uint64_t aura_shift = plt_log2_u32(aura_limit); uint64_t aura_drop, drop_pc; + inl_rq->spb_drop_ena = true; + if (aura_shift < 8) aura_shift = 0; else diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index cfcc4df916..d90baabc4d 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -617,7 +617,8 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, rq->first_skip = first_skip; rq->later_skip = sizeof(struct rte_mbuf); rq->lpb_size = mp->elt_size; - rq->lpb_drop_ena = !(dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY); + if (roc_errata_nix_no_meta_aura()) + rq->lpb_drop_ena = !(dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY); /* Enable Inline IPSec on RQ, will not be used for Poll mode */ if (roc_nix_inl_inb_is_enabled(nix)) -- 2.25.1