Commit 9fbf082f authored by Leon Romanovsky's avatar Leon Romanovsky Committed by David S. Miller

net/core: Do not clear VF index for node/port GUIDs query

VF numbers were assigned to node_guid and port_guid, but cleared
right before such query calls were issued. It caused to return
node/port GUIDs of VF index 0 for all VFs.

Fixes: 30aad417 ("net/core: Add support for getting VF GUIDs")
Reported-by: default avatarAdrian Chiris <adrianc@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31484d56
......@@ -1242,6 +1242,8 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
return 0;
memset(&vf_vlan_info, 0, sizeof(vf_vlan_info));
memset(&node_guid, 0, sizeof(node_guid));
memset(&port_guid, 0, sizeof(port_guid));
vf_mac.vf =
vf_vlan.vf =
......@@ -1290,8 +1292,6 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
sizeof(vf_trust), &vf_trust))
goto nla_put_vf_failure;
memset(&node_guid, 0, sizeof(node_guid));
memset(&port_guid, 0, sizeof(port_guid));
if (dev->netdev_ops->ndo_get_vf_guid &&
!dev->netdev_ops->ndo_get_vf_guid(dev, vfs_num, &node_guid,
&port_guid)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment