[ovs-dev] [PATCH] netdev: Add 'errp' to set_config().
Kevin Traynor
ktraynor at redhat.com
Wed Jan 11 10:56:08 UTC 2017
On 01/07/2017 01:24 AM, Daniele Di Proietto wrote:
> Since 55e075e65ef9("netdev-dpdk: Arbitrary 'dpdk' port naming"),
> set_config() is used to identify a DPDK device, so it's better to report
> its detailed error message to the user. Tunnel devices and patch ports
> rely a lot on set_config() as well.
>
> This commit adds a param to set_config() that can be used to return
> an error message and makes use of that in netdev-dpdk and netdev-vport.
>
> Before this patch:
>
> $ ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
> ovs-vsctl: Error detected while setting up 'dpdk0': dpdk0: could not set configuration (Invalid argument). See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> $ ovs-vsctl add-port br0 p+ -- set Interface p+ type=patch
> ovs-vsctl: Error detected while setting up 'p+': p+: could not set configuration (Invalid argument). See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> $ ovs-vsctl add-port br0 gnv0 -- set Interface gnv0 type=geneve
> ovs-vsctl: Error detected while setting up 'gnv0': gnv0: could not set configuration (Invalid argument). See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> After this patch:
>
> $ ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
> ovs-vsctl: Error detected while setting up 'dpdk0': 'dpdk0' is missing 'options:dpdk-devargs'. The old 'dpdk<port_id>' names are not supported. See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> $ ovs-vsctl add-port br0 p+ -- set Interface p+ type=patch
> ovs-vsctl: Error detected while setting up 'p+': p+: patch type requires valid 'peer' argument. See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> $ ovs-vsctl add-port br0 gnv0 -- set Interface gnv0 type=geneve
> ovs-vsctl: Error detected while setting up 'gnv0': gnv0: geneve type requires valid 'remote_ip' argument. See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch/".
>
> CC: Ciara Loftus <ciara.loftus at intel.com>
> CC: Kevin Traynor <ktraynor at redhat.com>
> Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
> ---
> lib/netdev-dpdk.c | 27 ++++++++++--------
> lib/netdev-dummy.c | 3 +-
> lib/netdev-provider.h | 9 ++++--
> lib/netdev-vport.c | 76 ++++++++++++++++++++++++++++++++++-----------------
> lib/netdev.c | 10 +++++--
> 5 files changed, 84 insertions(+), 41 deletions(-)
>
Note the commit message lines get truncated in git log, you may want to
wrap them. It's much more intuitive now, thanks.
Acked-by: Kevin Traynor <ktraynor at redhat.com>
More information about the dev
mailing list