numam-dpdk/lib
Victor Kaplansky a368804699 vhost: protect active rings from async ring changes
When performing live migration or memory hot-plugging,
the changes to the device and vrings made by message handler
done independently from vring usage by PMD threads.

This causes for example segfaults during live-migration
with MQ enable, but in general virtually any request
sent by qemu changing the state of device can cause
problems.

These patches fixes all above issues by adding a spinlock
to every vring and requiring message handler to start operation
only after ensuring that all PMD threads related to the device
are out of critical section accessing the vring data.

Each vring has its own lock in order to not create contention
between PMD threads of different vrings and to prevent
performance degradation by scaling queue pair number.

See https://bugzilla.redhat.com/show_bug.cgi?id=1450680

Cc: stable@dpdk.org
Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-21 15:51:52 +01:00
..
librte_acl lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
librte_bbdev bbdev: introduce wireless base band device lib 2018-01-19 01:44:25 +01:00
librte_bitratestats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_cfgfile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_cmdline lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_compat fix typos using codespell utility 2017-06-14 23:54:13 +02:00
librte_cryptodev cryptodev: fix function prototype 2018-01-20 16:10:20 +01:00
librte_distributor distributor: remove unnecessary parenthesis 2018-01-05 22:08:24 +01:00
librte_eal eal: improve likely and unlikely macros 2018-01-20 17:47:34 +01:00
librte_efd lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_ether ethdev: add function to look up Tx offload names 2018-01-21 15:51:52 +01:00
librte_eventdev eventdev: add API to perform self test 2018-01-19 16:09:56 +01:00
librte_flow_classify log: update legacy modules dynamic logs regex 2018-01-17 14:21:21 +01:00
librte_gro gro: support VxLAN GRO 2018-01-11 23:18:36 +01:00
librte_gso lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_hash hash: select fbk function at run-time 2018-01-20 15:35:16 +01:00
librte_ip_frag lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_jobstats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_kni lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_kvargs mk: do not generate LDLIBS from directory dependencies 2017-10-24 02:14:57 +02:00
librte_latencystats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_lpm lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_mbuf mbuf: fix performance of freeing with non atomic refcnt 2018-01-19 00:43:56 +01:00
librte_member member: fix memory leak on error 2018-01-19 00:43:56 +01:00
librte_mempool lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_meter lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_metrics lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_net net: fix RARP generation 2018-01-21 15:51:52 +01:00
librte_pci remove useless memzone includes 2017-11-06 22:12:08 +01:00
librte_pdump pdump: fix error check when creating/canceling thread 2018-01-17 18:49:38 +01:00
librte_pipeline lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_port lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_power power: clean KVM files 2018-01-12 00:37:07 +01:00
librte_reorder lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_ring lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_sched lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_security security: get session size 2018-01-20 16:10:52 +01:00
librte_table lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_timer lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
librte_vhost vhost: protect active rings from async ring changes 2018-01-21 15:51:52 +01:00
Makefile bbdev: introduce wireless base band device lib 2018-01-19 01:44:25 +01:00