lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2023 16:01:37 -0700
From:   Saeed Mahameed <saeed@...nel.org>
To:     Niklas Schnelle <schnelle@...ux.ibm.com>
Cc:     Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Gerd Bayer <gbayer@...ux.ibm.com>,
        Alexander Schmidt <alexs@...ux.ibm.com>,
        Leon Romanovsky <leonro@...dia.com>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] net/mlx5: stop waiting for PCI link if reset
 is required

On 11 Apr 12:51, Niklas Schnelle wrote:
>After an error on the PCI link, the driver does not need to wait
>for the link to become functional again as a reset is required. Stop
>the wait loop in this case to accelerate the recovery flow.
>
>Co-developed-by: Alexander Schmidt <alexs@...ux.ibm.com>
>Signed-off-by: Alexander Schmidt <alexs@...ux.ibm.com>
>Reviewed-by: Leon Romanovsky <leonro@...dia.com>
>Link: https://lore.kernel.org/r/20230403075657.168294-1-schnelle@linux.ibm.com
>Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
>---
> drivers/net/ethernet/mellanox/mlx5/core/health.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
>index f9438d4e43ca..81ca44e0705a 100644
>--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
>+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
>@@ -325,6 +325,8 @@ int mlx5_health_wait_pci_up(struct mlx5_core_dev *dev)
> 	while (sensor_pci_not_working(dev)) {
> 		if (time_after(jiffies, end))
> 			return -ETIMEDOUT;
>+		if (pci_channel_offline(dev->pdev))
>+			return -EIO;

We already sent a patch to net not too long a go to break this while loop
when there is a triggered reset:
  
net/mlx5: Stop waiting for PCI up if teardown was triggered
https://lore.kernel.org/netdev/20230314054234.267365-3-saeed@kernel.org/

Usually when the pci goes offline, either the PCI subsystem will detect
that and will trigger the mlx5 teardown or mlx5 health check will detect it
and will initiate the teardown, in both ways the MLX5_BREAK_FW_WAIT flag
will be raised and the loop will quit, please let me know if you think 
the extra check of pci_channel_offline(dev->pdev) is still required here
for your system.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ