]> git.baikalelectronics.ru Git - kernel.git/commit
vdpasim: fix MAC address configuration
authorLaurent Vivier <lvivier@redhat.com>
Thu, 29 Oct 2020 12:20:49 +0000 (13:20 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 30 Oct 2020 08:04:35 +0000 (04:04 -0400)
commitd567fd783ae151e70628b1e626c7ef21dfb8daf1
tree5583779821b479100e39f4034a791ccd092cdd0f
parent029a5b7936f3e53be5c7f420d1d0278ce3ae9f5a
vdpasim: fix MAC address configuration

vdpa_sim generates a ramdom MAC address but it is never used by upper
layers because the VIRTIO_NET_F_MAC bit is not set in the features list.

Because of that, virtio-net always regenerates a random MAC address each
time it is loaded whereas the address should only change on vdpa_sim
load/unload.

Fix that by adding VIRTIO_NET_F_MAC in the features list of vdpa_sim.

Fixes: 43c6dd814dc6 ("vdpasim: vDPA device simulator")
Cc: jasowang@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Link: https://lore.kernel.org/r/20201029122050.776445-2-lvivier@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim.c