From: Eugenio Pérez Date: Wed, 20 Jul 2022 06:59:27 +0000 (+0200) Subject: virtio-net: Expose MAC_TABLE_ENTRIES X-Git-Tag: v7.1.0-rc0~8^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6758c01f054c2a842d41d927d628b09f649d3254;p=thirdparty%2Fqemu.git virtio-net: Expose MAC_TABLE_ENTRIES vhost-vdpa control virtqueue needs to know the maximum entries supported by the virtio-net device, so we know if it is possible to apply the filter. Signed-off-by: Eugenio Pérez Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7ad948ee7c8..f83e96e4cec 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -49,7 +49,6 @@ #define VIRTIO_NET_VM_VERSION 11 -#define MAC_TABLE_ENTRIES 64 #define MAX_VLAN (1 << 12) /* Per 802.1Q definition */ /* previously fixed value */ diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h index eb87032627d..cce1c554f76 100644 --- a/include/hw/virtio/virtio-net.h +++ b/include/hw/virtio/virtio-net.h @@ -35,6 +35,9 @@ OBJECT_DECLARE_SIMPLE_TYPE(VirtIONet, VIRTIO_NET) * and latency. */ #define TX_BURST 256 +/* Maximum VIRTIO_NET_CTRL_MAC_TABLE_SET unicast + multicast entries. */ +#define MAC_TABLE_ENTRIES 64 + typedef struct virtio_net_conf { uint32_t txtimer;