This series of patch tries to solve the problem of migration with nics who have
multiple mac addresses or vlans. Qemu currently only send gratuitous packet for
first mac address, so after migration other mac addresses or vlans were broken.

The information of mac addresses and vlans were often stored in model specific
structure, so a model specific function were introduced and used after
migration during self announcement. A sample announcing function for virtio-net
is also implemented in this series. Other model could be also done in this
way. The previous method is kept for the model who does not implement model
specific function.

While there's still issues which need your comments and need to be solved.

1 Virtio specification allows filtering any number of destination mac addresses
  which looks impossible for the migration. Then we need to record an unlimited
  numbers of mac address which is not safe.

2 Virtio specification allows filtering of vlan and mac address but neither the
spec nor the implementation could decide the mappings between vlans and mac
addresses. This could make it impossible to send correct tagged gratuitous
packet.

For issue 1, the number of mac addresses were limited in this series.
For issue 2, I suspect it needs the modification of guest drivers to send the
mappings in order to make migration work. Or is there any method to get this
without touching guest drivers? For safety, all the mac addresses were only
announced when there's no vlan in guest which means the vlan after migration is
still broken.

This patchset is just an RFC and need your suggestions and comments.

Thanks.

---

Jason Wang (4):
      net: move announce_self_create to net.c
      net: Introduce model specific nic announce function
      virtio-net: Limit the num of uni/multicast mac addresses
      virtio-net: implement virtio-net specific announce function


 hw/virtio-net.c |   47 ++++++++++++++++++++++++++++++++++++++++++-----
 net.c           |   31 +++++++++++++++++++++++++++++++
 net.h           |    3 +++
 savevm.c        |   42 ++++++++----------------------------------
 4 files changed, 84 insertions(+), 39 deletions(-)

-- 
Jason Wang

Reply via email to