net/virtio: add MAC device config getter and setter
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 17 Jun 2021 14:17:18 +0000 (16:17 +0200)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 23 Jun 2021 07:55:45 +0000 (09:55 +0200)
commitc995b00572f88792b8257e59ad5abe82cd95e8dd
tree44f30309301fcb5be58b18c4dc8832994587297f
parent9b7466f6ce5bb43200f082fea1e8eb1c22ecd5d3
net/virtio: add MAC device config getter and setter

This patch uses the new device config ops to get and set
the MAC address if supported.

If a valid MAC address is passed as devarg of the
Virtio-user PMD, the driver will try to store it in the
device config space. Otherwise the one provided in
the device config space will be used, if available.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
drivers/net/virtio/virtio_user/virtio_user_dev.c
drivers/net/virtio/virtio_user/virtio_user_dev.h
drivers/net/virtio/virtio_user_ethdev.c