From patchwork Tue Nov 28 14:04:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Yalavarthi X-Patchwork-Id: 134674 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 A3186433F2; Tue, 28 Nov 2023 15:04:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3932C42DE0; Tue, 28 Nov 2023 15:04:14 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 79B0942D89 for ; Tue, 28 Nov 2023 15:04:09 +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 3ASCYgho015019 for ; Tue, 28 Nov 2023 06:04:08 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=dE6BaoSK4AD7oylfnwz5W7L+v/fLMWQgHHIFhxv0/+s=; b=AO0lMWT78UOuEbE1SuAA363p92sPoZbCt0GtW+pBOV337d+e+sPe5NTEenCAS5LFBG7A 9IEX8HbmpmTgY4pPKtnHPYzV9HGrUTMwHsPjm2XZDUJt4Anmz30cYA35dd+j9Yk3K1Yc 9K5nQrd8pvkYjZFXEH9Rnjz3C3CNPxXhRf1fNPk+u+6dS11CcKO3hOe0PYVVxh+dQNIG bHC2/uNDyh+VQU0RRvvKQCH8+IrqhLnPifrGAAzpbBffJhVPV7lJNUsFl7HGwbhb2A4c tU64TVcyNV7xh02YGLEgVReDRs+0ErBpYMsWKOGKTcz0RT2Bk+ftMTgX+VHkcSEgNIBb 3w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3una4dhdxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 28 Nov 2023 06:04:08 -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; Tue, 28 Nov 2023 06:04:06 -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; Tue, 28 Nov 2023 06:04:06 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 72D423F703F; Tue, 28 Nov 2023 06:04:06 -0800 (PST) From: Srikanth Yalavarthi To: Srikanth Yalavarthi CC: , , , , Subject: [PATCH 1/1] ml/cnxk: exclude caching run stats from xstats Date: Tue, 28 Nov 2023 06:04:00 -0800 Message-ID: <20231128140400.11921-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Proofpoint-GUID: N_NSjHQP78ItRGRp_GZ87c5z2yfqbGya X-Proofpoint-ORIG-GUID: N_NSjHQP78ItRGRp_GZ87c5z2yfqbGya X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-28_14,2023-11-27_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: Anup Prabhu Exclude the hardware and firmware latency of model data caching run from xstats calculation. Fixes: 9cfad6c334f2 ("ml/cnxk: update device and model xstats functions") Signed-off-by: Anup Prabhu Acked-by: Srikanth Yalavarthi --- drivers/ml/cnxk/cn10k_ml_ops.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c index 7f7e5efceac..53700387335 100644 --- a/drivers/ml/cnxk/cn10k_ml_ops.c +++ b/drivers/ml/cnxk/cn10k_ml_ops.c @@ -288,6 +288,7 @@ cn10k_ml_model_xstat_get(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *l static int cn10k_ml_cache_model_data(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *layer) { + struct cn10k_ml_layer_xstats *xstats; char str[RTE_MEMZONE_NAMESIZE]; const struct plt_memzone *mz; uint64_t isize = 0; @@ -309,6 +310,16 @@ cn10k_ml_cache_model_data(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer * PLT_PTR_ADD(mz->addr, isize), 1); plt_memzone_free(mz); + /* Reset sync xstats. */ + xstats = layer->glow.sync_xstats; + xstats->hw_latency_tot = 0; + xstats->hw_latency_min = UINT64_MAX; + xstats->hw_latency_max = 0; + xstats->fw_latency_tot = 0; + xstats->fw_latency_min = UINT64_MAX; + xstats->fw_latency_max = 0; + xstats->dequeued_count = 0; + return ret; }