Skip to content

Commit

Permalink
ibdiags: Copy the cl_qmap implementation from opensm
Browse files Browse the repository at this point in the history
ibdiags stuff is using this, so provide it internally as we can't depend
on opensm. This version is copied from opensm commit
6d49a7e3c02a ("libvendor/osm_vendor_mlx_sim.c: In osmv_transport_init, fix
memory leaks on error") and then stripped down.

This eliminates complib dependencies from libibnetdisc.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
jgunthorpe committed May 16, 2019
1 parent 58670e0 commit 2f9141a
Show file tree
Hide file tree
Showing 7 changed files with 1,673 additions and 4 deletions.
1 change: 0 additions & 1 deletion ibdiags/libibnetdisc/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rdma_library(ibnetdisc libibnetdisc.map
target_link_libraries(ibnetdisc LINK_PRIVATE
ibmad
ibumad
osmcomp
)
# FIXME for osmcomp
target_include_directories(ibnetdisc PRIVATE "/usr/include/infiniband")
Expand Down
1 change: 0 additions & 1 deletion ibdiags/libibnetdisc/src/ibnetdisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <infiniband/mad.h>

#include <infiniband/ibnetdisc.h>
#include <complib/cl_nodenamemap.h>

#include "internal.h"
#include "chassis.h"
Expand Down
2 changes: 1 addition & 1 deletion ibdiags/libibnetdisc/src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define _INTERNAL_H_

#include <infiniband/ibnetdisc.h>
#include <complib/cl_qmap.h>
#include <util/cl_qmap.h>

#define IBND_DEBUG(fmt, ...) \
if (ibdebug) { \
Expand Down
1 change: 0 additions & 1 deletion ibdiags/libibnetdisc/test/testleaks.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <errno.h>
#include <inttypes.h>

#include <infiniband/complib/cl_nodenamemap.h>
#include <infiniband/ibnetdisc.h>

static const char *argv0 = "iblinkinfotest";
Expand Down
2 changes: 2 additions & 0 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
publish_internal_headers(util
cl_qmap.h
compiler.h
symver.h
util.h
)

set(C_FILES
cl_map.c
util.c)

if (HAVE_COHERENT_DMA)
Expand Down

0 comments on commit 2f9141a

Please sign in to comment.