X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fguest_cli%2Fvm_power_cli_guest.c;h=77e54401aa023f4e482b724e3e9d8508db952040;hb=a6a752402dfce8695c258a27da97d5a6d187c49b;hp=2d9e7689a71ccfb09e72f1160ca3c58331dc9990;hpb=39701c19dd2f1748385d9546ccff97e845a6575b;p=dpdk.git 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 2d9e7689a7..77e54401aa 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 @@ -34,7 +34,7 @@ struct cmd_quit_result { }; union PFID { - struct ether_addr addr; + struct rte_ether_addr addr; uint64_t pfid; }; @@ -51,9 +51,15 @@ set_policy_mac(int port, int idx) { struct channel_packet *policy; union PFID pfid; + int ret; /* Use port MAC address as the vfid */ - rte_eth_macaddr_get(port, &pfid.addr); + ret = rte_eth_macaddr_get(port, &pfid.addr); + if (retval != 0) { + printf("Failed to get device (port %u) MAC address: %s\n", + port, rte_strerror(-retval)); + return retval; + } printf("Port %u MAC: %02" PRIx8 ":%02" PRIx8 ":%02" PRIx8 ":" "%02" PRIx8 ":%02" PRIx8 ":%02" PRIx8 "\n", @@ -66,10 +72,15 @@ set_policy_mac(int port, int idx) return 0; } -void +int set_policy_defaults(struct channel_packet *pkt) { - set_policy_mac(0, 0); + int ret; + + ret = set_policy_mac(0, 0); + if (ret != 0) + return ret; + pkt->nb_mac_to_monitor = 1; pkt->t_boost_status.tbEnabled = false;