Page MenuHomeFreeBSD

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

Authored by sreekanth.reddy_broadcom.com on Fri, Dec 26, 10:47 AM.
Tags
None
Referenced Files
F141894077: D54368.diff
Mon, Jan 12, 3:12 AM
Unknown Object (File)
Sat, Jan 10, 2:50 AM
Unknown Object (File)
Fri, Jan 9, 2:23 PM
Unknown Object (File)
Fri, Jan 9, 11:22 AM
Unknown Object (File)
Wed, Jan 7, 4:55 AM
Unknown Object (File)
Sat, Jan 3, 5:46 AM
Unknown Object (File)
Fri, Jan 2, 6:41 AM
Unknown Object (File)
Fri, Jan 2, 6:33 AM

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.Tue, Jan 6, 2:56 PM