Page MenuHomeFreeBSD

bnxt_re: Add Userspace Library Support for RoCE Driver
ClosedPublic

Authored by chandrakanth.patil_broadcom.com on Jun 25 2024, 10:36 AM.
Tags
None
Referenced Files
F103230145: D45729.diff
Fri, Nov 22, 11:05 AM
Unknown Object (File)
Fri, Nov 8, 12:07 AM
Unknown Object (File)
Thu, Nov 7, 5:27 PM
Unknown Object (File)
Mon, Nov 4, 12:35 PM
Unknown Object (File)
Mon, Nov 4, 12:34 PM
Unknown Object (File)
Mon, Nov 4, 12:33 PM
Unknown Object (File)
Mon, Nov 4, 12:33 PM
Unknown Object (File)
Mon, Nov 4, 12:19 PM
Subscribers
None

Details

Summary
  • This patch introduces userspace library support for the bnxt_re RoCE driver.
  • The library can be linked with RDMA applications such as perftest and rping.
  • The RoCE traffic has been tested with the rping and perftest utility.

Diff Detail

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

Event Timeline

Overall this looks good, up to my ability to review it. A couple of really minor nits, plus a question based on a pull request that came in over the weekend.

contrib/ofed/libbnxtre/main.c
75

I just reviewed a patch on github that adds 0x1801 as a BCM57504 NPAR. Is that needed here?
https://github.com/freebsd/freebsd-src/pull/1306/files

lib/ofed/libbnxtre/Makefile
2

Stray blank line

3

Might be better to not use _<anything> for this, since I think that's reserved for the system implementation.

6

why is this in /lib instead of /usr/lib? I'm not saying it's wrong, I just don't understand.

contrib/ofed/libbnxtre/abi.h
44

See style(9) for the proper ordering of includes

50

Can these defines be avoided? Eg. we have stdbool.h.

This really pollutes consumer's namespace.

lib/ofed/libbnxtre/Makefile
6

libmlx5.so is in /lib because libpcap.so is linked against it.
Is it possible to do RoCE sniffiing on bnxt?

chandrakanth.patil_broadcom.com added inline comments.
contrib/ofed/libbnxtre/abi.h
44

I will correct the ordering in the next revision.

50

Agreed. I'll fix it and update it in the new revision.

contrib/ofed/libbnxtre/main.c
75

0x1801 is not supported in RoCE.

lib/ofed/libbnxtre/Makefile
2

I kept the blank space for consistency with other modules Makefiles. I'll fix it and upload the new version

3

Ok. I have taken the _spath name for consistency with the other modules Makefiles. I will remove the underscore prefix. Should I use SPATH in uppercase to be consistent with other system variables?

6

Agreed to the Kib response.

  • Updated the Makefile. Renamed the _spath varaible to SPATH
  • reordered the header files as per the style.9 man page standard
  • removed the manual #define of bool flags.
  • I missed updating the SPATH for CFLAGS in the Makefile. This has been corrected in the current revision.

I suppose the use of the library would come from the future changes. Also I cannot comment on the actual code for the bnxtre.

This revision is now accepted and ready to land.Jul 5 2024, 10:07 PM