Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2623993pxu; Sat, 28 Nov 2020 22:50:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzqT51WCk8DFvaJX7c5l9KSb9kSkmXJG7H10guNis8MueX7JgHxKgvwciKTv0XUJJFwRxt X-Received: by 2002:a05:6402:1818:: with SMTP id g24mr16275655edy.313.1606632600346; Sat, 28 Nov 2020 22:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606632600; cv=none; d=google.com; s=arc-20160816; b=pbgIfaQgrtJdfTl/hoQRCEW7+WLl8wYPenErRmf8L7ojlK2zki2JfT9rAYBFd80ipd Lyn6rOXJZu5VbJFEBBs0IX3mtHzkMVfBt/Jmj+E8BoXPJzChAVNSSIoJqa8RxE+kKJDP QqgCMGOBFNoVWwtT/lWGBcm9pOu1xMihQteSfhCfU/QSYc47a204W7fPbySoP8j2QRJN FwZpzaLB0TgZVz47cQvV3JwVeIHXRAqsDUExgyRakVfBLwFqIOYXA5tADIVT730oZRzs yaK9/DyLBSbpJy/JgWrvkAWjO4erC8m9UXIcQ7gE08X7gToqMEQC2+L15b5QarS4pEwA QEhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=vnx+QKCDfGuWiwXTibE49Afola6Whl8yGwIrV5dy/uA=; b=MO6Q+Qf+epkniI2XjhvONi8ObGhLs+sohhdoU4ZTp8Cm+YV+SDLXlzv0Dtm0jQIARj kqOhZSzL8N57Jf7v89iRss7zoXV539Sq3E6/YKUdg2nCTI0OhagI5Fi4QNdp9fCD8Coz 2ED97VEgb9yGIjO7VKhUOBoVZGLHpOlZqib5KdhEwlu6HUP6zE0FVlEUwfeKBbmGBU8X Qm0eZAp9nXhvhrUCyjLP4cuwSwvmkdQ9K0s9IIxOVwGaxEwP4lgs1FkPrG39/v6rG9xZ l/u0JZfU9L8OprKEnRwCINJh2ykLFJ5q3LNpod31467WCR8vfgXRBpcRyyLIv+bvUzTi 1vvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=fXiCQCei; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si8494639eds.557.2020.11.28.22.49.37; Sat, 28 Nov 2020 22:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=fXiCQCei; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbgK2Goy (ORCPT + 99 others); Sun, 29 Nov 2020 01:44:54 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:7168 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgK2Goy (ORCPT ); Sun, 29 Nov 2020 01:44:54 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 28 Nov 2020 22:44:11 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 29 Nov 2020 06:44:14 +0000 Received: from vdi.nvidia.com (10.124.1.5) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Sun, 29 Nov 2020 06:44:12 +0000 From: Eli Cohen To: , , , CC: , Eli Cohen Subject: [PATCH] vdpa/mlx5: Use random MAC for the vdpa net instance Date: Sun, 29 Nov 2020 08:43:51 +0200 Message-ID: <20201129064351.63618-1-elic@nvidia.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1606632252; bh=vnx+QKCDfGuWiwXTibE49Afola6Whl8yGwIrV5dy/uA=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type; b=fXiCQCeiyS6nAjQgtUHmkwRkMBMlfVprpksS0XQUtspFr+f6FsLMoSXlGKAdVCCAI zFT6TvXLDgOVOW8IMGaBbjm9oMwC58a/rXwt32AWY+BXRWSevOBq+VSEqv2r9tg5fF lL5lQwvtlbCJL9qskJ4DU2OwHDrRBL8e/bgvyuaYVQeJ/uMXC+7l/ZYsTDqmmYNxjC SpwMBlcU7ukSlqGRNvZh/XHZ0JIo6WYY7lDXpMnDqrIBtpkY/s+vzKXdcDIl3j8nQe fHx/NUGii82jw2k5tYvYU4jc4R6MbNZiS1WZbCAz2Rt3BfUlN0jRiebQDzGmDuYYLn lvO+GIQDC29wg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should not try to use the VF MAC address as that is used by the regular (e.g. mlx5_core) NIC implementation. Instead, use a random generated MAC address. Suggested by: Cindy Lu Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices= ") Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5= _vnet.c index 1fa6fcac8299..80d06d958b8b 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -1955,10 +1955,7 @@ void *mlx5_vdpa_add_dev(struct mlx5_core_dev *mdev) if (err) goto err_mtu; =20 - err =3D mlx5_query_nic_vport_mac_address(mdev, 0, 0, config->mac); - if (err) - goto err_mtu; - + eth_random_addr(config->mac); mvdev->vdev.dma_dev =3D mdev->device; err =3D mlx5_vdpa_alloc_resources(&ndev->mvdev); if (err) --=20 2.26.2