Date: Fri, 22 Jan 2021 12:48:35 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a7c9b12baf7d - stable/11 - MFC 480570dbb309: Fixes for SRIOV in mlx5core. Message-ID: <202101221248.10MCmZVl019844@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a7c9b12baf7dd834957cc88c23322f18399cac43 commit a7c9b12baf7dd834957cc88c23322f18399cac43 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-01-08 11:06:11 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-01-22 12:34:48 +0000 MFC 480570dbb309: Fixes for SRIOV in mlx5core. - call pci_iov_detach() on detaching from PCI device to take care of hang on destroying VFs after PF is down. - disable eswitch SRIOV support right after pci_iov_detach(), else the eswitch cleanup sometimes occur while the SRIOV flow table is still present. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/mlx5/mlx5_core/mlx5_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index ff3671fd8d02..1887fcb4eeff 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1645,6 +1645,11 @@ static void remove_one(struct pci_dev *pdev) struct mlx5_core_dev *dev = pci_get_drvdata(pdev); struct mlx5_priv *priv = &dev->priv; +#ifdef PCI_IOV + pci_iov_detach(pdev->dev.bsddev); + mlx5_eswitch_disable_sriov(priv->eswitch); +#endif + if (mlx5_unload_one(dev, priv, true)) { mlx5_core_err(dev, "mlx5_unload_one() failed, leaked %lld bytes\n", (long long)(dev->priv.fw_pages * MLX5_ADAPTER_PAGE_SIZE));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101221248.10MCmZVl019844>