From: Moni Shoua <monis@xxxxxxxxxxxx> If MR is of type DM it doesn't make sense to ask MR to be on-demand. Fixes: f06164d5ea8d ("verbs: Add device memory support in rc_pingpong example") Signed-off-by: Moni Shoua <monis@xxxxxxxxxxxx> Reviewed-by: Guy Levi <guyle@xxxxxxxxxxxx> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- libibverbs/examples/rc_pingpong.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libibverbs/examples/rc_pingpong.c b/libibverbs/examples/rc_pingpong.c index 089d482..d4c5df5 100644 --- a/libibverbs/examples/rc_pingpong.c +++ b/libibverbs/examples/rc_pingpong.c @@ -856,6 +856,11 @@ int main(int argc, char *argv[]) return 1; } + if (use_odp && use_dm) { + fprintf(stderr, "DM memory region can't be on demand\n"); + return 1; + } + if (use_ts) { ts.comp_recv_max_time_delta = 0; ts.comp_recv_min_time_delta = 0xffffffff; -- 1.8.3.1