Commit graph

18 commits

Author SHA1 Message Date
Brooks Davis 2a32b54a57 ofed: don't expose symbols twice
ibv_init_wq and ibv_cleanup_wq are made visible with the
default_symver which puts them in the IBVERBS_1.1 ABI.  Don't
try to expose them as IBVERBS_PRIVATE_14 symbols as GNU ld
complains with --no-undefined-symbol.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D45090
2024-05-08 15:52:00 +01:00
Bartosz Sobczak 8e1f58caf7
ofed: fix warnings during libibverbs compilation
create_qp_handle_resp_common_cleanup should be void
__ibv_cleanup_wq should use wq->cond for cond destroy
both issues were overlooked in:
a687910 ('Cleanup pthread locks in ofed RDMA verbs')

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	sean.lim@dell.com, vangyzen@, erj@
MFC after:	1 day
Sponsored by: Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D43491
2024-02-05 18:58:20 -08:00
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 dd0f2d02c6 libibverbs: remove nonexistent symbols from the linker map
The function ibv_query_device_ex is static inline, it is not exported
from the dso. With lld 16, which is much more picky about versioning and
undefined symbols, this becomes an error.

The ibv_register_driver driver symbol is explicitly versioned in
sources, it is non-existent in un-versioned object files.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Piotr Kubaj 35c87c070a ofed: allow using IPv6 address in rc_pingpong server
Summary:
The current OFED code allows binding server to IPv6 address. It was added back in 91fc39561d

Sponsored by:	Intel Corporation
MFC after:	3 days

Reviewers: hselasky

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D37196
2022-10-30 20:11:41 +01:00
Eric van Gyzen 8ca1ed33ec Fix style in r363220
Apply the style change Kostik suggested in the review.

Reported by:	kib
MFC after:	2 weeks
X-MFC with:	r363220
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D25676
2020-07-15 13:26:15 +00: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
Hans Petter Selasky daceb33617 Add support for 200Gbit speeds to libibverbs.
Submitted by:	slavash@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:56:22 +00:00
Slava Shwartsman a6578a04e4 libibverbs: Fix memory leak in ibv_read_sysfs_file().
Testing packetdrill using valgrind resulted in finding a memory leak in
ibv_read_sysfs_file(). The attached patch fixes it.

Submitted by:	tuexen@
Approved by:    hselasky (mentor)
MFC after:      1 week
Sponsored by:   Mellanox Technologies
2018-12-05 13:28:17 +00:00
Hans Petter Selasky 3468ddce67 Use unspecified address family when connecting as a client in
libibverbs example utilities.

This allows connecting to both IPv4 and IPv6 and reverts
some FreeBSD only patches.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2018-07-18 10:23:30 +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
Hans Petter Selasky 2a2234c0f4 Remove the "load drivers" logic from libibverbs.
The "load drivers" logic in the libibverbs configuration file is relevant
for Linux only.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2018-04-22 06:11:46 +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
Bryan Drewery 4ca50eab86 Fix build with LLD by removing duplicate symbols already in IBVERBS_1.0.
Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D10352
2017-04-10 21:26:37 +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 d0bd125135 Add proper Makefiles to build some infiniband example utilities.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2014-12-26 10:25:34 +00:00
Hans Petter Selasky f02f742280 Hardware driver update from Mellanox Technologies, including:
- improved performance
 - better stability
 - new features
 - bugfixes

Supported HCAs:
 - ConnectX-2
 - ConnectX-3
 - ConnectX-3 Pro

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2014-09-23 12:37:01 +00:00
Jeff Roberson aa0a1e58f0 - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00