examples: work only on defined lcores
[dpdk.git] / examples / l3fwd-vf / main.c
index 22bc388..79c30a8 100644 (file)
@@ -495,7 +495,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, lookup_struct_t * l3fwd
 }
 
 /* main processing loop */
-static __attribute__((noreturn)) int
+static int
 main_loop(__attribute__((unused)) void *dummy)
 {
        struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
@@ -513,7 +513,7 @@ main_loop(__attribute__((unused)) void *dummy)
 
        if (qconf->n_rx_queue == 0) {
                RTE_LOG(INFO, L3FWD, "lcore %u has nothing to do\n", lcore_id);
-               while(1);
+               return 0;
        }
 
        RTE_LOG(INFO, L3FWD, "entering main loop on lcore %u\n", lcore_id);