2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 21:38:13 +00:00

1738 Commits

Author SHA1 Message Date
William Tu
334eec6a8e checkpatch: Ignore utilities/bugtool.
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-17 14:39:49 -07:00
Mark Michelson
f3e24610ea Remove OVN.
OVN is separated into its own repo. This commit removes the OVN source,
OVN tests, and OVN documentation. It also removes mentions of OVN from
most documentation. The only place where OVN has been left is in
changelogs/NEWS, since we shouldn't mess with the history of the
project.

There is an exception here. The ovsdb-cluster tests rely on ovn-nbctl
and ovn-sbctl to run. Therefore those ovn utilities, as well as their
dependencies remain in the repo with this commit.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-06 14:54:58 -07:00
Michele Baldessari
5c56607200 Make pid_exists() more robust against empty pid argument
In some of our destructive testing of ovn-dbs inside containers managed
by pacemaker we reached a situation where /var/run/openvswitch had
empty .pid files. The current code does not deal well with them
and pidfile_is_running() returns true in such a case and this confuses
the OCF resource agent.

- Before this change:
Inside a container run:
  killall ovsdb-server;
  echo -n '' > /var/run/openvswitch/ovnnb_db.pid; echo -n '' > /var/run/openvswitch/ovnsb_db.pid

We will observe that the cluster is unable to ever recover because
it believes the ovn processes to be running when they really aren't and
eventually just fails:
 podman container set: ovn-dbs-bundle [192.168.24.1:8787/rhosp15/openstack-ovn-northd:pcmklatest]
   ovn-dbs-bundle-0     (ocf::ovn:ovndb-servers):       Master controller-0
   ovn-dbs-bundle-1     (ocf::ovn:ovndb-servers):       Stopped controller-1
   ovn-dbs-bundle-2     (ocf::ovn:ovndb-servers):       Slave controller-2

Let's make sure pid_exists() returns false when the pid is an empty
string.

- After this change the cluster is able to recover from this state and
correctly start the resource:
 podman container set: ovn-dbs-bundle [192.168.24.1:8787/rhosp15/openstack-ovn-northd:pcmklatest]
   ovn-dbs-bundle-0     (ocf::ovn:ovndb-servers):       Master controller-0
   ovn-dbs-bundle-1     (ocf::ovn:ovndb-servers):       Slave controller-1
   ovn-dbs-bundle-2     (ocf::ovn:ovndb-servers):       Slave controller-2

Fixes: 3028ce2595c8 ("ovs-lib: Allow "status" command to work as non-root.")

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-08-29 07:40:13 -07:00
Jaime Caamaño Ruiz
96b2c715ef utilities: Improve ovs-dpctl-top flow parsing
* check that expected bytes and packets stats are correctly read from
  every flow.
* check that the expected elements are read for every field type
  aggregation.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-08-28 16:07:52 -07:00
William Tu
9c74b57402 ovs-lib: Add timeout at ovs-check-dead-ifs.
At SUSE12 SP3, we hit a case where ovs-check-dead-ifs tries to read
an entry in /proc/<pid>/fd/<some fd> but hangs forever.  The pid is
a qemu-system-x86_64 process and we suspect it's an issue related to
qemu, not ovs.  As a result, force-reload-kmod hangs and OVS bridge
never gets restarted. This patch adds a timeout of 5-seconds to
ovs-check-dead-ifs.

VMware-BZ: #2408059
Signed-off-by: William Tu <u9012063@gmail.com>
Cc: Ashish Varma <ashishvarma.ovs@gmail.com>
Cc: Gurucharan Shetty <guru@ovn.org>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2019-08-26 23:54:11 -07:00
Aliasgar Ginwala
6b4dc055d6 OVS: Containerize components
1. Start OVS components in containers so that building and shipping
    of OVS components is easy.
 2. Load OVS kernel modules on host from container to avoid installing ovs
    on host.
 3. Update documentation about how to build/run ovs in docker.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: aginwala <aginwala@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-08-22 13:19:46 -07:00
Aliasgar Ginwala
1a3f3cf8ac ovs-lib: Fix standalone db migration to raft
Current code of create-cluster from standalone db takes backup of existing
standalone db and then generates a new clustered dbs from backup dbs. Hence,
during migration if nb and sb  dbs are still present, create-cluster will fail
saying file exists and will not really convert  dbs to clustered dbs. This
patch fixes the same.

e.g message that pops up while migration from standalone to raft cluster:
 * Backing up database to /etc/openvswitch/ovnnb_db.db.backup5.13.0-1278623084
ovsdb-tool: I/O error: /etc/openvswitch/ovnnb_db.db: create failed (File exists)
 * Creating cluster database /etc/openvswitch/ovnnb_db.db from existing one

Signed-off-by: aginwala <aginwala@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-08-21 10:21:11 -07:00
Ilya Maximets
aacad8685e checkpatch: Fix regexp for if, while, etc inside macros.
This allows to use a one-character expression inside the 'if'
statement and multiple spaces before the line continuation character.

Fixes false positive in case like this:

  #define MACRO(ARG)     \
      if (a) {           \
          do_work(ARG);  \
      }

Fixes: 16770c6d9179 ("checkpatch: support macro continuation")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-08-12 10:56:35 +03:00
Ilya Maximets
df8c04b1c8 checkpatch: Check FOR_EACH loops with numbers.
OVS has defines for loops like 'BITMAP_FOR_EACH_1' or
'ULLONG_FOR_EACH_1', but the regexp in checkpatch doesn't match with
numbers and skips these loops while checking.

This patch adds numbers into regexp and adds some FER_EACH loops to
the unit tests.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-07-12 19:22:14 +03:00
Ben Pfaff
4304fd986e ovs-ofctl: New testing command "parse-group".
This will be used in an upcoming test.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-09 16:19:30 -07:00
Ilya Maximets
7095b9036c checkpatch: Ignore "sparse" headers.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-05-29 14:07:53 +03:00
Gurucharan Shetty
fe772f5395 ovs-save: Handle cases of upgrades from very old OVS versions.
We have added code to ovs-save over the last few releases
which makes the following bad assumptions.

1. The default OpenFlow version of running daemon is OpenFlow14.

Impact: This causes upgrades from older OVS versions to end up with no
flows in their bridges (even the default 'NORMAL' ones) causing traffic
to stop.

2. That ovs-ofctl commands like dump-groups and dump-tlv-map
will just work with old OVS versions.

Impact: Does not look like it effects the upgrade in a bad away - except
you get some errors.

Since OpenFlow14 was enabled by default in OVS 2.8, this commit makes
a lazy assumption that any upgrade of OVS from versions before 2.7
will not attempt to save and restore flows.

VMware-BZ: #2340482
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2019-05-09 03:58:32 -07:00
Ilya Maximets
eeecd1b294 ovs-tcpdump: Fix E117 over-indented.
utilities/ovs-tcpdump.in:376:9: E117 over-indented
make[2]: *** [flake8-check] Error 1

CC: Liu Chang <txfh2007@aliyun.com>
Fixes: 2eeadf73d931 ("ovs-tcpdump: Improve error message when tcpdump is not available.")
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2019-04-30 10:48:46 +03:00
Liu Chang
2eeadf73d9 ovs-tcpdump: Improve error message when tcpdump is not available.
Signed-off-by: Liu Chang <txfh2007@aliyun.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-04-16 15:43:23 -07:00
Ilya Maximets
4bee6d8b03 checkpatch: Fix handling of line endings.
Unlike manual splitting, 'splitlines' correctly handles different
line endings. Without this change script fails to check files with
'\r\n' endings treating the whole patch as a header.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-04-15 12:33:29 -07:00
Alin Gabriel Serdean
241bc88a2d checkpatch: Normalize exit code for Windows
Using python `sys.exit(-1)` on Windows produces mixed results.
Let's take the following results from different shells:
CMD
>python -c "import sys; sys.exit(-1)" & echo %errorlevel%
1
MSYS
$ python -c "import sys; sys.exit(-1)" && echo $?
0
WSL
$ python -c "import sys; sys.exit(-1)"; echo $?
255

this results in the following tests to fail:
checkpatch

 10: checkpatch - sign-offs                          FAILED (checkpatch.at:32)
 11: checkpatch - parenthesized constructs           FAILED (checkpatch.at:32)
 12: checkpatch - parenthesized constructs - for     FAILED (checkpatch.at:32)
 13: checkpatch - comments                           FAILED (checkpatch.at:32)

because of:
 ./checkpatch.at:32: exit code was 0, expected 255

This patch introduces a positive constant for the default exit code (1)
similar to other OVS utilities.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-04-03 17:47:29 +03:00
Ilya Maximets
6ca88964d2 ovs-vsctl: Add datapath_type column to show command.
Sometimes it's unclear which datapath type is in use by particular
bridge. For example, if all the interfaces supported by both system
and netdev datapaths it needs a DB query or log analysis to find out
which 'datapath_type' is in use.
Another case is that it's hard to figure out if patch ports are really
connected to each other. They are definitely not connected if datapath
types of their bridges differs.

With this change non-default 'datapath_type's will be exposed to
'ovs-vsctl show' command, so it'll be easier to spot misconfiguration.

  $ ovs-vsctl show
  ...
      Bridge "br0"
          datapath_type: netdev
          Port "br0"
              Interface "br0"
                  type: internal
  ...

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-03-22 13:59:29 -07:00
Li RongQing
8bdf4e674c ofctl: break the loop if ovs_pcap_read returns error
otherwise packet is NULL, and dereference it to cause segfault

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-22 13:03:42 -08:00
Ilya Maximets
9307fc4600 checkpatch: Escape range operators inside regex.
' -(' matches a single character in the range between ' ' (index 32)
and '(' (index 40). This leads to the false positive:

  WARNING: Line lacks whitespace around operator
  #445 FILE: ovsdb/monitor.c:573:
      if (--mcs->n_refs == 0) {

Need to escape '-' to have a right behaviour.
This patch additionally escapes all other '-' chars in the similar
regexes and makes them be one per line to ease the review in case of
future changes.

Basic unit tests added.

CC: Joe Stringer <joe@ovn.org>
Fixes: 0d7b16daea50 ("checkpatch: Check for infix operator whitespace.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-22 12:48:43 -08:00
Ilya Maximets
49b0a93389 python: Fix E117 over-indented.
New check was added to recent pycodestyle-2.5.0 and flake8
complains while building on Travis:

  ../utilities/bugtool/ovs-bugtool.in:767:17: E117 over-indented
  ../utilities/bugtool/ovs-bugtool.in:771:17: E117 over-indented
  ../utilities/bugtool/ovs-bugtool.in:774:17: E117 over-indented
  ../utilities/bugtool/ovs-bugtool.in:778:17: E117 over-indented
  ../python/ovs/db/error.py:33:17: E117 over-indented
  ../python/ovs/poller.py:118:21: E117 over-indented
  ../python/ovs/reconnect.py:244:17: E117 over-indented

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-12 14:30:19 -08:00
Timothy Redaelli
fce20b8b73 ovs-ctl: Permit to specify additional options
Currently using ovs-ctl is not possible to specify additional options
for ovs-vswitchd and ovsdb-server (for example to specify a different
loglevel during daemon startup).

This patch adds --ovs-vswitchd-options and --ovsdb-server-options
options to ovs-ctl in order to specify the additional options.

Due to word splitting it may not be possible to specify an option that
includes whitespaces.

Reported-at: https://bugzilla.redhat.com/1664794
Reported-by: Matt Flusche <mflusche@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-11 17:52:17 -08:00
Timothy Redaelli
1f6daa7311 ovs-lib.in: Cleanup old socket and pidfiles in stop_daemon
Currently if a client crashes (signal 11) the unix socket (.ctl) and the
pidfile may not be deleted when you use ovs-ctl stop or restart.

Moreover since ovs-appctl is used on a closed socket some warnings are
printed.

This commit deletes the pidfile and the unix socket then returns without
running ovs-appctl if the pidfile point to a not-existing pid.

Reported-at: https://bugzilla.redhat.com/1667845
Reported-by: Candido Campos <ccamposr@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-11 08:44:04 -08:00
Ben Pfaff
29718ad49d Remove support for OpenFlow 1.6 (draft).
ONF abandoned the OpenFlow specification, so that OpenFlow 1.6 will never
be completed.  It did not contain much in the way of useful features, so
remove what support Open vSwitch already had.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2019-02-05 09:21:19 -08:00
Hyong Youb Kim
6012a42000 ovs-tcpdump: Fix an undefined variable
Run ovs-tcpdump without --span, and it throws the following
exception. Define mirror_select_all to avoid the error.

Traceback (most recent call last):
  File "/usr/local/bin/ovs-tcpdump", line 488, in <module>
    main()
  File "/usr/local/bin/ovs-tcpdump", line 454, in main
    mirror_select_all)
UnboundLocalError: local variable 'mirror_select_all' referenced before assignment

Fixes: 0475db71c650 ("ovs-tcpdump: Add --span to mirror all ports on bridge.")
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-04 12:28:09 -08:00
Ilya Maximets
b48aa1437d checkpatch: Check for C99 style comments.
Coding-style document asks not to use C99 ( '//' ) comments.

Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-18 09:21:25 -08:00
Ben Pfaff
4e413ac88d ovs-vswitchd: Implement OFPT_TABLE_FEATURES table modification request.
This allows a controller to change the name of OpenFlow flow tables in the
OVS software switch.

CC: Brad Cowie <brad@cowie.nz>
Acked-by: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-15 16:59:37 -08:00
Ilya Maximets
862b9cce15 checkpatch: Check style of FOREACH loops.
Current checkpatch rules matches only OVS 'FOR_EACH' loops.
This change will apply same style checks for DPDK iterators
like 'RTE_ETH_FOREACH_MATCHING_DEV () {}'.

Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-15 09:18:06 -08:00
Ben Pfaff
145a7e88bb python: Fix invalid escape sequences.
It appears that Python silently treats invalid escape sequences in
strings as literals, e.g. "\." is the same as "\\.".  Newer versions of
checkpatch complain, and it does seem reasonable to me to fix these.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-11 08:45:04 -08:00
Ben Pfaff
be51cd4173 ovs-actions: New document describing OVS actions in detail.
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-10 15:52:05 -08:00
Ilya Maximets
04895042e9 vconn: Allow timeout configuration for blocking connection.
On some systems in case where remote is not responding, socket could
remain in SYN_SENT state for a really long time without errors waiting
for connection. This leads to situations where vconn connection hangs
for a few minutes waiting for connection to the DOWN remote.

For example, this situation emulated by "refuse-connection" vconn
testcase. This leads to test failures because Alarm signal arrives much
faster than ETIMEDOUT from the socket:

  ./vconn.at:21: ovstest test-vconn refuse-connection tcp
  Alarm clock
  stderr:
  |socket_util|INFO|0:127.0.0.1: listening on port 63812
  |poll_loop|DBG|wakeup due to 0-ms timeout
  |poll_loop|DBG|wakeup due to 10155-ms timeout
  |fatal_signal|WARN|terminating with signal 14 (Alarm clock)
  ./vconn.at:21: exit code was 142, expected 0
  vconn.at:21: 535. tcp vconn - refuse connection (vconn.at:21): FAILED

This patch allowes to specify timeout value for vconn blocking
connections. If the connection takes more time, socket will be closed
with ETIMEDOUT error code. Negative value could be used to wait
infinitely.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-10 15:42:54 -08:00
Andreas Karis
ed47794ca3 utilities: gdb debug commands fix typos
Fix minor typos in ovs_gdb debug script.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Andreas Karis <akaris@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-10 11:00:48 -08:00
Eelco Chaudron
e33b3fec1c utilities: Update gdb script so it works with all python versions
Newer versions of Python require a different iterator function. This
change will make the iterator classes work with all Python versions.

Adds a fix for python3 as it does not support the long() type.
The fix guaranties the script still works on Python 2.7.

The uKey walker is rather slow on python3, so added a spinner to
indicate we are still busy processing entries.

Fix functions using the iterkeys() function on dictionaries.

Tested-by: solomon <liwei.solomon@gmail.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-10 10:59:33 -08:00
Martin Fong
0475db71c6 ovs-tcpdump: Add --span to mirror all ports on bridge.
Signed-off-by: Martin Fong <mwfong@csl.sri.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-12 09:59:57 -08:00
Eelco Chaudron
cd5b89a5a9 utilities: Add smap related command and iterator to the GDB script
Adds "ovs_dump_smap <struct smap *>" command

Example output:

Breakpoint 1, trtcm_policer_qos_construct (details=0x135bad0, conf=0x7ffd31f5da28) at lib/netdev-dpdk.c:4154
(gdb) ovs_dump_smap 0x135bad0
cbs: 2048
cir: 151800
eir: 151800
pbs: 2048

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-12 08:40:55 -08:00
David Marchand
741fd33efe ovs-ctl: fix system-id.conf owner
As far as RPMs are concerned, system-id.conf file is declared as being
owned by openvswitch.
At the first ovs startup, ovs-ctl creates this file if none exists without
ensuring this.

We end up with an inconsistency:
$ rpm -V openvswitch
.....UG..  c /etc/openvswitch/system-id.conf

Fix this when ovs-ctl is the one who creates the file.

Note: this issue ends up being hidden after a RPM upgrade, since the
openvswitch user is enforced on the whole /etc/openvswitch directory as a
%post operation.

Acked-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-10 13:02:55 -08:00
Yousong Zhou
dd091e163e ovs-ctl: fallback to "uname -n" for fetching hostname
The command "hostname" is not available in OpenWrt by default.  Strace
result of hostname-3.13 on centos7 shows that bare "hostname" command
calls uname() to fetch node name.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-03 18:14:45 -08:00
Nobuhiro MIKI
2df300c5c8 ovs-ofctl: update a man page about group syntax
Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
2018-12-03 13:43:28 -08:00
Ashish Varma
640c2f0da0 ovs-ofctl: Correct "out_group" field usage text in manpage.
Right now the man page of ovs-ofctl has "out_group=port". Correcting the
output to group instead of port.

Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-03 13:20:32 -08:00
Yousong Zhou
5c92852807 ovs-save: compatible with busybox ip command
Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
use `ip link show` to cover both iproute2 and busybox ip command

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-03 13:11:47 -08:00
Qiuyu Xiao
bdddc71535 debian and rhel: Create IPsec package.
Added rules and files to create debian and rpm ovs-ipsec packages.

Signed-off-by: Qiuyu Xiao <qiuyu.xiao.qyx@gmail.com>
Signed-off-by: Ansis Atteka <aatteka@ovn.org>
Co-authored-by: Ansis Atteka <aatteka@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-11-09 15:03:48 -08:00
Bala Sankaran
64b90b3022 checkpatch: fix typographical error
A typographical error in a prompt for missing python enchant library is
identified and fixed.

Signed-off-by: Bala Sankaran <bsankara@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-11-05 11:44:15 -08:00
Ben Pfaff
0fb02e8e50 checkpatch: Speed up checking when spell checking not enabled.
On my machine it takes almost a second for enchant to read its dictionary.
This time is wasted when spell checking is not enabled.  This commit makes
checkpatch read the dictionary only when it will be used.

Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-11-02 13:40:54 -07:00
Ben Pfaff
3bd2e465a1 checkpatch: Add explicit test for mailing list as author.
Somehow some such patches snuck through.  checkpatch caught them (and the
committer missed that) but this makes it even more explicit.

Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-11-02 13:40:51 -07:00
Yi-Hung Wei
21bc775f52 ovs-lib.in: Remove unnecessary conntrack flush
We introduced flush-conntrack in force-reload-kmod script by commit
8bea39b186ca ("datapath: Prevent panic") to prevent kernel panic.
It turns out that the kernel panic is actually triggered by the
IPv4 secret timer, and it is fixed by commit
121905984724 ("compat: Initialize IPv4 reassembly secret timer").

This commit removes the unnecessary conntrack flush in the script.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
CC: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
2018-10-31 10:38:08 -07:00
Ilya Maximets
9bccc3ff03 manpages: Include ovs.tmac in most man roots.
This allows to not redefine common macroses in every single
file and allowes using things like .EX without warying about
compatibility.
manpages.mk updated automatically.

Files that are already complete pages (i.e. has no *.in sources)
wasn't touched, because this will require additional file
manipulations and changes in makefiles/specs without serious
profit.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-10-30 07:24:55 -07:00
Ben Pfaff
b47e7e2bac ofp-table: Always format the table number in table features.
Table features should indicate the table number as well as the table
name.  Before this, the first line for each table looked like this:
   table myname ("myname"):
but it's more useful if it's:
   table 123 ("myname"):

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2018-10-26 15:19:44 -07:00
Ben Pfaff
9d36d7d728 ofp-table: Better summarize table features and statistics.
Before this patch, most dump-table-stats outputs would contain about
250 lines of the form:

  table #: ditto

With this patch, they have one line like this:

  tables 2...254: ditto

which is much easier to read.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2018-10-26 15:19:37 -07:00
Ben Pfaff
23b9ac1e5b ovs-ofctl: Update documentation for MPLS actions.
Reported-by: lidejun <lidejun1@huawei.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2018-10-26 15:04:38 -07:00
Gurucharan Shetty
b2b3f8ce30 ovs-save: Parse geneve tlv map correctly.
We now have an extra space in the o/p of `ovs-ofctl dump-tlv-map`.

Fixes: 5a0e4aec1af (treewide: Convert leading tabs to spaces.)
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2018-10-08 01:14:47 -07:00
Han Zhou
298115b94b ovs-ctl: Add new option to use short hostname.
Current ovs-ctl forces to set full hostname in external-ids. In
some situation users may want to set short hostname. For example,
in OpenStack - OVN integration, Neutron uses the host-id provided
by Nova, which is usually short hostname, to set "requested-chassis"
in OVN. The mismatch in hypervisor's external-ids:hostname setting
causes OVN port binding failure. It can be overridden to short name
but a openvswitch restart using ovs-ctl would again set it to full
hostname. This patch ensures in such use cases --no-full-hostname
can be specified to ovs-ctl to set short hostname instead.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-10-08 10:39:58 -07:00