On 12/15/2016 11:54 AM, Ciara Loftus wrote:
> In order to use dpdk ports in ovs they have to be bound to a DPDK
> compatible driver before ovs is started.
> 
> This patch adds the possibility to hotplug (or hot-unplug) a device
> after ovs has been started. The implementation adds two appctl commands:
> netdev-dpdk/attach and netdev-dpdk/detach
> 
> After the user attaches a new device, it has to be added to a bridge
> using the add-port command, similarly, before detaching a device,
> it has to be removed using the del-port command.
> 
> Signed-off-by: Mauricio Vasquez B <mauricio.vasquezber...@studenti.polito.it>
> Signed-off-by: Ciara Loftus <ciara.lof...@intel.com>
> Co-authored-by: Ciara Loftus <ciara.lof...@intel.com>
> ---
> Changelog:
> * Use xasprintf instead of snprintf when reporting attach/detach errors.
> * Updated format of link in docs to comply with new format.
> * Remove 'port-' from appctl netdev-dpdk/(port-)attach and detach commands
> * Free 'response' in attach and detach functions in netdev_dpdk
> * Add my Sign-off and Co-author tags
> * Fix docs - use port name for detach not PCI
> 
>  Documentation/intro/install/dpdk-advanced.rst | 25 +++++++
>  NEWS                                          |  1 +
>  lib/netdev-dpdk.c                             | 95 
> +++++++++++++++++++++++++--
>  3 files changed, 115 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/intro/install/dpdk-advanced.rst 
> b/Documentation/intro/install/dpdk-advanced.rst
> index 44d1cd7..0e78142 100644
> --- a/Documentation/intro/install/dpdk-advanced.rst
> +++ b/Documentation/intro/install/dpdk-advanced.rst
> @@ -932,6 +932,31 @@ validate the suitability of different vSwitch 
> implementations in a telco
>  deployment environment. More information can be found on the `OPNFV wiki
>  <https://wiki.opnfv.org/display/vsperf/VSperf+Home>`__.
>  
> +Port Hotplug
> +------------
> +
> +OvS supports port hotplugging, it allows to use ports that were not bound
> +to DPDK when vswitchd was started.
> +In order to attach a port, it has to be bound to DPDK using the
> +dpdk_nic_bind.py script:
> +
> +       $ $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio 0000:01:00.0
> +
> +Then it can be attached to OVS:
> +
> +       $ ovs-appctl netdev-dpdk/attach 0000:01:00.0
> +
> +At this point, the user can create a ovs port using the add-port command.
> +
> +It is also possible to detach a port from ovs, the user has to remove the
> +port using the del-port command, then it can be detached using:
> +
> +       $ ovs-appctl netdev-dpdk/detach dpdk0
> +
> +This feature is not supported with VFIO and could not work with some NICs.

Does it only work with igb_uio? What about uio_pci_generic?

nit - 'could not' makes things a bit vague - how about 'does not'.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to