Skip to content

Commit 29efa1d

Browse files
committed
init: add DPDK variables and improve ipfixprobed script
1 parent f27d83f commit 29efa1d

File tree

2 files changed

+119
-12
lines changed

2 files changed

+119
-12
lines changed

init/ipfixprobed

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ CONFFILE="/etc/ipfixprobe/$1.conf"
55
if [ -e "$CONFFILE" ]; then
66
source "$CONFFILE"
77
input=""
8+
dpdkinput=""
9+
if [ "$USE_DPDK" = "1" ]; then
10+
# set up DPDK interface(s)
11+
dpdkinput=("-i" "dpdk;p=$DPDK_PORT;q=$DPDK_QUEUES_COUNT;e=-c $DPDK_CPUMASK -a $DPDK_DEVICE")
12+
for ((ifc=1; ifc<$DPDK_QUEUES_COUNT;ifc++)); do
13+
dpdkinput+=("-i" "dpdk")
14+
done
15+
fi
816
if `declare -p INPUT > /dev/null 2>/dev/null`; then
917
# list of input plugins
1018
for ifc in "${!INPUT[@]}"; do
@@ -37,7 +45,7 @@ if [ -e "$CONFFILE" ]; then
3745
fi
3846
output="-o ipfix;host=${HOST:-127.0.0.1};port=${PORT:-4739};id=${LINK:-0};dir=${DIR:-0};${UDP_PARAM}"
3947

40-
exec /usr/bin/ipfixprobe $input $storage $process $output
48+
exec /usr/bin/ipfixprobe "${dpdkinput[@]}" $input $storage $process $output
4149
else
4250
echo "Configuration file '$CONFFILE' does not exist, exitting." >&2
4351
exit 1

init/link0.conf.example

Lines changed: 110 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,125 @@
1-
# set up shell-like variables
1+
# Set up shell-like variables
2+
# Lines starting with '#' are comments.
23

3-
# List of activated input plugins (arguments for -i parameter)
4-
# Specify array of input plugins with arguments using INPUT[], indexes (subscripts) must be unique
5-
INPUT[0]="ndp;dev=/dev/nfb0:0"
6-
INPUT[1]="ndp;dev=/dev/nfb0:1"
4+
# $$$$$$\ $$\
5+
# \_$$ _| $$ |
6+
# $$ | $$$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\
7+
# $$ | $$ __$$\ $$ __$$\ $$ | $$ |\_$$ _|
8+
# $$ | $$ | $$ |$$ / $$ |$$ | $$ | $$ |
9+
# $$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ |$$\
10+
# $$$$$$\ $$ | $$ |$$$$$$$ |\$$$$$$ | \$$$$ |
11+
# \______|\__| \__|$$ ____/ \______/ \____/
12+
# $$ |
13+
# $$ |
14+
# \__|
15+
#
16+
# Settings depend on type of input plugin.
17+
# For DPDK, skip to the related section and leave INPUT[*] array commented.
18+
#
19+
# For PCAP / NDP / raw, create a list of activated input plugins (arguments for -i parameter).
20+
#
21+
# Specify the array of input plugins with arguments using INPUT[], indexes (subscripts) must be unique.
22+
#
23+
# See `ipfixprobe --help input` for more information
24+
25+
# Example of PCAP:
26+
#
27+
#INPUT[0]="pcap;ifc=eno2"
28+
29+
# Example of NDP:
30+
#
31+
#INPUT[0]="ndp;dev=/dev/nfb0:0"
32+
#INPUT[1]="ndp;dev=/dev/nfb0:1"
33+
34+
# Example of raw:
35+
#
36+
#INPUT[0]="raw;ifc=eno2"
737

838
# or specify inputs using loop
939
# for i in `seq 0 15`; do
1040
# INPUT[$i]="ndp;dev=/dev/nfb0:$i"
1141
# done
1242

43+
#===================================================
44+
# DPDK input plugin settings
45+
# --------------------------------------------------
46+
#
47+
# It is recommended to use either DPDK or NDP.
48+
#
49+
# Enable USE_DPDK input by setting USE_DPDK=1:
50+
51+
#USE_DPDK=1
52+
53+
# Set PCIe address in the format <[domain:]bus:devid.func> for example:
54+
55+
#DPDK_DEVICE=0000:43:00.0
56+
57+
# Set CPU mask:
58+
59+
#DPDK_CPUMASK=0x1
60+
61+
# Set network device port:
62+
63+
#DPDK_PORT=0
64+
65+
# Set number of parallel queues (RSS feature)
66+
67+
#DPDK_QUEUES_COUNT=8
68+
69+
#===================================================
70+
71+
# $$$$$$$\ $$\
72+
# $$ __$$\ \__|
73+
# $$ | $$ | $$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$$\ $$\ $$$$$$$\ $$$$$$\
74+
# $$$$$$$ |$$ __$$\ $$ __$$\ $$ _____|$$ __$$\ $$ _____|$$ _____|$$ |$$ __$$\ $$ __$$\
75+
# $$ ____/ $$ | \__|$$ / $$ |$$ / $$$$$$$$ |\$$$$$$\ \$$$$$$\ $$ |$$ | $$ |$$ / $$ |
76+
# $$ | $$ | $$ | $$ |$$ | $$ ____| \____$$\ \____$$\ $$ |$$ | $$ |$$ | $$ |
77+
# $$ | $$ | \$$$$$$ |\$$$$$$$\ \$$$$$$$\ $$$$$$$ |$$$$$$$ |$$ |$$ | $$ |\$$$$$$$ |
78+
# \__| \__| \______/ \_______| \_______|\_______/ \_______/ \__|\__| \__| \____$$ |
79+
# $$\ $$ |
80+
# \$$$$$$ |
81+
# \______/
82+
#
1383
# List of activated process plugins (arguments for -p parameter), to skip plugins, use "basic" only:
1484
# PROCESS=(basic)
85+
#
86+
# See `ipfixprobe -h process` for the list of available plugins.
87+
#
1588
PROCESS=(pstats tls http ssdp "dnssd;txt")
1689

90+
#
91+
# $$$$$$$$\ $$\ $$$$$$\ $$\
92+
# $$ _____|$$ | $$ __$$\ $$ |
93+
# $$ | $$ | $$$$$$\ $$\ $$\ $$\ $$ / \__| $$$$$$\ $$$$$$$\ $$$$$$$\ $$$$$$\
94+
# $$$$$\ $$ |$$ __$$\ $$ | $$ | $$ | $$ | \____$$\ $$ _____|$$ __$$\ $$ __$$\
95+
# $$ __| $$ |$$ / $$ |$$ | $$ | $$ | $$ | $$$$$$$ |$$ / $$ | $$ |$$$$$$$$ |
96+
# $$ | $$ |$$ | $$ |$$ | $$ | $$ | $$ | $$\ $$ __$$ |$$ | $$ | $$ |$$ ____|
97+
# $$ | $$ |\$$$$$$ |\$$$$$\$$$$ | \$$$$$$ |\$$$$$$$ |\$$$$$$$\ $$ | $$ |\$$$$$$$\
98+
# \__| \__| \______/ \_____\____/ \______/ \_______| \_______|\__| \__| \_______|
99+
#
100+
#
101+
# Size of flow cache, exponent to the power of two
102+
CACHE_SIZE=17
103+
104+
# Active and inactive timeout in seconds
105+
ACTIVE_TIMEOUT=300
106+
INACTIVE_TIMEOUT=65
17107

108+
#
109+
# $$$$$$\ $$\ $$\
110+
# $$ __$$\ $$ | $$ |
111+
# $$ / $$ |$$\ $$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\
112+
# $$ | $$ |$$ | $$ |\_$$ _| $$ __$$\ $$ | $$ |\_$$ _|
113+
# $$ | $$ |$$ | $$ | $$ | $$ / $$ |$$ | $$ | $$ |
114+
# $$ | $$ |$$ | $$ | $$ |$$\ $$ | $$ |$$ | $$ | $$ |$$\
115+
# $$$$$$ |\$$$$$$ | \$$$$ |$$$$$$$ |\$$$$$$ | \$$$$ |
116+
# \______/ \______/ \____/ $$ ____/ \______/ \____/
117+
# $$ |
118+
# $$ |
119+
# \__|
120+
#
121+
# The following variables set IPFIX output.
122+
#
18123
# Link / ODID identifier
19124
LINK=0
20125

@@ -28,9 +133,3 @@ PORT=4739
28133
# Use UDP yes/no? (instead of TCP)
29134
UDP=yes
30135

31-
# Size of flow cache, exponent to the power of two
32-
CACHE_SIZE=17
33-
34-
# Active and inactive timeout in seconds
35-
ACTIVE_TIMEOUT=300
36-
INACTIVE_TIMEOUT=65

0 commit comments

Comments
 (0)