X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fconfig_check.c;h=fd9ff49569256bd99fa69d331c7e176814a352ae;hb=8dab4837012957b08d6770d307fa186bdced25d7;hp=8052bc40f8ce31e61e75163cf5fcd04a06b93851;hpb=ed0b2d0201598ce7364705045fd177849ae5a8c2;p=dpdk.git diff --git a/examples/ip_pipeline/config_check.c b/examples/ip_pipeline/config_check.c index 8052bc40f8..fd9ff49569 100644 --- a/examples/ip_pipeline/config_check.c +++ b/examples/ip_pipeline/config_check.c @@ -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;