[PATCH v1] net/virtio-user: implement MAC setting for Vhost-kernel

Stephen Hemminger stephen at networkplumber.org
Wed May 21 16:52:58 CEST 2025


On Wed, 21 May 2025 16:23:05 +0200
Maxime Coquelin <maxime.coquelin at redhat.com> wrote:

> iff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> index 611e2e25ec..3e13f8f65b 100644
> --- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> +++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> @@ -112,7 +112,7 @@ tap_get_flags(int tapfd, unsigned int *tap_flags)
>  }
> 
>  int
> -tap_set_mac(int tapfd, uint8_t *mac)
> +tap_set_mac(int tapfd, const uint8_t *mac)
>  {
>  	struct ifreq ifr;

Since static building of DPDK does not have namespaces, it would be
good if virtio use of tap and tap device did not get name conflicts.

I.e make all the global function names start with "virtio_tap_" prefix


More information about the dev mailing list