[ovs-dev] [PATCH 1/1] vswitchd: Allow setting MAC on DPDK interfaces

Ilya Maximets i.maximets at ovn.org
Thu Jan 9 13:27:39 UTC 2020

On 08.01.2020 11:48, Ophir Munk wrote:
> Hi,
> There is an important use case for having OVS change MAC addresses of dpdk interfaces. 
> OpenStack for example needs to update the MAC address of a VF assigned to a VM, where the corresponding VF representor is owned by dpdk. 
> For some NIC vendors using "ifconfig" or "ip" commands - is not an option (if the NIC is not bifurcated). 
> Therefore OpenStack should use the OVS API to set the MAC address for dpdk interfaces.
> Along with Ben's explanation it seems right to only allow "internal" or "dpdk" port types to set the MAC.

There are still same issues for DPDK ports.  Just because OVS
doesn't necessarily "owns" them.  In case of Mellanox NICs, ports
are still could be configured by 'ip' tool due to bifurcated
drivers.  And this produces the same confusion.

> Testing both patches [1] and [2] - passed successfully.
> Acked-by: Ophir Munk <ophirmu at mellanox.com>
> I hope patches [1] and [2] can be merged to master.
> [1]
> https://patchwork.ozlabs.org/patch/1186896/
> ("[ovs-dev,v2] netdev-dpdk: Add ability to set MAC address.")
> [2]
> https://patchwork.ozlabs.org/patch/1215075/
> ("[ovs-dev,1/1] vswitchd: Allow setting MAC on DPDK interfaces")
>> -----Original Message-----
>> From: Ben Pfaff <blp at ovn.org>
>> Sent: Tuesday, January 7, 2020 2:26 AM
>> To: Ilya Maximets <i.maximets at ovn.org>
>> Cc: Eveline Raine <eveliner at mellanox.com>; dev at openvswitch.org; Moshe
>> Levi <moshele at mellanox.com>; Adrian Chiris <adrianc at mellanox.com>;
>> Ophir Munk <ophirmu at mellanox.com>; Majd Dibbiny
>> <majd at mellanox.com>; Roni Bar Yanai <roniba at mellanox.com>; Ameer
>> Mahagneh <ameerm at mellanox.com>
>> Subject: Re: [PATCH 1/1] vswitchd: Allow setting MAC on DPDK interfaces
>> On Fri, Jan 03, 2020 at 03:56:59PM +0100, Ilya Maximets wrote:
>>> Ben, do you see any other drawbacks that we should handle if we'll
>>> allow changing MAC addresses for non-internal ports?  Or, maybe some
>>> issues with my logic?
>> It can cause surprises for interactions with regular system tools.
>> Anyone who uses "ip" or "ifconfig" to change the MAC will find it changed
>> back later (perhaps not immediately).  And if you un-set it in the database,
>> OVS doesn't know what to change it back to.
>> These drawbacks aren't there in the same way for devices that OVS "owns"
>> like internal devices or dpdk devices.  Well, I guess they are for OVS internal
>> devices to some extent, but for those OVS has some responsibility to pick a
>> reasonable MAC address to begin with.  If OVS doesn't, then it causes
>> confusion of its own through things like having a machine's MAC address
>> change if you create a bridge and move a physical NIC onto it.  We had lots of
>> experience with that early on with OVS.

More information about the dev mailing list