Skip to content

Commit 9c3ab97

Browse files
committed
Perftest: fix mr registeration fallback
Check for the right errno that returned from the missing implementation. It tested EPROTONOSUPPORT but it should have tested for EOPNOTSUPP. Reviewed-by: Yonatan Nachum <[email protected]> Reviewed-by: Yossi Leybovich <[email protected]> Signed-off-by: Ramon Fried <[email protected]>
1 parent 943db6a commit 9c3ab97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/perftest_resources.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ static int register_memory_region(struct pingpong_context *ctx,
18321832

18331833
mr = register_func(ctx, user_param, qp_index, flags, dmabuf_fd, dmabuf_offset);
18341834

1835-
if (!mr && errno == EPROTONOSUPPORT && register_func != register_mr) {
1835+
if (!mr && errno == EOPNOTSUPP && register_func != register_mr) {
18361836
/* If extended registration is not supported, fall back to standard registration */
18371837
register_func = register_mr;
18381838
mr = register_func(ctx, user_param, qp_index, flags, dmabuf_fd, dmabuf_offset);

0 commit comments

Comments
 (0)