|SUCCESS| app/test: use memcpy in ipsec test

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sat May 30 02:17:52 CEST 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-05-30

Commit: 20260529154651.128372-1-stephen at networkplumber.org
Author: Stephen Hemminger <stephen at networkplumber.org>
Subject: [PATCH] app/test: use memcpy in ipsec test

This patch replaces rte_memcpy() with standard memcpy() in the IPsec test
application to work around compiler confusion about AVX code bounds checking
when compiling without always inline.

> diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
> index 139c1e8dec..b5a430996d 100644
> --- a/app/test/test_ipsec.c
> +++ b/app/test/test_ipsec.c
> @@ -10,7 +10,6 @@
>  #include <rte_hexdump.h>
>  #include <rte_mbuf.h>
>  #include <rte_malloc.h>
> -#include <rte_memcpy.h>
>  #include <rte_cycles.h>
>  #include <rte_bus_vdev.h>
>  #include <rte_ip.h>

[ ... ]

> @@ -559,7 +558,7 @@ setup_test_string(struct rte_mempool *mpool, const char *string,
>  			return NULL;
>  		}
>  		if (string != NULL)
> -			rte_memcpy(dst, string, t_len);
> +			memcpy(dst, string, t_len);
>  		else
>  			memset(dst, 0, t_len);
>  	}

[ ... ]

> @@ -604,22 +603,22 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,
>  	/* copy outer IP and ESP header */
>  	ipv4_outer.total_length = rte_cpu_to_be_16(t_len);
>  	ipv4_outer.packet_id = rte_cpu_to_be_16(seq);
> -	rte_memcpy(dst, &ipv4_outer, sizeof(ipv4_outer));
> +	memcpy(dst, &ipv4_outer, sizeof(ipv4_outer));
>  	dst += sizeof(ipv4_outer);
>  	m->l3_len = sizeof(ipv4_outer);
> -	rte_memcpy(dst, &esph, sizeof(esph));
> +	memcpy(dst, &esph, sizeof(esph));
>  	dst += sizeof(esph);
>  
>  	if (string != NULL) {
>  		/* copy payload */
> -		rte_memcpy(dst, string, len);
> +		memcpy(dst, string, len);
>  		dst += len;
>  		/* copy pad bytes */
> -		rte_memcpy(dst, esp_pad_bytes, RTE_MIN(padlen,
> +		memcpy(dst, esp_pad_bytes, RTE_MIN(padlen,
>  			sizeof(esp_pad_bytes)));
>  		dst += padlen;
>  		/* copy ESP tail header */
> -		rte_memcpy(dst, &espt, sizeof(espt));
> +		memcpy(dst, &espt, sizeof(espt));
>  	} else
>  		memset(dst, 0, t_len);

The patch looks good. The replacement of rte_memcpy() with standard memcpy()
in test code is appropriate and aligns with DPDK practices for test
applications. The changes are straightforward substitutions with no
functional modifications to the logic.


More information about the test-report mailing list