On Fri, 18 Apr 2025 17:06:03 +0800
Feifei Wang <[email protected]> wrote:
> + /* Alloc TCAM filter memory. */
> + tcam_filter = rte_zmalloc("hinic3_fdir_filter",
> + sizeof(struct hinic3_tcam_filter), 0);
> + if (tcam_filter == NULL)
> + return -ENOMEM;
> + (void)rte_memcpy(&tcam_filter->tcam_key, tcam_key,
> + sizeof(struct hinic3_tcam_key));
This line has three issues.
1. Don't use (void) cast, that is old BSD lint style.
2. Don't use rte_memcpy() for simple fixed size things, use memcpy instead.
3. Don't use memcpy when structure assignment would work.