DPDK patches and discussions
 help / color / mirror / Atom feed
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org, qimaix.xiao@intel.com, ying.a.wang@intel.com,
	Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: add warning message when user sets rxq greater than txq
Date: Thu,  2 May 2019 16:44:46 +0100	[thread overview]
Message-ID: <20190502154446.35861-1-herakliusz.lipiec@intel.com> (raw)
Message-ID: <20190502154446.ZtAu1-nekA28Mcve-WwHbf-8NN8D-8zYG-YnjB8O-z0@z> (raw)

add a warning message when user sets port config all rxq value larger
than txq in interactive mode.

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
---
 app/test-pmd/cmdline.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5a10c5f38..94be3c6f8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1741,6 +1741,10 @@ cmd_config_rx_tx_parsed(void *parsed_result,
 		}
 		if (check_nb_rxq(res->value) != 0)
 			return;
+		if (res->value > nb_txq) {
+			printf("Warning: rxq should not be larger than txq\n");
+			return;
+		}
 		nb_rxq = res->value;
 	}
 	else if (!strcmp(res->name, "txq")) {
@@ -1750,6 +1754,10 @@ cmd_config_rx_tx_parsed(void *parsed_result,
 		}
 		if (check_nb_txq(res->value) != 0)
 			return;
+		if (res->value < nb_rxq) {
+			printf("Warning: rxq should not be larger than txq\n");
+			return;
+		}
 		nb_txq = res->value;
 	}
 	else if (!strcmp(res->name, "rxd")) {
-- 
2.17.2


             reply	other threads:[~2019-05-02 15:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 15:44 Herakliusz Lipiec [this message]
2019-05-02 15:44 ` Herakliusz Lipiec
2019-06-07 13:25 ` Iremonger, Bernard
2019-06-27 15:25 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190502154446.35861-1-herakliusz.lipiec@intel.com \
    --to=herakliusz.lipiec@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qimaix.xiao@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=ying.a.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).