Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ jobs:
- name: Build shared libraries using CMake
run: |
mkdir build-shared && cd build-shared
cmake -DENABLE_RDMA=ON ..
cmake -DENABLE_RDMA=ON -DCMAKE_BUILD_TYPE=Release ..
sudo make install
- name: Build static libraries using CMake
run: |
mkdir build-static && cd build-static
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_RDMA=ON ..
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_RDMA=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
sudo make install
- name: Build using Makefile
run: |
Expand Down
8 changes: 4 additions & 4 deletions src/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,8 +1035,7 @@ static int valkeyRdmaCM(valkeyContext *c, long timeout) {

static int valkeyRdmaWaitConn(valkeyContext *c, long timeout) {
long now, end;
RdmaContext *ctx = c->privctx;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declaring a temporary variable in a separate line, casting it from a private type pointer, and then accessing it — to me, the original style is more readable. However, I don’t object to the current style either.

Otherwise, LGTM.

struct epoll_event events[1], *event;
struct epoll_event events[1];
int nevent;

assert(timeout >= 0);
Expand All @@ -1062,8 +1061,9 @@ static int valkeyRdmaWaitConn(valkeyContext *c, long timeout) {
return VALKEY_ERR;
}

event = &events[0];
assert(event->data.fd == ctx->cm_channel->fd); /* CM channel fd wakes up only now */
/* Only the CM channel fd is polled here */
assert(events[0].data.fd == ((RdmaContext *)c->privctx)->cm_channel->fd);

if (valkeyRdmaCM(c, end - now) == VALKEY_ERR) {
return VALKEY_ERR;
}
Expand Down
Loading