]> git.proxmox.com Git - ovs.git/log
ovs.git
8 years agodoc: Convert ovn/TODO to rST
Stephen Finucane [Fri, 4 Nov 2016 10:04:00 +0000 (10:04 +0000)]
doc: Convert ovn/TODO to rST

This might not be of much value, but let's be consistent where we can.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert tutorial/OVN-Tutorial to rST
Stephen Finucane [Fri, 4 Nov 2016 10:03:59 +0000 (10:03 +0000)]
doc: Convert tutorial/OVN-Tutorial to rST

There's a mismash of absolute and relative URLs, but these will be
resolved by the move to Sphinx.

In addition, the URLs pointing to the test scripts are removed as they
will break when we move to Sphinx.  This is because they won't be
published with the Sphinx docs, ruling out relative links, and OVS
evolves too fast to rely on non-breaking links to GitHub. Better to
rely on shell examples like we do elsewhere and let the user figure it
out.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert tutorial/Tutorial to rST
Stephen Finucane [Fri, 4 Nov 2016 10:03:58 +0000 (10:03 +0000)]
doc: Convert tutorial/Tutorial to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agonetdev-windows: use bitwise comparison for flags
Alin Serdean [Thu, 27 Oct 2016 19:20:26 +0000 (19:20 +0000)]
netdev-windows: use bitwise comparison for flags

Use bitwise comparison when checking flags set by the kernel for the
device.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agonetdev-windows: fix ofpbuf initialization
Alin Serdean [Thu, 27 Oct 2016 19:20:01 +0000 (19:20 +0000)]
netdev-windows: fix ofpbuf initialization

ofpbuf_const_initializer takes only two parameters see:

https://github.com/openvswitch/ovs/blob/master/include/openvswitch/ofpbuf.h#L96

the compiler only gives the following warning:

lib/netdev-windows.c(229) : warning C4020: 'ofpbuf_const_initializer' :
too many actual parameters

which in result will put junk data into "ofpbuf b".

This patch fixes the initialization.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agodatapath-windows: clean code in geneve
Alin Serdean [Thu, 27 Oct 2016 18:57:12 +0000 (18:57 +0000)]
datapath-windows: clean code in geneve

The purpose of this patch is to make the code more readable and
fix a static analyzer warning.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agodatapath-windows: clean code in gre
Alin Serdean [Thu, 27 Oct 2016 18:55:36 +0000 (18:55 +0000)]
datapath-windows: clean code in gre

The purpose of this patch is to make the code more readable and
fix a static analyzer warning.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agodatapath-windows: clean code in stt
Alin Serdean [Thu, 27 Oct 2016 18:55:14 +0000 (18:55 +0000)]
datapath-windows: clean code in stt

The purpose of this patch is to make the code more readable and
fix a static analyzer warning.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agodatapath-windows: clean code in vxlan
Alin Serdean [Thu, 27 Oct 2016 18:53:54 +0000 (18:53 +0000)]
datapath-windows: clean code in vxlan

The purpose of this patch is to make the code more readable and
fix a static analyzer warning.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agodoc: Convert vswitchd/INTERNALS to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:09 +0000 (13:30 +0000)]
doc: Convert vswitchd/INTERNALS to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert OVS-GW-HA to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:08 +0000 (13:30 +0000)]
doc: Convert OVS-GW-HA to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert CONTAINERS.OpenStack to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:07 +0000 (13:30 +0000)]
doc: Convert CONTAINERS.OpenStack to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert datapath-windows/DESIGN to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:06 +0000 (13:30 +0000)]
doc: Convert datapath-windows/DESIGN to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert datapath-windows/CodingStyle to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:05 +0000 (13:30 +0000)]
doc: Convert datapath-windows/CodingStyle to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Update windows/README
Stephen Finucane [Sun, 30 Oct 2016 13:30:04 +0000 (13:30 +0000)]
doc: Update windows/README

This is already in rST (whut?), but we should add a license and make
the formatting a little more consistent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert xenserver/README to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:03 +0000 (13:30 +0000)]
doc: Convert xenserver/README to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert datapath/README to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:02 +0000 (13:30 +0000)]
doc: Convert datapath/README to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.DPDK-ADVANCED to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:01 +0000 (13:30 +0000)]
doc: Convert INSTALL.DPDK-ADVANCED to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.SELinux to rST
Stephen Finucane [Sun, 30 Oct 2016 13:30:00 +0000 (13:30 +0000)]
doc: Convert INSTALL.SELinux to rST

Refer to 'dnf' and not the deprecated 'yum'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.RHEL to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:59 +0000 (13:29 +0000)]
doc: Convert INSTALL.RHEL to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.NetBSD to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:58 +0000 (13:29 +0000)]
doc: Convert INSTALL.NetBSD to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.Libvirt to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:57 +0000 (13:29 +0000)]
doc: Convert INSTALL.Libvirt to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.SSL to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:56 +0000 (13:29 +0000)]
doc: Convert INSTALL.SSL to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.Fedora to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:55 +0000 (13:29 +0000)]
doc: Convert INSTALL.Fedora to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert README.ovs-vtep to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:54 +0000 (13:29 +0000)]
doc: Convert README.ovs-vtep to rST

Expand on the definition of VTEP (it took me a bit of Googling).

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert third-party/README to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:53 +0000 (13:29 +0000)]
doc: Convert third-party/README to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert rhel/README.RHEL to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:52 +0000 (13:29 +0000)]
doc: Convert rhel/README.RHEL to rST

This is a top-level document, so plain old rST is preferred.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert OVSDB-replication to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:51 +0000 (13:29 +0000)]
doc: Convert OVSDB-replication to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert release-process to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:50 +0000 (13:29 +0000)]
doc: Convert release-process to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert committer-responsibilities to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:49 +0000 (13:29 +0000)]
doc: Convert committer-responsibilities to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert committer-grant-revocation to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:48 +0000 (13:29 +0000)]
doc: Convert committer-grant-revocation to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert ovs-command-bashcomp.INSTALL to rST
Stephen Finucane [Sun, 30 Oct 2016 13:29:47 +0000 (13:29 +0000)]
doc: Convert ovs-command-bashcomp.INSTALL to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert DESIGN to rST
Stephen Finucane [Sun, 30 Oct 2016 13:15:38 +0000 (13:15 +0000)]
doc: Convert DESIGN to rST

This is a top-level document, so plain old rST is preferred.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoCorrect references to env7 packet scripts
Genevieve LEsperance [Thu, 3 Nov 2016 16:34:07 +0000 (09:34 -0700)]
Correct references to env7 packet scripts

Submitted-at: https://github.com/openvswitch/ovs/pull/160
Signed-off-by: Genevieve LEsperance <glesperance@pivotal.io>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoovn: Add a case of policy based routing.
Gurucharan Shetty [Thu, 6 Oct 2016 10:33:17 +0000 (03:33 -0700)]
ovn: Add a case of policy based routing.

OVN currently supports multiple gateway routers (residing on
different chassis) connected to the same logical topology.

When external traffic enters the logical topology, they can enter
from any gateway routers and reach its eventual destination. This
is achieved with proper static routes configured on the gateway
routers.

But when traffic is initiated in the logical space by a logical
port, we do not have a good way to distribute that traffic across
multiple gateway routers.

This commit introduces one particular way to do it. Based on the
source IP address or source IP network of the packet, we can now
jump to a specific gateway router.

This is very useful for a specific use case of Kubernetes.
When traffic is initiated inside a container heading to outside world,
we want to be able to send such traffic outside the gateway router
residing in the same host as that of the container. Since each
host gets a specific subnet, we can use source IP address based
policy routing to decide on the gateway router.

Rationale for using the same routing table for both source and
destination IP address based routing:

Some hardware network vendors support policy routing in a different table
on arbitrary "match".  And when a packet enters, if there is a match
in policy based routing table, the default routing table is not
consulted at all.  In case of OVN, we mainly want policy based routing
for north-south traffic. We want east-west traffic to flow as-is. Creating
a separate table for policy based routing complicates the configuration
quite a bit. For e.g., if we have a source IP network based rule added,
to decide a particular gateway router as a next hop, we should add rules at
a higher priority for all the connected routes to make sure that east-west
traffic is not effected in the policy based routing table itself.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agoovn-controller: Container can have connection to a hosting VM.
Gurucharan Shetty [Tue, 4 Oct 2016 16:49:10 +0000 (09:49 -0700)]
ovn-controller: Container can have connection to a hosting VM.

A Container running inside a VM can have a connection to the
hosting VM (parent port) in the logical topology (for e.g via a router).
So we should be able to loop-back into the same VM, even if the
final packet delivered does not have any tags in it.

Reported-by: Dustin Spinhirne <dspinhirne@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agotests: windows ovsdb online compact
Alin Serdean [Thu, 27 Oct 2016 21:45:42 +0000 (21:45 +0000)]
tests: windows ovsdb online compact

Skip symlinks checks on Windows.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agotests: Test offline compacting on Windows.
Alin Serdean [Thu, 27 Oct 2016 20:33:35 +0000 (20:33 +0000)]
tests: Test offline compacting on Windows.

This patch adds the offline compacting (ovsdb-tool compact) to be run on
Windows.

Windows does not implement --run so this drops its use.  Other tests do
check that --run works on Linux so this shouldn't be an issue.

Also on Windows we do not check for symlinks, so skip the tests for it.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agodebian: Include ovn-trace in ovn-common package
Flavio Fernandes [Sat, 22 Oct 2016 00:00:22 +0000 (19:00 -0500)]
debian: Include ovn-trace in ovn-common package

Include the ovn-trace binary and it's man page in ovn-common package

Fixes: 4acd1e87a8bf ("ovn-trace: New utility.")
Fixes: f448e5a4bb1f ("rhel: Include ovn-trace in ovn-common package")
Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agoovn: fix ovn-northd leak in build_acls
Flavio Fernandes [Tue, 1 Nov 2016 21:19:59 +0000 (16:19 -0500)]
ovn: fix ovn-northd leak in build_acls

Avoid leak due to missing ds_destroy in build_acl for non-stateful
drop action.

Found via inspection.  I do not know that this fixes a common leak.

Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agoovn-southbound: Implement read-only connection support.
Lance Richardson [Tue, 25 Oct 2016 16:38:49 +0000 (12:38 -0400)]
ovn-southbound: Implement read-only connection support.

Add a connection table to the southbound db schema, similar
to the Open_vSwitch "Manager" table.

Add tests for pssl: and ptcp: read-only connection types.

Add support to ovn-sbctl for listing the SB Connection table.

Potential future work:
   - Test cases for other connection types (punix, ssl, tcp, unix).
   - SSL configuration table for southbound db.
   - Connection table for NB schema.
   - Add a way to specify a read-only connection as an ovsdb-server
     command-line option.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agoovsdb-server: Implement read-only remote connection type.
Lance Richardson [Tue, 25 Oct 2016 16:38:48 +0000 (12:38 -0400)]
ovsdb-server: Implement read-only remote connection type.

Adds a new "read_only" column for remote connections.

Operations that would alter the state of the database are not
permitted on connections for which the "read_only" column is set
to "true".

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agodatapath: geneve: Handle vlan tag
Pravin B Shelar [Tue, 1 Nov 2016 19:06:15 +0000 (12:06 -0700)]
datapath: geneve: Handle vlan tag

The compat vlan code ignores vlan tag for inner packet
on egress path. Following patch fixes this by inserting the
tag for inner packet before tunnel encapsulation.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
8 years agoofproto-dpif: Log warning when ct action or its variants are not supported.
Ben Pfaff [Mon, 31 Oct 2016 21:33:13 +0000 (14:33 -0700)]
ofproto-dpif: Log warning when ct action or its variants are not supported.

Some datapaths do not support the ct action, and others support only a
subset of its features.  Until now, it has been difficult to tell why a
particular action is being rejected.  This commit should make it clearer.

Reported-by: Kevin Lin <kevinlin@berkeley.edu>
Reported-at: http://openvswitch.org/pipermail/discuss/2016-October/023060.html
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
8 years agodoc: fix duplicated colons in rst documents
Mauricio Vasquez [Tue, 1 Nov 2016 04:12:08 +0000 (23:12 -0500)]
doc: fix duplicated colons in rst documents

Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodatapath: backport: vxlan: avoid using stale vxlan socket.
Pravin B Shelar [Mon, 31 Oct 2016 21:36:32 +0000 (14:36 -0700)]
datapath: backport: vxlan: avoid using stale vxlan socket.

Upstream commit:
    commit c6fcc4fc5f8b592600c7409e769ab68da0fb1eca
    Author: pravin shelar <pshelar@ovn.org>
    Date:   Fri Oct 28 09:59:15 2016 -0700

    vxlan: avoid using stale vxlan socket.

    When vxlan device is closed vxlan socket is freed. This
    operation can race with vxlan-xmit function which
    dereferences vxlan socket. Following patch uses RCU
    mechanism to avoid this situation.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
8 years agolisp: avoid using stale lisp socket.
Pravin B Shelar [Sun, 30 Oct 2016 04:33:06 +0000 (21:33 -0700)]
lisp: avoid using stale lisp socket.

This patch is similar to earlier vxlan patch.
Lisp device close operation frees lisp socket. This
operation can race with lisp-xmit function which
dereferences lisp socket. Following patch uses RCU
mechanism to avoid this situation.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
8 years agodatapath: backport: geneve: avoid using stale geneve socket.
Pravin B Shelar [Sun, 30 Oct 2016 04:33:05 +0000 (21:33 -0700)]
datapath: backport: geneve: avoid using stale geneve socket.

Upstream commit:
    commit fceb9c3e38252992bbf1a3028cc2f7b871211533
    Author: pravin shelar <pshelar@ovn.org>
    Date:   Fri Oct 28 09:59:16 2016 -0700

    geneve: avoid using stale geneve socket.

    This patch is similar to earlier vxlan patch.
    Geneve device close operation frees geneve socket. This
    operation can race with geneve-xmit function which
    dereferences geneve socket. Following patch uses RCU
    mechanism to avoid this situation.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
8 years agoFAQ: Mention conntrack capability for packet filtering.
Han Zhou [Fri, 28 Oct 2016 19:13:44 +0000 (12:13 -0700)]
FAQ: Mention conntrack capability for packet filtering.

The existing explanation didn't tell user the conntrack capability
and user may be unaware of the stateful feature of OVS.

Signed-off-by: Han Zhou <zhouhan@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agoifnotifier: do not wake up when there is no db connection
Thadeu Lima de Souza Cascardo [Tue, 25 Oct 2016 17:44:43 +0000 (15:44 -0200)]
ifnotifier: do not wake up when there is no db connection

When bridge uses the interface notifier, it wakes up until a reconfiguration
takes place. However, if there is no connection or a lock contention to the
database, the check for reconfiguration will not take place.

This uses a seq and only seq_wait when checking for the interfaces change.

This is easily reproduced by starting ovs-vswitchd without starting
ovsdb-server, and then creating a new system interface, like using
'ip link add type veth'. ovs-vswitchd will then consume 100% CPU.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agodatapath-windows: Set isActivated flag only on success
Shashank Ram [Mon, 10 Oct 2016 22:15:05 +0000 (15:15 -0700)]
datapath-windows: Set isActivated flag only on success

@Switch.c: Modifies OvsActivateSwitch() function
to mark the switch as activated only if the
the status is success. The callers itself
only call this method when the isActivated
flag is unset.

Signed-off-by: Shashank Ram <rams@vmware.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
8 years agoFAQ.rst: Trivial link fixes.
Russell Bryant [Sat, 29 Oct 2016 20:13:49 +0000 (22:13 +0200)]
FAQ.rst: Trivial link fixes.

Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agotrivial: Resolve whitespace issues with acinclude
Stephen Finucane [Tue, 18 Oct 2016 20:03:45 +0000 (21:03 +0100)]
trivial: Resolve whitespace issues with acinclude

Completely unrelated, but annoying. Let's fix it up.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert FAQ to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:44 +0000 (21:03 +0100)]
doc: Convert FAQ to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert OPENFLOW-1.1+ to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:42 +0000 (21:03 +0100)]
doc: Convert OPENFLOW-1.1+ to rST

Rename it to OPENFLOW.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert CONTRIBUTING to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:41 +0000 (21:03 +0100)]
doc: Convert CONTRIBUTING to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert README-native-tunneling to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:40 +0000 (21:03 +0100)]
doc: Convert README-native-tunneling to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert README-lisp to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:39 +0000 (21:03 +0100)]
doc: Convert README-lisp to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert SECURITY to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:38 +0000 (21:03 +0100)]
doc: Convert SECURITY to rST

This is a top-level document, so plain old rST is preferred.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert WHY-OVS to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:37 +0000 (21:03 +0100)]
doc: Convert WHY-OVS to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoovn/TODO: Remove completed IPAM item.
Russell Bryant [Tue, 25 Oct 2016 14:10:42 +0000 (10:10 -0400)]
ovn/TODO: Remove completed IPAM item.

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Lance Richardson <lrichard@redhat.com>
8 years agodoc: Convert REPORTING-BUGS to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:36 +0000 (21:03 +0100)]
doc: Convert REPORTING-BUGS to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: v2: fix bad link to dpdk advance installation guide
Mauricio Vasquez [Fri, 21 Oct 2016 04:51:24 +0000 (23:51 -0500)]
doc: v2: fix bad link to dpdk advance installation guide

Previous fix was also wrong.

Fixes: 167703d ("doc: Convert INSTALL.DPDK to rST")
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert README to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:35 +0000 (21:03 +0100)]
doc: Convert README to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert PORTING to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:34 +0000 (21:03 +0100)]
doc: Convert PORTING to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoconfigure: Support compiling with Linux 4.8.
Jarno Rajahalme [Thu, 20 Oct 2016 22:22:14 +0000 (15:22 -0700)]
configure: Support compiling with Linux 4.8.

Datapath should now compile and work with Linux 4.8.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
8 years agodatapath: Support a fixed size of 128 distinct labels.
Jarno Rajahalme [Thu, 20 Oct 2016 22:22:14 +0000 (15:22 -0700)]
datapath: Support a fixed size of 128 distinct labels.

Port upstream change in conntrack labels extension.  Add a new
configure macro HAVE_NF_CONN_LABELS_WITH_WORDS to detect the old
definition.  Unfortunately there is no conntrack API to hide the
difference, so the this makes conntrack.c deviate from upstream source
a bit.

Upstream commit:
    commit 23014011ba4209a086931ff402eac1c41abbe456
    Author: Florian Westphal <fw@strlen.de>
    Date:   Thu Jul 21 12:51:16 2016 +0200

    netfilter: conntrack: support a fixed size of 128 distinct labels

    The conntrack label extension is currently variable-sized, e.g. if
    only 2 labels are used by iptables rules then the labels->bits[] array
    will only contain one element.

    We track size of each label storage area in the 'words' member.

    But in nftables and openvswitch we always have to ask for worst-case
    since we don't know what bit will be used at configuration time.

    As most arches are 64bit we need to allocate 24 bytes in this case:

    struct nf_conn_labels {
        u8            words;   /*     0     1 */
        /* XXX 7 bytes hole, try to pack */
        long unsigned bits[2]; /*     8     24 */

    Make bits a fixed size and drop the words member, it simplifies
    the code and only increases memory requirements on x86 when
    less than 64bit labels are required.

    We still only allocate the extension if its needed.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
8 years agoovn-test: Fix 'test-ovn composition' crash
Andy Zhou [Tue, 11 Oct 2016 18:26:13 +0000 (11:26 -0700)]
ovn-test: Fix 'test-ovn composition' crash

Without this fix, the added test will core dump.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agodoc: Convert MAINTAINERS to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:33 +0000 (21:03 +0100)]
doc: Convert MAINTAINERS to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert IntegrationGuide to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:32 +0000 (21:03 +0100)]
doc: Convert IntegrationGuide to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert CodingStyle to rST
Stephen Finucane [Tue, 18 Oct 2016 20:03:31 +0000 (21:03 +0100)]
doc: Convert CodingStyle to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agofedora: do not restart the service on a pkg upgrade
Flavio Leitner [Tue, 18 Oct 2016 17:04:42 +0000 (15:04 -0200)]
fedora: do not restart the service on a pkg upgrade

There is no reliable way to restore the previous networking
state after a service restart. Many things like firewall
configuration, traffic shaping, stacked devices, custom setups
are completely out of OVS control.

The OVS might be providing the network used for remote
administration, so do not automatically restart the service
during a package upgrade.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoDocumentationStyle: Clarify what documentation is
Stephen Finucane [Thu, 20 Oct 2016 07:19:24 +0000 (08:19 +0100)]
DocumentationStyle: Clarify what documentation is

We're going to convert all docs to reStructuredText, so the "legacy
documents" warning is going to become outdated rather quickly. Simply
remove it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodpif-netdev: Fix windows build.
Daniele Di Proietto [Wed, 19 Oct 2016 18:31:33 +0000 (11:31 -0700)]
dpif-netdev: Fix windows build.

OVS_ALIGNED_VAR(...) should be at the beginning of a definition, as
the example in include/openvswitch/compiler.h shows.

Fixes: 38ee0814978c ("dpif-netdev: Cache align netdev_flow_keys.")
Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
8 years agoovsdb-idl: Check internal graph in OVSDB tests.
Ben Pfaff [Wed, 7 Sep 2016 16:04:46 +0000 (09:04 -0700)]
ovsdb-idl: Check internal graph in OVSDB tests.

Some upcoming tests will add extra trickiness to the IDL internal graph.
This worries me, because the IDL doesn't have any checks for its graph
consistency.  This commit adds some.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idl: Mark ovsdb_idl_get_row_arc() parameter const.
Ben Pfaff [Thu, 25 Aug 2016 06:10:15 +0000 (23:10 -0700)]
ovsdb-idl: Mark ovsdb_idl_get_row_arc() parameter const.

This function doesn't modify its 'dst_table' parameter, so it might as well
be marked const.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idl: Add some more implementation comments.
Ben Pfaff [Mon, 29 Aug 2016 06:21:40 +0000 (23:21 -0700)]
ovsdb-idl: Add some more implementation comments.

I wrote this code and if I have to rediscover how it works, it's time to
improve the commnts.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Remove special case for "sizeof bool".
Ben Pfaff [Tue, 30 Aug 2016 23:58:44 +0000 (16:58 -0700)]
ovsdb-idlc: Remove special case for "sizeof bool".

The "sparse" checker used to warn about sizeof(bool).  These days, it does
not warn (without -Wsizeof-bool), so remove this ugly special case.

If you have a version of "sparse" that still warns by default, please
upgrade to a version that includes commit 2667c2d4ab33 (sparse: Allow
override of sizeof(bool) warning).

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idl: Sort and unique-ify datum in ovsdb_idl_txn_write().
Ben Pfaff [Wed, 31 Aug 2016 18:42:53 +0000 (11:42 -0700)]
ovsdb-idl: Sort and unique-ify datum in ovsdb_idl_txn_write().

I noticed that there were lots of calls to ovsdb_datum_sort_unique() from
"set" functions in generated IDL code.  This moves that call into common
code, reducing redundancy.

There are more calls to the same function that are a little harder to
remove.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idl: Improve comment on ovsdb_idl_txn_write[_clone]().
Ben Pfaff [Wed, 31 Aug 2016 18:34:53 +0000 (11:34 -0700)]
ovsdb-idl: Improve comment on ovsdb_idl_txn_write[_clone]().

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Eliminate <prefix>_init() function from generated code.
Ben Pfaff [Wed, 24 Aug 2016 21:53:52 +0000 (14:53 -0700)]
ovsdb-idlc: Eliminate <prefix>_init() function from generated code.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Consolidate assertions.
Ben Pfaff [Wed, 24 Aug 2016 22:33:31 +0000 (15:33 -0700)]
ovsdb-idlc: Consolidate assertions.

There were lots of bits of code emitting "assert(inited);".  This combines
many of them.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Declare loop variables in for statements in generated code.
Ben Pfaff [Wed, 24 Aug 2016 19:38:39 +0000 (12:38 -0700)]
ovsdb-idlc: Declare loop variables in for statements in generated code.

This changes several instances of
    size_t i;
    for (i = 0; i < ...; i++)
into:
    for (size_t i = 0; i < ...; i++)
in generated code, making it slightly more compact and easier to read.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Make generated references to columns easier to read.
Ben Pfaff [Wed, 24 Aug 2016 19:32:59 +0000 (12:32 -0700)]
ovsdb-idlc: Make generated references to columns easier to read.

This replaces ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_CUR_CFG]
by the easier to read and equivalent ovsrec_open_vswitch_col_cur_cfg in
generated code.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Make generated references to table classes easier to read.
Ben Pfaff [Wed, 24 Aug 2016 19:00:21 +0000 (12:00 -0700)]
ovsdb-idlc: Make generated references to table classes easier to read.

This replaces &ovsrec_table_classes[OVSREC_TABLE_OPEN_VSWITCH] by the
easier to read and equivalent &ovsrec_table_open_vswitch in generated code.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Simplify code generation to parse sets and maps of references.
Ben Pfaff [Wed, 24 Aug 2016 18:47:56 +0000 (11:47 -0700)]
ovsdb-idlc: Simplify code generation to parse sets and maps of references.

This switches from code that looks like:
    if (keyRow) {
        ...
    }
to:
    if (!keyRow) {
        continue;
    }
    ...
which is a little easier to generate because the indentation of ... is
constant.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Factor out sorting columns.
Ben Pfaff [Wed, 24 Aug 2016 22:07:03 +0000 (15:07 -0700)]
ovsdb-idlc: Factor out sorting columns.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Remove obsolete documentation and usage.
Ben Pfaff [Thu, 25 Aug 2016 02:24:25 +0000 (19:24 -0700)]
ovsdb-idlc: Remove obsolete documentation and usage.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovsdb-idlc: Use ovsdb_datum_from_smap() instead of open-coding it.
Ben Pfaff [Thu, 1 Sep 2016 05:03:27 +0000 (22:03 -0700)]
ovsdb-idlc: Use ovsdb_datum_from_smap() instead of open-coding it.

There's no reason to have three copies of this code for every smap-type
column.

The code wasn't a perfect match for ovsdb_datum_from_smap(), so this commit
also changes ovsdb_datum_from_smap() to better suit it.  It only had one
caller and the new design is adequate for that caller.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
8 years agoovn: fix build on FreeBSD
Thadeu Lima de Souza Cascardo [Wed, 19 Oct 2016 15:32:57 +0000 (13:32 -0200)]
ovn: fix build on FreeBSD

The missing include was needed for struct in6_addr.

Otherwise, this build failure would occur.

In file included from ovn/lib/actions.c:23:
ovn/lib/ovn-dhcp.h:163:21: error: field has incomplete type 'struct in6_addr'

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
8 years agodoc: fix bad link to dpdk advance installation guide
Mauricio Vasquez [Tue, 18 Oct 2016 22:23:12 +0000 (17:23 -0500)]
doc: fix bad link to dpdk advance installation guide

The link was pointing to a wrong place after the file was converted to rst.

Fixes: 167703d664fc ("doc: Convert INSTALL.DPDK to rST")
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoMakefile.am: Add DocumentationStyle.rst to distribution.
Jarno Rajahalme [Tue, 18 Oct 2016 23:59:56 +0000 (16:59 -0700)]
Makefile.am: Add DocumentationStyle.rst to distribution.

Compile fails otherwise.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: YAMAMOTO Takashi <yamamoto@ovn.org>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agoovn-controller.at: Stop hardcoding a list of iface types
YAMAMOTO Takashi [Tue, 18 Oct 2016 11:31:55 +0000 (11:31 +0000)]
ovn-controller.at: Stop hardcoding a list of iface types

The list of supported iface types hardcoded in the test
is wrong on NetBSD. (or any userland-only ports I guess)
Instead of adding another case for NetBSD following WIN32,
just get the list from ovsdb.

Signed-off-by: YAMAMOTO Takashi <yamamoto@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agoovn.at: Avoid using "printf -v"
YAMAMOTO Takashi [Tue, 18 Oct 2016 11:15:56 +0000 (11:15 +0000)]
ovn.at: Avoid using "printf -v"

It seems like a non-portable bash extension.

Signed-off-by: YAMAMOTO Takashi <yamamoto@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agoFix parent_pid on NetBSD
YAMAMOTO Takashi [Thu, 13 Oct 2016 07:42:27 +0000 (16:42 +0900)]
Fix parent_pid on NetBSD

Fix recently introduced parent_pid macro on NetBSD 7.0.
On NetBSD, procfs status file looks like the following.

    n7% cat /proc/$$/status
    zsh 18509 12970 18509 18509 5,8 ctty,sldr 1476344459,639266 0,15575 0,15575 pause 1000 100,100,0
    n7%

Signed-off-by: YAMAMOTO Takashi <yamamoto@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
8 years agodocs: Add writing guide
Stephen Finucane [Sat, 8 Oct 2016 13:18:01 +0000 (14:18 +0100)]
docs: Add writing guide

Help documentation authors avoid common pitfalls.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodocs: Add documentation style guide
Stephen Finucane [Sat, 8 Oct 2016 13:18:00 +0000 (14:18 +0100)]
docs: Add documentation style guide

We have one for coding and could do with one for docs.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.KVM to rST
Stephen Finucane [Sat, 8 Oct 2016 16:30:31 +0000 (17:30 +0100)]
doc: Convert INSTALL.KVM to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.XenServer to rST
Stephen Finucane [Sat, 8 Oct 2016 16:30:30 +0000 (17:30 +0100)]
doc: Convert INSTALL.XenServer to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
8 years agodoc: Convert INSTALL.userspace to rST
Stephen Finucane [Sat, 8 Oct 2016 16:30:29 +0000 (17:30 +0100)]
doc: Convert INSTALL.userspace to rST

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>