mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/net/virtio-net: make VirtIONet.vlans an array instead of a pointer
This field is a fixed-size buffer (number of elements is MAX_VLAN, known at build time). There's no need to allocate it dynamically, it can be made an integral part of VirtIONet structure. This field is the only user of VMSTATE_BUFFER_POINTER_UNSAFE() macro. Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Message-ID: <20251023135316.31128-2-mjt@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
b12c1b3724
commit
3a9cd2a4a1
@@ -202,7 +202,7 @@ struct VirtIONet {
|
||||
uint8_t uni_overflow;
|
||||
uint8_t *macs;
|
||||
} mac_table;
|
||||
uint32_t *vlans;
|
||||
uint32_t vlans[MAX_VLAN];
|
||||
virtio_net_conf net_conf;
|
||||
NICConf nic_conf;
|
||||
DeviceState *qdev;
|
||||
|
||||
Reference in New Issue
Block a user