app/test: shorten execution time
[dpdk.git] / examples / ip_pipeline / config_check.c
index 8052bc4..fd9ff49 100644 (file)
@@ -59,12 +59,16 @@ check_mempools(struct app_params *app)
 static void
 check_links(struct app_params *app)
 {
-       uint32_t n_links_port_mask = __builtin_popcountll(app->port_mask);
        uint32_t i;
 
        /* Check that number of links matches the port mask */
-       APP_CHECK((app->n_links == n_links_port_mask),
-               "Not enough links provided in the PORT_MASK\n");
+       if (app->port_mask) {
+               uint32_t n_links_port_mask =
+                       __builtin_popcountll(app->port_mask);
+
+               APP_CHECK((app->n_links == n_links_port_mask),
+                       "Not enough links provided in the PORT_MASK\n");
+       }
 
        for (i = 0; i < app->n_links; i++) {
                struct app_link_params *link = &app->link_params[i];
@@ -76,8 +80,8 @@ check_links(struct app_params *app)
                rxq_max = 0;
                if (link->arp_q > rxq_max)
                        rxq_max = link->arp_q;
-               if (link->tcp_syn_local_q > rxq_max)
-                       rxq_max = link->tcp_syn_local_q;
+               if (link->tcp_syn_q > rxq_max)
+                       rxq_max = link->tcp_syn_q;
                if (link->ip_local_q > rxq_max)
                        rxq_max = link->ip_local_q;
                if (link->tcp_local_q > rxq_max)
@@ -89,7 +93,7 @@ check_links(struct app_params *app)
 
                for (i = 1; i <= rxq_max; i++)
                        APP_CHECK(((link->arp_q == i) ||
-                               (link->tcp_syn_local_q == i) ||
+                               (link->tcp_syn_q == i) ||
                                (link->ip_local_q == i) ||
                                (link->tcp_local_q == i) ||
                                (link->udp_local_q == i) ||
@@ -98,6 +102,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 +121,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;