TAP support (and a few other small things)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | KVM test: add some MAC/IP address utilities to kvm_utilsclient/ | +108 | 0 replies | |
| 2/12 | KVM test: add basic TAP support with static MAC-IP mappingclient/ client/ client/ | +79 | 0 replies | |
| 3/12 | KVM test: add sample 'qemu-ifup' scriptclient/ | +8 | 4 replies | |
| 4/12 | KVM test: add host-specific MAC-IP pool configurationclient/ client/ | +76 | 0 replies | |
| 5/12 | KVM test: specify installation cdkeys in a dedicated fileclient/ client/ | +19 | 2 replies | |
| 6/12 | KVM test: minor style changes to kvm_config.pyclient/ | +18 | 1 reply | |
| 7/12 | KVM test: kvm_config.py: do not fail when including a nonexistent fileclient/ | +11 | 3 replies | |
| 8/12 | KVM test: kvm_subprocess: send user specified parameters to kvm_tail callbacksclient/ | +49 | 0 replies | |
| 9/12 | KVM test: dynamically detect and cache MAC-IP pairs using tcpdumpclient/ | +41 | 0 replies | |
| 10/12 | KVM test: kvm_utils.py: small fix for format_str_for_message()client/ | +3 | 0 replies | |
| 11/12 | KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdumpclient/ client/ client/ +1 more | +81 | 0 replies | |
| 12/12 | KVM test: make stress_boot work properly with TAP networkingclient/ client/ | +12 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [KVM-AUTOTEST PATCH 0/12] TAP support (and a few other small things)
Here's my proposed TAP solution:
- The user specifies MAC ranges and may or may not specify corresponding IP ranges.
- VMs are always given MAC addresses from the user specified MAC ranges.
- MAC address ranges must be unique to each host running KVM tests -- there must be no overlap between them.
- If corresponding IP ranges are specified as well, the system will use them when trying to communicate with guests.
- If corresponding IP ranges are not specified, tcpdump will be used to listen to DHCP traffic and dynamically detect the right IP addresses. There's also a flag that can force this behavior.
- tcpdump will run in the background at all times, and collect MAC-IP pairs as soon as they are assigned by the DHCP server. This is useful for NIC hotplugging (where IP addresses are assigned during the test itself) and generally for misbehaving guests or DHCP servers (restarting network services during the test, using very short lease times).
- It is up to the user to create the actual bridge for TAP devices; the qemu-ifup script included in one of the patches only adds the TAP interface to an existing bridge. The user should modify this script or create a bridge some other way.
This works very well on two hosts I tried, but I'm not entirely sure it will work in all cases -- please let me know what you think.
(I remember Jason Wang mentioned that tcpdump doesn't always catch all the required traffic, or that it might somehow depend on the DHCP server -- anyone willing to comment on that?)
The following patches have been tested with a few KVM tests (boot, reboot, stress_boot, migration) with both TAP and user mode, but they could probably use more testing (maybe with Python 2.6?), so if anyone is willing to help with that I'd appreciate it very much.