event/octeontx2: enhance Tx path cache locality
[dpdk.git] / examples / eventdev_pipeline / main.c
index 2195826..823f8b5 100644 (file)
@@ -81,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++;
                        }
                }
@@ -232,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++;
@@ -296,7 +296,8 @@ signal_handler(int signum)
                RTE_ETH_FOREACH_DEV(portid) {
                        rte_event_eth_rx_adapter_stop(portid);
                        rte_event_eth_tx_adapter_stop(portid);
-                       rte_eth_dev_stop(portid);
+                       if (rte_eth_dev_stop(portid) < 0)
+                               printf("Failed to stop port %u", portid);
                }
 
                rte_eal_mp_wait_lcore();
@@ -395,7 +396,7 @@ main(int argc, char **argv)
        }
 
        int worker_idx = 0;
-       RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+       RTE_LCORE_FOREACH_WORKER(lcore_id) {
                if (lcore_id >= MAX_NUM_CORE)
                        break;