[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 02/21] virtio-net: Expose MAC_TABLE_ENTRIES
From: |
Eugenio Pérez |
Subject: |
[PATCH v6 02/21] virtio-net: Expose MAC_TABLE_ENTRIES |
Date: |
Wed, 20 Jul 2022 08:59:27 +0200 |
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>
---
include/hw/virtio/virtio-net.h | 3 +++
hw/net/virtio-net.c | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
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;
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 7ad948ee7c..f83e96e4ce 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 */
--
2.31.1
- [PATCH v6 00/21] vdpa net devices Rx filter change notification with Shadow VQ, Eugenio Pérez, 2022/07/20
- [PATCH v6 02/21] virtio-net: Expose MAC_TABLE_ENTRIES,
Eugenio Pérez <=
- [PATCH v6 07/21] vhost: Check for queue full at vhost_svq_add, Eugenio Pérez, 2022/07/20
- [PATCH v6 04/21] vdpa: Avoid compiler to squash reads to used idx, Eugenio Pérez, 2022/07/20
- [PATCH v6 01/21] vhost: move descriptor translation to vhost_svq_vring_write_descs, Eugenio Pérez, 2022/07/20
- [PATCH v6 05/21] vhost: Reorder vhost_svq_kick, Eugenio Pérez, 2022/07/20
- [PATCH v6 06/21] vhost: Move vhost_svq_kick call to vhost_svq_add, Eugenio Pérez, 2022/07/20
- [PATCH v6 08/21] vhost: Decouple vhost_svq_add from VirtQueueElement, Eugenio Pérez, 2022/07/20
- [PATCH v6 03/21] virtio-net: Expose ctrl virtqueue logic, Eugenio Pérez, 2022/07/20
- [PATCH v6 09/21] vhost: Add SVQDescState, Eugenio Pérez, 2022/07/20
- [PATCH v6 10/21] vhost: Track number of descs in SVQDescState, Eugenio Pérez, 2022/07/20
- [PATCH v6 12/21] vhost: Expose vhost_svq_add, Eugenio Pérez, 2022/07/20