#include <stdlib.h>
#include <string.h>
#include <sys/uio.h>
-#include <sys/utsname.h>
#include <time.h>
#include <unistd.h>
"%s-%s", dev->bus->name, dev->name);
/* DPDK reports in units of Mbps */
- rte_eth_link_get(port, &link);
- if (link.link_status == RTE_ETH_LINK_UP)
+ if (rte_eth_link_get(port, &link) == 0 &&
+ link.link_status == RTE_ETH_LINK_UP)
speed = link.link_speed * PCAPNG_MBPS_SPEED;
if (rte_eth_macaddr_get(port, &macaddr) < 0)