From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jasvinde@ecsmtp.ir.intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 932D7FE5
 for <dev@dpdk.org>; Tue,  1 Dec 2015 13:24:02 +0100 (CET)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by orsmga103.jf.intel.com with ESMTP; 01 Dec 2015 04:24:01 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.20,368,1444719600"; 
   d="scan'208";a="5448271"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by fmsmga004.fm.intel.com with ESMTP; 01 Dec 2015 04:24:00 -0800
Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com
 [10.237.217.46])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 tB1CNxE5030217; Tue, 1 Dec 2015 12:23:59 GMT
Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1])
 by sivswdev02.ir.intel.com with ESMTP id tB1CNxIH013263;
 Tue, 1 Dec 2015 12:23:59 GMT
Received: (from jasvinde@localhost)
 by sivswdev02.ir.intel.com with  id tB1CNxgV013259;
 Tue, 1 Dec 2015 12:23:59 GMT
From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Date: Tue,  1 Dec 2015 12:23:59 +0000
Message-Id: <1448972639-13229-1-git-send-email-jasvinder.singh@intel.com>
X-Mailer: git-send-email 1.7.4.1
In-Reply-To: <1441630435-14158-1-git-send-email-jasvinder.singh@intel.com>
References: <1441630435-14158-1-git-send-email-jasvinder.singh@intel.com>
Subject: [dpdk-dev] [PATCH v2] ip_pipeline: add check on nic's rxq and txq
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2015 12:24:03 -0000

This patch checks that rx queue and tx queue of each
link specified in ip pipeline configuration file are
used.

*v2
- fix checkpatch warnings

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/config_check.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/ip_pipeline/config_check.c b/examples/ip_pipeline/config_check.c
index 8052bc4..1ff5763 100644
--- a/examples/ip_pipeline/config_check.c
+++ b/examples/ip_pipeline/config_check.c
@@ -98,6 +98,8 @@ check_links(struct app_params *app)
 
 		n_rxq = app_link_get_n_rxq(app, link);
 
+		APP_CHECK((n_rxq), "%s does not have any RXQ\n", link->name);
+
 		APP_CHECK((n_rxq == rxq_max + 1),
 			"%s RXQs are not contiguous (B)\n", link->name);
 
@@ -115,6 +117,8 @@ check_links(struct app_params *app)
 		/* Check that link RXQs are contiguous */
 		n_txq = app_link_get_n_txq(app, link);
 
+		APP_CHECK((n_txq),  "%s does not have any TXQ\n", link->name);
+
 		for (i = 0; i < n_txq; i++) {
 			char name[APP_PARAM_NAME_SIZE];
 			int pos;
-- 
2.5.0