51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
|
|
From c8ee92256e06a7fec7cfff3bf18e21ec03016613 Mon Sep 17 00:00:00 2001
|
||
|
|
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
|
||
|
|
Date: Wed, 20 Jul 2022 08:59:27 +0200
|
||
|
|
Subject: [PATCH] virtio-net: Expose MAC_TABLE_ENTRIES
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
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>
|
||
|
|
Signed-off-by: fangyi <eric.fangyi@huawei.com>
|
||
|
|
---
|
||
|
|
hw/net/virtio-net.c | 1 -
|
||
|
|
include/hw/virtio/virtio-net.h | 3 +++
|
||
|
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
||
|
|
index 512b37eb76..36d24b47bb 100644
|
||
|
|
--- a/hw/net/virtio-net.c
|
||
|
|
+++ b/hw/net/virtio-net.c
|
||
|
|
@@ -48,7 +48,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 eb87032627..cce1c554f7 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;
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|