From: Or Gerlitz <ogerlitz@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Amir Vadai <amirv@mellanox.com>,
Tal Alon <talal@mellanox.com>,
Hadar Har-Zion <hadarh@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>
Subject: [PATCH net-next V1 09/13] IB/mlx4: Set VF to read from QP counters
Date: Mon, 15 Jun 2015 17:59:04 +0300 [thread overview]
Message-ID: <1434380348-19005-10-git-send-email-ogerlitz@mellanox.com> (raw)
In-Reply-To: <1434380348-19005-1-git-send-email-ogerlitz@mellanox.com>
From: Eran Ben Elisha <eranbe@mellanox.com>
As IB VFs are not capable to read the port counters through MADs,
move there to read their own QP counters to gather statistics.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
drivers/infiniband/hw/mlx4/mad.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index 74ca13f..bc698b1 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -869,10 +869,12 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
struct ib_wc *in_wc, struct ib_grh *in_grh,
struct ib_mad *in_mad, struct ib_mad *out_mad)
{
+ struct mlx4_ib_dev *dev = to_mdev(ibdev);
switch (rdma_port_get_link_layer(ibdev, port_num)) {
case IB_LINK_LAYER_INFINIBAND:
- return ib_process_mad(ibdev, mad_flags, port_num, in_wc,
- in_grh, in_mad, out_mad);
+ if (!mlx4_is_slave(dev->dev))
+ return ib_process_mad(ibdev, mad_flags, port_num, in_wc,
+ in_grh, in_mad, out_mad);
case IB_LINK_LAYER_ETHERNET:
return iboe_process_mad(ibdev, mad_flags, port_num, in_wc,
in_grh, in_mad, out_mad);
--
1.7.1
next prev parent reply other threads:[~2015-06-15 14:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 14:58 [PATCH net-next V1 00/13] mlx4 driver update (+ new VF ndo) Or Gerlitz
2015-06-15 14:58 ` [PATCH net-next V1 01/13] net/mlx4_core: Check before cleaning counters bitmap Or Gerlitz
2015-06-15 14:58 ` [PATCH net-next V1 02/13] net/mlx4_core: Reset counters data when freed Or Gerlitz
2015-06-15 14:58 ` [PATCH net-next V1 03/13] net/mlx4_core: Add sink counter Or Gerlitz
2015-06-15 14:58 ` [PATCH net-next V1 04/13] net/mlx4_core: Remove counters table allocation from VF flow Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 05/13] net/mlx4_core: Adjust counter grant policy in the resource tracker Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 06/13] net/mlx4_core: Add port attribute when tracking counters Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 07/13] net/mlx4_core: Allocate default counter per port Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 08/13] IB/mlx4: Add RoCE/IB dedicated counters Or Gerlitz
2015-06-15 14:59 ` Or Gerlitz [this message]
2015-06-15 14:59 ` [PATCH net-next V1 10/13] net/mlx4_core: Add helper to query counters Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 11/13] net/mlx4_en: Show PF own statistics via ethtool Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 12/13] net/core: Add reading VF statistics through the PF netdevice Or Gerlitz
2015-06-15 14:59 ` [PATCH net-next V1 13/13] net/mlx4_en: Support ndo_get_vf_stats Or Gerlitz
2015-06-16 0:23 ` [PATCH net-next V1 00/13] mlx4 driver update (+ new VF ndo) David Miller
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=1434380348-19005-10-git-send-email-ogerlitz@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=hadarh@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=talal@mellanox.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;
as well as URLs for NNTP newsgroup(s).