Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net] net/core: Populate VF index in struct ifla_vf_guid
@ 2019-12-03 15:43 Leon Romanovsky
  2019-12-03 19:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2019-12-03 15:43 UTC (permalink / raw)
  To: David S . Miller, David Ahern
  Cc: Danit Goldberg, linux-netdev, Leon Romanovsky

From: Danit Goldberg <danitg@mellanox.com>

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>
---
 net/core/rtnetlink.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 93791dad3e31..af3a4f7ce3dc 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/core: Populate VF index in struct ifla_vf_guid
  2019-12-03 15:43 [PATCH net] net/core: Populate VF index in struct ifla_vf_guid Leon Romanovsky
@ 2019-12-03 19:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-03 19:25 UTC (permalink / raw)
  To: leon; +Cc: dsahern, danitg, netdev, leonro

From: Leon Romanovsky <leon@kernel.org>
Date: Tue,  3 Dec 2019 17:43:36 +0200

> From: Danit Goldberg <danitg@mellanox.com>
> 
> 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>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 15:43 [PATCH net] net/core: Populate VF index in struct ifla_vf_guid Leon Romanovsky
2019-12-03 19:25 ` David Miller

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git