patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] vdpa/ifc: fix argument compatibility check
@ 2022-12-01  7:32 Andy Pei
  2023-01-19 10:20 ` Maxime Coquelin
  2023-02-03 14:48 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Pei @ 2022-12-01  7:32 UTC (permalink / raw)
  To: dev; +Cc: chenbo.xia, maxime.coquelin, stable

"sw_fallback_lm=0" means driver does not provide live migration assistance.
so hardware assistance is needed to support live migration.
However registers for live migration in BAR4 are not implemented.
In the case, we just return error after display some logs.

Fixes: 4c3f55cc23ea ("net/ifc: add LM mode parameter")
Cc: stable@dpdk.org

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

diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 49d68ad..9468f66 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1746,6 +1746,11 @@ struct rte_vdpa_dev_info dev_info[] = {
 			goto error;
 	}
 	internal->sw_lm = sw_fallback_lm;
+	if (!internal->sw_lm && !internal->hw.lm_cfg) {
+		DRV_LOG(ERR, "Device %s does not support HW assist live migration, please enable sw-live-migration!",
+			pci_dev->name);
+		goto error;
+	}
 
 	pthread_mutex_lock(&internal_list_lock);
 	TAILQ_INSERT_TAIL(&internal_list, list, next);
-- 
1.8.3.1


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

* Re: [PATCH] vdpa/ifc: fix argument compatibility check
  2022-12-01  7:32 [PATCH] vdpa/ifc: fix argument compatibility check Andy Pei
@ 2023-01-19 10:20 ` Maxime Coquelin
  2023-02-03 14:48 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-01-19 10:20 UTC (permalink / raw)
  To: Andy Pei, dev; +Cc: chenbo.xia, stable



On 12/1/22 08:32, Andy Pei wrote:
> "sw_fallback_lm=0" means driver does not provide live migration assistance.
> so hardware assistance is needed to support live migration.
> However registers for live migration in BAR4 are not implemented.
> In the case, we just return error after display some logs.
> 
> Fixes: 4c3f55cc23ea ("net/ifc: add LM mode parameter")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..9468f66 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1746,6 +1746,11 @@ struct rte_vdpa_dev_info dev_info[] = {
>   			goto error;
>   	}
>   	internal->sw_lm = sw_fallback_lm;
> +	if (!internal->sw_lm && !internal->hw.lm_cfg) {
> +		DRV_LOG(ERR, "Device %s does not support HW assist live migration, please enable sw-live-migration!",
> +			pci_dev->name);
> +		goto error;
> +	}
>   
>   	pthread_mutex_lock(&internal_list_lock);
>   	TAILQ_INSERT_TAIL(&internal_list, list, next);

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

Thanks,
Maxime


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

* Re: [PATCH] vdpa/ifc: fix argument compatibility check
  2022-12-01  7:32 [PATCH] vdpa/ifc: fix argument compatibility check Andy Pei
  2023-01-19 10:20 ` Maxime Coquelin
@ 2023-02-03 14:48 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-02-03 14:48 UTC (permalink / raw)
  To: Andy Pei, dev; +Cc: chenbo.xia, stable



On 12/1/22 08:32, Andy Pei wrote:
> "sw_fallback_lm=0" means driver does not provide live migration assistance.
> so hardware assistance is needed to support live migration.
> However registers for live migration in BAR4 are not implemented.
> In the case, we just return error after display some logs.
> 
> Fixes: 4c3f55cc23ea ("net/ifc: add LM mode parameter")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..9468f66 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1746,6 +1746,11 @@ struct rte_vdpa_dev_info dev_info[] = {
>   			goto error;
>   	}
>   	internal->sw_lm = sw_fallback_lm;
> +	if (!internal->sw_lm && !internal->hw.lm_cfg) {
> +		DRV_LOG(ERR, "Device %s does not support HW assist live migration, please enable sw-live-migration!",
> +			pci_dev->name);
> +		goto error;
> +	}
>   
>   	pthread_mutex_lock(&internal_list_lock);
>   	TAILQ_INSERT_TAIL(&internal_list, list, next);


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:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01  7:32 [PATCH] vdpa/ifc: fix argument compatibility check Andy Pei
2023-01-19 10:20 ` Maxime Coquelin
2023-02-03 14:48 ` 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).