From patchwork Fri Aug 11 08:57:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 130132 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 5C92543032; Fri, 11 Aug 2023 11:00:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00C9843293; Fri, 11 Aug 2023 10:59:06 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 19CE043293 for ; Fri, 11 Aug 2023 10:59:06 +0200 (CEST) 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 37AN2clb011369 for ; Fri, 11 Aug 2023 01:59:05 -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=0KnPYzwId2TWsriSwu3JhAFQHExGq7Fn72COmjYhevU=; b=V3uYphoxkPUnqgwOcrkSQJDPUYC56Ht0f2N2u/Av1QZZHnL/XQqv1WuQjvb+GnjW7pKr njbrDDq0BPNdtV6jK1vQC42isbXDeUTYchgk4gY6h3uVc4gDBbg1pO38/nSGqZzv1Vrb isto3m9AZcNkUuoNw2ET1VEdsWrcXwiweolIcRhxskZyENHlS1j8R7FSxE9Bxi66LfrY VnJQjaK1z6g/DWT/ohnZPUZh1oTwLA+r7o+L+J/qymdmzRrR61hAqXwojdsPyMCNRklf 0iZoRt3SrRxaLHltnwop5W85MIPilrov8fyYaX6ZB0tLmsdo6nQ0UEdsjxH0UABQoJiW nw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sd8ya1gar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 11 Aug 2023 01:59:05 -0700 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; Fri, 11 Aug 2023 01:59:03 -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.48 via Frontend Transport; Fri, 11 Aug 2023 01:59:03 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id D218F3F706A; Fri, 11 Aug 2023 01:59:00 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Kommula Shiva Shankar Subject: [PATCH 18/31] common/cnxk: enable CQ stashing Date: Fri, 11 Aug 2023 14:27:52 +0530 Message-ID: <20230811085805.441256-18-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230811085805.441256-1-ndabilpuram@marvell.com> References: <20230811085805.441256-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 9gjCBmmE-m-MdkU_dE2RbonPRp_eEc6x X-Proofpoint-GUID: 9gjCBmmE-m-MdkU_dE2RbonPRp_eEc6x X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_20,2023-08-10_01,2023-05-22_02 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 From: Kommula Shiva Shankar This patch enables CQ stashing for better CQE processing performance Signed-off-by: Kommula Shiva Shankar --- drivers/common/cnxk/roc_features.h | 6 ++++++ drivers/common/cnxk/roc_nix.h | 1 + drivers/common/cnxk/roc_nix_queue.c | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/drivers/common/cnxk/roc_features.h b/drivers/common/cnxk/roc_features.h index 815f800e7a..a461ca46c5 100644 --- a/drivers/common/cnxk/roc_features.h +++ b/drivers/common/cnxk/roc_features.h @@ -46,6 +46,12 @@ roc_feature_nix_has_reass(void) return roc_model_is_cn10ka(); } +static inline bool +roc_feature_nix_has_cqe_stash(void) +{ + return roc_model_is_cn10ka_b0(); +} + static inline bool roc_feature_nix_has_rxchan_multi_bpid(void) { diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index bb55fbe971..5892de6b24 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -368,6 +368,7 @@ struct roc_nix_cq { /* Input parameters */ uint16_t qid; uint32_t nb_desc; + uint8_t stash_thresh; /* End of Input parameters */ uint16_t drop_thresh; struct roc_nix *roc_nix; diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index 5e689d08be..f96d5c3a96 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -908,6 +908,13 @@ roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq) } cq_ctx->bp = cq->drop_thresh; + if (roc_feature_nix_has_cqe_stash()) { + if (cq_ctx->caching) { + cq_ctx->stashing = 1; + cq_ctx->stash_thresh = cq->stash_thresh; + } + } + rc = mbox_process(mbox); mbox_put(mbox); if (rc)