Skip to content

Commit 0c5918d

Browse files
authored
Merge pull request #352 from mrgolin/fix-reg-mr-fallback
Fix MR registration for providers which don't support extended
2 parents b8d56ae + 78e6a35 commit 0c5918d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/perftest_resources.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,8 @@ static int register_memory_region(struct pingpong_context *ctx,
19021902

19031903
mr = register_func(ctx, user_param, qp_index, flags, dmabuf_fd, dmabuf_offset);
19041904

1905-
if (!mr && errno == EPROTONOSUPPORT && register_func != register_mr) {
1905+
if (!mr && (errno == EOPNOTSUPP || errno == EPROTONOSUPPORT) &&
1906+
register_func != register_mr) {
19061907
/* If extended registration is not supported, fall back to standard registration */
19071908
register_func = register_mr;
19081909
mr = register_func(ctx, user_param, qp_index, flags, dmabuf_fd, dmabuf_offset);

0 commit comments

Comments
 (0)