wwbmmm commented on code in PR #1999:
URL: https://github.com/apache/incubator-brpc/pull/1999#discussion_r1024737322
##########
src/brpc/rdma/rdma_helper.cpp:
##########
@@ -99,37 +99,41 @@ static ibv_device** g_devices = NULL;
static ibv_context* g_context = NULL;
static SocketId g_async_socket;
static ibv_pd* g_pd = NULL;
-static std::vector<ibv_mr*>* g_mrs = NULL;
+static std::vector<ibv_mr*>* g_mrs = NULL; // mr registered by brpc
Review Comment:
可以按照地址排列成有序集合,用二分法查找更快
##########
test/brpc_rdma_unittest.cpp:
##########
@@ -1061,7 +1068,10 @@ TEST_F(RdmaTest, server_miss_after_ack) {
usleep(100000);
ASSERT_EQ(rdma::RdmaEndpoint::ESTABLISHED, s->_rdma_ep->_state);
ASSERT_EQ(4, read(acc_fd, data, 4));
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
Review Comment:
(uint32_t*)data改成(uint32_t*)(void*)data应该就不会报错了
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]