From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@mellanox.com>,
"David S . Miller" <davem@davemloft.net>
Cc: Leon Romanovsky <leonro@mellanox.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Danit Goldberg <danitg@mellanox.com>,
linux-netdev <netdev@vger.kernel.org>
Subject: [PATCH rdma-next 3/4] IB/ipoib: Add ndo operation for getting VFs GUID attributes
Date: Thu, 14 Nov 2019 15:31:25 +0200 [thread overview]
Message-ID: <20191114133126.238128-5-leon@kernel.org> (raw)
In-Reply-To: <20191114133126.238128-1-leon@kernel.org>
From: Danit Goldberg <danitg@mellanox.com>
Add ndo operation to the network driver that enables configuring
ipoib_get_vf_guid operation. The operation allows to get a VF port
and node GUIDs.
Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index ac0583ff280d..e5f438ab716c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -2019,6 +2019,15 @@ static int ipoib_set_vf_guid(struct net_device *dev, int vf, u64 guid, int type)
return ib_set_vf_guid(priv->ca, vf, priv->port, guid, type);
}
+static int ipoib_get_vf_guid(struct net_device *dev, int vf,
+ struct ifla_vf_guid *node_guid,
+ struct ifla_vf_guid *port_guid)
+{
+ struct ipoib_dev_priv *priv = ipoib_priv(dev);
+
+ return ib_get_vf_guid(priv->ca, vf, priv->port, node_guid, port_guid);
+}
+
static int ipoib_get_vf_stats(struct net_device *dev, int vf,
struct ifla_vf_stats *vf_stats)
{
@@ -2045,6 +2054,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
.ndo_set_vf_link_state = ipoib_set_vf_link_state,
.ndo_get_vf_config = ipoib_get_vf_config,
.ndo_get_vf_stats = ipoib_get_vf_stats,
+ .ndo_get_vf_guid = ipoib_get_vf_guid,
.ndo_set_vf_guid = ipoib_set_vf_guid,
.ndo_set_mac_address = ipoib_set_mac,
.ndo_get_stats64 = ipoib_get_stats,
--
2.20.1
next prev parent reply other threads:[~2019-11-14 13:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 13:31 [PATCH rdma-next 0/4] Get IB port and node GUIDs through rtnetlink Leon Romanovsky
2019-11-14 13:31 ` [PATCH iproute2-next] ip link: Add support to get SR-IOV VF node GUID and port GUID Leon Romanovsky
2019-11-14 20:35 ` David Ahern
2019-11-15 15:24 ` Leon Romanovsky
2019-11-14 13:31 ` [PATCH rdma-next 1/4] net/core: Add support for getting VF GUIDs Leon Romanovsky
2019-11-22 0:54 ` David Ahern
2019-11-22 16:16 ` Leon Romanovsky
2019-11-14 13:31 ` [PATCH rdma-next 2/4] IB/core: Add interfaces to get VF node and port GUIDs Leon Romanovsky
2019-11-14 13:31 ` Leon Romanovsky [this message]
2019-11-14 13:31 ` [PATCH rdma-next 4/4] IB/mlx5: Implement callbacks for getting VFs GUID attributes Leon Romanovsky
2019-11-18 7:25 ` [PATCH rdma-next 0/4] Get IB port and node GUIDs through rtnetlink Leon Romanovsky
2019-11-21 17:36 ` Leon Romanovsky
2019-11-22 16:21 ` Leon Romanovsky
2019-11-22 20:15 ` 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=20191114133126.238128-5-leon@kernel.org \
--to=leon@kernel.org \
--cc=danitg@mellanox.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).