From patchwork Tue Oct 29 11:40:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 62146 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ECA93A00BE; Tue, 29 Oct 2019 12:40:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA8F01BEA4; Tue, 29 Oct 2019 12:40:32 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3A8CB1BE9F for ; Tue, 29 Oct 2019 12:40:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 04:40:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,243,1569308400"; d="scan'208";a="350956709" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.38]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2019 04:40:28 -0700 From: David Hunt To: dev@dpdk.org Cc: lei.a.yao@intel.com, David Hunt Date: Tue, 29 Oct 2019 11:40:13 +0000 Message-Id: <20191029114013.22803-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] examples/vm_power: fix no PCI option for guest cli X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If there are no ports available to the guest cli application, it will exit when setting up the default policy because it fails to set the mac address. This should not be the case, as this example can be used for many other use cases that do not need ports. If ports not found, simply set nb_mac_to_monitor in the policy to zero and continue. Fixes: 70febdcfd60f ("examples: check status of getting MAC address") Signed-off-by: David Hunt Acked-by: Lei Yao --- examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c index eb0ae9114..96c1a1ff6 100644 --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c @@ -79,9 +79,9 @@ set_policy_defaults(struct channel_packet *pkt) ret = set_policy_mac(0, 0); if (ret != 0) - return ret; - - pkt->nb_mac_to_monitor = 1; + pkt->nb_mac_to_monitor = 0; + else + pkt->nb_mac_to_monitor = 1; pkt->t_boost_status.tbEnabled = false;