|SUCCESS| [1/1] ml/cnxk: avoid overwriting layer name during load

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Mar 31 22:11:18 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/162791

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-03-31

commit 20260331085445.1105590-1-syalavarthi at marvell.com
Author: Srikanth Yalavarthi <syalavarthi at marvell.com>
Subject: [PATCH 1/1] ml/cnxk: avoid overwriting layer name during load

Layer name is initialized during metadata fetch and parsing stage. Avoid
overwriting the layer name during layer load.

> diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c
> index 628ff963c3c..77947120f25 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);
> -

Does this code introduce a name mismatch if layer->name was not already
initialized? Can cn10k_ml_layer_load() be called with layer->name
uninitialized?

The removed rte_memcpy() does not have a NULL terminator enforcement. If
the glow.metadata.model.name was not properly terminated, would this have
caused potential string handling issues elsewhere? Does removing this copy
eliminate such issues, or were they already addressed during the
initialization stage?

>  	/* Enable support for batch_size of 256 */
>  	if (layer->glow.metadata.model.batch_size == 0)
>  		layer->batch_size = 256;


More information about the test-report mailing list