On Mon, Mar 27, 2017 at 06:06:42PM +0300, Mark Bloch wrote: > Hi Shamir, > > Like I've said in v1 of this patch, I believe we are calling ipoib_delete_debug_files too many times. > We are calling in unconditionally in: ipoib_dev_cleanup > and also in ipoib_netdev_event when we get an NETDEV_UNREGISTER event. > > For example, I have a setup with ConnectX-4 dual port configured to be in IB mode. > So I have two ipoib interfaces (ib0, ib1) > > When I load and unload mlx5_ib (while ib_ipoib is loaded: > > root@dev-r-vrt-175 tools]# ./funccount.py 'ipoib_*_debug_files' > Tracing 2 functions for "ipoib_*_debug_files"... Hit Ctrl-C to end. > ^C > FUNC COUNT > ipoib_create_debug_files 2 > ipoib_delete_debug_files 4 > Detaching... > > Why not just remove the call in ipoib_dev_cleanup? > Hi Mark, v3 of this patch works fine on system that has CX3 with 2 ports and the below udev rules: # InfiniBand: Mellanox Technologies MT27500 Family [ConnectX-3] SUBSYSTEM=="net", ACTION=="add", DRIVERS=="mlx4_core", BUS=="pci", ID=="0002:01:00.0", ATTR{dev_id}=="0x0", KERNEL=="ib*", NAME="ib1" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="mlx4_core", BUS=="pci", ID=="0002:01:00.0", ATTR{dev_id}=="0x1", KERNEL=="ib*", NAME="ib0" On this system, the udev rules rename ib0-ib1 & ib1->ib0 causing small chaos in the ipoib device names. The attached logs include the information collected when the openibd service was started and when it was stopped. You can have a look in the files and see what are the network events and how they are processed by the ipoib devices. I think it will answer your concerns. BR, Shamir