patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration
@ 2022-12-12  7:12 Andy Pei
  2023-01-19 14:51 ` Maxime Coquelin
  2023-02-03 14:51 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Pei @ 2022-12-12  7:12 UTC (permalink / raw)
  To: dev; +Cc: chenbo.xia, maxime.coquelin, xiao.w.wang, stable

In the case using argument "sw-live-migration=1" to enable SW assisted live 
migration, we take QEMU as front end for example, after source VM migrates 
to destination VM, we keep vdpa process for source VM there, we kill the 
QEMU process for source VM, and restart the QEMU process for source VM. 
In this case, vdpa driver will not perform DMA map and data path will not 
work properly.

The above case works fine in the case "sw-live-migration=0".

The root cause is that current code driver does not set running flag to 0.
Driver treats device as ruuning and does not perform DMA map.

Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
---
 drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 49d68ad..dc8600d 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1044,6 +1044,8 @@ struct rte_vdpa_dev_info {
 
 	vdpa_disable_vfio_intr(internal);
 
+	rte_atomic32_set(&internal->running, 0);
+
 	ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false);
 	if (ret && ret != -ENOTSUP)
 		goto error;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration
  2022-12-12  7:12 [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration Andy Pei
@ 2023-01-19 14:51 ` Maxime Coquelin
  2023-02-03 14:51 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-01-19 14:51 UTC (permalink / raw)
  To: Andy Pei, dev; +Cc: chenbo.xia, xiao.w.wang, stable



On 12/12/22 08:12, Andy Pei wrote:
> In the case using argument "sw-live-migration=1" to enable SW assisted live
> migration, we take QEMU as front end for example, after source VM migrates
> to destination VM, we keep vdpa process for source VM there, we kill the
> QEMU process for source VM, and restart the QEMU process for source VM.
> In this case, vdpa driver will not perform DMA map and data path will not
> work properly.
> 
> The above case works fine in the case "sw-live-migration=0".
> 
> The root cause is that current code driver does not set running flag to 0.
> Driver treats device as ruuning and does not perform DMA map.
> 
> Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..dc8600d 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1044,6 +1044,8 @@ struct rte_vdpa_dev_info {
>   
>   	vdpa_disable_vfio_intr(internal);
>   
> +	rte_atomic32_set(&internal->running, 0);
> +
>   	ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false);
>   	if (ret && ret != -ENOTSUP)
>   		goto error;

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration
  2022-12-12  7:12 [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration Andy Pei
  2023-01-19 14:51 ` Maxime Coquelin
@ 2023-02-03 14:51 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-02-03 14:51 UTC (permalink / raw)
  To: Andy Pei, dev; +Cc: chenbo.xia, xiao.w.wang, stable



On 12/12/22 08:12, Andy Pei wrote:
> In the case using argument "sw-live-migration=1" to enable SW assisted live
> migration, we take QEMU as front end for example, after source VM migrates
> to destination VM, we keep vdpa process for source VM there, we kill the
> QEMU process for source VM, and restart the QEMU process for source VM.
> In this case, vdpa driver will not perform DMA map and data path will not
> work properly.
> 
> The above case works fine in the case "sw-live-migration=0".
> 
> The root cause is that current code driver does not set running flag to 0.
> Driver treats device as ruuning and does not perform DMA map.
> 
> Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..dc8600d 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1044,6 +1044,8 @@ struct rte_vdpa_dev_info {
>   
>   	vdpa_disable_vfio_intr(internal);
>   
> +	rte_atomic32_set(&internal->running, 0);
> +
>   	ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false);
>   	if (ret && ret != -ENOTSUP)
>   		goto error;


Applied to dpdk-next-virtio/main.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-03 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12  7:12 [PATCH] vdpa/ifc: fix reconnetion issue in SW assisted live migration Andy Pei
2023-01-19 14:51 ` Maxime Coquelin
2023-02-03 14:51 ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).