[PATCH dpdk v3 2/2] hash: free replaced data on overwrite when RCU is configured
Konstantin Ananyev
konstantin.ananyev at huawei.com
Mon Mar 9 08:48:57 CET 2026
> 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 at dpdk.org
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
>
> Signed-off-by: Robin Jarry <rjarry at redhat.com>
> ---
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> 2.53.0
>
More information about the dev
mailing list