1IBV_IS_FORK_INITIALIZED(3L)ibibverbs Programmer’s ManuaIlBV_IS_FORK_INITIALIZED(3)
2
3
4
6 ibv_is_fork_initialized - check if fork support (ibv_fork_init) is en‐
7 abled
8
10 #include <infiniband/verbs.h>
11
12 enum ibv_fork_status {
13 IBV_FORK_DISABLED,
14 IBV_FORK_ENABLED,
15 IBV_FORK_UNNEEDED,
16 };
17
18 enum ibv_fork_status ibv_is_fork_initialized(void);
19
21 ibv_is_fork_initialized() checks whether libibverbs fork() support was
22 enabled through the ibv_fork_init() verb.
23
25 ibv_is_fork_initialized() returns IBV_FORK_DISABLED if fork support is
26 disabled, or IBV_FORK_ENABLED if enabled. IBV_FORK_UNNEEDED return
27 value indicates that the kernel copies DMA pages on fork, hence a call
28 to ibv_fork_init() is unneeded.
29
31 The IBV_FORK_UNNEEDED return value takes precedence over IBV_FORK_DIS‐
32 ABLED and IBV_FORK_ENABLED. If the kernel supports copy-on-fork for
33 DMA pages then IBV_FORK_UNNEEDED will be returned regardless of whether
34 ibv_fork_init() was called or not.
35
37 fork(2), ibv_fork_init(3)
38
40 Gal Pressman <galpress@amazon.com>
41
42
43
44libibverbs 2020-10-09 IBV_IS_FORK_INITIALIZED(3)