summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorVictor Kaplansky <victork@redhat.com>2018-01-17 15:49:25 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-21 15:51:52 +0100
commita3688046995f88c518fa27c45b39ae389260b18d (patch)
tree0fd26eb1d5300f29cc30e7965a7b2bf77ed0e40c /drivers/net/mlx5/mlx5_ethdev.c
parent3ebd930588b7847906e08e2645a35761a90abf2a (diff)
downloaddpdk-a3688046995f88c518fa27c45b39ae389260b18d.zip
dpdk-a3688046995f88c518fa27c45b39ae389260b18d.tar.gz
dpdk-a3688046995f88c518fa27c45b39ae389260b18d.tar.xz
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>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
0 files changed, 0 insertions, 0 deletions