From patchwork Thu May 2 15:44:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herakliusz Lipiec X-Patchwork-Id: 53227 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 034F31B119; Thu, 2 May 2019 17:43:58 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 50823493D for ; Thu, 2 May 2019 17:43:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 08:43:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,422,1549958400"; d="scan'208";a="139317292" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.133]) by orsmga008.jf.intel.com with ESMTP; 02 May 2019 08:43:52 -0700 From: Herakliusz Lipiec To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org, qimaix.xiao@intel.com, ying.a.wang@intel.com, Herakliusz Lipiec Date: Thu, 2 May 2019 16:44:46 +0100 Message-Id: <20190502154446.35861-1-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.17.2 Subject: [dpdk-dev] [PATCH] app/testpmd: add warning message when user sets rxq greater than txq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" add a warning message when user sets port config all rxq value larger than txq in interactive mode. Signed-off-by: Herakliusz Lipiec Acked-by: Bernard Iremonger --- 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")) {