2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Commit Graph

11140 Commits

Author SHA1 Message Date
Jarno Rajahalme
0a939c1f15 utilities/ovs-ofctl: Fix meter requests.
Meter requests should use dump/stats transaction, instead of
transact_noreply, which caused the output to go to stderr and an error
exit.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-11-19 18:20:39 -08:00
Joe Stringer
c7c5a4bc21 AUTHORS: Update email address.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-19 16:57:21 -08:00
Andy Zhou
3bf382a32e AUTHORS: Update Andy Zhou's email address.
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
2015-11-19 16:22:02 -08:00
Jarno Rajahalme
b67feabbbf AUTHORS: Update email address.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
2015-11-19 14:18:41 -08:00
Ariel Tubaltsev
1928978737 HW VTEP Schema: update Tunnel table definition
vtep/vtep.xml : Tunnel table definitions were reviewed against
latest OVS schema.
Relevant changes taken into HW VTEP schema.
XML formatting of Tunnel table corrected

Signed-off-by: Ariel Tubaltsev <tubaltzev@gmail.com>
Acked-by: Bruce Davie <bdavie@vmware.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
2015-11-19 17:08:01 -05:00
Mauricio Vasquez B
8f0a76c9a1 netdev-dpdk: assume dpdkr peer can be multi-producer/consumer
Although netdev does explicit locking, it is only valid from the ovs
perspective, then only the ring ends used by ovs should be declared as
single producer/consumer.
The other ends that are used by the application should be declared as
multiple producer/consumer that is the most general case.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2015-11-19 13:22:38 -08:00
Andy Zhou
e9d6808ca6 vlog: Fix a deadlock bug.
Calling VLOG_FATAL() while holding the 'log_file_mutex" may lead to
deadlock since VLOG_FATAL() implementation tries to acquire the
same lock. Fix this by building the error message first, then
call VLOG_FATAL() after the 'log_file_mutex' has been released.

This bug is not likely show up in practice since chown() usually
won't fail. It is still better to have a correct implementation.

Reported-by: Daniele Di Proietto <ddiproietto@vmware.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
2015-11-19 13:13:20 -08:00
Justin Pettit
10d8e9c671 Merge pull request #89 from zhouyaguo/master
FAQ.md: Fix typo
2015-11-18 15:29:27 -08:00
Yaguo Zhou
1e759125a5 FAQ.md: Fix typo
typo in FAQ.md: ovs-vcstl

Signed-off-by: Yaguo Zhou <zhouyaguo@unionpay.com>
2015-11-18 23:16:31 +08:00
Gurucharan Shetty
eaa923e383 Add Docker integration for OVN.
Docker multi-host networking is now part of
Docker 1.9.

This commit adds two drivers for OVN integration
with Docker. The first driver is a pure overlay driver
that does not need OpenStack integration. The second driver
needs OVN+OpenStack.

The description of the Docker API exists here:
https://github.com/docker/libnetwork/blob/master/docs/remote.md

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-13 17:04:58 -08:00
Andy Zhou
3e2493e12c vlog: fix clang warnings
Make sure clang does not complain about accessing ovs_log_file
outside of log_file_mutex protection.

Signed-off-by: Andy Zhou <azhou@nicira.com>
2015-11-12 14:33:03 -08:00
Russell Bryant
2552e0e044 ovn-tutorial: Use github instead of relative links.
All of these links when viewing OVN-Tutorial on github, but most of
these links didn't work when viewing OVN-Tutorial.md.html in dist-docs.
Use full github links so that they always work (as long as you have
internet access).

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-By: Kyle Mestery <mestery@mestery.com>
2015-11-12 15:20:44 -05:00
Andy Zhou
de929213d1 vlog: Only compile vlog_change_owner on Unix platform
uid_t and gid_t are not defined for Windows platform.

Signed-off-by: Andy Zhou <azhou@nicira.com>
2015-11-11 18:54:10 -08:00
Andy Zhou
2258d8b5d2 lib: allow group access to Unix domain sockets
By default, Unix domain sockets are created with file system permission
mode of 0700. This means that only processes that runs under the same
user can access this socket.

For OVS, it may be more convenient to control access at the group
level rather than at the user level, since other processes need to
access OVSDB and UNIXCTL sockets while running under different users.

This patch changes Unix domain sockets' file system permission to 0770,
to grant group access.

It has not been an issue in the past since OVS, until very recently,
had to run as root. If a process needed to access OVSDB or UNIXCTL
sockets, it had to be a root process as well.

With the added --user option to OVS daemons and this change, system
administrators can deploy OVS more securely: OVS daemons can run as
a non root user. Various processes that need to talk to OVS does not
have to run as root process anymore.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
2015-11-11 18:06:02 -08:00
Andy Zhou
3de44dd188 vlog: change log file owner when switching user
vlog log file can be created when parsing --log-file option, before
switching user, in case the --user option is also specified. While this
does not directly cause errors for the running daemons, it can
leave the log files on the disk as created under the "root" user.
This patch fix the log file ownership to the user specified with --user.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
2015-11-11 18:05:54 -08:00
Andy Zhou
6069edb0ea lib: simplify daemon_become_new_user__()
A global variable 'switch_user' was used to make sure
we switch process's current user only once. This logic is now
simplified by testing for uid directly; if switch process has
taken place, the current uid will be not be zero.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
2015-11-11 18:05:44 -08:00
Russell Bryant
c4e34c6114 system-traffic: Add resubmit conntrack test.
This tests that resubmits return as expected when conntrack is used
with recirculation to another table.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
2015-11-11 10:17:02 -08:00
Joe Stringer
e37b8437e9 ofproto-dpif-xlate: Don't stop processing after ct.
If conntrack recirculates, it should not stop processing the current
pipeline. The cloned packet will begin processing in the table specified
with the current metadata and action set; The current copy of the packet
will continue processing, including to return back to prior resubmit()
calls.

Reported-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-11-11 10:16:44 -08:00
Ben Pfaff
0e7850eb8d dist-docs: Fix text and HTML manpage generation with some groff versions.
Some versions of groff use termcap sequences for bold, italic, etc. by
default.  The dist-docs script doesn't cope with those; it expects
sequences based on backspacing and overprinting.  This commit fixes the
problem by setting an environment variable GROFF_NO_SGR that forces groff
to use backspacing.

Found on Fedora.

Reported-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-11 09:20:07 -08:00
Justin Pettit
ef6d1b1123 ovs-ofctl.8: Improve description of dec_ttl action.
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-10 18:23:53 -08:00
Ben Pfaff
5657f68636 ovs-thread: Fix memory leak in thread exit.
'n' is the number of keys, which are grouped into blocks of L2_SIZE
indexes.  Even if only one key in a block is allocated, the whole block has
a pointer to it that must be freed.  Thus, we need to round up instead of
down.

Reported-at: https://github.com/openvswitch/ovs/pull/87
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-11-10 14:11:28 -08:00
Jiri Benc
b863fb652f tunneling: extend tnl_match with ipv6
[cascardo: use IPv4-mapped IPv6 addresses]

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Co-authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-10 10:02:33 -08:00
Thadeu Lima de Souza Cascardo
ccaa81e0a5 tnl-arp-cache: Include tnl-arp-cache.h as first header.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-10 10:02:09 -08:00
Thadeu Lima de Souza Cascardo
5f639b68b5 tnl-arp-cache: fix log error when using tnl/arp/set with IPv6
lookup_ip will emit an error when used with an IPv6 address, like below.

2015-10-20T18:48:22.357Z|00036|socket_util|ERR|"2001:cafe::92" is not a valid IP address

Verify if address looks like IPv6 before giving it to either lookup_ip or
lookup_ipv6.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-10 10:00:54 -08:00
Jiri Benc
9835576bc1 lib: add ipv6 helper functions for tnl_config
These functions will be used by the next patches.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-10 10:00:04 -08:00
Justin Pettit
dd7652e66b ovn-northd: Support pinging logical router ports.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-09 15:01:54 -08:00
Justin Pettit
f6ecf944a9 vswitchd: Allow modifying ICMP type and code.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
2015-11-09 15:01:50 -08:00
Justin Pettit
b8786b188d packets: Add support for modifying ICMP type and code.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
2015-11-09 15:01:26 -08:00
Justin Pettit
e0c9e58b3d ovn: Change printed stage names.
The stage names were getting long and throwing off the formatting when
dumping the logical flows.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-09 15:01:17 -08:00
Justin Pettit
47f3b59b06 ovn: Use "ip.ttl--" instead of "ip4.ttl--".
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-09 15:01:15 -08:00
Justin Pettit
4c20b9f2a7 ovn-sb: Fix "ip.ttl--" lower limit description.
To decrement the IP TTL, the existing TTL can't be less than two.  The
field is not bit-maskable, though, so "ip.ttl < 2" will not work.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-09 15:01:12 -08:00
Justin Pettit
e4a1264b9f ovn-northd.8: Correct description of sending out inport.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-11-09 15:00:55 -08:00
Ben Pfaff
09dc775746 AUTHORS: Update my email address.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2015-11-07 17:07:43 -08:00
Justin Pettit
607c5e55ae TODO.md: Remove old item.
The patchwork instance has been recreated, so this doesn't point any
place valid.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-06 16:33:29 -08:00
Justin Pettit
ad625e5605 AUTHORS: Update Justin Pettit's email address.
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-06 16:33:29 -08:00
Ciara Loftus
e73b7508fb INSTALL.DPDK: Mention issue with QEMU v2.4.0 & dpdkvhostuser
Currently when using QEMU v2.4.0+, two (or more) dpdkvhostuser ports cannot
be unbound from the kernel driver in the guest without causing the
ovs-vswitchd process to crash. Document this limitation and potential
workarounds.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2015-11-06 16:02:31 -08:00
Jarno Rajahalme
994fcc5a15 upcall: Check for recirc_id in ukey_create_from_dpif_flow()
Filter out not only flows with recirculation actions, but also flows
with non-zero recirculation id in flow key when creating ukeys from
datapath flows, as such flows also depend on the recirculation
context, which have been lost after a restart.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-11-04 18:39:17 -08:00
Jarno Rajahalme
76e3e6695e ofp-actions: Fix conntrack action usable_protocols handling.
Restrictions from embedded actions should be folded in rather than
discarded.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-11-04 18:39:16 -08:00
Jarno Rajahalme
f3abc57bbf upcall: Eliminate dead code.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-11-04 15:48:56 -08:00
Jarno Rajahalme
a00a72a6cd tests: Strip more variable output from conntrack output.
'conntrack' output format varies depending on the system
configuration, i.e., conntrack accounting or timestamping is enabled.
Modify the FORMAT_CT() macro to hide these differences.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-11-04 15:47:35 -08:00
Russell Bryant
0df6430eda ovn-tutorial: Add a section on ACLs.
Add a section that gives a quick introduction to applying ACLs.  It
discusses how the ACLs are translated into OVN logical flows. It doesn't
get down to the OpenFlow level because that's not supported in
ovs-sandbox yet.  Instead, it provides a reference to an OpenStack
related blog post that talks about how OVN ACLs are used there and gives
examples of the resulting OpenFlow flows.

In theory, once we have a userspace conntrack implementation available,
we'll be able to provide better suppot for it in ovs-sandbox.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Kyle Mestery <mestery@mestery.com>
2015-11-04 11:03:18 -05:00
Ben Pfaff
68dfc25b62 ofp-parse: Fix parsing, formatting of multiple fields in NTR extension.
Until now, the only way to specify multiple fields in the "fields"
parameter for the Netronome groups extension, was to specify "fields"
more than once, e.g. fields=eth_dst,fields=ip_dst

However, this wasn't documented and the code in ofp-print didn't use it,
generating output that couldn't be parsed.

This commit fixes the situation by introducing a more straightforward
syntax, e.g. fields(eth_dst,ip_dst), documents it, and adjusts ofp-print
code to use it when there is more than one field (it retains the previous
format for backward compatibility when there is exactly one field)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <simon.horman@netronome.com>
2015-11-03 19:45:29 -08:00
Ben Pfaff
337c452854 dpctl: Fix jump through wild pointer in "dpctl/help".
dpctl_unixctl_handler() didn't fully initialize the dpctl_params structure
it passed to the handler, which meant that dpctl_help() could see a nonnull
(indeterminate) 'usage' pointer and jump through it, causes a crash.
This commit fixes the crash by fully initializing the structure.

The dpctl/help command wasn't going to do anything useful anyway, so this
commit also stops registering it.

Reported-by: Murali R <muralirdev@gmail.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-October/019135.html
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2015-11-03 17:41:05 -08:00
Ansis Atteka
3ee7cc6c37 tests: add documentation for OVS_WAIT_UNTIL and OVS_WAIT_WHILE macros
It is very easy to misuse these macros, because when the COMMAND
returns exit code "0" it is actually considered as if condition
evaluated to "true" and not "false" as some might think.

This patch ensures that this is clearly reflected in documentation.

Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2015-11-03 16:22:01 -08:00
Russell Bryant
23508e797b ovn-northd: Fix table ID in a comment.
This changed from 2 to 3 when ACLs got implemented, as it turned out
ACLs needed two tables (1 and 2).

While we're at it, do a bit of OCD formatting cleanup by fixing the
alignment of '\' at the end of each line in the logical flow table
defininitions.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-11-03 16:20:09 -05:00
Russell Bryant
39595cd3b9 ovn: Remove duplicate versions from schemas.
Since commit 5935835968, the OVN nb and sb
schema definitions have included duplicate version entries.  In the nb
case, the version has since been updated to 2.0.0, but only in one
place.  Remove the duplicate version entries that were at the bottom of
the files.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-11-03 16:19:38 -05:00
Russell Bryant
7fd06fc7b1 ovn: Fix check on existing encap row.
This code does some checking to validate the existing encaps for a
chassis to see if they need to be updated.  This typo resulted in
ovn-controller re-creating its encap(s) every time this code ran, making
ovn-controller and ovsdb-server eat up a CPU in my testing.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-11-03 16:18:59 -05:00
Sairam Venugopal
642fbd708b datapath-windows: STT - Offload inner checksum calculation
Offload the inner checksum computation to NDIS in OvsDecapStt function.

Signed-off-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-11-03 12:37:26 -08:00
Andy Zhou
60a15922f5 bfd: improve ovs-vswitchd.conf.db(5) manpage
Use the wording from RFC 5880 to describe the "diagnostic" and
"remote_diagnostic" fields.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-11-03 11:17:54 -08:00
Alin Serdean
ec6f7ef3fd datapath-windows: Report correctly when trying to add tunnel types
Report invalid parameter to the userspace if the user tries to add a vport
tunnel type which is not supported by the kernel extension.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-11-03 10:54:58 -08:00