|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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 \
40 _(mem-alloc-request, m) \
44 #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)
76 #define DPDK_UPDATE_COUNTER(vnm, tidx, xd, stat, cnt) \
79 u64 _v = (xd)->stats.stat; \
80 u64 _lv = (xd)->last_stats.stat; \
81 if (PREDICT_FALSE (_v != _lv)) \
83 if (PREDICT_FALSE (_v < _lv)) \
84 dpdk_log_warn ("%v: %s counter decreased (before %lu after %lu)", \
85 xd->name, #stat, _lv, _v); \
87 vlib_increment_simple_counter ( \
88 vec_elt_at_index ((vnm)->interface_main.sw_if_counters, cnt), \
89 (tidx), (xd)->sw_if_index, _v - _lv); \
101 if ((xd->
flags & DPDK_DEVICE_FLAG_PMD) == 0)
struct rte_eth_stats stats
f64 time_last_stats_update
struct rte_eth_stats last_stats
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
@ VNET_INTERFACE_COUNTER_RX_MISS
vnet_main_t * vnet_get_main(void)
static_always_inline uword vlib_get_thread_index(void)
#define DPDK_UPDATE_COUNTER(vnm, tidx, xd, stat, cnt)
static void dpdk_get_xstats(dpdk_device_t *xd)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
@ VNET_INTERFACE_COUNTER_RX_NO_BUF
struct rte_eth_xstat * xstats
@ VNET_INTERFACE_COUNTER_RX_ERROR
static void dpdk_update_counters(dpdk_device_t *xd, f64 now)