Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nsdperf.C
Original file line number Diff line number Diff line change
Expand Up @@ -8153,6 +8153,11 @@ int RdmaAsync::threadBody()
// If device table size changes, rebuild the poll list
if (rdmaDevTab.size() != lastDevCount)
{
// The async fd is non-blocking; stale duplicate entries can make one
// event look readable more than once and turn the second drain into EAGAIN.
rdevList.clear();
fdList.clear();

rdevList.reserve(rdmaDevTab.size());
fdList.reserve(rdmaDevTab.size());
pfd.events = POLLIN;
Expand All @@ -8176,6 +8181,7 @@ int RdmaAsync::threadBody()
rdevList.push_back(NULL);
pfd.fd = asyncSocks[0];
fdList.push_back(pfd);
lastDevCount = rdmaDevTab.size();
}

// Poll for an event on one of the RDMA devices
Expand Down