Page MenuHomeFreeBSD

librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure
ClosedPublic

Authored by sreekanth.reddy_broadcom.com on Dec 26 2025, 10:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 16, 2:59 AM
Unknown Object (File)
Sun, Mar 15, 7:39 AM
Unknown Object (File)
Tue, Mar 10, 7:51 PM
Unknown Object (File)
Tue, Feb 17, 10:42 PM
Unknown Object (File)
Tue, Feb 17, 3:25 PM
Unknown Object (File)
Tue, Feb 17, 3:25 PM
Unknown Object (File)
Feb 10 2026, 9:22 AM
Unknown Object (File)
Feb 8 2026, 12:35 PM

Details

Summary

Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA
provider library.

This change:

  • Registers libbnxtre in src.libnames.mk so it is built and installed as part of the OFED libraries.
  • Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled.
  • Declares proper dependency mappings for bnxtre (ibverbs, pthread).
  • Introduces LIBBNXTREDIR for consistent object directory handling.
  • Updates libibverbs and librdmacm build rules to link against libbnxtre, enabling Broadcom RoCE device support at runtime.
  • libbnxtre library uses below constructor to register with the libibverbs, static attribute((constructor)) void bnxt_re_register_driver(void)

These updates ensure that applications using libibverbs and librdmacm can discover
and use Broadcom bnxt RDMA devices on FreeBSD.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I don't understand. This patch is already applied to the tree, commit 35dd53a9e1326.

I don't understand. This patch is already applied to the tree, commit 35dd53a9e1326.

Oh, it was reverted. It's the same diff as before as far as I can see, just the commit log message changed. It looks like Jessica's main question is, why exactly is it necessary to link libbnxtre:

> Secondly, this states some things, but I don’t see why this change
> follows from it. *Why* does it matter that ibv_devices and rping do not
> link against libbnxtre? If it builds, that means none of libbnxtre’s
> symbols were needed. Is there some magic dynamic registration going on
> in linker sets / constructors inside libbnxtre? Please explain the why
> in the commit message.

Sure enough, a peek at contrib/ofed/libbnxtre/main.c reveals a static __attribute__((constructor)) void bnxt_re_register_driver(void) which registers the driver with libibverbs. So I guess you should mention this mechanism. With that it looks ok to me.

I don't understand. This patch is already applied to the tree, commit 35dd53a9e1326.

Oh, it was reverted. It's the same diff as before as far as I can see, just the commit log message changed. It looks like Jessica's main question is, why exactly is it necessary to link libbnxtre:

> Secondly, this states some things, but I don’t see why this change
> follows from it. *Why* does it matter that ibv_devices and rping do not
> link against libbnxtre? If it builds, that means none of libbnxtre’s
> symbols were needed. Is there some magic dynamic registration going on
> in linker sets / constructors inside libbnxtre? Please explain the why
> in the commit message.

Sure enough, a peek at contrib/ofed/libbnxtre/main.c reveals a static __attribute__((constructor)) void bnxt_re_register_driver(void) which registers the driver with libibverbs. So I guess you should mention this mechanism. With that it looks ok to me.

Updated the patch description as you suggested. Thanks

This revision is now accepted and ready to land.Jan 6 2026, 2:56 PM