[PATCH] vdpa/ifc: fix argument compatibility check

Andy Pei andy.pei at intel.com
Thu Dec 1 08:32:20 CET 2022


"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);
-- 
1.8.3.1



More information about the stable mailing list