Skip to content

Commit 9600494

Browse files
authored
Merge pull request #331 from tianx666/master
add Yunsilicon dev types
2 parents ce4f20c + e503581 commit 9600494

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
@@ -2068,6 +2068,12 @@ enum ctx_device ib_dev_name(struct ibv_context *context)
20682068
case 0x1000: dev_fname = TCU1; break;
20692069
default : dev_fname = UNKNOWN; break;
20702070
}
2071+
} else if (attr.vendor_id == 0x1f67) {
2072+
switch (attr.vendor_part_id) {
2073+
case 0x1021 : dev_fname = YUNSILICON_DIAMOND; break;
2074+
case 0x1023 : dev_fname = YUNSILICON_DIAMOND_NEXT; break;
2075+
default : dev_fname = YUNSILICON_ANDES; break;
2076+
}
20712077
} else {
20722078

20732079
//coverity[uninit_use]

src/perftest_parameters.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ enum ctx_device {
388388
INTEL_GEN2 = 32,
389389
CONNECTX9 = 33,
390390
TCU1 = 34,
391+
YUNSILICON_ANDES = 35,
392+
YUNSILICON_DIAMOND = 36,
393+
YUNSILICON_DIAMOND_NEXT = 37,
391394
};
392395

393396
/* 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)