qemu-patch-raspberry4/hw
Amos Kong b1be42803b net: add support of mac-programming over macvtap in QEMU side
Currently macvtap based macvlan device is working in promiscuous
mode, we want to implement mac-programming over macvtap through
Libvirt for better performance.

Design:
 QEMU notifies Libvirt when rx-filter config is changed in guest,
 then Libvirt query the rx-filter information by a monitor command,
 and sync the change to macvtap device. Related rx-filter config
 of the nic contains main mac, rx-mode items and vlan table.

This patch adds a QMP event to notify management of rx-filter change,
and adds a monitor command for management to query rx-filter
information.

Test:
 If we repeatedly add/remove vlan, and change macaddr of vlan
 interfaces in guest by a loop script.

Result:
 The events will flood the QMP client(management), management takes
 too much resource to process the events.

 Event_throttle API (set rate to 1 ms) can avoid the events to flood
 QMP client, but it could cause an unexpected delay (~1ms), guests
 guests normally expect rx-filter updates immediately.

 So we use a flag for each nic to avoid events flooding, the event
 is emitted once until the query command is executed. The flag
 implementation could not introduce unexpected delay.

There maybe exist an uncontrollable delay if we let Libvirt do the
real change, guests normally expect rx-filter updates immediately.
But it's another separate issue, we can investigate it when the
work in Libvirt side is done.

Michael S. Tsirkin: tweaked to enable events on start
Michael S. Tsirkin: fixed not to crash when no id
Michael S. Tsirkin: fold in patch:
   "additional fixes for mac-programming feature"
Amos Kong: always notify QMP client if mactable is changed
Amos Kong: return NULL list if no net client supports rx-filter query

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-15 21:23:08 +03:00
..
9pfs hw/9pfs: Be robust against paths without FS_IOC_GETVERSION 2013-05-28 15:23:12 +05:30
acpi piix: fix some printf errors when debug is enabled 2013-06-14 14:38:45 +04:00
alpha pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
arm pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
audio Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu 2013-06-15 10:53:44 +00:00
block nand: Don't inherit from Sysbus 2013-06-25 19:15:46 +01:00
bt sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
char cadence_uart: Handle backend tx errors 2013-06-24 16:26:52 +02:00
core memory: make section size a 128-bit integer 2013-06-20 16:32:47 +02:00
cpu target-i386: Move APIC to ICC bus 2013-05-01 13:06:07 +02:00
cris hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
display Merge remote-tracking branch 'spice/spice.v71' into staging 2013-06-24 14:33:09 -05:00
dma dma: eliminate DMAContext 2013-06-20 16:39:52 +02:00
gpio Remove unneeded type casts 2013-04-19 11:36:33 +02:00
i2c qdev: Drop FROM_QBUS() macro 2013-06-07 14:55:33 +02:00
i386 pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
ide cmd646: fix build when DEBUG_IDE is enabled. 2013-06-28 15:46:38 +02:00
input isa: Use realizefn for ISADevice 2013-06-07 12:14:45 +02:00
intc intc/openpic_kvm: Fix QOM and build issues 2013-07-01 01:11:15 +02:00
isa isa: QOM'ify ISADevice 2013-06-07 14:55:33 +02:00
lm32 qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
m68k hw: move char devices to hw/char/, configure via default-configs/ 2013-04-08 18:13:14 +02:00
microblaze microblaze/petalogix_s3adsp1800_mmu: Fix UART IRQ 2013-06-18 09:44:59 +02:00
mips pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
misc pvpanic: fix fwcfg for big endian hosts 2013-07-04 10:42:51 +03:00
moxie Trivial grammar and spelling fixes 2013-05-01 20:55:21 +04:00
net net: add support of mac-programming over macvtap in QEMU side 2013-07-15 21:23:08 +03:00
nvram spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00
openrisc hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pci pci-bridge: update mappings for migration/restore 2013-07-10 12:49:26 +03:00
pci-bridge pci: fix BRDIGE typo 2013-07-10 12:49:33 +03:00
pci-host pci: Replace pci_find_domain() with more general pci_root_bus_path() 2013-07-07 23:10:57 +03:00
ppc pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
s390x virtio-ccw: fix build breakage on windows 2013-07-01 11:00:20 +02:00
scsi dma: eliminate DMAContext 2013-06-20 16:39:52 +02:00
sd sd: pass bool parameter for sd_init 2013-06-21 22:52:50 +04:00
sh4 pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
sparc refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
sparc64 pci: Add root bus parameter to pci_nic_init() 2013-07-07 23:10:57 +03:00
ssi qdev: Drop FROM_QBUS() macro 2013-06-07 14:55:33 +02:00
timer i.MX: Rework functions/types name and use new style initialization 2013-06-25 18:34:13 +01:00
tpm Move TPM passthrough specific command line options to backend structure 2013-04-23 10:40:40 -05:00
unicore32 console: add device link to QemuConsoles 2013-04-25 14:45:46 -05:00
usb usb: add serial bus property 2013-06-24 08:41:07 +02:00
virtio memory: make section size a 128-bit integer 2013-06-20 16:32:47 +02:00
watchdog wdt_i6300esb: fix vmstate versioning 2013-06-18 13:44:37 -05:00
xen memory: make section size a 128-bit integer 2013-06-20 16:32:47 +02:00
xtensa sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
Makefile.objs virtio: simplify Makefile conditionals 2013-04-19 16:18:11 +02:00