[PATCH v6] eal/x86: optimize memcpy of small sizes

Morten Brørup mb at smartsharesystems.com
Tue Jan 20 12:22:43 CET 2026


> From: Varghese, Vipin [mailto:Vipin.Varghese at amd.com]
> Sent: Tuesday, 20 January 2026 12.19
> 
> [Public]
> 
> Hi @Morten Brørup, quick query in function `rte_mov17_to_32`
> 
> ```
> +       if (__rte_constant(n)) {
> +               if (n == 16) {
> +                       rte_mov16((uint8_t *)dst, (const uint8_t
> *)src);
> +                       rte_mov1((uint8_t *)dst + 16, (const uint8_t
> *)src + 16);
> +                       return dst;
> +               }
> +               if (n == 17) {
> +                       rte_mov16((uint8_t *)dst, (const uint8_t
> *)src);
> +                       rte_mov1((uint8_t *)dst + 16, (const uint8_t
> *)src + 16);
> +                       return dst;
> +               }
> ```
> 
> For `size 16` do we need to call ` rte_mov1((uint8_t *)dst + 16, (const
> uint8_t *)src + 16);`? Can you please help me understand the corner
> case for the same.

Good catch!
Copy-paste bug.
Will fix in next version, awaiting other feedback.



More information about the dev mailing list