NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
ethdev.h
Go to the documentation of this file.
1#ifndef NDNDPDK_DPDK_ETHDEV_H
2#define NDNDPDK_DPDK_ETHDEV_H
3
5
6#include "../core/common.h"
7#include <rte_ethdev.h>
8#include <rte_flow.h>
9
11static inline bool
12EthDev_IsDown(uint16_t port) {
13 struct rte_eth_link link;
14 int res = rte_eth_link_get_nowait(port, &link);
15 return res != 0 || link.link_status == RTE_ETH_LINK_DOWN;
16}
17
18#endif // NDNDPDK_DPDK_ETHDEV_H