Skip to content

MAC list broken with proper handling of set mac-vlan callback #261

@ScottDaniels

Description

@ScottDaniels

To support the use of the 'set mac-vlan' callback which allows a guest to add MAC addresses to the white list in real-time, the capability of setting a static list of MAC addresses in the VFs config file may break.

Specifically, when a guest virtual machine initialises the vNIC a 'reset' is received (MAC address of all zeros) which causes VFd to clear the list of MAC addresses added to the VF. This behavour was added to emulate the behavour of various drivers and is correct. However, the feature of allowing MAC addresses to be supplied via the VF configuration is broken with this as the MAC addresses are cleared and as they were no t initially inserted by the guest, they will not be replaced.

To return VFd to support the ability to supply 'white list' MAC addresses in the VF configuration file, the following change is being proposed:

If the VF config contains one or more MAC addresses in the array, the first will be used as the default MAC address (visible to the guest) and the remainder will be added to the white list (guest will receive packets with these MAC addresses as the dest, and will be allowed to send packets with these MAC addresses as the source. Any set mac-vlan callbacks will be ignored by VFd.

When the VF config has an empty array for MAC addresses, or the field is missing from the config, VFd will cause a random MAC address to be defined as the default, and set mac-vlan callbacks will be processed allowing the guest to add/delete MAC addresses from the white list.

Please comment.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions