Skip to content

Commit

Permalink
libibverbs: ignore IBV_FORK_SAFE et.al. when kernel has fork support
Browse files Browse the repository at this point in the history
ibv_fork_init will now check if IBV_FORK_UNNEEDED is true, and if so
will skip initialization of mm_root.  Environment variables like
IBV_FORK_SAFE and UCX_IB_FORK_INIT are silently ignored when the
kernel has the necessary fork support.

Signed-off-by: Kevan Rehm <[email protected]>
  • Loading branch information
krehm committed Feb 20, 2024
1 parent 40fcc1c commit 5a11b68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libibverbs/memory.c
Expand Up @@ -134,6 +134,9 @@ int ibv_fork_init(void)
if (mm_root)
return 0;

if (ibv_is_fork_initialized() == IBV_FORK_UNNEEDED)
return 0;

if (too_late)
return EINVAL;

Expand Down

0 comments on commit 5a11b68

Please sign in to comment.