aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2021-08-23 10:22:37 +0200
committerPeter Mikus <pmikus@cisco.com>2021-08-23 08:48:55 +0000
commitc849edfc256df9c3de1ece6babcd4757bb2a8072 (patch)
treee2f69e978be386cd94429ec2f873610ea4475a74 /resources/libraries
parent442a8b449fea1f632d7a3d5d31c9c4f21de0c76b (diff)
DPDK build: fix l3fwd build and update Meson opts
Fix l3fwd patch which broke because the code got moved. Rework two Meson options: * RTE_LIBRTE_I40E_16BYTE_RX_DESC using Meson option c_args instead of CFLAGS. According to Meson docs, using c_args is the proper way to pass C compiler arguments and the support for CFLAGS is there for legacy reasons and not guaranteed to work. * Add platform=generic which mirrors VPP configuration. This removes the need to hack Arm CPU and NUMA values as the generic build uses high enough values. Change-Id: Ibcb17879bdf26329881819c332c1782b9c713182 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries')
-rwxr-xr-xresources/libraries/bash/entry/patch_l3fwd_flip_routes4
-rw-r--r--resources/libraries/bash/function/dpdk.sh19
2 files changed, 11 insertions, 12 deletions
diff --git a/resources/libraries/bash/entry/patch_l3fwd_flip_routes b/resources/libraries/bash/entry/patch_l3fwd_flip_routes
index 3b35e1f930..23a6675145 100755
--- a/resources/libraries/bash/entry/patch_l3fwd_flip_routes
+++ b/resources/libraries/bash/entry/patch_l3fwd_flip_routes
@@ -1,7 +1,7 @@
#!/bin/sh
-patch --ignore-whitespace --forward l3fwd_lpm.c <<"_EOF"
-44,45c44,45
+patch --ignore-whitespace --forward main.c <<"_EOF"
+185,186c185,186
< {RTE_IPV4(198, 18, 0, 0), 24, 0},
< {RTE_IPV4(198, 18, 1, 0), 24, 1},
---
diff --git a/resources/libraries/bash/function/dpdk.sh b/resources/libraries/bash/function/dpdk.sh
index 3c16372294..ea7871bed7 100644
--- a/resources/libraries/bash/function/dpdk.sh
+++ b/resources/libraries/bash/function/dpdk.sh
@@ -86,13 +86,14 @@ function dpdk_compile () {
pushd "${DPDK_DIR}" || die "Pushd failed"
- # Patch ARM.
- sed_file="config/arm/meson.build"
- sed_cmd="s/'RTE_MAX_LCORE', [0-9]*/'RTE_MAX_LCORE', $(nproc --all)/"
- sed -i "${sed_cmd}" "${sed_file}" || die "RTE_MAX_LCORE Patch failed"
- sed_cmd="s/'RTE_MAX_NUMA_NODES', [0-9]*/'RTE_MAX_NUMA_NODES', "
- sed_cmd+="$(echo /sys/devices/system/node/node* | wc -w)/"
- sed -i "${sed_cmd}" "${sed_file}" || die "RTE_MAX_NUMA_NODES Patch failed"
+ # enable l3fwd
+ meson_options="-Dexamples=l3fwd "
+
+ # i40e specific options
+ meson_options="${meson_options} -Dc_args=RTE_LIBRTE_I40E_16BYTE_RX_DESC=y"
+
+ # Configure generic build - the same used by VPP
+ meson_options="${meson_options} -Dplatform=generic"
# Patch L3FWD.
sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128"
@@ -106,9 +107,7 @@ function dpdk_compile () {
popd || die "Popd failed"
# Compile using Meson and Ninja.
- export CFLAGS=""
- CFLAGS+="-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y"
- meson -Dexamples=l3fwd build || {
+ meson ${meson_options} build || {
die "Failed to compile DPDK!"
}
ninja -C build || die "Failed to compile DPDK!"