From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 382BFA00BE;
	Wed, 30 Oct 2019 02:09:36 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id C82742C02;
	Wed, 30 Oct 2019 02:09:34 +0100 (CET)
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 317812BF5
 for <dev@dpdk.org>; Wed, 30 Oct 2019 02:09:33 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 29 Oct 2019 18:09:32 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.68,245,1569308400"; d="scan'208";a="193803351"
Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203])
 by orsmga008.jf.intel.com with ESMTP; 29 Oct 2019 18:09:31 -0700
Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by
 FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)
 id 14.3.439.0; Tue, 29 Oct 2019 18:09:31 -0700
Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by
 FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS)
 id 14.3.439.0; Tue, 29 Oct 2019 18:09:31 -0700
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.108]) by
 SHSMSX105.ccr.corp.intel.com ([169.254.11.225]) with mapi id 14.03.0439.000;
 Wed, 30 Oct 2019 09:09:28 +0800
From: "Yao, Lei A" <lei.a.yao@intel.com>
To: "Hunt, David" <david.hunt@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [PATCH v1] examples/vm_power: fix no PCI option for guest cli
Thread-Index: AQHVjk2t+DJMnGGYy0+bVCE2UTakK6dyYHPg
Date: Wed, 30 Oct 2019 01:09:27 +0000
Message-ID: <2DBBFF226F7CF64BAFCA79B681719D95497CF9BF@shsmsx102.ccr.corp.intel.com>
References: <20191029114013.22803-1-david.hunt@intel.com>
In-Reply-To: <20191029114013.22803-1-david.hunt@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWM3Mzc1NDctYTY1MC00ZTljLTgyYTMtYTkzNTQxOTA3ZTliIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVE9YWTRhc3JENitVUkE0K1Y4cDRUWXBxSlJyMWtBcTRUNUNHQlJidVJUdmN3UVprUkJtVHorZWxEdFwvbDNtd1IifQ==
x-ctpclassification: CTP_NT
dlp-product: dlpe-windows
dlp-version: 11.2.0.6
dlp-reaction: no-action
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



> -----Original Message-----
> From: Hunt, David <david.hunt@intel.com>
> Sent: Tuesday, October 29, 2019 7:40 PM
> To: dev@dpdk.org
> Cc: Yao, Lei A <lei.a.yao@intel.com>; Hunt, David <david.hunt@intel.com>
> Subject: [PATCH v1] examples/vm_power: fix no PCI option for guest cli
>=20
> If there are no ports available to the guest cli application, it will exi=
t when
> setting up the default policy because it fails to set the mac address. Th=
is
> should not be the case, as this example can be used for many other use
> cases that do not need ports.
>=20
> If ports not found, simply set nb_mac_to_monitor in the policy to zero an=
d
> continue.
>=20
> Fixes: 70febdcfd60f ("examples: check status of getting MAC address")
> Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
> ---
>  examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>=20
> 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)
>=20
>  	ret =3D set_policy_mac(0, 0);
>  	if (ret !=3D 0)
> -		return ret;
> -
> -	pkt->nb_mac_to_monitor =3D 1;
> +		pkt->nb_mac_to_monitor =3D 0;
> +	else
> +		pkt->nb_mac_to_monitor =3D 1;
>=20
>  	pkt->t_boost_status.tbEnabled =3D false;
>=20
> --
> 2.17.1