git: 75b63f08d2e8 - stable/13 - mlx5core: Don't query the PCI config space for offline during a firmware command.

Hans Petter Selasky hselasky at FreeBSD.org
Mon Jul 26 16:13:53 UTC 2021


The branch stable/13 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=75b63f08d2e849c8639f0990f1e1794136b7050d

commit 75b63f08d2e849c8639f0990f1e1794136b7050d
Author:     Hans Petter Selasky <hselasky at FreeBSD.org>
AuthorDate: 2021-06-16 13:01:54 +0000
Commit:     Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2021-07-26 16:04:32 +0000

    mlx5core: Don't query the PCI config space for offline during a firmware command.
    
    Querying the PCI config space for offline for every firmware command blocks
    the PCI bus and affects performance. Especially for packet pacing and TLS
    when objects are frequently created and destroyed.
    
    Reviewed by:    kib
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
    
    (cherry picked from commit e787b5acb1bdf97fc04ec3ebebb7a8dd40d85199)
---
 sys/dev/mlx5/mlx5_core/mlx5_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/mlx5/mlx5_core/mlx5_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
index 0bc5f92e3b02..c6cc3fee8c43 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
@@ -1287,8 +1287,7 @@ static int cmd_exec_helper(struct mlx5_core_dev *dev,
 	u8 status = 0;
 	u32 drv_synd;
 
-	if (pci_channel_offline(dev->pdev) ||
-	    dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) {
+	if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) {
 		u16 opcode = MLX5_GET(mbox_in, in, opcode);
 		err = mlx5_internal_err_ret_value(dev, opcode, &drv_synd, &status);
 		MLX5_SET(mbox_out, out, status, status);


More information about the dev-commits-src-all mailing list