-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix huge
rdma_recv_block_type no effect issue.
#2326
Conversation
src/brpc/rdma/rdma_endpoint.cpp
Outdated
static const size_t HELLO_MSG_LEN_MAX = 4096; | ||
static const size_t ACK_MSG_LEN = 4; | ||
static uint16_t g_rdma_hello_msg_len = 38; // In Byte | ||
static uint16_t g_rdma_hello_msg_len = 40; // In Byte | ||
static uint16_t g_rdma_hello_version = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we modify the hello message format, we should change the hello version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
huge
rdma_recv_block_type unavailable issue.huge
rdma_recv_block_type no effect issue.
test/brpc_rdma_unittest.cpp
Outdated
@@ -203,7 +203,7 @@ TEST_F(RdmaTest, client_hello_msg_invalid_magic_str) { | |||
Socket* s = GetSocketFromServer(0); | |||
ASSERT_EQ(rdma::RdmaEndpoint::UNINIT, s->_rdma_ep->_state); | |||
|
|||
uint8_t data[38]; | |||
uint8_t data[40]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use named constant instead of 40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
It has no effect for `huge` type of recv_block_size which is as large as 2^21, because the `block_size` variable is defined as type `uint16_t`, its maximum value is 2^16. So, change the type of `block_size` to `uint32_t` with relevant updates. Signed-off-by: Lijin Xiong <lijin.xiong@zstack.io>
LGTM |
It has no effect for
huge
type of recv_block_sizewhich is as large as 2^21, because the
block_size
variable is defined as type
uint16_t
, its maximumvalue is 2^16. So, change the type of
block_size
to
uint32_t
with relevant updates.What problem does this PR solve?
Issue Number:
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: