#include <rte_dev.h>
#include <rte_log.h>
#include <rte_memory.h>
-#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_tailq.h>
#include <rte_eal.h>
struct rte_eth_stats stats;
struct rte_eth_stats last_stats;
+ struct rte_eth_stats last_cleared_stats;
struct rte_eth_xstats * xstats;
+ struct rte_eth_xstats * last_cleared_xstats;
f64 time_last_stats_update;
dpdk_port_type_t port_type;
i32 n_vectors[MAX_NELTS];
} frame_queue_trace_t;
+typedef struct {
+ u64 count[MAX_NELTS];
+} frame_queue_nelt_counter_t;
+
#define DPDK_TX_RING_SIZE (4 * 1024)
#define DPDK_STATS_POLL_INTERVAL (10.0)
f64 link_state_poll_interval;
f64 stat_poll_interval;
+ /* for frame queue tracing */
+ frame_queue_trace_t *frame_queue_traces;
+ frame_queue_nelt_counter_t *frame_queue_histogram;
+
/* convenience */
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
void set_efd_bitmap (u8 *bitmap, u32 value, u32 op);
+struct rte_mbuf * dpdk_replicate_packet_mb (vlib_buffer_t * b);
+struct rte_mbuf * dpdk_zerocopy_replicate_packet_mb (vlib_buffer_t * b);
+
#define foreach_dpdk_error \
_(NONE, "no error") \
_(RX_PACKET_ERROR, "Rx packet errors") \
u32 dpdk_get_admin_up_down_in_progress (void);
-uword
-dpdk_input_rss (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * f);
+u32 dpdk_num_mbufs (void);
+
+int dpdk_io_thread_release (void);
+
+dpdk_pmd_t dpdk_get_pmd_type (vnet_hw_interface_t *hi);
+
+i8 dpdk_get_cpu_socket (vnet_hw_interface_t *hi);
+
+void * dpdk_input_multiarch_select();
+void * dpdk_input_rss_multiarch_select();
+void * dpdk_input_efd_multiarch_select();
+
+clib_error_t*
+dpdk_get_hw_interface_stats (u32 hw_if_index, struct rte_eth_stats* dest);
format_function_t format_dpdk_device_name;
format_function_t format_dpdk_device;