16 #define DPDK_NB_RX_DESC_DEFAULT 1024 17 #define DPDK_NB_TX_DESC_DEFAULT 1024 18 #define DPDK_NB_RX_DESC_VIRTIO 256 19 #define DPDK_NB_TX_DESC_VIRTIO 256 21 #define I40E_DEV_ID_SFP_XL710 0x1572 22 #define I40E_DEV_ID_QSFP_A 0x1583 23 #define I40E_DEV_ID_QSFP_B 0x1584 24 #define I40E_DEV_ID_QSFP_C 0x1585 25 #define I40E_DEV_ID_10G_BASE_T 0x1586 26 #define I40E_DEV_ID_VF 0x154C 29 #define foreach_eal_double_hyphen_predicate_arg \ 35 #define foreach_eal_single_hyphen_mandatory_arg \ 39 #define foreach_eal_single_hyphen_arg \ 41 _(mem-alloc-request, m) \ 45 #define foreach_eal_double_hyphen_arg \ 57 if (!(xd->
flags & DPDK_DEVICE_FLAG_ADMIN_UP))
60 len = rte_eth_xstats_get (xd->
port_id, NULL, 0);
67 if (ret < 0 || ret > len)
82 u64 rxerrors, last_rxerrors;
85 if ((xd->
flags & DPDK_DEVICE_FLAG_PMD) == 0)
113 rxerrors = xd->
stats.ierrors;
122 rxerrors - last_rxerrors);
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
vnet_main_t * vnet_get_main(void)
struct rte_eth_stats last_stats
vnet_interface_main_t interface_main
#define clib_memcpy_fast(a, b, c)
static void vlib_increment_simple_counter(vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 increment)
Increment a simple counter.
struct rte_eth_stats stats
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
A collection of simple counters.
static void dpdk_get_xstats(dpdk_device_t *xd)
f64 time_last_stats_update
vlib_simple_counter_main_t * sw_if_counters
static_always_inline uword vlib_get_thread_index(void)
static void dpdk_update_counters(dpdk_device_t *xd, f64 now)
struct rte_eth_xstat * xstats