mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Håkon Bugge" <haakon.bugge@oracle.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Yishai Hadas <yishaih@nvidia.com>,
	Or Gerlitz <ogerlitz@mellanox.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC for-rc] IB/mlx4: Fix the fix for reading flow-counters
Date: Tue, 11 Jan 2022 17:35:38 +0100	[thread overview]
Message-ID: <1641918938-10011-1-git-send-email-haakon.bugge@oracle.com> (raw)

It is not logical to call iboe_process_mad() when the link-layer is
Infiniband. Nevertheless, the commit message in commit 43bfb9729ea8
("IB/mlx4: Fix use of flow-counters for process_mad") explicitly state
that iboe_process_mad() shall be called.

Without this fix, reading:

yields "Invalid argument", whereas with this commit, said counter can
be read.

Please note that mlx4_1 is a VF.

Fixes: 43bfb9729ea8 ("IB/mlx4: Fix use of flow-counters for process_mad")
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
---
 drivers/infiniband/hw/mlx4/mad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index d13ecbd..cc83782 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -998,8 +998,8 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num,
 		     (in->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS ||
 		      in->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS_EXT ||
 		      in->mad_hdr.attr_id == IB_PMA_CLASS_PORT_INFO)))
-			return iboe_process_mad(ibdev, mad_flags, port_num,
-						in_wc, in_grh, in, out);
+			return ib_process_mad(ibdev, mad_flags, port_num,
+					      in_wc, in_grh, in, out);
 
 		return ib_process_mad(ibdev, mad_flags, port_num, in_wc, in_grh,
 				      in, out);
-- 
1.8.3.1


             reply	other threads:[~2022-01-11 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 16:35 Håkon Bugge [this message]
2022-01-11 16:38 ` Haakon Bugge
2022-01-11 16:39   ` Haakon Bugge
2022-01-11 18:35     ` Haakon Bugge

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=1641918938-10011-1-git-send-email-haakon.bugge@oracle.com \
    --to=haakon.bugge@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yishaih@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®