Skip to content

Commit 0bbf0b9

Browse files
committed
set testpmd num-mbufs to limit memory allocation
1 parent 4936b1b commit 0bbf0b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

testpmd-container-app/cnfapp/scripts/testpmd-wrapper

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ CORES_STR=$LCORES
5858
IFS=',' read -ra CORES_ARR <<< "$CORES_STR"
5959
CORES_LEN=${#CORES_ARR[@]}
6060
if [[ $CORES_LEN -gt $TESTPMD_CPU_COUNT ]]; then
61-
echo "ERROR: Acutal cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
61+
echo "ERROR: Actual cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
6262
exit 1
6363
fi
6464

@@ -78,10 +78,11 @@ TXQ=${tx_queues:=1}
7878
RXD=${rx_descriptors:=1024}
7979
TXD=${tx_descriptors:=1024}
8080
STATS_PERIOD=${stats_period:=1}
81+
NUM_MBUFS=${num_mbufs:=187456}
8182

8283
RUN="/usr/local/bin/example-cnf/testpmd-run"
8384
CMD="/usr/local/bin/example-cnf/testpmd"
84-
CMD="${CMD} -l $LCORES --in-memory $PCI --socket-mem ${SOCKET_MEM} -n ${MEMORY_CHANNELS} --proc-type auto --file-prefix pg"
85+
CMD="${CMD} -l $LCORES --in-memory $PCI --total-num-mbufs ${NUM_MBUFS} --socket-mem ${SOCKET_MEM} -n ${MEMORY_CHANNELS} --proc-type auto --file-prefix pg"
8586
CMD="${CMD} --"
8687
CMD="${CMD} --disable-rss --nb-cores=${FORWARDING_CORES} --rxq=${RXQ} --txq=${TXQ} --rxd=${RXD} --txd=${TXD}"
8788
CMD="${CMD} --auto-start ${ETH_PEER} --forward-mode=mac --stats-period ${STATS_PERIOD}"

0 commit comments

Comments
 (0)