[PATCH] app/test: use memcpy in ipsec test
Stephen Hemminger
stephen at networkplumber.org
Sat May 30 00:52:54 CEST 2026
On Fri, 29 May 2026 22:45:00 +0200
Morten Brørup <mb at smartsharesystems.com> wrote:
> > > @@ -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));
>
> How about:
> *dst = ipv4_outer;
>
> Don't know if it applies here.
Good idea but dst is char *.
I suppose could use a cast but at that point the good
properties of assignment disappear.
Didn't want to go changing other code.
More information about the dev
mailing list