All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qing Huang <qing.huang@oracle.com>
To: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Cc: jgg@ziepe.ca, dledford@redhat.com, leon@kernel.org,
	gerald.gibson@oracle.com, qing.huang@oracle.com,
	danielj@mellanox.com, sharon.s.liu@oracle.com
Subject: [PATCH v2] IB/mlx5: avoid excessive warning msgs when creating VFs on 2nd port
Date: Mon, 23 Jul 2018 14:15:08 -0700	[thread overview]
Message-ID: <20180723211508.7078-1-qing.huang@oracle.com> (raw)

When a CX5 device is configured in dual-port RoCE mode, after creating
many VFs against port 1, creating the same number of VFs against port 2
will flood kernel/syslog with something like
"mlx5_*:mlx5_ib_bind_slave_port:4266:(pid 5269): port 2 already
affiliated."

So basically, when traversing mlx5_ib_dev_list, mlx5_ib_add_slave_port()
repeatedly attempts to bind the new mpi structure to every device
on the list until it finds an unbound device.

Change the log level from warn to dbg to avoid log flooding as the warning
should be harmless.

Signed-off-by: Qing Huang <qing.huang@oracle.com>
---
  v1 -> v2: change the log level instead

 drivers/infiniband/hw/mlx5/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index b3ba9a2..f57b8f7 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -5127,8 +5127,8 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,
 
 	spin_lock(&ibdev->port[port_num].mp.mpi_lock);
 	if (ibdev->port[port_num].mp.mpi) {
-		mlx5_ib_warn(ibdev, "port %d already affiliated.\n",
-			     port_num + 1);
+		mlx5_ib_dbg(ibdev, "port %d already affiliated.\n",
+			    port_num + 1);
 		spin_unlock(&ibdev->port[port_num].mp.mpi_lock);
 		return false;
 	}
-- 
2.9.3

             reply	other threads:[~2018-07-23 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 21:15 Qing Huang [this message]
2018-07-23 21:17 ` [PATCH v2] IB/mlx5: avoid excessive warning msgs when creating VFs on 2nd port Daniel Jurgens
2018-07-26 22:12 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180723211508.7078-1-qing.huang@oracle.com \
    --to=qing.huang@oracle.com \
    --cc=danielj@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=gerald.gibson@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sharon.s.liu@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.