http://bugs.dpdk.org/show_bug.cgi?id=1883
Bug ID: 1883
Summary: rte_hash with big cap and key size of 64bytes and more
can lead to key store corruption
Product: DPDK
Version: 26.03
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: other
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 340
--> http://bugs.dpdk.org/attachment.cgi?id=340&action=edit
simple repro
I was experimenting with table size of 2^26 and key size of 64 bytes, and
noticed, that deletion was failing for some earlier added entries, after some
digging it seems like the main problem is overflow in key_store offset
calculation, seems like there are multiple places, but as example
new_k = RTE_PTR_ADD(keys, slot_id * h->key_entry_size);
slot_id is u32, and h->key_entry_size is u32 as well, in my case at high
occupancy slot_id can be very high(up to 67mil) which multiplied by 80 will
overflow u32 and will overwrite earlier entries.
lazy fix seem to be making h->key_entry_size u64
Attached simple repro.
--
You are receiving this mail because:
You are the assignee for the bug.