git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d96394e
)
net/af_xdp: use recvfrom instead of poll syscall
author
Ciara Loftus
<ciara.loftus@intel.com>
Wed, 10 Mar 2021 07:48:15 +0000
(07:48 +0000)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Wed, 10 Mar 2021 17:49:32 +0000
(18:49 +0100)
poll() is more expensive and requires more tuning
when used with the upcoming busy polling functionality.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_xdp/rte_eth_af_xdp.c
patch
|
blob
|
history
diff --git
a/drivers/net/af_xdp/rte_eth_af_xdp.c
b/drivers/net/af_xdp/rte_eth_af_xdp.c
index
be524e4
..
9c0e935
100644
(file)
--- a/
drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/
drivers/net/af_xdp/rte_eth_af_xdp.c
@@
-263,7
+263,8
@@
af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
if (nb_pkts == 0) {
#if defined(XDP_USE_NEED_WAKEUP)
if (xsk_ring_prod__needs_wakeup(fq))
- (void)poll(rxq->fds, 1, 1000);
+ recvfrom(xsk_socket__fd(rxq->xsk), NULL, 0,
+ MSG_DONTWAIT, NULL, NULL);
#endif
return 0;
@@
-335,7
+336,8
@@
af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
if (nb_pkts == 0) {
#if defined(XDP_USE_NEED_WAKEUP)
if (xsk_ring_prod__needs_wakeup(fq))
- (void)poll(rxq->fds, 1, 1000);
+ recvfrom(xsk_socket__fd(rxq->xsk), NULL, 0,
+ MSG_DONTWAIT, NULL, NULL);
#endif
return 0;
}