path: root/drivers/net/mlx5
diff options
authorVictor Kaplansky <>2018-01-17 15:49:25 +0200
committerFerruh Yigit <>2018-01-21 15:51:52 +0100
commita3688046995f88c518fa27c45b39ae389260b18d (patch)
tree0fd26eb1d5300f29cc30e7965a7b2bf77ed0e40c /drivers/net/mlx5
parent3ebd930588b7847906e08e2645a35761a90abf2a (diff)
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 Cc: Signed-off-by: Victor Kaplansky <> Reviewed-by: Maxime Coquelin <> Acked-by: Yuanhan Liu <>
Diffstat (limited to 'drivers/net/mlx5')
0 files changed, 0 insertions, 0 deletions