Skip to content

Commit

Permalink
set testpmd num-mbufs to limit memory allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
manurodriguez committed Oct 8, 2024
1 parent 4936b1b commit 0bbf0b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testpmd-container-app/cnfapp/scripts/testpmd-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CORES_STR=$LCORES
IFS=',' read -ra CORES_ARR <<< "$CORES_STR"
CORES_LEN=${#CORES_ARR[@]}
if [[ $CORES_LEN -gt $TESTPMD_CPU_COUNT ]]; then
echo "ERROR: Acutal cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
echo "ERROR: Actual cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
exit 1
fi

Expand All @@ -78,10 +78,11 @@ TXQ=${tx_queues:=1}
RXD=${rx_descriptors:=1024}
TXD=${tx_descriptors:=1024}
STATS_PERIOD=${stats_period:=1}
NUM_MBUFS=${num_mbufs:=187456}

RUN="/usr/local/bin/example-cnf/testpmd-run"
CMD="/usr/local/bin/example-cnf/testpmd"
CMD="${CMD} -l $LCORES --in-memory $PCI --socket-mem ${SOCKET_MEM} -n ${MEMORY_CHANNELS} --proc-type auto --file-prefix pg"
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"
CMD="${CMD} --"
CMD="${CMD} --disable-rss --nb-cores=${FORWARDING_CORES} --rxq=${RXQ} --txq=${TXQ} --rxd=${RXD} --txd=${TXD}"
CMD="${CMD} --auto-start ${ETH_PEER} --forward-mode=mac --stats-period ${STATS_PERIOD}"
Expand Down

0 comments on commit 0bbf0b9

Please sign in to comment.