Skip to content

Commit b8d56ae

Browse files
authored
Merge pull request #341 from dot-lu/master
add inline support for nebula-matrix rdma nic
2 parents 8c7480f + 427479d commit b8d56ae

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/perftest_parameters.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,18 @@ enum ctx_device ib_dev_name(struct ibv_context *context)
21502150
case 0x1023 : dev_fname = YUNSILICON_DIAMOND_NEXT; break;
21512151
default : dev_fname = YUNSILICON_ANDES; break;
21522152
}
2153+
} else if (attr.vendor_id == 0x1f0f) {
2154+
switch (attr.vendor_part_id) {
2155+
case 0x340b : dev_fname = NBL_LEONIS; break; /* leonis snic v3r1 pf */
2156+
case 0x3413 : dev_fname = NBL_LEONIS; break; /* leonis snic v3r1 vf nbl_dev */
2157+
case 0x1047 : dev_fname = NBL_DF200; break; /* DF200 */
2158+
case 0x1226 : dev_fname = NBL_DF200; break; /* DF200 */
2159+
case 0x1227 : dev_fname = NBL_DF200; break; /* DF200 */
2160+
case 0x3500 : dev_fname = NBL_DRACO; break; /* draco use same inline size with df200 */
2161+
case 0x3501 : dev_fname = NBL_DRACO; break;
2162+
case 0x1610 : dev_fname = NBL_RNIC400; break; /* RNIC400 */
2163+
default : dev_fname = NBL_LEONIS;
2164+
}
21532165
} else {
21542166

21552167
//coverity[uninit_use]
@@ -2466,6 +2478,17 @@ static void ctx_set_max_inline(struct ibv_context *context,struct perftest_param
24662478
user_param->inline_size = 48;
24672479
else if (current_dev == INTEL_GEN2)
24682480
user_param->inline_size = 101;
2481+
else if (current_dev == NBL_LEONIS) {
2482+
if (user_param->connection_type == UD)
2483+
user_param->inline_size = 0;
2484+
else
2485+
user_param->inline_size = 48;
2486+
} else if (current_dev == NBL_DF200 || current_dev == NBL_DRACO || current_dev == NBL_RNIC400) {
2487+
if (user_param->connection_type == UD)
2488+
user_param->inline_size = 434;
2489+
else
2490+
user_param->inline_size = 465;
2491+
}
24692492

24702493
} else {
24712494
user_param->inline_size = 0;

src/perftest_parameters.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ enum ctx_device {
391391
YUNSILICON_ANDES = 35,
392392
YUNSILICON_DIAMOND = 36,
393393
YUNSILICON_DIAMOND_NEXT = 37,
394+
NBL_LEONIS = 38,
395+
NBL_DRACO = 39,
396+
NBL_DF200 = 40,
397+
NBL_RNIC400 = 41,
394398
};
395399

396400
/* Units for rate limiter */

0 commit comments

Comments
 (0)