aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c')
-rw-r--r--host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c b/host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c
index 3acc3d709..309e5e643 100644
--- a/host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c
+++ b/host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c
@@ -215,7 +215,7 @@ int uhd_dpdk_send(struct uhd_dpdk_socket *sock, struct rte_mbuf **bufs,
* Add blocking calls with timeout
*/
int uhd_dpdk_recv(struct uhd_dpdk_socket *sock, struct rte_mbuf **bufs,
- unsigned int num_bufs, unsigned int timeout)
+ unsigned int num_bufs, int timeout)
{
if (!sock || !bufs || !num_bufs)
return -EINVAL;
@@ -223,7 +223,9 @@ int uhd_dpdk_recv(struct uhd_dpdk_socket *sock, struct rte_mbuf **bufs,
return -EINVAL;
unsigned int num_rx = rte_ring_count(sock->rx_ring);
num_rx = (num_rx < num_bufs) ? num_rx : num_bufs;
- if (num_rx) {
+ /* if ((timeout > 0) && (num_rx != num_bufs)) {
+ // Wait for enough bufs
+ } else*/ if (num_rx) {
unsigned int avail = 0;
unsigned int status = rte_ring_dequeue_bulk(sock->rx_ring,
(void **) bufs, num_rx, &avail);