aboutsummaryrefslogtreecommitdiff
path: root/pcap-dpdk.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap-dpdk.c')
-rw-r--r--pcap-dpdk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcap-dpdk.c b/pcap-dpdk.c
index a3f8bd55..1fcbcd38 100644
--- a/pcap-dpdk.c
+++ b/pcap-dpdk.c
@@ -235,7 +235,8 @@ static int dpdk_read_with_timeout(pcap_t *p, uint16_t portid, uint16_t queueid,s
if (p->break_loop){
break;
}
- // sleep for a very short while, but do not block CPU.
+ // sleep for a very short while.
+ // block sleep is the only choice, since usleep() will impact performance dramatically.
rte_delay_us_block(DPDK_DEF_MIN_SLEEP_MS*1000);
sleep_ms += DPDK_DEF_MIN_SLEEP_MS;
}