diff options
author | Luca Deri <deri@ntop.org> | 2018-11-10 16:10:22 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2018-11-10 16:10:22 +0100 |
commit | 71b2c19cf28f72ad2e876719af88c7841c2aea84 (patch) | |
tree | 8d5d8c1be904f1b8ff88aaa3adcac0bdcfbbfdff /example/ndpi_util.h | |
parent | 6d929bf4cc48d54db91678a24ef0afb2e20382d7 (diff) |
Added DPDK support to ndpiReader
Diffstat (limited to 'example/ndpi_util.h')
-rw-r--r-- | example/ndpi_util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/example/ndpi_util.h b/example/ndpi_util.h index d1d461490..eb9ab8e65 100644 --- a/example/ndpi_util.h +++ b/example/ndpi_util.h @@ -31,6 +31,24 @@ #include <pcap.h> +#ifdef USE_DPDK +#include <rte_eal.h> +#include <rte_ether.h> +#include <rte_ethdev.h> +#include <rte_cycles.h> +#include <rte_lcore.h> +#include <rte_mbuf.h> + +#define RX_RING_SIZE 128 +#define TX_RING_SIZE 512 +#define NUM_MBUFS 8191 +#define MBUF_CACHE_SIZE 250 +#define BURST_SIZE 32 +#define PREFETCH_OFFSET 3 + +extern int dpdk_port_init(int port, struct rte_mempool *mbuf_pool); +#endif + #define MAX_NUM_READER_THREADS 16 #define IDLE_SCAN_PERIOD 10 /* msec (use TICK_RESOLUTION = 1000) */ #define MAX_IDLE_TIME 30000 |