Skip to content
Commit 749a4016 authored by Jonah Palmer's avatar Jonah Palmer Committed by Michael S. Tsirkin
Browse files

vdpa/mlx5: Allow CVQ size changes



The MLX driver was not updating its control virtqueue size at set_vq_num
and instead always initialized to MLX5_CVQ_MAX_ENT (16) at
setup_cvq_vring.

Qemu would try to set the size to 64 by default, however, because the
CVQ size always was initialized to 16, an error would be thrown when
sending >16 control messages (as used-ring entry 17 is initialized to 0).
For example, starting a guest with x-svq=on and then executing the
following command would produce the error below:

 # for i in {1..20}; do ifconfig eth0 hw ether XX:xx:XX:xx:XX:XX; done

 qemu-system-x86_64: Insufficient written data (0)
 [  435.331223] virtio_net virtio0: Failed to set mac address by vq command.
 SIOCSIFHWADDR: Invalid argument

Acked-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
Acked-by: default avatarEugenio Pérez <eperezma@redhat.com>
Signed-off-by: default avatarJonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240216142502.78095-1-jonah.palmer@oracle.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Tested-by: default avatarLei Yang <leiyang@redhat.com>
Fixes: 5262912e ("vdpa/mlx5: Add support for control VQ and MAC setting")
parent c4e8b5ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment