Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9985602ybi; Wed, 24 Jul 2019 13:34:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHldKuBOjCy9JjvapIrNUOXGLcW9+ixeGk6rkTqB9nZYQG4kLSQsK/HnWcaGSvalYQZHDe X-Received: by 2002:a63:e54f:: with SMTP id z15mr82830444pgj.4.1564000464612; Wed, 24 Jul 2019 13:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000464; cv=none; d=google.com; s=arc-20160816; b=nIj86PAsi5oMJxsSadvmHpGl9MGrcWz/5pNpVvAglAd+2DJrWSTHANVQh3AhEN0NLr 5GSPxrZgciX1f8wuJ6DFtQWTKqrN2a48BpujQ7whFa5A2iEKhKFyyrtXOt1uNljVoZLB zuA0n5i8GcMAZojFDvCwXkwQkJgtY6mqcqhEJ2m0a3u3IN4540efB2uypUqtVKym2DJp zBrTvyG9auRlYSdhBDutWSL9oDUmUm12uzvADCUxfl1WyYDnhv6YbGxQuZ626qmLkmlp g/55VqPxEYFge3o9lsY1w3GvcJULq/PRj1MiRg9+jIivLUmZRO3sSjiYJrhpDh4VSwaV dpRg== 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=F5dsiONMFhM7+JmxFLGP973U6Fw40TEW7mbdyxkzS2s=; b=lxalVLlwManVuqhyrRRRTjzL6ocwzqmCnhwIr2ykrLFj5Ybpzj0sL5IILNa9KGmH0P 3n2iyQVtv880k4TGH0JaafSFFNEC9J9jqSZvSMGui81i7E44WtL6Q4f2OktJbrMfnOEn kVJ5sCUgn25avSdrgpZ7ar2uKfk+rwsMuJBQAxT+7+9N/h2kWcZars/20sVPYDTJkpWk 7iM8khwIqMkCaUdMMuG45lOwmyx+VuevbvAppAXyyP13ODOwv5sv9xtvu6F2J7r0qz+s cqbAXDikGAxhQGez90OUOPPJ/LspXAe0Ud/MVqMoWLaNvbAJup4799NXB3U+/0kJjYIe r89g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KgZ0HbQC; 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 a191si15831036pge.93.2019.07.24.13.34.09; Wed, 24 Jul 2019 13:34:24 -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=KgZ0HbQC; 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 S2388272AbfGXT2c (ORCPT + 99 others); Wed, 24 Jul 2019 15:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388332AbfGXT20 (ORCPT ); Wed, 24 Jul 2019 15:28:26 -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 2C43921951; Wed, 24 Jul 2019 19:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996505; bh=q/PP4wEmBuwNZos+xIzrwifTyzw3b6/QtHSmRi3p/48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KgZ0HbQCAw37ygQVk+0tjKnRnn3JPZ0gu2JeFCD6Vu/Ev0uLJLZqgVgg13aOML8x/ /bNQvGLIbBqPtuYgh1k0CjO3D2fx/v+36m0Kd2ioTrXC1FAMFOPGuRJqeK3XWepZcY ZNxK7orAFCDzb1PhClJDoBiOuaS0NZe0rOG323jk= 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 5.2 118/413] ipoib: correcly show a VF hardware address Date: Wed, 24 Jul 2019 21:16:49 +0200 Message-Id: <20190724191743.712150851@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@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 9b5e11d3fb85..04ea7db08e87 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1998,6 +1998,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