[dpdk-dev] ip_pipeline: add check on nic's rxq and txq

Message ID 1441630435-14158-1-git-send-email-jasvinder.singh@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Jasvinder Singh Sept. 7, 2015, 12:53 p.m. UTC
  This patch checks that rx queue and tx queue of each link
specified in ip pipeline configuration file are used.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 examples/ip_pipeline/config_check.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Cristian Dumitrescu Sept. 7, 2015, 1:29 p.m. UTC | #1
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Monday, September 7, 2015 3:54 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian
> Subject: [PATCH] ip_pipeline: add check on nic's rxq and txq
> 
> This patch checks that rx queue and tx queue of each link
> specified in ip pipeline configuration file are used.
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
  

Patch

diff --git a/examples/ip_pipeline/config_check.c b/examples/ip_pipeline/config_check.c
index 07f4c8b..b843926 100644
--- a/examples/ip_pipeline/config_check.c
+++ b/examples/ip_pipeline/config_check.c
@@ -95,6 +95,8 @@  check_links(struct app_params *app)
 				"%s RXQs are not contiguous (A)\n", link->name);
 
 		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);
@@ -112,7 +114,9 @@  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;