X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fkni%2Fmain.c;h=c576fc767e150e031f5ee5f3f1e4d1b4ea274100;hb=ef2bf3dee265d6009cf71e476b3f04741df3cc12;hp=8eb5b610e88d9abd5a886a7d4615e8702f610371;hpb=22e5c73bd181ddae758189295146154542b63360;p=dpdk.git diff --git a/examples/kni/main.c b/examples/kni/main.c index 8eb5b610e8..c576fc767e 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -940,8 +940,12 @@ kni_alloc(uint16_t port_id) port_id, strerror(-ret)); /* Get the interface default mac address */ - rte_eth_macaddr_get(port_id, + ret = rte_eth_macaddr_get(port_id, (struct rte_ether_addr *)&conf.mac_addr); + if (ret != 0) + rte_exit(EXIT_FAILURE, + "Failed to get MAC address (port %u): %s\n", + port_id, rte_strerror(-ret)); rte_eth_dev_get_mtu(port_id, &conf.mtu);