|
FD.io VPP
v21.10.1-2-g0a485f517
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_MAX_LRO_SIZE_DEFAULT 65536
19 #define DPDK_NB_RX_DESC_VIRTIO 256
20 #define DPDK_NB_TX_DESC_VIRTIO 256
22 #define I40E_DEV_ID_SFP_XL710 0x1572
23 #define I40E_DEV_ID_QSFP_A 0x1583
24 #define I40E_DEV_ID_QSFP_B 0x1584
25 #define I40E_DEV_ID_QSFP_C 0x1585
26 #define I40E_DEV_ID_10G_BASE_T 0x1586
27 #define I40E_DEV_ID_VF 0x154C
30 #define foreach_eal_double_hyphen_predicate_arg \
36 #define foreach_eal_single_hyphen_mandatory_arg \
40 #define foreach_eal_single_hyphen_arg \
41 _(mem-alloc-request, m) \
46 #define foreach_eal_double_hyphen_arg \
61 if (!(xd->
flags & DPDK_DEVICE_FLAG_ADMIN_UP))
64 len = rte_eth_xstats_get (xd->
port_id, NULL, 0);
71 if (ret < 0 || ret >
len)
80 #define DPDK_UPDATE_COUNTER(vnm, tidx, xd, stat, cnt) \
83 u64 _v = (xd)->stats.stat; \
84 u64 _lv = (xd)->last_stats.stat; \
85 if (PREDICT_FALSE (_v != _lv)) \
87 if (PREDICT_FALSE (_v < _lv)) \
88 dpdk_log_warn ("%v: %s counter decreased (before %lu after %lu)", \
89 xd->name, #stat, _lv, _v); \
91 vlib_increment_simple_counter ( \
92 vec_elt_at_index ((vnm)->interface_main.sw_if_counters, cnt), \
93 (tidx), (xd)->sw_if_index, _v - _lv); \
105 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)