git: e787b5acb1bd - main - mlx5core: Don't query the PCI config space for offline during a firmware command.

Hans Petter Selasky hselasky at FreeBSD.org
Mon Jul 12 13:09:59 UTC 2021


The branch main has been updated by hselasky:

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

commit e787b5acb1bdf97fc04ec3ebebb7a8dd40d85199
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-12 12:22:33 +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.
    
    MFC after:      1 week
    Reviewed by:    kib
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 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