X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Feventdev_pipeline%2Fmain.c;h=4ac5821539f405a8b4017f6e9a15aa9d628fc29c;hb=e0194feb322c;hp=d3ff1bbe4f94cc94d0d5b3320a4f7c49f09b6666;hpb=5392ebc0e164a139ab9ff93d0c8c1a437a56c90a;p=dpdk.git diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index d3ff1bbe4f..4ac5821539 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -10,6 +10,8 @@ #include "pipeline_common.h" +struct fastpath_data *fdata; + struct config_data cdata = { .num_packets = (1L << 25), /* do ~32M packets */ .num_fids = 512, @@ -79,7 +81,7 @@ parse_coremask(const char *coremask) val = xdigit2val(c); for (j = 0; j < BITS_HEX && idx < MAX_NUM_CORE; j++, idx++) { if ((1 << j) & val) { - mask |= (1UL << idx); + mask |= (1ULL << idx); count++; } } @@ -230,10 +232,10 @@ parse_app_args(int argc, char **argv) usage(); for (i = 0; i < MAX_NUM_CORE; i++) { - fdata->rx_core[i] = !!(rx_lcore_mask & (1UL << i)); - fdata->tx_core[i] = !!(tx_lcore_mask & (1UL << i)); - fdata->sched_core[i] = !!(sched_lcore_mask & (1UL << i)); - fdata->worker_core[i] = !!(worker_lcore_mask & (1UL << i)); + fdata->rx_core[i] = !!(rx_lcore_mask & (1ULL << i)); + fdata->tx_core[i] = !!(tx_lcore_mask & (1ULL << i)); + fdata->sched_core[i] = !!(sched_lcore_mask & (1ULL << i)); + fdata->worker_core[i] = !!(worker_lcore_mask & (1ULL << i)); if (fdata->worker_core[i]) cdata.num_workers++; @@ -299,12 +301,6 @@ signal_handler(int signum) rte_eal_mp_wait_lcore(); - RTE_ETH_FOREACH_DEV(portid) { - rte_eth_dev_close(portid); - } - - rte_event_dev_stop(0); - rte_event_dev_close(0); } if (signum == SIGTSTP) rte_event_dev_dump(0, stdout); @@ -467,5 +463,14 @@ main(int argc, char **argv) } + RTE_ETH_FOREACH_DEV(portid) { + rte_eth_dev_close(portid); + } + + rte_event_dev_stop(0); + rte_event_dev_close(0); + + rte_eal_cleanup(); + return 0; }