[mvapich-discuss] [PATCH] Fix rate type for mlx5 device
Subramoni, Hari
subramoni.1 at osu.edu
Wed Sep 16 17:17:54 EDT 2020
Hi, Honggang.
Thank you for the patch. I appreciate it. I will take it into the code with an acknowledgement to you.
Best,
Hari.
-----Original Message-----
From: Honggang LI <honli at redhat.com>
Sent: Tuesday, September 15, 2020 5:02 AM
To: mvapich-discuss at cse.ohio-state.edu <mvapich-discuss at mailman.cse.ohio-state.edu>
Cc: Subramoni, Hari <subramoni.1 at osu.edu>
Subject: [PATCH] Fix rate type for mlx5 device
From: Honggang Li <honli at redhat.com>
The function 'mv2_get_hca_type' sets variable 'rate' with default '0'.
When the environment variable 'MV2_USE_RoCE' was set, no matter it set to '0' or '1', the function 'get_rate' will be skipped. As result, the 'hca_type' has been set with default 'MV2_HCA_MLX_CX_SDR' for mlx5 device.
Signed-off-by: Honggang Li <honli at redhat.com>
---
.../common/src/detect/hca/mv2_hca_detect.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/mpid/ch3/channels/common/src/detect/hca/mv2_hca_detect.c b/src/mpid/ch3/channels/common/src/detect/hca/mv2_hca_detect.c
index 1356fae8ba55..023d72e034c6 100644
--- a/src/mpid/ch3/channels/common/src/detect/hca/mv2_hca_detect.c
+++ b/src/mpid/ch3/channels/common/src/detect/hca/mv2_hca_detect.c
@@ -478,14 +478,12 @@ mv2_hca_type mv2_get_hca_type( struct ibv_device *dev )
return hca_type;
}
- if (!getenv("MV2_USE_RoCE")) {
- rate = get_rate(&umad_ca);
- if (!rate) {
- umad_release_ca(&umad_ca);
- umad_done();
- last_type = hca_type;
- return hca_type;
- }
+ rate = get_rate(&umad_ca);
+ if (!rate) {
+ umad_release_ca(&umad_ca);
+ umad_done();
+ last_type = hca_type;
+ return hca_type;
}
umad_release_ca(&umad_ca);
--
2.25.4
More information about the mvapich-discuss
mailing list