372046933 commented on code in PR #2252:
URL: https://github.com/apache/brpc/pull/2252#discussion_r1199549244


##########
src/brpc/rdma/rdma_helper.cpp:
##########
@@ -397,53 +449,43 @@ static void GlobalRdmaInitializeOrDieImpl() {
     }
 
     // Find the first active port
-    int available_devices = 0;
+    int available_devices = NumAvailableDevices();
     g_port_num = FLAGS_rdma_port;
-    auto context_deleter = [](ibv_context* p) { IbvCloseDevice(p); };
     for (int i = 0; i < num; ++i) {
-        std::unique_ptr<ibv_context, decltype(context_deleter)> context(
-            IbvOpenDevice(g_devices[i]), context_deleter);
+        std::unique_ptr<ibv_context, IbvContextDeleter> context{

Review Comment:
   The last commit 
https://github.com/apache/brpc/pull/2252/commits/281b279479c32aefc0f47eb92b9f8b24c3a293c5
 updates some comments only.



-- 
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]

Reply via email to