[PATCH] vdpa/ifc: fix argument compatibility check

Maxime Coquelin maxime.coquelin at redhat.com
Thu Jan 19 11:20:11 CET 2023



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 at dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei at 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 at redhat.com>

Thanks,
Maxime



More information about the stable mailing list