From patchwork Wed Nov 22 17:13:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Yalavarthi X-Patchwork-Id: 134540 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 395C443382; Wed, 22 Nov 2023 18:13:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7FBB402C7; Wed, 22 Nov 2023 18:13:33 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5D175402BE for ; Wed, 22 Nov 2023 18:13:32 +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 3AMH9wew030963 for ; Wed, 22 Nov 2023 09:13:31 -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=Jqpo3C7NuldRKlzmuVFCdjlTnadGJo38d136M2V54/8=; b=Y1QRqpaQzMcWUMZpnM0gwuDstj577z2qEYKgKDLS9omHYdN0/1WxJ2ePwtHsfm0KNqgv +Dma1LbF+gqIK/Gs2uiO+AUZppHUIjiVdKrC1ctN0aJT70YG/nrdSpoyZugAIMdW+TIJ 2R9rvUCGiVr21m+qf1tANQVjlvkhXG02DUvxpMWdHPHFkb+dbYY7FU6xRxeXdTw97Vim +o32VX2mt7a5e9b7S2BGqoWdpP4nDsXWXCF83z5kPmMfj+D2yR6AnaYCUwmqQlBa0xAj BxUUXVn4QeY+nvq7mw9DwC3VyLlu7S3bBZUopJh7puSaGzYc8FkE6Ui8XtF/8R+r+Bti XQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uewnw6aqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 22 Nov 2023 09:13:31 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 22 Nov 2023 09:13:29 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 22 Nov 2023 09:13:29 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 32FB83F703F; Wed, 22 Nov 2023 09:13:29 -0800 (PST) From: Srikanth Yalavarthi To: Srikanth Yalavarthi , Prince Takkar CC: , , , Subject: [PATCH v2 1/1] ml/cnxk: fix name of TVM model with single layer Date: Wed, 22 Nov 2023 09:13:19 -0800 Message-ID: <20231122171320.14907-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231122163640.615-1-syalavarthi@marvell.com> References: <20231122163640.615-1-syalavarthi@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: JNtYo44BbKrckSqLjLyKdtiU54JCPcVz X-Proofpoint-ORIG-GUID: JNtYo44BbKrckSqLjLyKdtiU54JCPcVz 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_12,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 Name field of TVM model with single MRVL layer is currently set to empty string. Update the name with the field from metadata. Fixes: 5cea2c67edfc ("ml/cnxk: update internal TVM model info structure") Signed-off-by: Srikanth Yalavarthi --- v2: - Replaced rte_memcpy with strlcpy drivers/ml/cnxk/mvtvm_ml_model.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ml/cnxk/mvtvm_ml_model.c b/drivers/ml/cnxk/mvtvm_ml_model.c index 3e06ea658bb..e3234ae4422 100644 --- a/drivers/ml/cnxk/mvtvm_ml_model.c +++ b/drivers/ml/cnxk/mvtvm_ml_model.c @@ -352,6 +352,10 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo tvm_mrvl_model: cn10k_ml_model_info_set(cnxk_mldev, model, &model->mvtvm.info, &model->layer[0].glow.metadata); + + metadata = &model->mvtvm.metadata; + strlcpy(info->name, metadata->model.name, TVMDP_NAME_STRLEN); + info->io_layout = RTE_ML_IO_LAYOUT_SPLIT; }