[ovs-dev] [RFC v2] netdev-dpdk: setting VF MAC address

Roni Bar Yanai roniba at mellanox.com
Wed Oct 30 11:57:28 UTC 2019

On cloud topology with hardware offload, when SR-IOV is used there is an
architecture limitation to configure the VF from the host. The port representor
is attached to OVS, while the VF is usually configured in pass through to the
VM. In such topology the MAC address of the VF is configured by the infra
 (OpenStack for example), as VM is usually untrusted.

For OVS-kernel this can be done by ip link command line. For OVS-DPDK and in
fact for any DPDK application that doesn't use bifurcated driver, the only
entity that can configure the VF MAC address is the PF owner.

Since the DPDK ports management is controlled by the application (OVS here),
such configuration request should be intercepted by OVS.
A more complex approach would be to have an external tool, provided by DPDK,
which would take care of avoiding any conflict or race condition with the
application threads. It is obviously easier to follow the current DPDK model
and keep full control in OVS.

A new command line for OVS will be added:

    ovs-vsctl set interface <dpdk-rep_id> mac=XX:XX:XX:XX:XX:XX

The OVS will use the rte_eth_dev_default_mac_addr_set api that should be
extended to configure the VF mac address in the name of the representor.

see link: https://www.mail-archive.com/dev@dpdk.org/msg140671.html

It seems like this local approach requires minor changes in OVS netdev-dpdk,
and the benefit will be substantial mainly OVS-DPDK integration with  OpenStack
and other controllers.

More information about the dev mailing list