> On 5 Jan 2019, at 04:37, Jason Gunthorpe <jgg@xxxxxxxx> wrote: > > On Fri, Jan 04, 2019 at 09:19:26PM +0100, Håkon Bugge wrote: >> >> >>> On 4 Jan 2019, at 17:27, Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote: >>> >>> On Fri, Jan 04, 2019 at 02:17:20PM +0100, Håkon Bugge wrote: >>>> When an IB port has been brought back to Active state, after being >>>> down, ibacm gets an event about it. It will then (re) enumerate the >>>> devices, and does so by executing an ioctl with SIOCGIFCONF. This >>>> particular ioctl will only return interfaces that are "running". >>> >>> This seems like an ugly hack, should this be using netlink instead of >>> SIOCGIFCONF to get the interface list? >> >> You mean the SIOCGIFCONF ioctl or the commit that is ugly? > > I think trying to recover from the error that is caused by not > enumerating the interfaces correctly is pretty ugly OK. I take that as a Nay to my proposal: > I am in favour of pursuing this patch. Down the road, the ioctl method can be hardened by using netlink instead, and this patch can be reverted. I am looking into reading /proc/net/dev in addition to the existing SIOCGIFCONF method. Give a hint if that can be accepted, or if a pure netlink implementation is required. Thxs, Håkon