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

Morten Brørup
2026-01-20T11:22:51Z

> From: Varghese, Vipin [mailto:Vipin.Varghese@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.