net/pcap: set live interface as non-blocking
PATCH 1/1 net/pcap: set live interface as non-blocking
The DPDK PMD's are supposed to be non-blocking and poll for packets. Configure PCAP to do this on live interface.
Bugzilla ID: 1526
Reported-by Ofer Dagan <[email protected]>
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/pcap/pcap_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/pcap/pcap_ethdev.c +6 -0
@@ -522,6 +522,12 @@ open_iface_live(const char *iface, pcap_t **pcap) {return -1 ; } +if (pcap_setnonblock (*pcap,1 , errbuf)) { +PMD_LOG (ERR ,"Couldn't set non-blocking on %s: %s" , iface, errbuf); +pcap_close (*pcap); +return -1 ; + } +return 0 ; }
Signature · 1 line
2.43.0
Quoted 7 lines · Stephen Hemminger
The DPDK PMD's are supposed to be non-blocking and poll for packets. Configure PCAP to do this on live interface.
Bugzilla ID: 1526
Reported-by Ofer Dagan <[email protected]>Signed-off-by Stephen Hemminger <[email protected]>
Bugzilla ID: 1526
Fixes: 4c173302c307 ("pcap: add new driver")
Cc: [email protected]Acked-by Ferruh Yigit <[email protected]>
Applied to dpdk-next-net/main, thanks.