On Thu, Jan 24, 2019 at 03:47:35PM +0100, Håkon Bugge wrote: > ibacm uses ioctl with SIOCGIFCONF to enumerate the interfaces. This > particular ioctl will only return interfaces that are "running". > > This is a problem if, for example, ibacm is started before the > interfaces get plumbed, or when an interface gets resurrected. > > By using netlink (nl), we avoid using the sysfs interface to read the > gid, as it is supplied directly by nl. > > This commit does not change the existing functionality, but is made > to prepare for a fix where ibacm is unable to resurrect an interface. > > Detailed logging added: > > acm_if_iter: name: stib0 label: stib0 index: 9 > flags: broadcast,multicast,up,running,lowerup > addr: 192.168.200.200/24 pkey: 0x88b4 guid: 0x21280001a17c97 > > Change-Id: I6e428d1d6b2d345ccfbd74d482c69b56f8fe98da > Signed-off-by: Håkon Bugge <haakon.bugge@xxxxxxxxxx> > ibacm/CMakeLists.txt | 2 + > ibacm/src/acm.c | 7 ++ > ibacm/src/acm_util.c | 267 ++++++++++++++++++++++++------------------- > ibacm/src/acm_util.h | 5 +- > 4 files changed, 165 insertions(+), 116 deletions(-) > > diff --git a/ibacm/CMakeLists.txt b/ibacm/CMakeLists.txt > index 3a4e2632..a0ef7035 100644 > +++ b/ibacm/CMakeLists.txt > @@ -7,6 +7,7 @@ publish_headers(infiniband > include_directories("include") > include_directories("src") > include_directories("linux") > +include_directories(${NL_INCLUDE_DIRS}) A little more is needed here, cmake current has libnl as optional as verbs does not hard require it If ibacm hard requires it then we shouldn't build it when libnl is not available. Jason