Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3783423ybi; Mon, 29 Jul 2019 12:32:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVUxqk5xOV+OIBWfFhPXuSPxfTKvCq4jOUurc8pwsFvrts2rtkRjiTv/f46L/0/PFxeFbx X-Received: by 2002:a17:90a:d3d4:: with SMTP id d20mr116308091pjw.28.1564428761293; Mon, 29 Jul 2019 12:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428761; cv=none; d=google.com; s=arc-20160816; b=pLpP4zNeRxpgE5V7Mfv8x2nP9OIdFOWzi10ZiCebku8rPOzfXCrwQVQ3IOG0hcMzh+ HVXI2HrDw1SewJJA8uToLAS+CTFMsxrUcxH9ITbbz6dMj+//Qp0ZbNqz/ClpvRdSSkov P9liMOtM74uIKHqgdW8aNAG4MkBuii5C0khkBGamS3s6Imq2T6H+eyrJsV3k5crmDfRB U0PcRrfzdY4g+WWSPsqHi9x27Ld/+hP+9vwqctaMpuHj3SuyF74kbCxtlC1wKiYIxk2G gmgEBV3JytiXnMZtP6SRhlDjhduu3BsCVGcl4YiIBJMi/NpMDfgC8qrnUHnmI99UDw58 ZIug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NltirNDFdfCGR5fAYHZOk+c8yqkDjkRu3MWIiz7COmQ=; b=VO3f5PzPYF0m3Q9OwU0SKlK3kviuN0e4tQCsOHJQ4ffb//KROekwX5LNbkntq7wHz3 k5dJJMWWx6fTwLKlcVRBlLt/z6rARVOCPL43wCkntj9YBrEJX6CEOcnZPrCaLmuxxM8i csLDeQkJ/+nk6LgrhVb5YDDv/ifVFigQ8avZX9v5PbNW9Tsgk7OOleUUEwv4pYPWnEY7 ZifQ1jIInZj9j240jwqNJBDZagemY+iY3A564xnZHGwlqfXp7hmTLCMsd07YbAyaHHWT PAxStPUCsSSPMtUg9bdwaylEFR1BXJorf3KwZWh/dYzuC6ZVIuTxHHbrXg19yUBqeDOW W+ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kfx+icDo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si26100068pjw.22.2019.07.29.12.32.26; Mon, 29 Jul 2019 12:32:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kfx+icDo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729817AbfG2T0q (ORCPT + 99 others); Mon, 29 Jul 2019 15:26:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:39210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729059AbfG2T0p (ORCPT ); Mon, 29 Jul 2019 15:26:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 8BB6A20C01; Mon, 29 Jul 2019 19:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428405; bh=ozoPLPXd/jrSdZ2FR3JHy5bVrMxX2dEdna7OTOZWhpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kfx+icDotBcaPoL5hdgNpPG/X+heuWxzTWYBfAxYsHk8sAwhG5IjqrlzrpZR052DK avlpI8fzUjwHAQ8ScZ5daNjkG9y7fb1Qhb1bo3nKINqVpx9yv1JIQlO77UTZHGK46N d+Qbzj6pTskUtG+Eye7569yAABmL1FrvWbyDeKbk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Denis Kirjanov , Doug Ledford , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 058/293] ipoib: correcly show a VF hardware address Date: Mon, 29 Jul 2019 21:19:09 +0200 Message-Id: <20190729190828.664445391@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 64d701c608fea362881e823b666327f5d28d7ffd ] in the case of IPoIB with SRIOV enabled hardware ip link show command incorrecly prints 0 instead of a VF hardware address. Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 MAC 00:00:00:00:00:00, spoof checking off, link-state disable, trust off, query_rss off ... After: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, link-state disable, trust off, query_rss off v1->v2: just copy an address without modifing ifla_vf_mac v2->v3: update the changelog Signed-off-by: Denis Kirjanov Acked-by: Doug Ledford Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index e6ff16b27acd..1a93d3d58c8a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1833,6 +1833,7 @@ static int ipoib_get_vf_config(struct net_device *dev, int vf, return err; ivf->vf = vf; + memcpy(ivf->mac, dev->dev_addr, dev->addr_len); return 0; } -- 2.20.1