From patchwork Thu Dec 1 07:32:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pei, Andy" X-Patchwork-Id: 120412 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F19B3A00C5; Thu, 1 Dec 2022 09:24:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE66F42D11; Thu, 1 Dec 2022 09:24:09 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 6E6C242D0D; Thu, 1 Dec 2022 09:24:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669883047; x=1701419047; h=from:to:cc:subject:date:message-id; bh=BHkpSyQMmHV+vMSQbr5L/xbEbZUOWT3B4gCeUhx6a1Y=; b=m4eYW1yOKtWjEl/9GakudLcKwdOKbr+808QXtypy4Aktvx4OirEW2jxa TjiTjf6FYdu4LSyjNlH91obxuRYhUA1VbFRnq1XTXfRvUjAw7I7JL/ffU S/J/SPUOSnLG3vrwv4qUr6issNGawo1+PRuoq7q5pEmMsRZ7LX6ypoRhC lG8hOd9gnqqPPm8l+6fVTIlkpX7DJjNrDz9Z//Q5egwizMcH/pzOVWIKY PgVchLulEojlDRK0tqQ6lgzR7KExlLttRCCkoooSfUQrnd26q4qh0uHuP nru/cLmbbzWr9FlHCvHAAb+eq4i1Mcl29xLTEUcGNFCoTv+h70yxPu5mK A==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314323277" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314323277" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2022 00:23:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="713136808" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="713136808" Received: from dpdk-dipei.sh.intel.com ([10.67.110.251]) by fmsmga004.fm.intel.com with ESMTP; 01 Dec 2022 00:23:54 -0800 From: Andy Pei To: dev@dpdk.org Cc: chenbo.xia@intel.com, maxime.coquelin@redhat.com, stable@dpdk.org Subject: [PATCH] vdpa/ifc: fix argument compatibility check Date: Thu, 1 Dec 2022 15:32:20 +0800 Message-Id: <1669879940-60846-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org "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 Reviewed-by: Maxime Coquelin --- 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);