Skip to content

Conversation

@rbradford
Copy link
Member

Provide options to let the user choose their host MAC address. If the user does not provide one we generate one and store it in the config.

Fixes: #1177

rbradford added 2 commits May 15, 2020 09:58
Do this by reading the HW address information and then modifying the
HW address to match the desired address. Preserving the rest of the
state including the address type.

Signed-off-by: Rob Bradford <[email protected]>
Signed-off-by: Sebastien Boeuf <[email protected]>
This is necessary to support setting the MAC address on the tap
interface on the host.

Signed-off-by: Rob Bradford <[email protected]>
@rbradford rbradford force-pushed the 2020-05-15-host-mac-addr branch 2 times, most recently from 42b5e8c to 0875bb6 Compare May 15, 2020 10:12
rbradford added 2 commits May 15, 2020 11:18
Add a new "host_mac" parameter to "--net" and "--net-backend" and use
this to set the MAC address on the tap interface. If no address is given
one is randomly assigned and is stored in the config.

Support for vhost-user-net self spawning was also included.

Fixes: cloud-hypervisor#1177

Signed-off-by: Rob Bradford <[email protected]>
Extend the set of tests we have for virtio-net and vhost-user-net to
check for host MAC address setting.

Signed-off-by: Rob Bradford <[email protected]>
@rbradford rbradford force-pushed the 2020-05-15-host-mac-addr branch from 0875bb6 to b2a2f55 Compare May 15, 2020 10:18
Copy link
Member

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rbradford rbradford merged commit 391508f into cloud-hypervisor:master May 15, 2020
@rbradford rbradford deleted the 2020-05-15-host-mac-addr branch May 26, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allocate and store host TAP mac address

2 participants