Skip to content

Commit 2af4110

Browse files
committed
add Yunsilicon dev types
The device IDs of some of our equipment overlap with Mellanox's, so we need to add vendor ID and dev types for proper differentiation. signed-off-by: [email protected]
1 parent f961e40 commit 2af4110

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/perftest_parameters.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,12 @@ enum ctx_device ib_dev_name(struct ibv_context *context)
20452045
case 5522 : dev_fname = INTEL_GEN2; break;
20462046
default : dev_fname = INTEL_GEN2; break;
20472047
}
2048+
} else if (attr.vendor_id == 0x1f67) {
2049+
switch (attr.vendor_part_id) {
2050+
case 0x1021 : dev_fname = YUNSILICON_DIAMOND; break;
2051+
case 0x1023 : dev_fname = YUNSILICON_DIAMOND_NEXT; break;
2052+
default : dev_fname = YUNSILICON_ANDES; break;
2053+
}
20482054
} else {
20492055

20502056
//coverity[uninit_use]

src/perftest_parameters.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ enum ctx_device {
387387
CONNECTX8 = 31,
388388
INTEL_GEN2 = 32,
389389
CONNECTX9 = 33,
390+
YUNSILICON_ANDES = 34,
391+
YUNSILICON_DIAMOND = 35,
392+
YUNSILICON_DIAMOND_NEXT = 36,
390393
};
391394

392395
/* Units for rate limiter */

src/perftest_resources.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,10 @@ int verify_params_with_device_context(struct ibv_context *context,
19351935
current_dev != BLUEFIELD2 &&
19361936
current_dev != BLUEFIELD3 &&
19371937
current_dev != EFA &&
1938-
current_dev != HNS)
1938+
current_dev != HNS &&
1939+
current_dev != YUNSILICON_ANDES &&
1940+
current_dev != YUNSILICON_DIAMOND&&
1941+
current_dev != YUNSILICON_DIAMOND_NEXT)
19391942
{
19401943
if (!user_param->use_old_post_send)
19411944
{

0 commit comments

Comments
 (0)