virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] virtio_net: vdpa: update MAC address when it is generated by virtio-net
@ 2023-01-23 12:00 Laurent Vivier
  2023-01-23 12:00 ` [PATCH v2 1/1] virtio_net: notify MAC address change on device initialization Laurent Vivier
  0 siblings, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2023-01-23 12:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cindy Lu, Michael S. Tsirkin, netdev, virtualization,
	Eugenio Pérez, David S. Miller, Gautam Dawar, Eli Cohen

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

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-27 14:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-23 12:00 [PATCH v2 0/1] virtio_net: vdpa: update MAC address when it is generated by virtio-net Laurent Vivier
2023-01-23 12:00 ` [PATCH v2 1/1] virtio_net: notify MAC address change on device initialization Laurent Vivier
2023-01-24 10:15   ` Michael S. Tsirkin
2023-01-24 11:04     ` Laurent Vivier
2023-01-27 11:08       ` Michael S. Tsirkin
2023-01-27 12:28         ` Laurent Vivier
2023-01-27 14:53           ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).