chenBright commented on code in PR #3304:
URL: https://github.com/apache/brpc/pull/3304#discussion_r3263804244
##########
src/brpc/rdma/rdma_helper.cpp:
##########
@@ -701,6 +701,36 @@ bool SupportedByRdma(std::string protocol) {
return false;
}
+uint16_t detect_mtu(struct ibv_context* ctx, int port_num) {
+ struct ibv_port_attr port_attr;
+
+ if (ibv_query_port(ctx, port_num, &port_attr)) {
Review Comment:
Only one MTU type detection is needed in GlobalRdmaInitializeOrDie(). It
doesn't need to be detected on every handshake.
##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -115,6 +117,7 @@ struct HelloMessage {
uint32_t block_size;
uint16_t sq_size;
uint16_t rq_size;
+ uint16_t mtu_type;
Review Comment:
To maintain forward compatibility with the handshake protocol, mtu_type
needs to be added to the end.
--
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]