Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDMA builtin support #1209

Open
wants to merge 4 commits into
base: unstable
Choose a base branch
from
Open

Conversation

pizhenwei
Copy link
Contributor

Hi,

There are several patches in this PR:

  • Abstract set/rewrite config bind option: bind option is a special config, socket and tls are using the same one. However RDMA uses the similar style but different one. Use a bit abstract work to make it flexible for both socket and RDMA. Even for QUIC in the future.
  • Introduce closeListener for connection type: closing socket by a simple syscall would be fine, RDMA has complex logic. Introduce connection type specific close listener method.
  • RDMA: Use valkey.conf style instead of module parameters: use --rdma-bind and --rdma-port style instead of module parameters.
  • RDMA: Support builtin: support make BUILD_RDMA=yes. module style is still kept for now. Once module style is decided to drop, I volunteer to do it for TLS and RDMA together.

Each patch has independent functionality, also been tested by CI and local commands, so request no-squash merge for this PR.

Originally, special config 'bind' is used for socket and TLS, however
multiple addresses handling is also workable for RDMA(QUIC in the
future). Abstract bind option as helper functions to apply more
connection types.

rewriteConfigBindOption is a local function, declare it as 'static'
function.

Signed-off-by: zhenwei pi <[email protected]>
Socket family use close() syscall to close listener, however RDMA has
another style. Use an abstract function handler instead of hard code
syscall style.

Signed-off-by: zhenwei pi <[email protected]>
Move 4 parameters from valkey-rdma.so to valkey-server, keep RDMA
listener similar to TCP/TLS. Also prepare to build Valkey Over RDMA
into builtin.

Signed-off-by: zhenwei pi <[email protected]>
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 55.05618% with 40 lines in your changes missing coverage. Please review.

Project coverage is 70.52%. Comparing base (285064b) to head (047c7ec).
Report is 19 commits behind head on unstable.

Files with missing lines Patch % Lines
src/config.c 51.66% 29 Missing ⚠️
src/server.c 27.27% 8 Missing ⚠️
src/unix.c 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1209      +/-   ##
============================================
- Coverage     70.72%   70.52%   -0.20%     
============================================
  Files           114      115       +1     
  Lines         63090    63152      +62     
============================================
- Hits          44621    44540      -81     
- Misses        18469    18612     +143     
Files with missing lines Coverage Δ
src/connection.c 78.82% <100.00%> (+0.25%) ⬆️
src/connection.h 87.64% <100.00%> (+0.43%) ⬆️
src/rdma.c 100.00% <100.00%> (ø)
src/server.h 100.00% <ø> (ø)
src/socket.c 91.52% <100.00%> (+0.40%) ⬆️
src/tls.c 100.00% <ø> (ø)
src/unix.c 73.49% <0.00%> (-2.76%) ⬇️
src/server.c 88.50% <27.27%> (-0.25%) ⬇️
src/config.c 77.65% <51.66%> (-1.19%) ⬇️

... and 15 files with indirect coverage changes

Support RDMA builtin and module together. To build a builtin version:
 $ make BUILD_RDMA=yes

Signed-off-by: zhenwei pi <[email protected]>
@zuiderkwast zuiderkwast added the major-decision-pending Major decision pending by TSC team label Nov 1, 2024
@zuiderkwast
Copy link
Contributor

@valkey-io/core-team Please approve.

This adds make BUILD_RDMA=yes, so just like TLS it can be built as a module or as builtin. Just like for TLS, the default is no.

It is a step towards official (non-experimantal) RDMA support.

I already merged the RDMA fork-safety here: #1244. It makes sure the server doesn't crash if we try to talk to an RDMA client from a forked child process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-pending Major decision pending by TSC team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants