All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] examples/vm_power: fix no PCI option for guest cli
@ 2019-10-29 11:40 David Hunt
  2019-10-30  1:09 ` Yao, Lei A
  0 siblings, 1 reply; 3+ messages in thread
From: David Hunt @ 2019-10-29 11:40 UTC (permalink / raw)
  To: dev; +Cc: lei.a.yao, David Hunt

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 <david.hunt@intel.com>
---
 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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-12  7:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 11:40 [dpdk-dev] [PATCH v1] examples/vm_power: fix no PCI option for guest cli David Hunt
2019-10-30  1:09 ` Yao, Lei A
2019-11-12  7:29   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.