Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAE56C54E94 for ; Mon, 23 Jan 2023 12:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231515AbjAWMBb convert rfc822-to-8bit (ORCPT ); Mon, 23 Jan 2023 07:01:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbjAWMBZ (ORCPT ); Mon, 23 Jan 2023 07:01:25 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DFEF166C2; Mon, 23 Jan 2023 04:00:40 -0800 (PST) Received: from lenovo-t14s.redhat.com ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MKsaz-1ozEsm05Ph-00LEs8; Mon, 23 Jan 2023 13:00:25 +0100 From: Laurent Vivier To: linux-kernel@vger.kernel.org Cc: Gautam Dawar , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, Eli Cohen , Cindy Lu , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Parav Pandit Subject: [PATCH v2 0/1] virtio_net: vdpa: update MAC address when it is generated by virtio-net Date: Mon, 23 Jan 2023 13:00:21 +0100 Message-Id: <20230123120022.2364889-1-lvivier@redhat.com> X-Mailer: git-send-email 2.39.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K1:kdTrXlXOuCPL7jiaWQI9WXzof8NAdeOnvouqUAL01MTUIA8Kr22 a+qTMVEaaSrBI0VFplVwJylyy5FsY/N2Fh6X3LAN6xN8vLhVxTMCNxF4RVMom0Z48j1F9XX PYk/4LPcCGTy87kGYnE+G1x306j2vLfBNCd/KoZHXDq8Q7Y3Pw2JVLb7vQWAK0yl4U21OvF Adg/ranDnGinlVzhTbjxA== UI-OutboundReport: notjunk:1;M01:P0:2nLqAPfkmz4=;ME1dtv68aATFXykiq24doQVfAG3 px94zx7FpfJojGIffpqGI0gEddgCxUoyUu8xMFtMPFPpT4e5J9ZPG14SQ/H2N+WLxDDvBqjSp ZHpp2KQE5av3925WWsb7Gvne9hhW/wciGi9ASYBT0uQNRLY1tK46uTrcE4OYAML9dqFRnVt2U cNtleIPJgELbjwenHR8tIkjMjInKxTXX+2YJoa6Ly7lcIHjQ5LrNF5s1SXDZ0nWiQCfncDRFM LXIDUd1zMiZbFMGWihNztjI18Ky4YbUgVuv4Pp5+Dgn2Tp9I2BuROtn2WJ33H851L85zyaCPD eEXuqVaLe2ZX9dV2Pn56NcKClLNNQLVtxexhk+ybjqGZt5FI+shevGlBPBaj9nMHL6Edqmimk MjjgB9fW7ZzPOYFmQd3tco0gHFHeAI/f0yMdUYgyUyhv5UUNPcFFwpn/JyNiEPVWfitGUxM7F w6t7ydLW0gKDH/nFl869B8VqfdsrZeCAroz9CpsuoOkW8RYtHjgyISUVgysuONhbDnbK1s6sv Sj9HLDmc05t9+wf5slzHVgDl7fg2V1kaMaOMdf7fyfZ7mJtVrU2mTpgZfYfrmTmGAiWGyPaM6 1GwOJardTxWUgLh0jS1OLVk2iTcIWuSKY5YTb2iM3XPk7LPd6VWBdWcb9fT4ErYttFRXsm9z8 t64BYa8PFMOCvrkqE4GwoyLYgJkgoXZ17IPLFiTpzA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the MAC address is not provided by the vdpa device virtio_net driver assigns a random one without notifying the device. The consequence, in the case of mlx5_vdpa, is the internal routing tables of the device are not updated and this can block the communication between two namespaces. To fix this problem, use virtnet_send_command(VIRTIO_NET_CTRL_MAC) to set the address from virtnet_probe() when the MAC address is not provided by the device. v2: - remove vdpa_sim related fixes - check virtio_has_feature(vdev, VIRTIO_NET_F_MAC) rather than addr_assign_type Laurent Vivier (1): virtio_net: notify MAC address change on device initialization drivers/net/virtio_net.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.39.0