Fix pointer-to-int-cast warnings for RDMA address handling#3186
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3186 +/- ##
============================================
- Coverage 74.94% 0 -74.95%
============================================
Files 129 0 -129
Lines 71328 0 -71328
============================================
- Hits 53458 0 -53458
+ Misses 17870 0 -17870 🚀 New features to boost your workflow:
|
someone else already fixed it (valkey-io/libvalkey#252) though I didn't noticed it before, however it's not included by the latest maybe it would be better to upgrade the whole |
Yes, we always upgrade the whole Hi @bjosv |
This patch fixes the server side Valkey Over RDMA for ARM, so it could be merged. After upgrading libvalkey, we can close this issue. |
|
I'll remove the edits on libvalkey, and awaiting for a new libvalkey release |
Signed-off-by: stydxm <stydxm@outlook.com>
|
Merged, thanks. |
Thanks for the headsup. We will tag the latest libvalkey and then I'll bump it in the valkey repo. |
…#3186) When building Valkey 9 for openSUSE Tumbleweed with RDMA enabled there are some build failures for the i586 and armv7l arches (with `-Werror`): ``` [ 45s] cc -std=c99 -pedantic -O3 -fPIC -fvisibility=hidden -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -Wall -Wextra -pedantic -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -Werror -g -ggdb -Iinclude/valkey -I../../src/ -I../../src/ -MMD -MP -c src/rdma.c -o obj/rdma.o [ 45s] src/rdma.c: In function ‘rdmaPostRecv’: [ 45s] src/rdma.c:164:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 164 | recv_wr.wr_id = (uint64_t)cmd; [ 45s] | ^ [ 45s] src/rdma.c: In function ‘rdmaSendCommand’: [ 45s] src/rdma.c:305:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 305 | send_wr.wr_id = (uint64_t)_cmd; [ 45s] | ^ [ 45s] In file included from /usr/include/sys/types.h:176, [ 45s] from include/valkey/valkey.h:42, [ 45s] from include/valkey/async.h:34, [ 45s] from src/rdma.c:36: [ 45s] src/rdma.c: In function ‘connRdmaRegisterRx’: [ 45s] src/rdma.c:323:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 323 | cmd.memory.addr = htobe64((uint64_t)ctx->recv_buf); [ 45s] | ^ [ 45s] src/rdma.c: In function ‘connRdmaHandleRecv’: [ 45s] src/rdma.c:341:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] [ 45s] 341 | ctx->tx_addr = (char *)be64toh(cmd->memory.addr); [ 45s] | ^ [ 45s] cc1: all warnings being treated as errors [ 45s] make[3]: *** [Makefile:228: obj/rdma.o] Error 1 ``` Fixes valkey-io#3183 Signed-off-by: stydxm <stydxm@outlook.com>
…#3186) When building Valkey 9 for openSUSE Tumbleweed with RDMA enabled there are some build failures for the i586 and armv7l arches (with `-Werror`): ``` [ 45s] cc -std=c99 -pedantic -O3 -fPIC -fvisibility=hidden -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -Wall -Wextra -pedantic -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -Werror -g -ggdb -Iinclude/valkey -I../../src/ -I../../src/ -MMD -MP -c src/rdma.c -o obj/rdma.o [ 45s] src/rdma.c: In function ‘rdmaPostRecv’: [ 45s] src/rdma.c:164:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 164 | recv_wr.wr_id = (uint64_t)cmd; [ 45s] | ^ [ 45s] src/rdma.c: In function ‘rdmaSendCommand’: [ 45s] src/rdma.c:305:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 305 | send_wr.wr_id = (uint64_t)_cmd; [ 45s] | ^ [ 45s] In file included from /usr/include/sys/types.h:176, [ 45s] from include/valkey/valkey.h:42, [ 45s] from include/valkey/async.h:34, [ 45s] from src/rdma.c:36: [ 45s] src/rdma.c: In function ‘connRdmaRegisterRx’: [ 45s] src/rdma.c:323:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [ 45s] 323 | cmd.memory.addr = htobe64((uint64_t)ctx->recv_buf); [ 45s] | ^ [ 45s] src/rdma.c: In function ‘connRdmaHandleRecv’: [ 45s] src/rdma.c:341:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] [ 45s] 341 | ctx->tx_addr = (char *)be64toh(cmd->memory.addr); [ 45s] | ^ [ 45s] cc1: all warnings being treated as errors [ 45s] make[3]: *** [Makefile:228: obj/rdma.o] Error 1 ``` Fixes valkey-io#3183 Signed-off-by: stydxm <stydxm@outlook.com> Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
Fixes #3183
compiled (with
-DBUILD_RDMA=yes) and tested (./runtest-rdma) on an armv7l Debian12 Docker container