- arch=$(uname -m) || {
- die "Get CPU architecture failed."
- }
-
- # DPDK prefers "arm64" to "aarch64" and does not allow arm64 native target.
- if [ ${arch} == "aarch64" ]; then
- arch="arm64"
- machine="armv8a"
- else
- machine="native"
- fi
-
- # Compile the l3fwd.
- export RTE_SDK="${DPDK_DIR}/"
- export RTE_TARGET="${arch}-${machine}-linuxapp-gcc"
- # Patch settings.
- sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128/#define RTE_TEST_RX_DESC_DEFAULT 2048/g"
- sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512/#define RTE_TEST_TX_DESC_DEFAULT 2048/g"
+ pushd "${DPDK_DIR}" || die "Pushd failed"
+ # Patch L3FWD.
+ sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128"
+ sed_rxd+="/#define RTE_TEST_RX_DESC_DEFAULT 2048/g"
+ sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512"
+ sed_txd+="/#define RTE_TEST_TX_DESC_DEFAULT 2048/g"