From patchwork Thu Jun 16 07:07:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 112837 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BF22A00C3; Thu, 16 Jun 2022 09:09:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B62642BDC; Thu, 16 Jun 2022 09:09:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 27863410D0 for ; Thu, 16 Jun 2022 09:09:45 +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 25G2BTY0015011 for ; Thu, 16 Jun 2022 00:09:44 -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-type; s=pfpt0220; bh=e6QL4ZIr4q5y0gZglPZF2NdVf7G4aKmlNBrWpRS6+xQ=; b=SNsa7s79UBAldnSCD6kFhxzEivmWfZ04O/wJKsqUAfviEuuPExn0Ef4kAQpSrgTZ9W9o dPe+mNhq2vMgbU8V8HN7oVCDPv6uNeudW2Zqe1sqqlbALtxxSMVas0ZQrlVuf3z7MCS2 hDMhbdO7zO/b/uy39kgTx3M5Nqs1797MJSQqBm2qOI58WBkDYSwKvva7xQrSSkXSb3xa h/KG4p852c2VyzDTtxbsnyUBsUE2DdRe90VoRd/fRzdjx3iYEdQRLgSZV8rOvlr4HjcR kXRNB2cvrgjv/6IlJejmXN6X19pwryY83g33trVPZGj0ORvDAMWckWYx+QHoMuyRFHTo qQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3gq83yx4yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jun 2022 00:09:37 -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; Thu, 16 Jun 2022 00:09:35 -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; Thu, 16 Jun 2022 00:09:35 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 0D1A83F709B; Thu, 16 Jun 2022 00:09:32 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: Subject: [PATCH 02/12] common/cnxk: avoid CPT backpressure due to errata Date: Thu, 16 Jun 2022 12:37:33 +0530 Message-ID: <20220616070743.30658-2-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220616070743.30658-1-ndabilpuram@marvell.com> References: <20220616070743.30658-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tj1JRMhV66wGBkXAO9AmKrnOaMmVHBu0 X-Proofpoint-GUID: tj1JRMhV66wGBkXAO9AmKrnOaMmVHBu0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-16_03,2022-06-15_01,2022-02-23_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 Avoid enabling CPT backpressure due to errata where backpressure would block requests from even other CPT LF's. Also allow CQ size >=16K. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_errata.h | 7 +++++++ drivers/common/cnxk/roc_nix.h | 2 +- drivers/common/cnxk/roc_nix_fc.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/common/cnxk/roc_errata.h b/drivers/common/cnxk/roc_errata.h index 31162d5..f048297 100644 --- a/drivers/common/cnxk/roc_errata.h +++ b/drivers/common/cnxk/roc_errata.h @@ -77,4 +77,11 @@ roc_errata_nix_has_perf_issue_on_stats_update(void) return true; } +/* Errata IPBUCPT-38726, IPBUCPT-38727 */ +static inline bool +roc_errata_cpt_hang_on_x2p_bp(void) +{ + return roc_model_is_cn10ka_a0(); +} + #endif /* _ROC_ERRATA_H_ */ diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index aedde1c..944e4c6 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -309,7 +309,7 @@ struct roc_nix_rq { struct roc_nix_cq { /* Input parameters */ uint16_t qid; - uint16_t nb_desc; + uint32_t nb_desc; /* End of Input parameters */ uint16_t drop_thresh; struct roc_nix *roc_nix; diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c index a0505bd..cef5d07 100644 --- a/drivers/common/cnxk/roc_nix_fc.c +++ b/drivers/common/cnxk/roc_nix_fc.c @@ -77,7 +77,8 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable) goto exit; /* Enable backpressure on CPT if inline inb is enabled */ - if (enable && roc_nix_inl_inb_is_enabled(roc_nix)) { + if (enable && roc_nix_inl_inb_is_enabled(roc_nix) && + !roc_errata_cpt_hang_on_x2p_bp()) { req = mbox_alloc_msg_nix_cpt_bp_enable(mbox); if (req == NULL) return rc;