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)
#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
#define clib_memcpy_fast(a, b, c)
struct rte_eth_stats stats
static void dpdk_get_xstats(dpdk_device_t *xd)
f64 time_last_stats_update
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
#define DPDK_UPDATE_COUNTER(vnm, tidx, xd, stat, cnt)