Date: Sat, 22 Feb 2020 01:48:38 +0100 From: Andreas Kempe <kempe@lysator.liu.se> To: freebsd-net@freebsd.org, freebsd-infiniband@freebsd.org Subject: [PATCH]: ipoib with mlx4 initialisation ordering Message-ID: <20200222004838.GA22659@moira.hest-guild.se>
next in thread | raw e-mail | index | archive | help
--zx4FCpZtqtKETZ7O Content-Type: multipart/mixed; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello everyone, We have had issues with our machine using IPoIB on FreeBSD with the mlx4 driver. The machine would hang on shutdown. We traced the issue to IPoIB registering multicast groups that increase the reference count of the port in the ib_multicast client. When shutting down the machine, the kernel tore down the ib_multicast before it tore down IPoIB, causing it to wait forever for the references to disappear before it deleted the multicast client. This issue can be remedied by changing the initialisation of the IPoIB module to happen after the mlx4 driver is initialised. By doing this, all multicast groups will be cleaned up before the ib_multicast client is destroyed. See patch attached. Sponsored by: Lysator ACS Cordially, Andreas Kempe --ew6BAiZeqk4r7MaW Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ipoib_ordering.patch" Content-Transfer-Encoding: quoted-printable --- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c 2020-02-21 20:52:35.= 311328000 +0100 +++ sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c 2020-02-22 01:06:20.= 720997000 +0100 @@ -1754,7 +1754,7 @@ } } =20 -module_init(ipoib_init_module); +module_init_order(ipoib_init_module, SI_ORDER_FOURTH); module_exit(ipoib_cleanup_module); =20 static int --ew6BAiZeqk4r7MaW-- --zx4FCpZtqtKETZ7O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEETci4cPcl+ZcyiACiCkqKrhcKSD0FAl5Qel8ACgkQCkqKrhcK SD3gFxAAkev95i1THhddprkY5iW4wb3vwVYcvo7t0cjD32V+ZYJnm4WS7PEKte0y 0nLLqN6ZEi8tXOxs5+Ky/A/v+P1abjsINwbMrcY6s1lp8GoA4AeYsdSexi/5ji0F q5Wtx4CJNJusl264kdrqde44ZCd8yFvaLtcmqRJbIizsY+0YXRIVKfrBlW+gTkjA HdFn3EbZcNVxLVzoCbs7wgYSJhHSFi0ZTsl6MduSocyGw5qQwHn+oo6L2ZIF1ASc 1810rPWDJpR7O1c6Wk+Ilc76yPh0lrB4mekMlb1IhjzkY3Di8Jrj9ha3XzrnulvA rzfAeigGG2BP0HDgJCNZ6ngDsZlb48MgYK9zKp7INwPZp1KGa4GPAUcu8J5b/B2I eVh4f2m4gZZoArd4xUsQ6m7RnnPhVgCevb8vEzjSLPF0pXreXVRY2h5KbV6t/Zks hj55W76PcLzB7EwJMFMx0rX3h5xWAHEP+GuakqByjHrKLivMvijlAXdQDd+wLMs9 Ng6u6o1APDXTXM7mLYdAfVSrypmR7Q9Pzx64WCKVA1fAZj1z7LKlj8Spy4Neq53O xeTo8SR0xKDPp1NrYPcivH8cvhqEIN+FW/cJKP3wAIoBPeEjZS4ef+fvjKl7mmKM BO4Y1UsVtKJIYFoQDr+DQNNs2f5ORI+SIMF7vsqnJj7PPtX6Nok= =n3bI -----END PGP SIGNATURE----- --zx4FCpZtqtKETZ7O--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200222004838.GA22659>