logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ibv_is_fork_initialized - check if fork support (ibv_fork_init) is enabled

Author

Gal Pressman galpress@amazon.com libibverbs 2020-10-09 IBV_IS_FORK_INITIALIZED(3)

Description

ibv_is_fork_initialized() checks whether libibverbs fork() support was enabled through the ibv_fork_init() verb.

Name

ibv_is_fork_initialized - check if fork support (ibv_fork_init) is enabled

Notes

The IBV_FORK_UNNEEDED return value takes precedence over IBV_FORK_DISABLED and IBV_FORK_ENABLED. If the kernel supports copy-on-fork for DMA pages then IBV_FORK_UNNEEDED will be returned regardless of whether ibv_fork_init() was called or not.

Return Value

ibv_is_fork_initialized() returns IBV_FORK_DISABLED if fork support is disabled, or IBV_FORK_ENABLED if enabled. IBV_FORK_UNNEEDED return value indicates that the kernel copies DMA pages on fork, hence a call to ibv_fork_init() is unneeded.

See Also

fork(2), ibv_fork_init(3)

Synopsis

#include <infiniband/verbs.h> enum ibv_fork_status { IBV_FORK_DISABLED, IBV_FORK_ENABLED, IBV_FORK_UNNEEDED, }; enum ibv_fork_status ibv_is_fork_initialized(void);

See Also