From e2cde21ceb7497dcc1ef25156afa6472fe64f009 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Fri, 31 Aug 2018 11:52:04 -0700 Subject: uhd-dpdk: Add ARP responder, set MTU, and clean up API Set MTU of Ethernet ports: Some NICs (like the Mellanox ones) require this to work. Add ARP responder to uhd-dpdk. Clean up pending ARP request list when done: Threads waiting for an ARP request to complete would be woken up when the request completed, but they wouldn't get removed from the list of pending requests. This fixes the issue. --- host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c') 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); -- cgit v1.2.3