diff options
author | Alex Williams <alex.williams@ni.com> | 2018-08-31 11:52:04 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-15 17:14:57 -0800 |
commit | e2cde21ceb7497dcc1ef25156afa6472fe64f009 (patch) | |
tree | 43def88d4d1e3950236dad44812d27f08ee9e232 /host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c | |
parent | 853c2a2263e54c1e1fd9562b479a17122a6d9b37 (diff) | |
download | uhd-e2cde21ceb7497dcc1ef25156afa6472fe64f009.tar.gz uhd-e2cde21ceb7497dcc1ef25156afa6472fe64f009.tar.bz2 uhd-e2cde21ceb7497dcc1ef25156afa6472fe64f009.zip |
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.
Diffstat (limited to 'host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c')
-rw-r--r-- | host/lib/transport/uhd-dpdk/uhd_dpdk_fops.c | 6 |
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); |