"Michael S. Tsirkin" <m...@redhat.com> wrote: > No objection to this or similar change with vlans, > but I'd like to know why was this made a separate buffer > originally.
Dunno, either, but I think that this has been always that way. commit b6503ed9b8815ecfb82fe9faba28936365321248 was when it was introduced Alex, any objection? > > On Wed, Dec 02, 2009 at 01:04:29PM +0100, Juan Quintela wrote: >> >> Signed-off-by: Juan Quintela <quint...@redhat.com> >> --- >> hw/virtio-net.c | 6 +----- >> 1 files changed, 1 insertions(+), 5 deletions(-) >> >> diff --git a/hw/virtio-net.c b/hw/virtio-net.c >> index c515e0e..550a814 100644 >> --- a/hw/virtio-net.c >> +++ b/hw/virtio-net.c >> @@ -54,7 +54,7 @@ typedef struct VirtIONet >> uint32_t first_multi; >> uint8_t multi_overflow; >> uint8_t uni_overflow; >> - uint8_t *macs; >> + uint8_t macs[MAC_TABLE_ENTRIES * ETH_ALEN]; >> } mac_table; >> uint8_t vlans[MAX_VLAN >> 3]; >> } VirtIONet; >> @@ -860,8 +860,6 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf >> *conf) >> n->mergeable_rx_bufs = 0; >> n->promisc = 1; /* for compatibility */ >> >> - n->mac_table.macs = qemu_mallocz(MAC_TABLE_ENTRIES * ETH_ALEN); >> - >> register_savevm("virtio-net", virtio_net_id++, VIRTIO_NET_VM_VERSION, >> virtio_net_save, virtio_net_load, n); >> >> @@ -876,8 +874,6 @@ void virtio_net_exit(VirtIODevice *vdev) >> >> unregister_savevm("virtio-net", n); >> >> - qemu_free(n->mac_table.macs); >> - >> qemu_del_timer(n->tx_timer); >> qemu_free_timer(n->tx_timer); >> >> -- >> 1.6.5.2