[PATCH v2 1/1] ml/cnxk: fix overwriting layer name during load

Srikanth Yalavarthi syalavarthi at marvell.com
Tue Jun 9 05:52:51 CEST 2026


Layer name is initialized during metadata fetch and parsing
stage and should not be overwritten during model load. Fix
overwriting the layer name during layer load.

Fixes: cc254869ae19 ("ml/cnxk: update model load/unload functions")

Signed-off-by: Srikanth Yalavarthi <syalavarthi at marvell.com>
---

v2:
* Updated commit message with fixline

v1:
* Initial patch

 drivers/ml/cnxk/cn10k_ml_ops.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c
index b30af7c7a44..cb9e6561442 100644
--- a/drivers/ml/cnxk/cn10k_ml_ops.c
+++ b/drivers/ml/cnxk/cn10k_ml_ops.c
@@ -671,9 +671,6 @@ cn10k_ml_layer_load(void *device, uint16_t model_id, const char *layer_name, uin
 	rte_memcpy(&layer->glow.metadata, buffer, sizeof(struct cn10k_ml_model_metadata));
 	cn10k_ml_model_metadata_update(&layer->glow.metadata);
 
-	/* Set layer name */
-	rte_memcpy(layer->name, layer->glow.metadata.model.name, MRVL_ML_MODEL_NAME_LEN);
-
 	/* Enable support for batch_size of 256 */
 	if (layer->glow.metadata.model.batch_size == 0)
 		layer->batch_size = 256;
-- 
2.34.1



More information about the dev mailing list