Skip to content

app/testpmd: fix invalid rxq and txq nubmer settings

Wei Dai dpdk-dev 6 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 1 replyApplied
  2. v52 patches 3 repliesSuperseded
  3. v42 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches2 repliesSuperseded
v22 patches2 repliesSuperseded
v12 patches4 repliesSuperseded

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/2app/testpmd: fix invalid rxq number settingapp/test-pmd/cmdline.c app/test-pmd/parameters.c app/test-pmd/testpmd.c +1 more+55 -30 replies
2/2app/testpmd: fix invalid txq number settingapp/test-pmd/cmdline.c app/test-pmd/parameters.c app/test-pmd/testpmd.c +1 more+53 -30 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKonstantin AnanyevYuan Peng
SeriesAced-by T-b
1/2A-b T-b
2/2A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] app/testpmd: fix invalid rxq and txq nubmer settings

If an invlaid number of RX or TX queues is configured from testpmd command like "port config all rxq number" or "port config all txq number" or from --rxq and --txq in the command to start testpmd. The global variable nb_rxq or nb_txq is updated by the invalid input. This can cause testpmd crash. For example, if the maximum number of RX or TX queues is 4, testpmd will crash after running commands "port config all rxq 5", "port config all txq 5" and "start" in sequence.
With these 2 patches, if an invalid input is detected, it is refused and testpmd keeps last correct values of nb_rxq and nb_txq.

Fixes ce8d561418d4 ("app/testpmd: add port configuration settings")

---
v6: same as v5. only correct patchwork mail format error
for maintainer's convenience.

v5: fix building failure with -Werror=maybe-uninitialized by gcc 5.3.1
fix typo error

v4: update git log message and rename 2 new added functions

v3: follow the guide from Konstantin to use functions to check
input rxq and txq instead of usage of new added global variables.

v2: fix a bug in v1

Wei Dai (2):
app/testpmd: fix invalid rxq number setting
app/testpmd: fix invalid txq number setting

 app/test-pmd/cmdline.c    |  4 +++
 app/test-pmd/parameters.c | 13 +++----
 app/test-pmd/testpmd.c    | 92 +++++++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h    |  5 +++
 4 files changed, 108 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.5