From patchwork Tue Dec 3 15:43:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 1203756 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kbUCHTpr"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47S5ql0Pwpz9sP6 for ; Wed, 4 Dec 2019 02:43:47 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbfLCPnp (ORCPT ); Tue, 3 Dec 2019 10:43:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:48178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfLCPnp (ORCPT ); Tue, 3 Dec 2019 10:43:45 -0500 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DE252070A; Tue, 3 Dec 2019 15:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575387824; bh=XzjGxQFNNGP7Xb9NC+HCNSYs1m7NPNzTqnj/N3YaE2o=; h=From:To:Cc:Subject:Date:From; b=kbUCHTprobwZmHos9LDcFyGhEnRVE5yjP9izejbEVYI44etuIVTvTGkKO9ygpsINl 1hjVy4Bd22LEH8yQYikxPUasjw2c7MqYjU5wG+bS++B/VtvzhoNfjCA4VlnuI8MBRZ 9IiEUPoIcsKEHBhqoAPqBHEVFDggKEK3O4U/4Rys= From: Leon Romanovsky To: "David S . Miller" , David Ahern Cc: Danit Goldberg , linux-netdev , Leon Romanovsky Subject: [PATCH net] net/core: Populate VF index in struct ifla_vf_guid Date: Tue, 3 Dec 2019 17:43:36 +0200 Message-Id: <20191203154337.42422-1-leon@kernel.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Danit Goldberg 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 Signed-off-by: Leon Romanovsky --- net/core/rtnetlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 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);