From patchwork Mon Jan 16 09:39:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 122086 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 5976A423EE; Mon, 16 Jan 2023 10:41:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E98242D0D; Mon, 16 Jan 2023 10:40:58 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id F317A42C54 for ; Mon, 16 Jan 2023 10:40:56 +0100 (CET) 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 30G9WXBo018627 for ; Mon, 16 Jan 2023 01:40:56 -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-transfer-encoding : content-type; s=pfpt0220; bh=yUrrRdxlNKq6CBrxZ1bs6fo63gEYSboq7bzX9FqJ9Ho=; b=LJQLSxXuis6DCIY8B908jTO9t1Da5HSpz086YEvvRjvwrXp3nnQefgr0dnKiNJwgy/Gg 3UotGS91qhOWmwZL5ozPn1yZIh2vLoO0PDPMMfWdwOS9qCFZkgpPU9bUWbX4rWG07jN4 UGp34H3XAhNhs99qFHhOKjeq2jGcq1HcKOwLfFzk9M7Ujpe0vzVyIfgTEnd3jaEz/bPn OfzdnIvxnghr0puLLkV9Ww02kpOVJKix/JO1cwDP7hdqatsr3LcSSPqsCglpqEAZP//4 V5hepXtTBgluxbsw7LgN0nXFeFUFMbMQxxvVF6Cjq+bkURxReN+ZVHlO1bK36RVvSk9d 0w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3n3vst5qut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 16 Jan 2023 01:40:56 -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.42; Mon, 16 Jan 2023 01:40: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.42 via Frontend Transport; Mon, 16 Jan 2023 01:40:54 -0800 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 2C7903F7041; Mon, 16 Jan 2023 01:40:51 -0800 (PST) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: Subject: [PATCH 3/9] common/cnxk: configure fc hist bits Date: Mon, 16 Jan 2023 15:09:48 +0530 Message-ID: <20230116093954.172938-3-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230116093954.172938-1-ndabilpuram@marvell.com> References: <20230116093954.172938-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yNLfE-nevYcSubRnS9GuxL6bQ8aBfUAQ X-Proofpoint-GUID: yNLfE-nevYcSubRnS9GuxL6bQ8aBfUAQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-16_08,2023-01-13_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 From: Satha Rao New parameter added inside SQ structure to control the fc_hyst_bits. Instead of count on all updates each SQ can tune his own hysteresis level. Signed-off-by: Satha Rao --- drivers/common/cnxk/roc_nix.h | 1 + drivers/common/cnxk/roc_nix_queue.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index 47ee078c2e..96756b1a2b 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -354,6 +354,7 @@ struct roc_nix_sq { uint16_t cq_drop_thresh; bool sso_ena; bool cq_ena; + uint8_t fc_hyst_bits; /* End of Input parameters */ uint16_t sqes_per_sqb_log2; struct roc_nix *roc_nix; diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index 385f1ba04e..287a489e7f 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -1025,9 +1025,8 @@ sqb_pool_populate(struct roc_nix *roc_nix, struct roc_nix_sq *sq) else aura.fc_stype = 0x3; /* STSTP */ aura.fc_addr = (uint64_t)sq->fc; - aura.fc_hyst_bits = 1; /* Store count on all updates */ - rc = roc_npa_pool_create(&sq->aura_handle, blk_sz, nb_sqb_bufs, &aura, - &pool, 0); + aura.fc_hyst_bits = sq->fc_hyst_bits & 0xF; + rc = roc_npa_pool_create(&sq->aura_handle, blk_sz, nb_sqb_bufs, &aura, &pool, 0); if (rc) goto fail;