When a hash entry is added, there are 2 sets of stores. 1) The application writes its data to memory (whose address is provided in rte_hash_add_key_with_hash_data API (or NULL)) 2) The rte_hash library writes to its own internal data structures; key store entry and the hash table. The only ordering requirement between these 2 is that - store to the application data must complete before the store to key_index. There are no ordering requirements between the stores to key/signature and store to application data. The synchronization point for application data can be any point between the 'store to application data' and 'store to the key_index'. So, 'pdata' should not be a guard variable for the data in hash table. It should be a guard variable only for the application data written to the memory location pointed by 'pdata'. Hence, in the lookup functions, 'pdata' can be loaded after full key comparison succeeds. The synchronization point for the application data (store-release to 'pdata' in key store) is changed to be consistent with the order of loads in lookup function. However, this change is cosmetic and does not affect the functionality. Fixes: e605a1d36 ("hash: add lock-free r/w concurrency") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Tested-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%