Commit graph

19 commits

Author SHA1 Message Date
Sean Lim a687910fc4 Cleanup pthread locks in ofed RDMA verbs
On FreeBSD, pthread mutex, cond, and spinlocks allocate memory.  On
Linux-based systems, these calls do not allocate memory.  So there was a
safe assumption that the ofed RDMA verb calls do not need to explicitly
destroy the pthread locks.  This assumption is false on FreeBSD.  So let
us rearrange the code to cleanup the pthread locks.

Reviewed by:	delphij
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D41105
2023-09-19 09:10:42 -05:00
Konstantin Belousov e5cf232b3f librmdacm: rdma_get_local_addr and rdma_get_peer_addr are not exported
they are static inline, remove them from the version script.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Konstantin Belousov 9a7eba89f9 librdmacm: remove rsocket symbols from the map file
rsocket support was never compiled on FreeBSD at all.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Eric van Gyzen d13def78cc Fix Coverity issues in OFED
read_ibdiag_config NULL deref
read_ibdiag_config mem leak
ib_mad_inv_field_str Missing comma in a string array initialization
print_node_header NULL deref
diff_node_ports copy-paste error
ibportstate.c main() missing break in switch
set_thresholds NULL ptr deref
dump_unicast_tables leaks mapnd
umad_cm_attr_str dead code
__ibv_close_device close(-1)
check return value of listen()
mlx5 bitmap.h - bad bit shift - UB
get_dst_addr check return value of inet_pton
osm_perfmgr_init check return value of cl_spinlock_init
osm_port_new memory leak on error path
sa_mad_ctrl_rcv_callback missing break in switch case

I did not include CID numbers because these were found by an internal
run at Isilon.

Reviewed by:	cem kib
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D25676
2020-07-15 13:17:16 +00:00
Navdeep Parhar 7815283df2 rping(1): Make sure the socket address defaults to something reasonable
when running as the server.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Reviewed by:	hselasky@, np@
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D17707
2018-10-29 21:46:05 +00:00
Slava Shwartsman cd9cc48b9a Fix false positive on failure
When running mckey, errors may happen in the init/connect stage.
When leaving multicast groups, we override this value.

Fix that by saving the return value from rdma_leave_multicast to different
parameter, and only in case of failure in rdma_leave_multicast override it.

MFC after:      1 week
Approved by:    hselasky (mentor), kib (mentor)
Sponsored by:   Mellanox Technologies
2018-06-17 07:08:47 +00:00
Konstantin Belousov f39bffc62c Rework ofed build.
Aligns the build with the FreeBSD traditional approach to not build in
contrib/, and to track inter-dependencies between libraries.

With help from:	bdrewery
Reviewed by:	bdrewery, hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15648
2018-06-16 15:05:05 +00:00
Konstantin Belousov 0521e6e192 ofed: Remove duplicated symbols from the version file.
ld.bfd accepts multiple listing of the same symbol in the version script.
lld is stricter and errors out.  Since arm64 and sometimes amd64 use lld,
we should correct this cosmetic issue.

Sponsored by:	Mellanox Technologies
Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D13329
2017-12-11 11:57:46 +00:00
Hans Petter Selasky e110d0774b Fix OFED library dependencies.
Sponsored by:	Mellanox Technologies
2017-11-13 12:36:36 +00:00
Hans Petter Selasky d388615314 Remove no longer needed TESTBUILD defines from OFED Makefiles.
Sponsored by:	Mellanox Technologies
2017-11-13 11:36:22 +00:00
Hans Petter Selasky d6b92ffa99 OFED user-space import and update for use with Linux-4.9 compatible RDMA
kernel APIs.

List of sources used:

1) rdma-core was cloned from "https://github.com/linux-rdma/rdma-core.git"
Top commit d65138ef93af30b3ea249f3a84aa6a24ba7f8a75

2) OpenSM was cloned from git://git.openfabrics.org/~halr/opensm.git
Top commit 85f841cf209f791c89a075048a907020e924528d

3) libibmad was cloned from "git://git.openfabrics.org/~iraweiny/libibmad.git"
Tag 1.3.13 with some additional patches from Mellanox.

4) infiniband-diags was cloned from "git://git.openfabrics.org/~iraweiny/infiniband-diags.git"
Tag 1.6.7 with some additional patches from Mellanox.

Added the required Makefiles for building and installing.

Sponsored by:	Mellanox Technologies
2017-08-02 16:00:30 +00:00
Hans Petter Selasky b340491939 Use LIBADD instead of LDADD.
Sponsored by:	Mellanox Technologies
2016-02-02 11:36:58 +00:00
Navdeep Parhar 361e428888 Use LIBADD instead of LDADD in rping's Makefile and add libcxgb4 (the
userspace iWARP library for cxgbe) to the list of libraries.

rping using the libcxgb4 + iw_cxgbe combo was tested with T5 hardware.

Obtained from:	Chelsio Communications
2016-01-26 01:02:19 +00:00
Hans Petter Selasky ec0e626baf Define BINDIR for some test utilities.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2015-03-19 15:55:02 +00:00
Hans Petter Selasky dcf58f92e2 Add missing libraries when linking.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-11-30 13:13:46 +00:00
Navdeep Parhar 4b63a7c678 Fix previous change to this file (r273811).
This has been submitted upstream and should show up there soon.

Submitted by:	Hariprasad at Chelsio dot com
2014-11-12 20:57:29 +00:00
Navdeep Parhar 1db6552d17 rping: make sure that the CQ event thread can never poll a CQ after it
has been destroyed.

Submitted by:	Hariprasad at Chelsio dot com
Sponsored by:	Chelsio Communications
2014-10-29 06:24:12 +00:00
Hans Petter Selasky 3823d5e198 Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-10-28 13:38:10 +00:00
Jeff Roberson aa0a1e58f0 - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00