Get IB port and node GUIDs through rtnetlink
Subsystems (4)
cover Get IB port and node GUIDs through rtnetlink
From: Leon Romanovsky <[email protected]>
Hi,
This series from Danit extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs.
The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally.
The iproute2 was extended too to present those GUIDs.
- ip link show <device>
For example:
- ip link set ib4 vf 0 node_guid 22:44:33:00:33:11:00:33
- ip link set ib4 vf 0 port_guid 10:21:33:12:00:11:22:10
- ip link show ib4
ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256
link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss offDue to the fact that this series touches both net and RDMA, we assume that it needs to be applied to our shared branch (mlx5-next) and pulled later by Dave and Doug/Jason.
Thanks
Danit Goldberg (4):
net/core: Add support for getting VF GUIDs IB/core: Add interfaces to get VF node and port GUIDs IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/mlx5: Implement callbacks for getting VFs GUID attributes
drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/verbs.c | 10 ++++++++++ drivers/infiniband/hw/mlx5/ib_virt.c | 24 +++++++++++++++++++++++ drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 10 ++++++++++ include/linux/netdevice.h | 4 ++++ include/rdma/ib_verbs.h | 6 ++++++ net/core/rtnetlink.c | 11 +++++++++++ 9 files changed, 70 insertions(+)
--
2.20.1
PATCH 1/1 ip link: Add support to get SR-IOV VF node GUID and port GUID
From: Danit Goldberg <[email protected]>
Extend iplink to show VF GUIDs (IFLA_VF_IB_NODE_GUID, IFLA_VF_IB_PORT_GUID), giving the ability for user-space application to print GUID values. This ability is added to the one of setting new node GUID and port GUID values.
Suitable ip link command:
- ip link show <device>
For example:
- ip link set ib4 vf 0 node_guid 22:44:33:00:33:11:00:33
- ip link set ib4 vf 0 port_guid 10:21:33:12:00:11:22:10
- ip link show ib4
ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256
link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss off
--- ip/ipaddress.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
ip/ipaddress.c +23 -0
@@ -484,6 +484,29 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) vf_spoofchk->setting); } +#define GUID_STR_LEN 24 +if (vf[IFLA_VF_IB_NODE_GUID ]) { +char buf[GUID_STR_LEN ]; +struct ifla_vf_guid *guid =RTA_DATA (vf[IFLA_VF_IB_NODE_GUID ]); +uint64_t node_guid =ntohll (guid->guid); + +print_string (PRINT_ANY ,"node guid" ,", NODE_GUID %s" , +ll_addr_n2a ((const unsigned char *)&node_guid, +RTA_PAYLOAD (vf[IFLA_VF_IB_NODE_GUID ]), +ARPHRD_INFINIBAND , + buf,sizeof (buf))); + } +if (vf[IFLA_VF_IB_PORT_GUID ]) { +char buf[GUID_STR_LEN ]; +struct ifla_vf_guid *guid =RTA_DATA (vf[IFLA_VF_IB_PORT_GUID ]); +uint64_t port_guid =ntohll (guid->guid); + +print_string (PRINT_ANY ,"port guid" ,", PORT_GUID %s" , +ll_addr_n2a ((const unsigned char *)&port_guid, +RTA_PAYLOAD (vf[IFLA_VF_IB_PORT_GUID ]), +ARPHRD_INFINIBAND , + buf,sizeof (buf))); + }if (vf[IFLA_VF_LINK_STATE ]) {struct ifla_vf_link_state *vf_linkstate =RTA_DATA (vf[IFLA_VF_LINK_STATE ]);
Signature · 1 line
2.20.1
PATCH 3/4 IB/ipoib: Add ndo operation for getting VFs GUID attributes
In reply to Leon RomanovskyFrom: Danit Goldberg <[email protected]>
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.
--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/infiniband/ulp/ipoib/ipoib_main.c +10 -0
@@ -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
PATCH 4/4 IB/mlx5: Implement callbacks for getting VFs GUID attributes
In reply to Leon RomanovskyFrom: Danit Goldberg <[email protected]>
Implement the IB defined callback mlx5_ib_get_vf_guid used to query FW for VFs attributes and return node and port GUIDs.
--- drivers/infiniband/hw/mlx5/ib_virt.c | 24 ++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ 3 files changed, 28 insertions(+)
drivers/infiniband/hw/mlx5/ib_virt.c +24 -0
@@ -201,3 +201,27 @@ int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port,return -EINVAL ; } + +int mlx5_ib_get_vf_guid (struct ib_device *device,int vf,u8 port, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid) +{ +struct mlx5_ib_dev *dev =to_mdev (device); +struct mlx5_core_dev *mdev = dev->mdev; +struct mlx5_hca_vport_context *rep; +int err; + + rep =kzalloc (sizeof (*rep),GFP_KERNEL ); +if (!rep) +return -ENOMEM ; + + err =mlx5_query_hca_vport_context (mdev,1 ,1 , vf+1 , rep); +if (err) + goto ex; + + port_guid->guid = rep->port_guid; + node_guid->guid = rep->node_guid; +ex: +kfree (rep); +return err; +}
drivers/infiniband/hw/mlx5/main.c +1 -0
@@ -6313,6 +6313,7 @@ static const struct ib_device_ops mlx5_ib_dev_ipoib_enhanced_ops = {static const struct ib_device_ops mlx5_ib_dev_sriov_ops = { .get_vf_config = mlx5_ib_get_vf_config, + .get_vf_guid = mlx5_ib_get_vf_guid, .get_vf_stats = mlx5_ib_get_vf_stats, .set_vf_guid = mlx5_ib_set_vf_guid, .set_vf_link_state = mlx5_ib_set_vf_link_state,
drivers/infiniband/hw/mlx5/mlx5_ib.h +3 -0
@@ -1315,6 +1315,9 @@ int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, u8 port, int state);int mlx5_ib_get_vf_stats (struct ib_device *device,int vf,u8 port,struct ifla_vf_stats *stats); +int mlx5_ib_get_vf_guid (struct ib_device *device,int vf,u8 port, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid);int mlx5_ib_set_vf_guid (struct ib_device *device,int vf,u8 port,u64 guid,int type);
--
2.20.1
PATCH 2/4 IB/core: Add interfaces to get VF node and port GUIDs
In reply to Leon RomanovskyFrom: Danit Goldberg <[email protected]>
Provide ability to get node and port GUIDs of VFs to be symmetrical to already existing set option.
--- drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/verbs.c | 10 ++++++++++ include/rdma/ib_verbs.h | 6 ++++++ 3 files changed, 17 insertions(+)
drivers/infiniband/core/device.c +1 -0
@@ -2618,6 +2618,7 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)SET_DEVICE_OP (dev_ops, get_port_immutable);SET_DEVICE_OP (dev_ops, get_vector_affinity);SET_DEVICE_OP (dev_ops, get_vf_config); +SET_DEVICE_OP (dev_ops, get_vf_guid);SET_DEVICE_OP (dev_ops, get_vf_stats);SET_DEVICE_OP (dev_ops, init_port);SET_DEVICE_OP (dev_ops, invalidate_range);
drivers/infiniband/core/verbs.c +10 -0
@@ -2460,6 +2460,16 @@ int ib_set_vf_guid(struct ib_device *device, int vf, u8 port, u64 guid, }EXPORT_SYMBOL (ib_set_vf_guid); +int ib_get_vf_guid (struct ib_device *device,int vf,u8 port, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid) +{ +if (!device->ops.get_vf_guid) +return -EOPNOTSUPP ; + +return device->ops.get_vf_guid (device, vf, port, node_guid, port_guid); +} +EXPORT_SYMBOL (ib_get_vf_guid);/** * ib_map_mr_sg_pi() - Map the dma mapped SG lists for PI (protection * information) and set an appropriate memory region for registration.
include/rdma/ib_verbs.h +6 -0
@@ -2472,6 +2472,9 @@ struct ib_device_ops { struct ifla_vf_info *ivf);int (*get_vf_stats)(struct ib_device *device,int vf,u8 port,struct ifla_vf_stats *stats); +int (*get_vf_guid)(struct ib_device *device,int vf,u8 port, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid);int (*set_vf_guid)(struct ib_device *device,int vf,u8 port,u64 guid,int type); struct ib_wq *(*create_wq)(struct ib_pd *pd,
@@ -3342,6 +3345,9 @@ int ib_get_vf_config(struct ib_device *device, int vf, u8 port, struct ifla_vf_info *info);int ib_get_vf_stats (struct ib_device *device,int vf,u8 port,struct ifla_vf_stats *stats); +int ib_get_vf_guid (struct ib_device *device,int vf,u8 port, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid);int ib_set_vf_guid (struct ib_device *device,int vf,u8 port,u64 guid,int type);
--
2.20.1
PATCH 1/4 net/core: Add support for getting VF GUIDs
In reply to Leon RomanovskyFrom: Danit Goldberg <[email protected]>
Introduce a new ndo: ndo_get_vf_guid, to get from the net device the port and node GUID.
New applications can choose to use this interface to show GUIDs with iproute2 with commands such as:
- ip link show ib4
ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256
link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss off
--- include/linux/netdevice.h | 4 ++++ net/core/rtnetlink.c | 11 +++++++++++ 2 files changed, 15 insertions(+)
include/linux/netdevice.h +4 -0
@@ -1316,6 +1316,10 @@ struct net_device_ops { struct nlattr *port[]);int (*ndo_get_vf_port)(struct net_device *dev,int vf,struct sk_buff *skb); +int (*ndo_get_vf_guid)(struct net_device *dev, +int vf, +struct ifla_vf_guid *node_guid, +struct ifla_vf_guid *port_guid);int (*ndo_set_vf_guid)(struct net_device *dev,int vf,u64 guid,int guid_type);
net/core/rtnetlink.c +11 -0
@@ -1204,6 +1204,8 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,struct ifla_vf_mac vf_mac;struct ifla_vf_broadcast vf_broadcast;struct ifla_vf_info ivi; +struct ifla_vf_guid node_guid; +struct ifla_vf_guid port_guid;memset (&ivi,0 ,sizeof (ivi));
@@ -1270,6 +1272,15 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb, nla_put(skb, IFLA_VF_TRUST, sizeof(vf_trust), &vf_trust)) goto nla_put_vf_failure; +if (dev->netdev_ops->ndo_get_vf_guid && + !dev->netdev_ops->ndo_get_vf_guid (dev, vfs_num, &node_guid, + &port_guid)) { +if (nla_put (skb,IFLA_VF_IB_NODE_GUID ,sizeof (node_guid), + &node_guid) || +nla_put (skb,IFLA_VF_IB_PORT_GUID ,sizeof (port_guid), + &port_guid)) + goto nla_put_vf_failure; + } vfvlanlist =nla_nest_start_noflag (skb,IFLA_VF_VLAN_LIST );if (!vfvlanlist) goto nla_put_vf_failure;
--
2.20.1
Re: [PATCH iproute2-next] ip link: Add support to get SR-IOV VF node GUID and port GUID
In reply to Leon Romanovskyip/ipaddress.c static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) · line 489
Quoted 11 lines · Leon Romanovsky
ip/ipaddress.c +3
-0@@ -484,6 +484,29 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) vf_spoofchk->setting); } +#define GUID_STR_LEN 24 +if (vf[IFLA_VF_IB_NODE_GUID ]) { +char buf[GUID_STR_LEN ];
buf should be declared with SPRINT_BUF; see other users of ll_addr_n2a. And, print_vfinfo already has b1 declared so you do not need a new one; just change buf to b1.
Quoted 24 lines
ip/ipaddress.c +20
-0+struct ifla_vf_guid *guid =RTA_DATA (vf[IFLA_VF_IB_NODE_GUID ]); +uint64_t node_guid =ntohll (guid->guid); + +print_string (PRINT_ANY ,"node guid" ,", NODE_GUID %s" , +ll_addr_n2a ((const unsigned char *)&node_guid, +RTA_PAYLOAD (vf[IFLA_VF_IB_NODE_GUID ]), +ARPHRD_INFINIBAND , + buf,sizeof (buf))); + } +if (vf[IFLA_VF_IB_PORT_GUID ]) { +char buf[GUID_STR_LEN ]; +struct ifla_vf_guid *guid =RTA_DATA (vf[IFLA_VF_IB_PORT_GUID ]); +uint64_t port_guid =ntohll (guid->guid); + +print_string (PRINT_ANY ,"port guid" ,", PORT_GUID %s" , +ll_addr_n2a ((const unsigned char *)&port_guid, +RTA_PAYLOAD (vf[IFLA_VF_IB_PORT_GUID ]), +ARPHRD_INFINIBAND , + buf,sizeof (buf))); + }if (vf[IFLA_VF_LINK_STATE ]) {struct ifla_vf_link_state *vf_linkstate =RTA_DATA (vf[IFLA_VF_LINK_STATE ]);
Re: [PATCH iproute2-next] ip link: Add support to get SR-IOV VF node GUID and port GUID
Quoted 9 lines · David Ahern
Quoted 8 lines · Leon Romanovsky
ip/ipaddress.c +0
-0@@ -484,6 +484,29 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) vf_spoofchk->setting); }
Quoted 7 lines
ip/ipaddress.c static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) · line 489
Quoted 3 lines
ip/ipaddress.c +3
-0+#define GUID_STR_LEN 24 +if (vf[IFLA_VF_IB_NODE_GUID ]) { +char buf[GUID_STR_LEN ];buf should be declared with
SPRINT_BUF; see other users ofll_addr_n2a. And,print_vfinfoalready has b1 declared so you do not need a new one; just change buf to b1.
Thanks, I posted v1.
https://lore.kernel.org/linux-rdma/[email protected]
Quoted 29 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Hi,
This series from Danit extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs.
The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally.
The iproute2 was extended too to present those GUIDs.
- ip link show <device>
For example:
- ip link set ib4 vf 0node_guid22:44:33:00:33:11:00:33
- ip link set ib4 vf 0port_guid10:21:33:12:00:11:22:10
- ip link show ib4ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss offDue to the fact that this series touches both net and RDMA, we assume that it needs to be applied to our shared branch (mlx5-next) and pulled later by Dave and Doug/Jason.
Quoted 7 lines
Thanks
Danit Goldberg (4):
net/core: Add support for getting VF GUIDs IB/core: Add interfaces to get VF node and port GUIDs IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/mlx5: Implement callbacks for getting VFs GUID attributes
Dave,
I see that you marked these patches as "not applicable" in patchworks.
Can I assume that you are OK with them and we can take them through RDMA tree? If yes, can you give your Ack on the first patch?
Thanks
Quoted 38 lines · Leon Romanovsky
Quoted 29 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Hi,
This series from Danit extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs.
The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally.
The iproute2 was extended too to present those GUIDs.
- ip link show <device>
For example:
- ip link set ib4 vf 0node_guid22:44:33:00:33:11:00:33
- ip link set ib4 vf 0port_guid10:21:33:12:00:11:22:10
- ip link show ib4ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss offDue to the fact that this series touches both net and RDMA, we assume that it needs to be applied to our shared branch (mlx5-next) and pulled later by Dave and Doug/Jason.
Quoted 7 lines
Thanks
Danit Goldberg (4):
net/core: Add support for getting VF GUIDs IB/core: Add interfaces to get VF node and port GUIDs IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/mlx5: Implement callbacks for getting VFs GUID attributes
Quoted 6 lines
Dave,
I see that you marked these patches as "not applicable" in patchworks.
Can I assume that you are OK with them and we can take them through RDMA tree? If yes, can you give your Ack on the first patch?
Kindly reminder.
Thanks
Quoted 2 lines
Thanks
Re: [PATCH rdma-next 1/4] net/core: Add support for getting VF GUIDs
In reply to Leon RomanovskyQuoted 15 lines · Leon Romanovsky
From: Danit Goldberg <[email protected]>
Introduce a new ndo:
ndo_get_vf_guid, to get from the net device the port and node GUID.New applications can choose to use this interface to show GUIDs with iproute2 with commands such as:
- ip link show ib4
ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256
link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
spoof checking off,NODE_GUID22:44:33:00:33:11:00:33,PORT_GUID10:21:33:12:00:11:22:10, link-state disable, trust off,query_rssoff
Quoted 7 lines
Signed-off-by Danit Goldberg <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- include/linux/netdevice.h | 4 ++++ net/core/rtnetlink.c | 11 +++++++++++ 2 files changed, 15 insertions(+)
LGTM
Re: [PATCH rdma-next 1/4] net/core: Add support for getting VF GUIDs
Quoted 25 lines · David Ahern
Quoted 15 lines · Leon Romanovsky
From: Danit Goldberg <[email protected]>
Introduce a new ndo:
ndo_get_vf_guid, to get from the net device the port and node GUID.New applications can choose to use this interface to show GUIDs with iproute2 with commands such as:
- ip link show ib4
ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256
link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
spoof checking off,NODE_GUID22:44:33:00:33:11:00:33,PORT_GUID10:21:33:12:00:11:22:10, link-state disable, trust off,query_rssoffQuoted 7 lines
Signed-off-by Danit Goldberg <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- include/linux/netdevice.h | 4 ++++ net/core/rtnetlink.c | 11 +++++++++++ 2 files changed, 15 insertions(+)
Quoted 3 lines
LGTM
Acked-by David Ahern <[email protected]>
Thanks a lot.
Quoted 2 lines
Leon Romanovsky
AppliedQuoted 29 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Hi,
This series from Danit extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs.
The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally.
The iproute2 was extended too to present those GUIDs.
- ip link show <device>
For example:
- ip link set ib4 vf 0node_guid22:44:33:00:33:11:00:33
- ip link set ib4 vf 0port_guid10:21:33:12:00:11:22:10
- ip link show ib4ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss offDue to the fact that this series touches both net and RDMA, we assume that it needs to be applied to our shared branch (mlx5-next) and pulled later by Dave and Doug/Jason.
Quoted 7 lines
Thanks
Danit Goldberg (4):
net/core: Add support for getting VF GUIDs IB/core: Add interfaces to get VF node and port GUIDs IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/mlx5: Implement callbacks for getting VFs GUID attributes
Applied to mlx5-next,
Doug, Jason please pull.
9c0015ef0928 IB/mlx5: Implement callbacks for getting VFs GUID attributes 2446887ed226 IB/ipoib: Add ndo operation for getting VFs GUID attributes bfcb3c5d1485 IB/core: Add interfaces to get VF node and port GUIDs 30aad41721e0 net/core: Add support for getting VF GUIDs
Thanks
Quoted 38 lines · Leon Romanovsky
Quoted 29 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Hi,
This series from Danit extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs.
The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally.
The iproute2 was extended too to present those GUIDs.
- ip link show <device>
For example:
- ip link set ib4 vf 0node_guid22:44:33:00:33:11:00:33
- ip link set ib4 vf 0port_guid10:21:33:12:00:11:22:10
- ip link show ib4ib4: <BROADCAST,MULTICAST> mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss offDue to the fact that this series touches both net and RDMA, we assume that it needs to be applied to our shared branch (mlx5-next) and pulled later by Dave and Doug/Jason.
Quoted 7 lines
Thanks
Danit Goldberg (4):
net/core: Add support for getting VF GUIDs IB/core: Add interfaces to get VF node and port GUIDs IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/mlx5: Implement callbacks for getting VFs GUID attributes
Quoted 7 lines
Applied to mlx5-next,
Doug, Jason please pull.
9c0015ef0928IB/mlx5: Implement callbacks for getting VFs GUID attributes2446887ed226IB/ipoib: Add ndo operation for getting VFs GUID attributesbfcb3c5d1485IB/core: Add interfaces to get VF node and port GUIDs30aad41721e0net/core: Add support for getting VF GUIDs
Okay, done.
Jason