On Thu, Mar 9, 2023 at 9:53 PM Stephen Hemminger <step...@networkplumber.org> wrote: > > On Thu, 9 Feb 2023 17:49:31 +0100 > Morten Brørup <m...@smartsharesystems.com> wrote: > > > > rte_memcpy(old, new, sizeof(struct nig_stats)); > > > > > > - rte_memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats- > > > >mac_stx[1]), > > > - sizeof(struct mac_stx)); > > > + rte_memcpy(RTE_PTR_ADD(estats, > > > + offsetof(struct bnx2x_eth_stats, > > > rx_stat_ifhcinbadoctets_hi)), > > > + &pstats->mac_stx[1], sizeof(struct mac_stx)); > > Stop using rte_memcpy() in slow path like this. > memcpy() is just as fast, compiler can optimize, and the checking tools > are better with it.
+1 @Morten Brørup Could you send the next version? I am marking as Change requested.