net/core: Populate VF index in struct ifla_vf_guid
authorDanit Goldberg <danitg@mellanox.com>
Tue, 3 Dec 2019 15:43:36 +0000 (17:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Dec 2019 19:24:34 +0000 (11:24 -0800)
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")
Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index 0b5ccb7c9bc81f55f5e00bcadfda85b5f5680aa2..02916f43bf63cdbdd7d2c7e030776d7203421232 100644 (file)
@@ -1250,7 +1250,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);