If process_dispatch_ring() has data packet to be processed and it is considered non-idle state.

This commit is contained in:
fengbojiang 2021-09-02 12:09:09 +08:00
parent 215f56e7e8
commit 391d4989fc
1 changed files with 2 additions and 2 deletions

View File

@ -1402,7 +1402,7 @@ process_dispatch_ring(uint16_t port_id, uint16_t queue_id,
process_packets(port_id, queue_id, pkts_burst, nb_rb, ctx, 1);
}
return 0;
return nb_rb;
}
static inline void
@ -1884,7 +1884,7 @@ main_loop(void *arg)
}
#endif
process_dispatch_ring(port_id, queue_id, pkts_burst, ctx);
idle &= !process_dispatch_ring(port_id, queue_id, pkts_burst, ctx);
nb_rx = rte_eth_rx_burst(port_id, queue_id, pkts_burst,
MAX_PKT_BURST);