MAC address reset on VF when SRIOV ports are deleted

Registered by Souvik Dey

Summary
=======
Reset MAC address from VF when the direct ports(SR-IOV) are deleted

Motivation
========
Currently when the VF are created and not in use by any port, the MAC address set on the VF is 00:00:00:00:00:00. When the VF is attached to the port then a MAC address is assigned it to the VF. But on the port deletion the MAC address is not reset on the VF. This makes debugging of platform issues a hassle as it is tough to recognize which VF are in use and which are free. Also, if the same VF is to be reused as macvtap instead of direct, then it fails as VF alreday has a MAC assigned and manual reset/removal of MAC is required from the VF.

Description
=========
After the deletion of the neutron port which is attached to the VF, the MAC address of the VF should be reset to 00:00:00:00:00:00. We can use the below ip link set command to do that.

    ip link set dev eth0 vf 0 mac 0

This command will flush the VF MAC to 0.

Proposed Change
===============

Once the port is deleted the sriovnicagent should be triggered to run the command using the ip-link(8) tool.

UX
===
NA

Testing
======
Tempest tests are not planned currently as SR-IOV hardware is not always available. 3rd party CI testing could be considered, though probably the feature is relatively minor for that.

Outside Dependencies
==================

And user will have a facility to control trust settings on specific Neutron ports.

    python-neutronclient does not need to be modified

Requirements Update Required
========================
NA

Doc Impact
=========
NA

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Souvik Dey
Direction:
Needs approval
Assignee:
SUYASH KARMARKAR
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Souvik Dey

Related branches

Sprints

Whiteboard

This issue is addressed by the fixed in libvirt from RedHat in RHEL 7.4.
https://bugzilla.redhat.com/show_bug.cgi?id=1415609

So closing the issue. If there is need to do more modification we can re-visit it.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.