-
Notifications
You must be signed in to change notification settings - Fork 81
/
dpdkinfo.hh
130 lines (74 loc) · 2.59 KB
/
dpdkinfo.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#ifndef CLICK_DPDKINFO_HH
#define CLICK_DPDKINFO_HH
#include <click/element.hh>
#include <click/dpdkdevice.hh>
CLICK_DECLS
/*
=title DPDKInfo
=c
DPDKInfo([I<keywords> NB_MBUF, MBUF_SIZE, RX_PTHRESH, etc.])
=s netdevices
Set DPDK global parameters.
=d
Set Intel's DPDK global parameters used by FromDPDKDevice and
ToDPDKDevice elements. See DPDK documentation for details.
Keyword arguments:
=over 8
=item NB_MBUF
Integer. Number of message buffers to allocate. Defaults to 65536.
=item MBUF_SIZE
Integer. Size of a message buffer in bytes. Defaults to 2048 +
RTE_PKTMBUF_HEADROOM.
=item MBUF_CACHE_SIZE
Integer. Number of message buffer to keep in a per-core cache. It should be
such that NB_MBUF modulo MBUF_CACHE_SIZE == 0. Defaults to 256.
=item RX_PTHRESH
Integer. RX prefetch threshold. Defaults to 8.
=item RX_HTHRESH
Integer. RX host threshold. Defaults to 8.
=item RX_WTHRESH
Integer. RX write-back threshold. Defaults to 4.
=item TX_PTHRESH
Integer. TX prefetch threshold. Defaults to 36.
=item TX_HTHRESH
Integer. TX host threshold. Defaults to 0.
=item TX_WTHRESH
Integer. TX write-back threshold. Defaults to 0.
=item MEMPOOL_PREFIX
Integer. TX write-back threshold. Defaults to 0.
=item DEF_RING_NDESC
Integer. Number of frame descriptors in the ring buffer.
Used for interprocess communication. Defaults to 1024.
=item DEF_BURST_SIZE
Integer. Number of frames to read/write from/to a DPDK device.
Defaults to 32.
=item RING_FLAGS
Integer. Parameters to pass to a ring-based DPDK process communication.
Defaults to 0.
=item RING_SIZE
Integer. The size of the ring used for DPDK inter-process communication.
Defaults to 64.
=item RING_POOL_CACHE_SIZE
Integer. The size of the message buffer for DPDK inter-process communication.
Defaults to 32.
=item RING_PRIV_DATA_SIZE
Integer. The size of the private memory area for a pair of interconnected DPDK process.
Defaults to 0 as there is no need to share something privately.
=back
This element is only available at user level, when compiled with DPDK
support.
=e
DPDKInfo(NB_MBUF 1048576, MBUF_SIZE 4096, MBUF_CACHE_SIZE 512)
=a FromDPDKDevice, ToDPDKDevice, FromDPDKRing, ToDPDKRing */
class DPDKInfo : public Element {
public:
const char *class_name() const override { return "DPDKInfo"; }
int configure_phase() const override { return CONFIGURE_PHASE_FIRST; }
int configure(Vector<String> &conf, ErrorHandler *errh);
enum {h_pool_count, h_pools};
static String read_handler(Element *e, void * thunk);
void add_handlers() override;
static DPDKInfo *instance;
};
CLICK_ENDDECLS
#endif