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 5C02443382; Wed, 22 Nov 2023 19:36:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29936402C7; Wed, 22 Nov 2023 19:36:07 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F3050402BE for ; Wed, 22 Nov 2023 19:36:04 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AMIU65A010349 for ; Wed, 22 Nov 2023 10:36:04 -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=XzLIkSuoBta2v/M/PlmS2HbvVaFbOhEyPpZwMU8z4GU=; b=VITqhKpEKOcbWOfUE7P96R1CFkFg75RIvRSjruIia9+6tGzkOyEKiW9knZjJKcqQUf9a oU+ucfT016HHeSrwWDSwaonWF7lTyt5E7nrrDWkyRvdTdlSUAnZGt67PVm/vlQj+ut/a 0SeQADnyzR8SbzDmNn44uj77zetMNqgYnUM1Pn7TzsvMGHqmv1syBowdefuHn17SJiuW jIa2JULxN0J5IBMg+lViOeKPuDTb7WbBMFZy4J2P3E2aroXzmGZ61IkLJUdF6x3S616w vGHkIWYICASLSIgJRRE8uD3wv5rPdpVItq3zrUuVVKZq02jTMD/+4AgEz05ae3pgDG/e 1w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uh1jbcsd4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 22 Nov 2023 10:36:03 -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.48; Wed, 22 Nov 2023 10:36:02 -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; Wed, 22 Nov 2023 10:36:02 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 7E2283F7050; Wed, 22 Nov 2023 10:36:01 -0800 (PST) From: Srikanth Yalavarthi To: Srikanth Yalavarthi CC: , , , , Subject: [PATCH v2 1/1] ml/cnxk: fix reading model and layer ID Date: Wed, 22 Nov 2023 10:35:59 -0800 Message-ID: <20231122183559.2373-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231122163706.758-1-syalavarthi@marvell.com> References: <20231122163706.758-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: KL_Id_awWOjkky8mkskedybQZiI9zb5O X-Proofpoint-GUID: KL_Id_awWOjkky8mkskedybQZiI9zb5O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-22_13,2023-11-22_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 Using model_id from op structure as layer index for TVM models with multiple MRVL layers is incorrect. This patch fixes the issue by reading the layer index from the job descriptor structure. Fixes: 31cc30b5f088 ("ml/cnxk: update model start/stop functions") Signed-off-by: Srikanth Yalavarthi --- v2: - restart upstream CI drivers/ml/cnxk/cn10k_ml_ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c index b9d30278c61..7f7e5efceac 100644 --- a/drivers/ml/cnxk/cn10k_ml_ops.c +++ b/drivers/ml/cnxk/cn10k_ml_ops.c @@ -1191,13 +1191,15 @@ cn10k_ml_result_update(struct cnxk_ml_dev *cnxk_mldev, int qp_id, void *request) uint64_t fw_latency; uint16_t model_id; uint16_t layer_id; + uint16_t idx; req = (struct cnxk_ml_req *)request; result = &req->cn10k_req.result; op = req->op; if (likely(result->error_code == 0)) { - model_id = cnxk_mldev->index_map[op->model_id].model_id; - layer_id = cnxk_mldev->index_map[op->model_id].layer_id; + idx = req->cn10k_req.jd.hdr.model_id; + model_id = cnxk_mldev->index_map[idx].model_id; + layer_id = cnxk_mldev->index_map[idx].layer_id; model = cnxk_mldev->mldev->data->models[model_id]; layer = &model->layer[layer_id]; if (likely(qp_id >= 0)) { -- 2.42.0