]> git.proxmox.com Git - mirror_ovs.git/log
mirror_ovs.git
5 years agonetdev-tc-offloads: Add support to match on 802.1AD ethertype
Jianbo Liu [Tue, 17 Jul 2018 02:01:55 +0000 (02:01 +0000)]
netdev-tc-offloads: Add support to match on 802.1AD ethertype

Currently, we assume VLAN ethtertype is 0x8100, but it could
be 0x88a8 if QinQ is supported.

Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
5 years agotc: Add VLAN tpid for push action
Jianbo Liu [Tue, 17 Jul 2018 02:01:54 +0000 (02:01 +0000)]
tc: Add VLAN tpid for push action

Currently we only support 802.1q, so we can offload push action without
specifying any vlan type. Kernel will push 802.1q ethertype by default.

But to support QinQ, we need to tell what ethertype is in push action as
it could be 802.1ad.

Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
5 years agoPrepare for post-2.10.0 (2.10.90).
Justin Pettit [Tue, 24 Jul 2018 22:29:56 +0000 (15:29 -0700)]
Prepare for post-2.10.0 (2.10.90).

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
5 years agoPrepare for 2.10.0.
Justin Pettit [Tue, 24 Jul 2018 22:28:08 +0000 (15:28 -0700)]
Prepare for 2.10.0.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
5 years agoPermit to build OVS with only Python3 installed
Timothy Redaelli [Fri, 22 Jun 2018 18:04:10 +0000 (20:04 +0200)]
Permit to build OVS with only Python3 installed

This commit renames HAVE_PYTHON to HAVE_PYTHON2 and PYTHON to PYTHON2
and adds HAVE_PYTHON and PYTHON with a different semantics:
- If PYTHON environment variable is set, use it as PYTHON
- If a python2 interpreter is available, PYTHON became the python2 interpreter
- If a python3 interpreter is available, PYTHON became the python3 interpreter

PYTHON is only used to run the python scripts needed by the build system

NOTE:
Since currently most of the utilities and bugtool doesn't support Python3,
they're installed only if python2 is available. This will be fixed in later
commits.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovs-tcpdump: Fix incompatibilities with python3
Timothy Redaelli [Tue, 24 Jul 2018 16:35:13 +0000 (18:35 +0200)]
ovs-tcpdump: Fix incompatibilities with python3

Opening a file with 'rw' in Python3 returns an error, moreover using 'rw' in
Python2 is wrong too since it opens the file using O_RDONLY and not by using
O_RDWR.

This commit fixes it by using the low-level os.open function with O_RDWR
as suggested by the Linux kernel (tuntap.txt) documentation.

This commit fixes also some usual bytes vs string incompatibilities.

Tested on Python 2.7.15 and Python 3.6.5

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovs-tcpundump: Fix incompatibilities with python3
Timothy Redaelli [Tue, 24 Jul 2018 16:35:22 +0000 (18:35 +0200)]
ovs-tcpundump: Fix incompatibilities with python3

Added parenthesis after print and use "as" instead of "," in except.

This commit fixes also a couple of flake8 warnings:

    utilities/ovs-tcpundump:23:1: E302 expected 2 blank lines, found 1
    utilities/ovs-tcpundump:35:1: E305 expected 2 blank lines after class or
    function definition, found 1

Tested on Python 2.7.15 and Python 3.6.5

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agosparse: Add support for DPDK.
Ben Pfaff [Thu, 12 Jul 2018 21:55:44 +0000 (14:55 -0700)]
sparse: Add support for DPDK.

This allows netdev-dpdk.c to compile cleanly with sparse.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
5 years agonetdev-dpdk: Use ETH_ADDR_BYTES_ARGS instead of open-coding it.
Ben Pfaff [Thu, 12 Jul 2018 21:55:43 +0000 (14:55 -0700)]
netdev-dpdk: Use ETH_ADDR_BYTES_ARGS instead of open-coding it.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
5 years agonetdev-dpdk: Fix sparse complaints.
Ben Pfaff [Thu, 12 Jul 2018 21:55:42 +0000 (14:55 -0700)]
netdev-dpdk: Fix sparse complaints.

Neither of these is a real problem.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
5 years agonetdev-dpdk: Fix incorrect byte order conversion in log message.
Ben Pfaff [Thu, 12 Jul 2018 21:55:41 +0000 (14:55 -0700)]
netdev-dpdk: Fix incorrect byte order conversion in log message.

uint8_t values shouldn't be passed to ntohs().

Found by soarse.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
5 years agoDocs: Improve OVS DPDK version mapping notice.
Ian Stokes [Thu, 12 Jul 2018 18:48:42 +0000 (19:48 +0100)]
Docs: Improve OVS DPDK version mapping notice.

A common issue is users pairing the incorrect version of OVS to DPDK
when working outside of the build tree.

To avoid this, this commit updates the OVS DPDK documentation to explicitly
flag that users should consult the OVS to DPDK release mapping in FAQ if
working outside of the OVS build tree.

Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
5 years agodpif-netdev: Add SMC cache after EMC cache
Yipeng Wang [Tue, 10 Jul 2018 10:14:06 +0000 (03:14 -0700)]
dpif-netdev: Add SMC cache after EMC cache

This patch adds a signature match cache (SMC) after exact match
cache (EMC). The difference between SMC and EMC is SMC only stores
a signature of a flow thus it is much more memory efficient. With
same memory space, EMC can store 8k flows while SMC can store 1M
flows. It is generally beneficial to turn on SMC but turn off EMC
when traffic flow count is much larger than EMC size.

SMC cache will map a signature to an dp_netdev_flow index in
flow_table. Thus, we add two new APIs in cmap for lookup key by
index and lookup index by key.

For now, SMC is an experimental feature that it is turned off by
default. One can turn it on using ovsdb options.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Co-authored-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Acked-by: Billy O'Mahony <billy.o.mahony@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
5 years agoNEWS: Mention daemon mode support for ovn-nbctl.
Jakub Sitnicki [Tue, 24 Jul 2018 14:21:58 +0000 (16:21 +0200)]
NEWS: Mention daemon mode support for ovn-nbctl.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agotests: Add test for ovn-nbctl's command parser error paths.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:26 +0000 (15:51 +0200)]
tests: Add test for ovn-nbctl's command parser error paths.

Preparatory work for getting rid of ctl_fatal() in command parser.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agotests: Add test for oneline-formatted output for ovn-nbctl.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:25 +0000 (15:51 +0200)]
tests: Add test for oneline-formatted output for ovn-nbctl.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agotests: Add test for ovn-nbctl dry run mode.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:24 +0000 (15:51 +0200)]
tests: Add test for ovn-nbctl dry run mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Initial support for daemon mode.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:23 +0000 (15:51 +0200)]
ovn-nbctl: Initial support for daemon mode.

Make ovn-nbctl act as a unixctl server if we were asked to detach. This
turns ovn-nbctl into a long-lived process that acts a proxy for
interacting with NB DB. The main difference to regular mode of ovn-nbctl
is that in the daemon mode, a local copy of database contents has to be
obtained only once.

Just two unixctl commands are supported 'run' and 'exit'. The former can
be used to run any ovn-nbctl command or a batch of them as so:

  ovs-appctl -t ovn-nbctl run [OPTIONS] COMMAND [-- [OPTIONS] COMMAND] ...

Running commands that have not yet been converted to not use ctl_fatal()
will result in death of the daemon process. However, --monitor option
can be used to keep the daemon running.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Extract a helper for appending command options.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:22 +0000 (15:51 +0200)]
ovn-nbctl: Extract a helper for appending command options.

Will be reused when parsing options in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Extract a helper for building short options string.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:21 +0000 (15:51 +0200)]
ovn-nbctl: Extract a helper for building short options string.

Will be reused for parsing options in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Extract handling of options that affect main loop.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:20 +0000 (15:51 +0200)]
ovn-nbctl: Extract handling of options that affect main loop.

Provide a handler for options that change how the main loop behaves.

This will allow code reuse for option parsing in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Extract helper for printing oneline output.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:19 +0000 (15:51 +0200)]
ovn-nbctl: Extract helper for printing oneline output.

This will allow us to direct oneline-formatted output to other sinks
than stdout if needed. Preparatory work for daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Introduce a poll_timer based wait timeout.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:18 +0000 (15:51 +0200)]
ovn-nbctl: Introduce a poll_timer based wait timeout.

Extend the main loop and the command runner so that the caller can
specify a timeout for poll_block(). This will allow us to break out of
the main loop when waiting on IDL, like in the blocked '--wait=sb/hv
sync' case.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Propagate errors from prerequisites runner.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:17 +0000 (15:51 +0200)]
ovn-nbctl: Propagate errors from prerequisites runner.

Instead of terminating the process, return the error to the caller.

This will allow us to reuse the prerequisites runner in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Propagate errors from the main loop.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:16 +0000 (15:51 +0200)]
ovn-nbctl: Propagate errors from the main loop.

Let the caller handle the errors instead of reporting it and
terminating. Prepare for reusing the main loop in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Propagate the error from do_nbctl().
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:15 +0000 (15:51 +0200)]
ovn-nbctl: Propagate the error from do_nbctl().

Instead of terminating the process, return the error to the caller.

This will allow us to reuse the main loop in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agodb-ctl-base: Propagate errors from the commands parser.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:14 +0000 (15:51 +0200)]
db-ctl-base: Propagate errors from the commands parser.

Let the caller decide how to handle the error. Prepare for using the
parser in ovn-nbctl daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agodb-ctl-base: Propagate error from parse_command().
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:13 +0000 (15:51 +0200)]
db-ctl-base: Propagate error from parse_command().

Let the caller handle the error. Needed for ovn-nbctl daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't destroy the transaction twice on error.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:12 +0000 (15:51 +0200)]
ovn-nbctl: Don't destroy the transaction twice on error.

Reset the global state, if transaction succeeded. Otherwise nbctl_exit()
callback will try to clean up on any fatal error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Signal need to try again via an output param.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:11 +0000 (15:51 +0200)]
ovn-nbctl: Signal need to try again via an output param.

Introduce an output parameter for the flag that signals need to retry
running the command. This leaves the return value for error reporting.

Preparatory work for reusing the main loop in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Pull up releasing IDL from do_nbctl().
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:10 +0000 (15:51 +0200)]
ovn-nbctl: Pull up releasing IDL from do_nbctl().

Destroy IDL resources in the routine where we allocated them.

Preparatory work for reusing the main loop in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Pull up destroying commands from do_nbctl().
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:09 +0000 (15:51 +0200)]
ovn-nbctl: Pull up destroying commands from do_nbctl().

Destroy commands in the same routine where they were allocated.

Preparatory work for reusing the main loop in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Extract the main loop.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:08 +0000 (15:51 +0200)]
ovn-nbctl: Extract the main loop.

Split out a routine for the main ovn-nbctl loop.

Preparatory work for introducing daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovsdb-idl: Allow monitoring columns that are already monitored.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:07 +0000 (15:51 +0200)]
ovsdb-idl: Allow monitoring columns that are already monitored.

If IDL was created with monitoring and alerts turned on by default for
all columns, then there is no harm in allowing the API users to ask
again for monitoring and alerts to be enabled for any given column.

This allows us to run prerequisites handlers for db-ctl and ovn-nbctl
commands once the IDL has already ran once.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agotable: Introduce a constant for default table style.
Jakub Sitnicki [Thu, 19 Jul 2018 13:51:06 +0000 (15:51 +0200)]
table: Introduce a constant for default table style.

Having a constant in addition to the constant expression for the default
table style allows us to reset 'struct table_style' variables to default
style.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Fix mem leak in nbctl_lrp_set_gateway_chassis().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:15 +0000 (15:34 +0200)]
ovn-nbctl: Fix mem leak in nbctl_lrp_set_gateway_chassis().

Fix fall-out from applying a semantic patch to propagate the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Remove pointless "return; " at ends of functions.
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:14 +0000 (15:34 +0200)]
ovn-nbctl: Remove pointless "return; " at ends of functions.

Fix fall-out from applying a semantic patch that converts ctl_fatal()
calls to use ctl_error().

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Use ctl_error() in command handlers.
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:13 +0000 (15:34 +0200)]
ovn-nbctl: Use ctl_error() in command handlers.

Instead of dying with ctl_fatal(), propagate the error thru the context.
This will allow us to report errors when running in daemon mode.

This patch is a result of applying the following semantic patch:

@@
identifier F, C;
expression S;
@@
  static void F(struct ctl_context *C) {
<...
-     ctl_fatal(S);
+     ctl_error(C, S);
+     return;
...>
  }
@@
identifier F, C;
expression S, A;
@@
  static void F(struct ctl_context *C) {
<...
-     ctl_fatal(S, A);
+     ctl_error(C, S, A);
+     return;
...>
  }

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Propagate error thru the context.
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:12 +0000 (15:34 +0200)]
ovn-nbctl: Propagate error thru the context.

Instead of dying let the main loop handle the error.
This will allow us to report errors when running in daemon mode.

This is a result of applying the following semantic patch:

@@
identifier F;
identifier C;
identifier E;
@@
  static void F(struct ctl_context *C) {
<...
      if (E) {
-         ctl_fatal("%s", E);
+         C->error = E;
+         return;
      }
...>
  }

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in dhcp_options_get().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:11 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in dhcp_options_get().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in parse_direction().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:10 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in parse_direction().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in parse_priority().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:09 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in parse_priority().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lrp_to_lr().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:08 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in lrp_to_lr().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lsp_to_ls().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:07 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in lsp_to_ls().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in gc_by_name_or_uuid().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:06 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in gc_by_name_or_uuid().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in pg_by_name_or_uuid().
Jakub Sitnicki [Tue, 17 Jul 2018 13:34:05 +0000 (15:34 +0200)]
ovn-nbctl: Don't die in pg_by_name_or_uuid().

Let the caller handle the error. This prepares us for reporting errors
in daemon mode.

Also, extend the tests to cover this error path.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agobuild: Add gitattribute file to build-aux
Alin Gabriel Serdean [Thu, 19 Jul 2018 16:39:42 +0000 (19:39 +0300)]
build: Add gitattribute file to build-aux

The command: `make check-tabs` fails on Windows due to line ending conversions
caused by the following setting: `git config --global core.autocrlf true`
(the whitelist `build-aux/initial-tab-whitelist` becomes a blacklist)

This patch adds a .gittatribute file to build-aux to force LF endings
on Windows.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ben Pfaff <blp@ovn.org>
5 years agotests: Add more items to .gitignore
Alin Gabriel Serdean [Mon, 9 Jul 2018 14:11:02 +0000 (17:11 +0300)]
tests: Add more items to .gitignore

This patch adds the system* testsuite directory and logs to .gitignore.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Fix compilation warnings.
Ian Stokes [Tue, 10 Jul 2018 18:46:55 +0000 (19:46 +0100)]
ovn-nbctl: Fix compilation warnings.

This commit fixes 'maybe-uninitialized' warnings for pointers in various
functions in ovn-nbctl when compiling with gcc 6.3.1 and -Werror.
Pointers to structs nbrec_logical_switch, nbrec_logical_switch_port,
nbrec_logical_router and nbrec_logical_router_port are now initialized
to NULL where required.

Cc: Justin Pettit <jpettit@ovn.org>
Cc: Venkata Anil <vkommadi@redhat.com>
Fixes: 31114af758c7 ("ovn-nbctl: Update logical router port commands.")
Fixes: 80f408f4cffb ("ovn: Use Logical_Switch_Port in NB.")
Fixes: 36f232bca2db ("ovn: l3ha, CLI for logical router port gateway
                      chassis")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
5 years agorhel: support kmod-openvswitch build against multiple kernels, rhel6
Martin Xu [Thu, 12 Jul 2018 23:25:24 +0000 (16:25 -0700)]
rhel: support kmod-openvswitch build against multiple kernels, rhel6

This patch only affects rhel6 spec file.

RHEL 7.4 introduced backward incompatible changes in the kernel. As
a result, prebuilt PRM packages against kernels newer than 693.17.1
will cannot be used on systems with older kernels, vice versa.

This patch allows multiple kernel version numbers delimited by
whitespace to be passed as variable "kversion". kmod-openvswitch RPM
packages the kernel module .ko files from all specified kernel
versions.

This patch also includes a script to update the weak-update symlinks
if the system kernel version is upgraded or downgraded after
kmod-openvswitch is installed.

Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
Co-authored-by: Greg Rose <gvrose8192@gmail.com>
CC: Ben Pfaff <blp@ovn.org>
CC: Flavio Leitner <fbl@redhat.com>
CC: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agorhel: remove openvswitch-kmod package from build, rhel6
Martin Xu [Thu, 12 Jul 2018 23:25:23 +0000 (16:25 -0700)]
rhel: remove openvswitch-kmod package from build, rhel6

This patch only affects rhel6 spec file.

Previouly the kernel_module_package macro is used to generate spec file
template to build kmod-openvswitch RPM. The main package only contains
the openvswitch.conf for depmod. The macro is now removed. Everything is
built in the main package instead. This effectively removes the redudant
openvswitch-kmod package from the build.

Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
CC: Greg Rose <gvrose8192@gmail.com>
CC: Ben Pfaff <blp@ovn.org>
CC: Flavio Leitner <fbl@redhat.com>
CC: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agorhel: rename openvswitch kmod rhel6 spec file
Martin Xu [Thu, 12 Jul 2018 23:25:22 +0000 (16:25 -0700)]
rhel: rename openvswitch kmod rhel6 spec file

This patch only affects rhel6 spec file.

The rhel6 kmod spec file is renamed from openvswitch-kmod-rhel6.spec
to kmod-openvswitch-rhel6.spec . This is to prepare for the next
patches to support building multiple kernel versions in the main
package. The rename makes the spec file consistent with the resulted
kmod-openvswitch-<version>.rpm, which is the real package with
kernel module files.

Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
Reviewed-by: Flavio Leitner <fbl@redhat.com>
CC: Greg Rose <gvrose8192@gmail.com>
CC: Ben Pfaff <blp@ovn.org>
CC: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovs-ofctl: New helper command "parse-packet".
Ben Pfaff [Tue, 10 Jul 2018 20:40:45 +0000 (13:40 -0700)]
ovs-ofctl: New helper command "parse-packet".

This was useful for testing commit 4fe080160685 ("flow: Fix buffer overread
for crafted IPv6 packets.").

Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
5 years agoconfigure: Disable -Wnull-pointer-arithmetic Clang warning.
Ben Pfaff [Mon, 9 Jul 2018 21:37:55 +0000 (14:37 -0700)]
configure: Disable -Wnull-pointer-arithmetic Clang warning.

OVS trips over this warning all over the place, so it's not worth leaving
on.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
5 years agonetdev-bsd: Fix crash on FreeBSD.
Olivier Cochard-Labbé [Wed, 11 Jul 2018 09:02:28 +0000 (11:02 +0200)]
netdev-bsd: Fix crash on FreeBSD.

Working on bug https://github.com/openvswitch/ovs-issues/issues/152, I've
found wrong mapping of netdev functions on FreeBSD.

Signed-off-by: Olivier Cochard <olivier@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agodatapath: work around the single GRE receive limitation.
William Tu [Wed, 11 Jul 2018 16:45:08 +0000 (09:45 -0700)]
datapath: work around the single GRE receive limitation.

Commit 9f57c67c379d ("gre: Remove support for sharing GRE protocol hook")
allows only single GRE packet receiver.  When upstream kernel's gre module
is loaded, the gre.ko exclusively becomes the only gre packet receiver,
preventing OVS kernel module from registering another gre receiver.

We can either try to unload the gre.ko by removing its dependencies,
or, in this patch, we try to register OVS as only the GRE transmit
portion when detecting there already exists another GRE receiver.

Signed-off-by: William Tu <u9012063@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Cc: Greg Rose <gvrose8192@gmail.com>
Cc: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoconntrack: Fix conn_update_state_alg use after free.
Darrell Ball [Tue, 10 Jul 2018 23:41:58 +0000 (16:41 -0700)]
conntrack: Fix conn_update_state_alg use after free.

When conn_update_state() returns true, conn has been freed, so skip calling
handle_ftp_ctl() with this conn and instead follow code path for new
connections.

Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoofproto-dpif-xlate: Check the right IPv6 address in is_nd_dst_correct().
Ben Pfaff [Tue, 10 Jul 2018 17:11:35 +0000 (10:11 -0700)]
ofproto-dpif-xlate: Check the right IPv6 address in is_nd_dst_correct().

Fixes test 815 "tunnel_push_pop_ipv6 - action".

CC: Aaron Conole <aconole@redhat.com>
Fixes: 6f231f7c3a9e ("xlate: use const struct in6_addr in linklocal check")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
5 years agosparse: Make IN6_IS_ADDR_MC_LINKLOCAL and IN6_ARE_ADDR_EQUAL pickier.
Ben Pfaff [Tue, 10 Jul 2018 16:27:18 +0000 (09:27 -0700)]
sparse: Make IN6_IS_ADDR_MC_LINKLOCAL and IN6_ARE_ADDR_EQUAL pickier.

On GNU systems these macros work with arbitrary pointers, but the relevant
standards only require IN6_IS_ADDR_MC_LINKLOCAL to work with in6_addr (and
don't specify IN6_ARE_ADDR_EQUAL at all).  Make the "sparse"
implementations correspondingly pickier so that we catch any introduced
problems more quickly.

CC: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
5 years agoovn-nbctl: Always initialize output arguments in *_by_name_or_uuid().
Ben Pfaff [Tue, 10 Jul 2018 20:13:18 +0000 (13:13 -0700)]
ovn-nbctl: Always initialize output arguments in *_by_name_or_uuid().

This makes it easier to reason about the outputs, and fixes warnings for
GCC 6.3.x.

Reported-by: Ian Stokes <ian.stokes@intel.com>
Cc: Venkata Anil <vkommadi@redhat.com>
Fixes: 31114af758c7 ("ovn-nbctl: Update logical router port commands.")
Fixes: 80f408f4cffb ("ovn: Use Logical_Switch_Port in NB.")
Fixes: 36f232bca2db ("ovn: l3ha, CLI for logical router port gateway chassis")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ian Stokes <ian.stokes@intel.com>
5 years agotests: Fix ICMP related 2 false positives.
Darrell Ball [Fri, 6 Jul 2018 03:11:33 +0000 (20:11 -0700)]
tests: Fix ICMP related 2 false positives.

Filter out packet-ins for V6 packets as this is a V4 test.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoifupdown.sh: Correctly bring up bond slaves.
Ken Sanislo [Wed, 20 Jun 2018 21:44:08 +0000 (14:44 -0700)]
ifupdown.sh: Correctly bring up bond slaves.

It seems that line 70 needs to be operating on the $slave variable created
in the for loop at :68.  Bonded interfaces fail to bring up their links
with the current version, this will makes them work correctly.

Signed-off-by: Ken Sanislo <ken@intherack.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agobridge: Clean leaking netdevs when route is added.
Tiago Lam [Thu, 21 Jun 2018 17:39:16 +0000 (18:39 +0100)]
bridge: Clean leaking netdevs when route is added.

When adding a route to a bridge, by executing "$appctl ovs/route/add
$IP/$MASK $BR", a reference to the existing netdev is taken and stored
in an instantiated ip_dev struct which is then stored in an addr_list
list in tnl-ports.c. When OvS is signaled to exit, as a result of a
"$appctl $OVS_PID exit --cleanup", for example, the bridge takes care of
destroying its allocated port and iface structs. While destroying and
freeing an iface, the netdev associated with it is also destroyed.
However, for this to happen its ref_cnt must be 0.  Otherwise the
destructor of the netdev (specific to each datapath) won't be called. On
the userspace datapath this means a system interface, such as "br0",
wouldn't get deleted upon exit of OvS (when a route happens to be
assocaited).

This was first observed in the "ptap - triangle bridge setup with L2 and
L3 GRE tunnels" test, which runs as part of the system userspace
testsuite and uses the netdev datapath (as opoosed to several tests
which use the dummy datapath, where this issue isn't seen). The test
would pass every other time and fail the rest of the times because the
needed system interfaces (br-p1, br-p2 and br-p3) were already present
(from the previous successfull run which didn't clean up properly),
leading to a failure.

To fix the leak and clean up the interfaces upon exit, on its final
stage before destroying a netdev, in iface_destroy__(), the bridge calls
tnl_port_map_delete_ipdev() which takes care of freeing the instatiated
ip_dev structs that refer to a specific netdev.

An extra test is also introduced which verifies that the resources used
by OvS netdev datapath have been correctly cleaned up between
OVS_TRAFFIC_VSWITCHD_STOP and AT_CLEANUP.

Signed-off-by: Tiago Lam <tiago.lam@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoconntrack: Fix using alg_exp_entry out of scope.
Ilya Maximets [Tue, 10 Jul 2018 11:05:50 +0000 (14:05 +0300)]
conntrack: Fix using alg_exp_entry out of scope.

'alg_exp_entry' is allocated on stack memory, but could be used via
'alg_exp' pointer inside 'write_ct_md' function, i.e. outside its scope.

CC: Darrell Ball <dlu998@gmail.com>
Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoNEWS: Re-add vhost zero copy support.
Ian Stokes [Tue, 10 Jul 2018 13:15:48 +0000 (14:15 +0100)]
NEWS: Re-add vhost zero copy support.

An entry for experimental vhost zero copy support was removed
incorrectly. Re-add this entry to NEWS.

Reported-by: Eelco Chaudron <echaudro@redhat.com>
Cc: Ciara Loftus <ciara.loftus@intel.com>
Fixes: c3c722d2c7ee ("Documentation: document ovs-dpdk flow offload")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agotable: New function table_format() for formatting a table as a string.
Ben Pfaff [Mon, 9 Jul 2018 23:34:00 +0000 (16:34 -0700)]
table: New function table_format() for formatting a table as a string.

This will be useful for daemonized ovn-nbctl.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jakub Sitnicki <jkbs@redhat.com>
5 years agoxlate: use const struct in6_addr in linklocal check
Aaron Conole [Tue, 10 Jul 2018 13:34:38 +0000 (09:34 -0400)]
xlate: use const struct in6_addr in linklocal check

Commit 83c2757bd16e ("xlate: Move tnl_neigh_snoop() to
terminate_native_tunnel()") introduced a call to
IN6_IS_ADDR_MC_LINKLOCAL() when checking neighbor discovery.

The call to this assumes that the argument may be a const uint8_t *.
According to The Open Group Base Specifications Issue 7, 2018:

    macro is of type int and takes a single argument of
    type const struct in6_addr *

The GNU implementation allows a bit of flexibility, by internally
casting the argument.  However, other implementations (such as OS X)
more rigidly implement the standard and fail with errors like:

    error: member reference base type 'const uint8_t'
           (aka 'const unsigned char') is not a structure or union

Fixes: 83c2757bd16e ("xlate: Move tnl_neigh_snoop() to terminate_native_tunnel()")
Cc: Zoltan Balogh <zoltan.balogh.eth@gmail.com>
Cc: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Clarify error messages in qos-add command.
Justin Pettit [Sat, 7 Jul 2018 21:07:27 +0000 (14:07 -0700)]
ovn-nbctl: Clarify error messages in qos-add command.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
5 years agoovn-nbctl: Correct qos-add documentation.
Justin Pettit [Sat, 7 Jul 2018 21:00:06 +0000 (14:00 -0700)]
ovn-nbctl: Correct qos-add documentation.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
5 years agoflow: Fix buffer overread for crafted IPv6 packets.
Ben Pfaff [Mon, 9 Jul 2018 20:04:03 +0000 (13:04 -0700)]
flow: Fix buffer overread for crafted IPv6 packets.

The ipv6_sanity_check() function implemented a check for IPv6 payload
length wrong: ip6_plen is the payload length but this function checked
whether it was longer than the total length of IPv6 header plus payload.
This meant that a packet with a crafted ip6_plen could result in a buffer
overread of up to the length of an IPv6 header (40 bytes).

The kernel datapath flow extraction code does not obviously have a similar
problem.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9287
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Darrell Ball <dlu998@gmail.com>
5 years agotreewide: Remove pointless "return;" at ends of functions.
Ben Pfaff [Mon, 9 Jul 2018 23:47:03 +0000 (16:47 -0700)]
treewide: Remove pointless "return;" at ends of functions.

Found with:
    git ls-files | xargs pcregrep -n -M 'return;\n*}'

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Darrell Ball <dlu998@gmail.com>
Tested-by: Darrell Ball <dlu998@gmail.com>
5 years agoovn-nbctl, ovn-sbctl, ovs-vsctl: Don't dup error message just to report it.
Jakub Sitnicki [Mon, 9 Jul 2018 23:40:06 +0000 (16:40 -0700)]
ovn-nbctl, ovn-sbctl, ovs-vsctl: Don't dup error message just to report it.

Get rid of a pointless copy operation.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lsp_set_type().
Jakub Sitnicki [Sat, 7 Jul 2018 11:10:04 +0000 (13:10 +0200)]
ovn-nbctl: Don't die in nbctl_lsp_set_type().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_route_del().
Jakub Sitnicki [Sat, 7 Jul 2018 11:10:03 +0000 (13:10 +0200)]
ovn-nbctl: Don't die in nbctl_lr_route_del().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_route_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:10:02 +0000 (13:10 +0200)]
ovn-nbctl: Don't die in nbctl_lr_route_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lrp_set_enabled().
Jakub Sitnicki [Sat, 7 Jul 2018 11:10:01 +0000 (13:10 +0200)]
ovn-nbctl: Don't die in nbctl_lrp_set_enabled().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lrp_del_gateway_chassis().
Jakub Sitnicki [Sat, 7 Jul 2018 11:10:00 +0000 (13:10 +0200)]
ovn-nbctl: Don't die in nbctl_lrp_del_gateway_chassis().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lrp_get_gateway_chassis().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:59 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lrp_get_gateway_chassis().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lrp_set_gateway_chassis().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:58 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lrp_set_gateway_chassis().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lrp_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:57 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lrp_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_del().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:56 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lr_del().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:55 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lr_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_lb_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:54 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lr_lb_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_ls_lb_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:53 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_ls_lb_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lb_del()
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:52 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lb_del()

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lb_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:51 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lb_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_nat_del().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:50 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lr_nat_del().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lr_nat_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:49 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lr_nat_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_qos_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:48 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_qos_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_acl().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:47 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_acl().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_lsp_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:46 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_lsp_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_ls_del().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:45 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_ls_del().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in nbctl_ls_add().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:44 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in nbctl_ls_add().

Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in parse_enabled().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:43 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in parse_enabled().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in acl_cmd_get_pg_or_ls().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:42 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in acl_cmd_get_pg_or_ls().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lrp_by_name_or_uuid().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:41 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in lrp_by_name_or_uuid().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lr_by_name_or_uuid().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:40 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in lr_by_name_or_uuid().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lb_by_name_or_uuid()
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:39 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in lb_by_name_or_uuid()

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in lsp_by_name_or_uuid().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:38 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in lsp_by_name_or_uuid().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
5 years agoovn-nbctl: Don't die in ls_by_name_or_uuid().
Jakub Sitnicki [Sat, 7 Jul 2018 11:09:37 +0000 (13:09 +0200)]
ovn-nbctl: Don't die in ls_by_name_or_uuid().

Let the caller handle the error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>