Skip to content

Commit

Permalink
net/core: Populate VF index in struct ifla_vf_guid
Browse files Browse the repository at this point in the history
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: 30aad41 ("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>
  • Loading branch information
Danit Goldberg authored and David S. Miller committed Dec 3, 2019
1 parent c4b4c42 commit 9aed6ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9aed6ae

Please sign in to comment.