Skip to contentSkip to conversation

net/core: Populate VF index in struct ifla_vf_guid

PATCH Applied Leon Romanovsky 2 participants 2 messages Dec 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/core: Populate VF index in struct ifla_vf_guid

From: Danit Goldberg <[email protected]>

In addition to filling the node_guid and port_guid attributes, there is a need to populate VF index too, otherwise users of netlink interface will see same VF index for all VFs.

Fixes 30aad41721e0 ("net/core: Add support for getting VF GUIDs")
---
 net/core/rtnetlink.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/core/rtnetlink.c +3 -1
index 93791dad3e31..af3a4f7ce3dc 100644
@@ -1236,7 +1236,9 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
 		vf_spoofchk.vf =
 		vf_linkstate.vf =
 		vf_rss_query_en.vf =
-		vf_trust.vf = ivi.vf;
+		vf_trust.vf =
+		node_guid.vf =
+		port_guid.vf = ivi.vf;
 
 	memcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac));
 	memcpy(vf_broadcast.broadcast, dev->broadcast, dev->addr_len);

--
2.20.1

maintainer Applied
#1 lore raw

From: Leon Romanovsky <[email protected]>
Date: Tue, 3 Dec 2019 17:43:36 +0200

Quoted 9 lines

From: Danit Goldberg <[email protected]>

In addition to filling the node_guid and port_guid attributes, there is a need to populate VF index too, otherwise users of netlink interface will see same VF index for all VFs.

Fixes 30aad41721e0 ("net/core: Add support for getting VF GUIDs")

Applied, thank you.