Re: Internal MAC addresses list (mac_table) usage

2022-07-18 Thread Jason Wang
o the trick. > Moreover it might also help to spot an error when -1 is returned from > qemu_macaddr_get_free (for the time being it's silently interpreted as 0xFF > MAC LSB). > > BR, > Vitalii > > From: Jason Wang > Sent: Thursday, July 14, 2022 9:44 > To: Ovchinnikov, Vitalii >

Re: Internal MAC addresses list (mac_table) usage

2022-07-14 Thread Ovchinnikov, Vitalii
, 2022 9:44 To: Ovchinnikov, Vitalii Cc: qemu-devel@nongnu.org Subject: Re: Internal MAC addresses list (mac_table) usage   On Tue, Jul 12, 2022 at 4:43 PM Ovchinnikov, Vitalii wrote: > > Hi folks, > > While developing an Ethernet NIC model I noticed that QEMU maintains the > followi

Re: Internal MAC addresses list (mac_table) usage

2022-07-13 Thread Jason Wang
On Tue, Jul 12, 2022 at 4:43 PM Ovchinnikov, Vitalii wrote: > > Hi folks, > > While developing an Ethernet NIC model I noticed that QEMU maintains the > following internal array which marks used/free MAC addresses in net/net.c: > > static int mac_table[256] = {0}; > > with three private (static)

Internal MAC addresses list (mac_table) usage

2022-07-12 Thread Ovchinnikov, Vitalii
Hi folks, While developing an Ethernet NIC model I noticed that QEMU maintains the following internal array which marks used/free MAC addresses in net/net.c: static int mac_table[256] = {0}; with three private (static) functions accessing it: qemu_macaddr_set_used, qemu_macaddr_set_free, qemu_