virtio-net: Expose MAC_TABLE_ENTRIES
authorEugenio Pérez <eperezma@redhat.com>
Wed, 20 Jul 2022 06:59:27 +0000 (08:59 +0200)
committerJason Wang <jasowang@redhat.com>
Wed, 20 Jul 2022 08:58:08 +0000 (16:58 +0800)
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 <eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c
include/hw/virtio/virtio-net.h

index 7ad948ee7c858703f602570fc57b1cdfe325092f..f83e96e4cecd81b05c5c8b82bc2c2b4a80c2af25 100644 (file)
@@ -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 */
index eb87032627d221a90002fb5e0f1bc9e2e0cfdd01..cce1c554f7618d3c0bd803279d4c32faa15592d7 100644 (file)
@@ -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;