RE: [PATCH dpdk v3 2/2] hash: free replaced data on overwrite when RCU is configured

Konstantin Ananyev
2026-03-09T07:49:00Z

> When rte_hash_add_key_data() overwrites an existing key, the old data
> pointer is silently lost. With RCU-protected readers still potentially
> accessing the old data, the application has no safe way to free it.
>
> When RCU is configured with a free_key_data_func callback, automatically
> enqueue the old data for deferred freeing via the RCU defer queue on
> overwrite. In SYNC mode, synchronize and call free_key_data_func
> directly.
>
> Cc: stable@dpdk.org
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---

Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>

> 2.53.0
>