Hi Stephen, Thanks for your explain abort the memcpy, on Fedora41 I had I understood why rte_memcpy will cause compile fault. I will be carefull to use memcpy, when a address of src or dst is not alignment.
Regards Wenbo > -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: 2025年2月12日 23:38 > To: 11 <caowe...@mucse.com> > Cc: tho...@monjalon.net; dev@dpdk.org; ferruh.yi...@amd.com; > andrew.rybche...@oktetlabs.ru; yao...@mucse.com > Subject: Re: [PATCH v9 12/28] net/rnp: add support link update operations > > On Wed, 12 Feb 2025 11:21:49 +0800 > "11" <caowe...@mucse.com> wrote: > > > Hi Stephen, > > For memcpy what ever base code or other code all used memcpy not > > rte_memcpy ? > > Even the memory is malloc from rte_malloc/zmalloc ? > > > > Regards Wenbo. > > > The documentation doesn't make it clear but rte_memcpy is the same as > memcpy. > It only exists because for some cases (like older versions of Gcc and differences in > alignment assumptions) when running micro benchmarks rte_memcpy was > faster. > > All new code should only use memcpy() unless there is a benchmark test that > shows a noticable difference. The reason is that tools like Coverity, Gcc, Clang, > and PVS studio all treat memcpy specially and can do checks for access outside of > range.