2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00
Commit Graph

1727 Commits

Author SHA1 Message Date
Joe Stringer
6fc2799e9e checkpatch: Check for pointer whitespace.
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
2017-03-09 12:34:44 -08:00
xurong00037997
6c7050b59c Adapt to flake8-import-order
https://review.openstack.org/#/c/432906/
flake8-import-order adds 3 new flake8 warnings:
I100: Your import statements are in the wrong order.
I101: The names in your from import are in the wrong order.
I201: Missing newline between sections or imports.

Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-03-08 21:11:48 -08:00
Jarno Rajahalme
a76a37efec conntrack: Force commit.
Userspace support for force commit.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
2017-03-08 17:23:57 -08:00
Jarno Rajahalme
2cd20955dc actions: Add resubmit with conntrack tuple.
Add resubmit option to use the conntrack original direction tuple
swapped with the corresponding packet header fields during the lookup.
This could allow the same ACL table be used for admitting return
and/or related traffic as is used for admitting the original direction
traffic.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
2017-03-08 17:23:24 -08:00
Jarno Rajahalme
67210a5510 lib: Check match and action prerequisities with 'match'.
Supply the match mask to prerequisities checking when available.  This
allows checking for zero-valued matches.  Non-zero valued matches
imply the presense of corresponding mask bits, but for zero valued
matches we must explicitly check the mask, too.

This is required now only for conntrack validity checking due to the
conntrack state having and 'invalid' bit, but not 'valid' bit.  One
way to match an valid conntrack state is to match on the 'tracked' bit
being one and 'invalid' bit being zero.  The latter requires the
corresponding mask bit be verified.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
2017-03-08 17:22:27 -08:00
Aaron Conole
26cea6adf8 ovs-tcpdump: Set mirror port mtu
When using ovs-tcpdump to mirror interfaces with MTU larger than the default,
Open vSwitch will lower the interfaces we are interested in monitoring.
Instead, probe the MTU and set the mirrored port's MTU value correctly.

Fixes: 314ce6479a ("ovs-tcpdump: Add a tcpdump wrapper utility")
Reported-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-03-08 16:16:56 -08:00
Aaron Conole
9ab5390d6d ovs-ctl: allow passing user:group to daemons
The Open vSwitch daemons allow passing --user user[:group] to allow
spawning under different user privileges.  ovs-ctl now accepts --ovs-user
in the same form to pass this argument on, as well as create databases and
data directories with the appropriate privileges.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Markos Chandras <mchandras@suse.de>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-02-24 15:05:27 -08:00
Ben Pfaff
c1689e1963 ovs-appctl: Document -T and --timeout options.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
2017-02-23 13:22:50 -08:00
Justin Pettit
70969b092f Remove build-time generated files when "make clean" is run.
"make clean" should remove all files generated by building a program, while
"make distclean" should also remove files generated by configuring the
program.  Previously some generated files during the build process, such
as man pages, were left behind when "make clean" was run.  This commit
only leaves configuration files after "make clean" is run, and removes
all other generated files.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-02-13 20:49:55 -08:00
William Tu
edb417cc25 ovs-ofctl: fix memory leak reported by valgrind.
Testcase 1057 ofproto-dpif - fragment handling - upcall reports
the following leak:
  xrealloc (util.c:123)
  vconn_dump_flows (vconn.c:1030)
  read_flows_from_switch (ovs-ofctl.c:3360)
  ofctl_replace_flows (ovs-ofctl.c:3433)
  ovs_cmdl_run_command__ (command-line.c:115)

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-02-08 15:03:52 -08:00
Ben Pfaff
f75612a12f ovs-vsctl: Disallow empty bridge, port, and interface names.
Reported-by: Gabor Locsei <gabor.locsei@ericsson.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2017-February/043613.html
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
2017-02-03 14:13:38 -08:00
Yi-Hung Wei
04f48a68c4 ofp-actions: Fix variable length meta-flow OXMs.
Previously, if a flow action that involves a tunnel metadata meta-flow
field is dumped from vswitchd, the replied field length in the OXM header
is filled with the maximum possible field length, instead of the length
configured in the tunnel TLV mapping table. To solve this issue, this patch
introduces the following changes.

In order to maintain the correct length of variable length mf_fields (i.e.
tun_metadata), this patch creates a per-switch based map (struct vl_mff_map)
that hosts the variable length mf_fields. This map is updated when a
controller adds/deletes tlv-mapping entries to/from a switch. Although the
per-swtch based vl_mff_map only hosts tun_metadata for now, it is able to
support new variable length mf_fields in the future.

With this commit, when a switch decodes a flow action with mf_field, the switch
firstly looks up the global mf_fields map to identify the mf_field type. For
the variable length mf_fields, the switch uses the vl_mff_map to get the
configured mf_field entries. By lookig up vl_mff_map, the switch can check
if the added flow action access beyond the configured size of a variable
length mf_field, and the switch reports an ofperr if the controller adds a flow
with unmapped variable length mf_field. Later on, when a controller request
flows from the switch, with the per-switch based mf_fields, the switch will
encode the OXM header with correct length for variable length mf_fields.

To use the vl_mff_map for decoding flow actions, extract-ofp-actions is
updated to pass the vl_mff_map to the required action decoding functions.
Also, a new error code is introduced to identify a flow with an invalid
variable length mf_field. Moreover, a testcase is added to prevent future
regressions.

Committer notes:
 - Factor out common code
 - Style fixups
 - Rename OFPERR_NXFMFC_INVALID_VL_MFF -> OFPERR_NXFMFC_INVALID_TLV_FIELD

VMWare-BZ: #1768370
Reported-by: Harold Lim <haroldl@vmware.com>
Suggested-by: Joe Stringer <joe@ovn.org>
Suggested-by: Jarno Rajahalme <jarno@ovn.org>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-02-01 13:05:34 -08:00
Ben Pfaff
96fee5e0a2 ovs-fields: New manpage to document Open vSwitch and OpenFlow fields.
There is still plenty of opportunity for improvement, but this new
ovs-fields(7) manpage is much more comprehensive than ovs-ofctl(8)
could be.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2017-01-25 13:58:04 -08:00
Ben Pfaff
3f5b5f7b41 db-ctl-base: Always support all tables in schema.
When one adds a new table to a database schema, it's easy to forget to
add the table to the list of tables in the *ctl.c program.  When this
happens, the database commands for that program don't work on that table
at all, even for commands like "list" and "create" that don't need any
special help.  This patch fixes that problem, by making sure that
db-ctl-base always has the complete list of tables.

Previously, each ctl_table_class pointed directly to the corresponding
ovsdb_idl_table_class.  With this patch, there are instead two parallel
arrays, one of ovsdb_idl_table_classes and the other of ctl_table_classes.
This change accounts for the bulk of the change to the db-ctl-base code.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Lance Richardson <lrichard@redhat.com>
2017-01-13 13:14:59 -08:00
Ben Pfaff
72fe7578ef New action "ct_clear".
This is being introduced specifically to allow a user of the "clone" action
to clear the connection tracking state, but it's implemented as a separate
action as a matter of clean design and in case another use case arises
later.

Reported-by: Mickey Spiegel <mickeys.dev@gmail.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-January/326981.html
Fixes: 7ae62a676d ("ofp-actions: Add clone action.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mickey Spiegel <mickeys.dev@gmail.com>
Tested-by: Dong Jun <dongj@dtdream.com>
2017-01-10 10:39:07 -08:00
Ben Pfaff
b827b2311f ofproto-dpif-xlate: Make "clone" save action set and stack.
This is a design decision but it seems conceptually cleaner than having
them leak through into the clone.

Reported-by: Mickey Spiegel <mickeys.dev@gmail.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-January/326981.html
Fixes: 7ae62a676d ("ofp-actions: Add clone action.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mickey Spiegel <mickeys.dev@gmail.com>
Tested-by: Dong Jun <dongj@dtdream.com>
2017-01-10 10:38:49 -08:00
Ben Pfaff
e8035fc014 ovs-ofctl: Document the "clone" action.
This was overlooked when "clone" was introduced.

Fixes: 7ae62a676d ("ofp-actions: Add clone action.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mickey Spiegel <mickeys.dev@gmail.com>
2017-01-05 20:38:01 -08:00
Joe Stringer
8c019a4158 ovs-ofctl.8: Document automatic helper assignment.
Due to upstream Linux feature "automatic helper assignment", up until
recently when using ct() action with FTP traffic, it has not been
necessary to specify the ALG parameter. However, automatic helper
assignment was disabled in Linux 4.7 or later, in upstream commit
3bb398d925ec ("netfilter: nf_ct_helper: disable automatic helper
assignment"). Document the need for this.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
2017-01-05 18:10:20 -08:00
Justin Pettit
e36f7b9ab9 ovs-sim: Quote "$@".
Quote "$@" so that arguments aren't split when being called.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-01-05 13:51:16 -08:00
Daniele Di Proietto
140f36ba46 ofproto: Fix crash on flow monitor request with tun_metadata.
nx_put_match() needs a non-NULL tunnel metadata table, otherwise it will
crash if a flow matches on tunnel metadata.

This wasn't handled in ofputil_append_flow_update(), causing a crash
when the controller sent a flow monitor request.

To fix the problem, this commit changes ofputil_append_flow_update() to
behave like ofputil_append_flow_stats_reply().
Since ofputil_append_flow_update() now needs to temporarily modify the
match, this commits also embeds 'struct match' into 'struct
ofputil_flow_update', to be safer.  This is more similar to
'struct ofputil_flow_stats'.

A regression test is added and a comment is updated in ovs-ofctl.c

 #0  0x000055699bd82fa0 in memcpy_from_metadata (dst=0x7ffc770930d0, src=0x7ffc77093698, loc=0x18) at ../lib/tun-metadata.c:451
 #1  0x000055699bd83c2e in metadata_loc_from_match_read (map=0x0, match=0x7ffc77093410, idx=0, mask=0x7ffc77093658, is_masked=0x7ffc77093287) at ../lib/tun-metadata.c:848
 #2  0x000055699bd83d9b in tun_metadata_to_nx_match (b=0x55699d3f0300, oxm=0, match=0x7ffc77093410) at ../lib/tun-metadata.c:871
 #3  0x000055699bce523d in nx_put_raw (b=0x55699d3f0300, oxm=0, match=0x7ffc77093410, cookie=0, cookie_mask=0) at ../lib/nx-match.c:1052
 #4  0x000055699bce5580 in nx_put_match (b=0x55699d3f0300, match=0x7ffc77093410, cookie=0, cookie_mask=0) at ../lib/nx-match.c:1116
 #5  0x000055699bd3926f in ofputil_append_flow_update (update=0x7ffc770940b0, replies=0x7ffc77094e00) at ../lib/ofp-util.c:6805
 #6  0x000055699bc4b5a9 in ofproto_compose_flow_refresh_update (rule=0x55699d405b40, flags=(NXFMF_INITIAL | NXFMF_ACTIONS), msgs=0x7ffc77094e00) at ../ofproto/ofproto.c:5915
 #7  0x000055699bc4b5f6 in ofmonitor_compose_refresh_updates (rules=0x7ffc77094e10, msgs=0x7ffc77094e00) at ../ofproto/ofproto.c:5929
 #8  0x000055699bc4bafc in handle_flow_monitor_request (ofconn=0x55699d404090, oh=0x55699d404220) at ../ofproto/ofproto.c:6082
 #9  0x000055699bc4f46d in handle_openflow__ (ofconn=0x55699d404090, msg=0x55699d404910) at ../ofproto/ofproto.c:7912
 #10 0x000055699bc4f5df in handle_openflow (ofconn=0x55699d404090, ofp_msg=0x55699d404910) at ../ofproto/ofproto.c:8002
 #11 0x000055699bc88154 in ofconn_run (ofconn=0x55699d404090, handle_openflow=0x55699bc4f5bc <handle_openflow>) at ../ofproto/connmgr.c:1427
 #12 0x000055699bc85934 in connmgr_run (mgr=0x55699d3adb90, handle_openflow=0x55699bc4f5bc <handle_openflow>) at ../ofproto/connmgr.c:363
 #13 0x000055699bc422c9 in ofproto_run (p=0x55699d3c85e0) at ../ofproto/ofproto.c:1798
 #14 0x000055699bc31ec6 in bridge_run__ () at ../vswitchd/bridge.c:2881
 #15 0x000055699bc320a6 in bridge_run () at ../vswitchd/bridge.c:2938
 #16 0x000055699bc3784e in main (argc=10, argv=0x7ffc770952c8) at ../vswitchd/ovs-vswitchd.c:111

Fixes: 8d8ab6c2d5 ("tun-metadata: Manage tunnel TLV mapping table on a
per-bridge basis.")

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-01-04 16:35:18 -08:00
Jarno Rajahalme
21b2fa6171 ofp-parse: Allow match field names in actions and brackets in matches.
Allow using match field names in addition to the canonical register
names in actions (including 'load', 'move', 'push', 'pop', 'output',
'multipath', 'bundle_load', and 'learn').  Allow also leaving out the
trailing '[]' to indicate full field.  These changes allow simpler
syntax similar to 'set_field' to be used also elsewhere.

Correspondingly, allow the '[start..end]' syntax to be used in matches
in addition to the more explicit 'value/mask' notation.  For example,
to match on the value 2 of the bits 14..15 of NXM_NX_REG0, the match
could include:

... reg0[14..15]=2 ...

instead of

... reg0=0x8000/0xc000 ...

Note that only contiguous masks can be specified with the bracket
notation.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-01-04 16:10:56 -08:00
Joe Stringer
40c7b2fc0d lib: Add support for tftp ct helper.
The kernel datapath provides support for TFTP helpers, so add support
for this ALG to the commandline and OpenFlow encoding/decoding.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-01-03 09:32:58 -08:00
Ben Pfaff
d444a914fd ovn-trace: New --ovs option to also print OpenFlow flows.
Sometimes seeing the OpenFlow flows that back a given logical flow can
provide additional insight.  This commit adds a new --ovs option to
ovn-trace that makes it connect to Open vSwitch over OpenFlow and retrieve
and print the OpenFlow flows behind each logical flow encountered during
a trace.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2016-12-28 09:31:42 -08:00
Lance Richardson
c4817da780 table: correct documented default format in man pages
There are currently five users of the table formatting library,
all of which default to "list" except for ovsdb-client which
defaults to "table".  The library current default is "table",
and the table.man man page fragment only considers ovs-vsctl
to use something other than "table" as a default.As a result,
the man pages for ovn-sbctl and vtep-ctl are currently incorrect
(these options aren't documented in the ovn-nbctl man page, which
will need to be addressed in a future patch).

Fix by making the library default format "list" and handling
ovsdb-client as the exception.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-22 16:13:13 -08:00
Daniele Di Proietto
feb38b6d35 ovs-vsctl: Print error when add-port fails.
When the add-port command fails, vsctl reports the failure and just
suggests to check the logs for more details.

ovs-vswitchd fills the error column in the Interface table with a
description of the error, so it might be helpful to print that.

This is useful especially for dpdk devices, because the port naming
change could use a better error reporting.

I'm planning another patch to make sure that ovs-vswitch writes
appropriates information in the error column, after the dpdk port naming
changes are merged.

CC: Ben Pfaff <blp@ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-12-21 11:07:17 -08:00
Stephen Finucane
3c8a3b312a doc: Move WHY-OVS
This is moved separately due to the sheer number of references to this
file in the codebase.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-12 08:57:07 -08:00
Stephen Finucane
7c9afefd0a doc: Populate 'topics' section
There are many docs that don't need to kept at the top level, along
with many more hidden in random folders. Move them all.

This also allows us to add the '-W' flag to Sphinx, ensuring unindexed
docs result in build failures.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-12 08:57:06 -08:00
Stephen Finucane
43f317fff1 doc: Further populate the 'howto' section
There are a couple of references to these for various build systems.
The website is going to be our "one true resource" for all docs, so
simply remove these references.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-12 08:56:40 -08:00
Stephen Finucane
795752a3cf doc: Populate 'install', 'howto' sections
This is a dumb move of all 'INSTALL*' docs, with very little
refactoring (mostly updating links and making the titles a little more
consistent. Additional refactoring will be done in subsequent changes.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-12 08:55:32 -08:00
Joe Stringer
81a86b9a86 treewide: Fix recent flake8-check.
Without this patch, I see errors like this on master:
../ofproto/ipfix-gen-entities:115:1: E305 expected 2 blank lines after
class or function definition, found 1

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2016-12-08 14:02:52 -08:00
Daniele Di Proietto
884e0dfe8f python: Add double newline after fuction or class (E305).
pycodestyle >= 2.1.0 reports E305 otherwise, and the flake8-check step
fails.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-12-02 11:03:36 -08:00
Stephen Finucane
49d9bd5b0e trivial: Don't mix tabs and spaces in ovs-sim
Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
2016-11-30 20:41:16 -05:00
Ben Pfaff
4930ea5620 ofp-actions: Add "ingress" and "egress" options to "sample" action.
Before Open vSwitch 2.5.90, IPFIX reports from Open vSwitch didn't include
whether the packet was ingressing or egressing the switch.  Starting in
OVS 2.5.90, this information was available but only accurate if the action
included a port number that indicated a tunnel.  Conflating these two does
not always make sense (not every packet involves a tunnel!), so this patch
makes it possible for the sample action to simply say whether it's for
ingress or egress.

This is difficult to test, since the "tests" directory of OVS does not have
a proper IPFIX listener.  This passes those tests, plus a couple that just
verify that the actions are properly parsed and formatted.  Benli did test
it end-to-end in a VMware use case.

Requested-by: Benli Ye <daniely@vmware.com>
Tested-by: Benli Ye <daniely@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Simon Horman <simon.horman@netronome.com>
2016-11-30 08:46:53 -08:00
Aaron Conole
fb9410d844 checkpatch: Add file-parsing mode
This adds a new argument and feature, 'check-file', which will allow
checkpatch to run against files instead of only against patches.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:05:13 -08:00
Aaron Conole
a1193b4def checkpatch: fix the if and whitespace checks
The regex for the if/for/while bracket tests fails to distinguish
non-space text.  This means text such as do_something_if() would match
incorrectly.

Additionally, the ends-with-bracket test doesn't allow for the common
coding paradigm:

    if (condition) { /* Text about conditional. */
    }

So fix that as well.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:04:54 -08:00
Aaron Conole
83f76d4ef1 checkpatch: Fix signoff error
When no 'Signed-off-by' tags are found, the output will look like:

    E: No signatures found.
    E: Too many signoffs; are you missing Co-authored-by lines?
    Warnings: 0, Errors: 2

However, there should really only be one error reported in this case.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:04:35 -08:00
Aaron Conole
4d7f5e5136 checkpatch: Print file line numbers
The line numbers being printed were the line numbers for the patchfile.
This is sometimes okay to fix simple things (trailing or leading
whitespace, missing signoffs, etc).  But more complicated fixes, or
those fixes which require a bit more care, aren't helped by this.  So,
we use the implied file line number.

This can be useful with future work to 'mock' apply and build a real
contextual scanner for checking multi-line changes.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:04:18 -08:00
Aaron Conole
e3ecc9d35c checkpatch: convert some of the warnings
These coding issues are not just things that shouldn't be done.  They are
styles which should never be submitted.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:04:00 -08:00
Aaron Conole
7d6b834fe5 checkpatch: Print the line in question distinctly
This makes it easier to distinguish between the line, and
the warning/error message.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:03:24 -08:00
Aaron Conole
3239c7937c checkpatch: Announce the file where errors occur
This makes finding the warning and error marks much easier.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-28 17:01:05 -08:00
Babu Shanmugam
207e85dbc5 utilities: Use FQDN for external_ids:hostname in Openvswitch table
Openstack compute manager uses FQDN to check for the hypervisors to
which the ports are bound.

Without this fix, no instances can be launched as the hypervisor's hostname
mismatches.

Signed-off-by: Babu Shanmugam <bschanmu@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-26 14:03:33 -08:00
Ben Pfaff
e0ce526826 ovs-tcpdump: Do not import unused "select" module.
Fixes the following flake8 warning:
    utilities/ovs-tcpdump.in:21:1: F401 'select' imported but unused

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
2016-11-23 09:48:08 -08:00
nickcooper-zhangtonghao
68b2a37d1d ovs-tcpdump: Fix error handling when parsing parameter.
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2016-11-22 15:14:07 -08:00
nickcooper-zhangtonghao
efeb3e44b2 ovs-tcpdump: destroy_mirror should really destroy the mirror.
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2016-11-22 15:13:47 -08:00
nickcooper-zhangtonghao
b47d91a740 ovs-tcpdump: should't halt when dumping traffic.
when sys.stdin is passed to tcpdump via pipe,
it will cause tcpdump to halt.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2016-11-22 15:13:42 -08:00
nickcooper-zhangtonghao
013c1e7080 ovs-tcpdump: Remove the newline from readline().
When using ovs-tcpdump, we always get the white line.
Remove newline from readline() and ovs-tcpdump will
format the output as tcpdump tool.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2016-11-22 15:12:46 -08:00
Yi-Hung Wei
a4b2c64f44 ovs-ofctl: Fix memory leak in bundle_print_errors().
In testcase "ofproto - bundle group mod with mod and add_or_mod command",
valgrind reports a memory leak with the following call stack.
    xmalloc (util.c:112)
    ofpbuf_resize__ (ofpbuf.c:246)
    ofpbuf_push_uninit (ofpbuf.c:436)
    ofpbuf_push (ofpbuf.c:459)
    ofperr_decode_msg (ofp-errors.c:332)
    bundle_print_errors (ovs-ofctl.c:692)
    bundle_transact.constprop.25 (ovs-ofctl.c:728)
    bundle_group_mod__ (ovs-ofctl.c:2663)
    ofctl_group_mod__ (ovs-ofctl.c:2681)
    ofctl_group_mod (ovs-ofctl.c:2736)
    ovs_cmdl_run_command__ (command-line.c:115)
    main (ovs-ofctl.c:151)

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-22 10:48:41 -08:00
Yi-Hung Wei
5a329e85d6 ovs-ofctl: Fix memory leak in ofctl_packet_out().
In testcase "bfd - bfd decay", valgrind reports a memory leak with the
following call stack.
    xmalloc (util.c:112)
    vconn_stream_new (vconn-stream.c:60)
    vconn_stream_open (vconn-stream.c:85)
    vconn_open (vconn.c:248)
    open_vconn_socket (ovs-ofctl.c:517)
    open_vconn__ (ovs-ofctl.c:553)
    open_vconn (ovs-ofctl.c:587)
    open_vconn_for_flow_mod (ovs-ofctl.c:1416)
    ofctl_packet_out (ovs-ofctl.c:2148)
    ovs_cmdl_run_command__ (command-line.c:115)
    main (ovs-ofctl.c:151)

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-22 10:41:38 -08:00
Ethan Rahn
e18a1d0861 Add support for specifying SSL connection parameters to ovsdb
Signed-off-by: Ethan Rahn <erahn@arista.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-11-10 10:36:42 -08:00
Stephen Finucane
60230e06ce doc: Remove final markdown references
There are some leftover Markdown references and Markdown-related
tooling. Seeing as there are no Markdown files left, we can kill it all
with fire.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
2016-11-07 14:19:10 -08:00