What's the status of fork() support in libibverbs?

Is it still same as what described in https://www.csm.ornl.gov/workshops/openshmem2014/documents/presentations_and_tutorials/Tutorials/Verbs%20programming%20t… https://www.csm.ornl.gov/workshops/openshmem2014/documents/presentations_and_tutorials/Tutorials/Verbs%20programming%20tutorial-final.pdf (as listed below) ? Or is there some improvement (less constraint) to support fork() since then?

  • When possible, avoid using fork()

• fork() or other system calls that call fork(), for example: system(), popen(), etc.

  • If fork() must be used, the next rules should be followed:

• Prepare libibverbs to work with fork():

  • Call the verb ibv_fork_init()

or

Setting the environment variables RDMAV_FORK_SAFE or IBV_FORK_SAFE

  • This will allocate internal structures in way which is more “fork()”-friendly

• RDMA should be used only in the parent process

• Child process should call immediately exec*() or exit()

• If huge pages are used, set the environment variable RDMAV_HUGEPAGES_SAFE as well

  • Warning: Not following those rules may lead to data corruption or segmentation fault!

Check this link in addition to your

https://www.mellanox.com/related-docs/prod_software/RDMA_Aware_Programming_user_manual.pdf https://www.mellanox.com/related-docs/prod_software/RDMA_Aware_Programming_user_manual.pdf

You also might check this subject on the RDMA developers mailing list - linux-rdma (Majordomo Lists at VGER.KERNEL.ORG Majordomo Lists at VGER.KERNEL.ORG ) . The subject is not unique to the Mellanox hardware and linux-rdma is a better place to check