numam-dpdk/lib
Honnappa Nagarahalli b0437f8b02 hash: load value after full key compare
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>
2019-07-08 20:03:39 +02:00
..
librte_acl
librte_bbdev
librte_bitratestats
librte_bpf
librte_cfgfile
librte_cmdline
librte_compressdev
librte_cryptodev
librte_distributor
librte_eal
librte_efd
librte_ethdev
librte_eventdev
librte_flow_classify
librte_gro
librte_gso
librte_hash hash: load value after full key compare 2019-07-08 20:03:39 +02:00
librte_ip_frag
librte_ipsec
librte_jobstats
librte_kni
librte_kvargs
librte_latencystats
librte_lpm
librte_mbuf
librte_member
librte_mempool
librte_meter
librte_metrics
librte_net
librte_pci
librte_pdump
librte_pipeline
librte_port
librte_power
librte_rawdev
librte_rcu
librte_reorder
librte_ring
librte_sched
librte_security
librte_stack
librte_table
librte_telemetry
librte_timer
librte_vhost
Makefile
meson.build