#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 == 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)
/* Expand any offloaded VLAN information */
if ((direction == RTE_PCAPNG_DIRECTION_IN &&
- (md->ol_flags & PKT_RX_VLAN_STRIPPED)) ||
+ (md->ol_flags & RTE_MBUF_F_RX_VLAN_STRIPPED)) ||
(direction == RTE_PCAPNG_DIRECTION_OUT &&
- (md->ol_flags & PKT_TX_VLAN))) {
+ (md->ol_flags & RTE_MBUF_F_TX_VLAN))) {
if (pcapng_vlan_insert(mc, RTE_ETHER_TYPE_VLAN,
md->vlan_tci) != 0)
goto fail;
}
if ((direction == RTE_PCAPNG_DIRECTION_IN &&
- (md->ol_flags & PKT_RX_QINQ_STRIPPED)) ||
+ (md->ol_flags & RTE_MBUF_F_RX_QINQ_STRIPPED)) ||
(direction == RTE_PCAPNG_DIRECTION_OUT &&
- (md->ol_flags & PKT_TX_QINQ))) {
+ (md->ol_flags & RTE_MBUF_F_TX_QINQ))) {
if (pcapng_vlan_insert(mc, RTE_ETHER_TYPE_QINQ,
md->vlan_tci_outer) != 0)
goto fail;