> From: Stephen Hemminger [mailto:[email protected]] > Sent: Saturday, 30 May 2026 00.53 > > On Fri, 29 May 2026 22:45:00 +0200 > Morten Brørup <[email protected]> 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.
Agree. Better stick with memcpy() than type cast.

