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

1150 Commits

Author SHA1 Message Date
Ben Pfaff
ce5a3e38da ovs-vsctl: Support references among records at creation time.
This makes it easy to create a bunch of records that are all related to
each other in a single ovs-vsctl invocation.  It adds an example to the
ovs-vsctl manpage.
2010-06-17 10:30:18 -07:00
Ben Pfaff
4a0335937f ovs-vsctl: Add support for command options that accept arguments. 2010-06-17 10:30:18 -07:00
Ben Pfaff
ef1e753e5d ovs-vsctl: Update manpage. Use same order as ovs-vswitchd.conf.db.5. 2010-06-17 10:30:18 -07:00
Ben Pfaff
8d49c47a5d ovs-vsctl: Fix assert-fail when an error occurs and "create" command used.
When the "create" command is used, post_create() calls
ovsdb_idl_txn_get_insert_uuid(), which asserts that the transaction
completed successfully.  This makes it clear that postprocess functions
should only run when the transaction completes successfully.  (Currently
post_create() is the only postprocess function.)
2010-06-17 10:30:18 -07:00
Ben Pfaff
f19f25a44b ovs-vsctl: Fix spelling error in log message. 2010-06-17 10:26:13 -07:00
Ben Pfaff
eb15cdbbea ofproto: Make OpenFlow connection log messages name the datapath.
Until now, log messages about OpenFlow connections have named the target
of the connection, e.g. "tcp:1.2.3.4:5555", but they have not named the
datapath.  Most often, every datapath has the same target, so this can
make it difficult to tell which connection is going wrong.  Usually, that
isn't important, because all connections with the same target will have the
same problems, but it's probably better to be more informative.

This commit changes the log messages to include the datapath name, so that
"tcp:1.2.3.4:5555" becomes, e.g., "xenbr0<->tcp:1.2.3.4:5555".

Requested-by: Keith Amidon <keith@nicira.com>
2010-06-08 10:38:57 -07:00
Ben Pfaff
9794e80604 rconn: Drop rconn_new(), rconn_new_from_vconn() functions.
There are enough rconn functions without these helpers, which weren't used
much in practice.
2010-06-08 10:35:53 -07:00
Ben Pfaff
58bdd0925e rconn: Drop 'name' arg to rconn_new_from_vconn(), rconn_connect_unreliably().
The 'name' argument to these functions is actively unhelpful, because none
of the callers provided a better name than the one provided by
vconn_get_name().  So drop it.
2010-06-08 10:35:53 -07:00
Jesse Gross
1e82e503c5 netdev: Remove may_create/may_open flags.
The most recent revision of the netdev library added may_create
and may_open flags to explicitly state the intent of the caller as
to whether the device should already be in use.  This was simply
a sanity check for users of the netdev library and the configuration.
At this point the netdev library and its users are well behaved and
should no longer need to be checked.  Additional checks have also
been added for incorrect configuration that mean the netdev library
is no longer the primary line of defense.

These flags themselves create problems because it is not always
easy for a library to know what the state of devices should be.
This is particularly a problem for ovs-openflowd, which expects
ports to be added by ovs-dpctl.  Fixing this either requires that
the checks are so permissive to be useless or ugly hacks to get
around them.  Since they are no longer needed, just remove the
checks.

This commit restores the previous behavior of ovs-openflowd to
not require that ports be specified on the command line or
cleaned up after use.

Bug #2652

CC: Natasha Gude <natasha@nicira.com>
CC: Jean Tourrilhes <jt@hpl.hp.com>
CC: 蒲彦 <yan.p.bjtu@gmail.com>
2010-06-01 17:27:45 -07:00
Ben Pfaff
7089685a9e Build ovs-wdt or nlmon utilities only on Linux.
These utilities are Linux-specific.
2010-05-26 15:36:58 -07:00
Ben Pfaff
9d82ec478d Always #include <sys/socket.h> before <net/if.h>.
FreeBSD 8.0's <net/if.h> requires <sys/socket.h> to be included first,
even though I don't see any such requirement in POSIX.
2010-05-26 15:27:01 -07:00
Ben Pfaff
e2bfacb6e4 ofproto: Prefer "master" and "other" connections for snooping over "slave".
This makes "ovs-ofctl snoop" and anything else that connects to the
switch's "snoop" socket typically more useful in the presence of multiple
controllers, since the "master" connection is the one with the most
interesting traffic.

Suggested-by: Justin Pettit <jpettit@nicira.com>
2010-05-13 09:43:39 -07:00
Ben Pfaff
0caf6bde24 ovs-ofctl: Add "snoop" command.
The "snoop" command does roughly the same thing as "monitor", but it is
easier to use in the common case where one just wants to look at the
OpenFlow controller connection for a bridge.  Instead of, for example,
   ovs-ofctl monitor unix:/var/run/openvswitch/br0.snoop
one merely types
   ovs-ofctl snoop br0
2010-05-11 12:44:58 -07:00
Ben Pfaff
7f1089b503 ovs-ofctl: "monitor" command takes no more than 2 arguments
The "monitor" command would accept 3 arguments and ignore the third one.
Reject such usage instead.
2010-05-11 12:22:17 -07:00
Ben Pfaff
a6bc4a03a4 ovs-ofctl: Fix usage message for "monitor" command.
The "monitor" command takes at most two arguments, and the second one is
optional, so express that correctly.
2010-05-11 12:20:58 -07:00
Ben Pfaff
d01600a208 ovs-vsctl: Add sFlow to supported set of tables.
Somehow this one got left out accidentally.

Reported-by: Neil McKee <neil.mckee@inmon.com>
2010-05-05 10:38:24 -07:00
Justin Pettit
18ee958b7b ovs-vsctl: Add emergency reset command
Add the "emer-reset" command, which is used to clear the configuration of
items likely to have been configured by the manager.  This will leave
the core networking configuration as it was.
2010-04-30 16:53:29 -07:00
Ben Pfaff
537eeb9ccf ovs-ofctl: Document that "actions" must be last in flow specifications.
Bug #2447.
Reported-by: Reid Price <reid@nicira.com>
2010-04-21 13:29:03 -07:00
Ben Pfaff
33e01d3a2b ovs-openflowd: Prefer --fail=standalone|secure over --fail=open|closed.
The "standalone" and "secure" terminology is less confusing.

This retains support for "open" and "closed" but does not document it.
2010-04-20 11:14:58 -07:00
Ben Pfaff
76ce943239 Add support for multiple OpenFlow controllers on a single bridge.
With this commit, Open vSwitch permits a bridge to have any number of
OpenFlow controllers.  When multiple controllers are configured, Open
vSwitch connects to all of them simultaneously.  Details of configuration
are in the vswitch schema documentation.

OpenFlow 1.0 does not specify how multiple controllers coordinate in
interacting with a single switch, so more than one controller should be
specified only if the controllers are themselves designed to coordinate
with each other.

An upcoming commit will provide a simple means for coordination between
multiple controllers.

Feature #2495.
2010-04-20 11:01:44 -07:00
Ben Pfaff
79c9f2ee78 ofproto: Bundle all controller-related settings into a struct.
Many ofproto settings are controller-related.  Upcoming commits will add
to ofproto the ability to support multiple controllers, so it is important
to be able to refer to controller settings as a group.  Hence, this commit
bundles them into a new "struct ofproto_controller".
2010-04-20 11:01:44 -07:00
Ben Pfaff
fb0d597fb6 ovs-openflowd: Remove documentation for obsolete --mgmt-id option.
Also remove unused OPT_MGMT_ID enum.
2010-04-20 11:01:44 -07:00
Jesse Gross
659586efcf tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel
on which a packet was received (0 if not received on a tunnel).  Also
add an action which allows the tunnel ID to be set for outgoing
packets.  At this point there aren't any tunnel implementations so
these fields don't have any effect.

The matching is exposed to OpenFlow by overloading the high 32 bits
of the cookie as the tunnel ID.  ovs-ofctl is capable of turning
on this special behavior using a new "tun-cookie" command but this
command is intentially undocumented to avoid it being used without
a full understanding of the consequences.
2010-04-19 09:11:51 -04:00
Justin Pettit
5de4844061 ovs-vsctl: Cleanup some formatting in man page 2010-04-14 20:53:15 -07:00
Ben Pfaff
80bc2072c0 ovs-ofctl: Fix write before beginning of string in "add-flow".
If "action" is the first word in a flow specification, then we were writing
one byte before the beginning of the string.  So overwrite the 'a' in
"action" instead; we know it's really there.

Reported-by: Ghanem Bahri <bahri.ghanem@gmail.com>
2010-04-14 10:26:35 -07:00
Ben Pfaff
379c2564b6 ovs-dpctl: In "dump-flows", only print flows that can be retrieved.
If dpif_flow_get() returns an error then we'd better not try to print
the flow (especially not the actions since check_rw_odp_flow() clears
the first action to 0xcc).
2010-04-13 16:51:13 -07:00
Ben Pfaff
c6278d2089 ovs-controller: Document how to use with management protocol. 2010-04-12 11:03:32 -07:00
Ben Pfaff
c9f3f37a9d jsonrpc: Add support for passive connections.
This allows ovs-vsctl to work as a simple Open vSwitch "manager" if the
XenServer host is configured to connect to it remotely.
2010-04-12 11:03:32 -07:00
Ben Pfaff
218a6f5959 ovs-vsctl: Add SSL support.
Normally ovs-vsctl is run locally, with a Unix domain socket as target, but
it can be useful over SSL as well from a remote host, so this commit
enables that use.
2010-04-12 11:03:32 -07:00
Ben Pfaff
b66bdf3032 ovs-controller: Add --unixctl option. 2010-04-12 11:03:32 -07:00
Justin Pettit
8cce2125ee ovs-ofctl: Allow setting cookie as a decimal or hex value
Clean-up a few items related to flow cookies:

    - Allow setting the flow cookie as a hex or decimal string
    - Consistently print the cookie in hex
    - Document the ability to set the flow cookie in ovs-ofctl.
2010-04-12 02:46:12 -07:00
Ben Pfaff
18b239f583 ovs-vsctl: Allow setting arbitrary database columns in add-port, add-bond. 2010-04-05 12:58:21 -07:00
Ben Pfaff
3a2fe1f354 ovs-ofctl: Add support for "resubmit" Nicira vendor extension.
CC: Paul Ingram <paul@nicira.com>
2010-04-05 09:37:59 -07:00
Justin Pettit
7b3d0898f8 ovs-monitor: Put run files in "/var/run/openvswitch" 2010-03-31 19:36:00 -07:00
Justin Pettit
bc39196036 Cleanup default file locations and XenServer packaging
This commit cleans up the locations of a number of files and directories
used.  These include:

    - Config file lives in /etc/openvswitch/conf.db
    - Logs go into /var/log/openvswitch
    - ovsdb-server socket is /var/run/openvswitch/db.sock
    - Schema goes into /usr/share/openvswitch/vswitch.ovsschema
    - PID files go in /var/run/openvswitch

For XenServer, these additional changes are made:

    - Cores go in /var/xen/openvswitch
    - OVS binaries run in /var/xen/openvswitch

In addition, it attempts to cleanup the XenServer packaging.  This
includes referring to the project as "openvswitch" as opposed to the
somewhat presumptuous "vswitch".

Note: Changes to the Debian packaging will be forthcoming.
2010-03-26 14:40:31 -07:00
Ben Pfaff
ac3005057c docs: Move PKI section heading into individual manpages.
The ovsdb-server manpage needs a paragraph between the heading and the
first option description, so the heading can't go into the common fragment.
2010-03-19 15:18:37 -07:00
Ben Pfaff
e1c0e2d173 ovsdb-idl: Make ovsdb_idl_txn_add_comment() take a printf() format string.
All of the callers were calling xasprintf() and then passing the result
to ovsdb_idl_txn_add_comment(), so this slightly simplifies the callers.
2010-03-08 14:18:44 -08:00
Ben Pfaff
8936565369 Add documentation for the vswitch database schema.
We can do better than this (I already have some comments) but this is
still much better than what we had.
2010-03-05 17:04:24 -08:00
Ben Pfaff
3b12addabb Update Open vSwitch documentation. 2010-03-04 10:05:44 -08:00
Ben Pfaff
af96ccd246 ovsdb-idl: New function ovsdb_idl_txn_commit_block().
This commit factors out common code from multiple callers of
ovsdb_idl_txn_commit() into a new function ovsdb_idl_txn_commit_block().
2010-03-03 12:55:39 -08:00
Ben Pfaff
a26cc67c16 Remove PCRE dependency. 2010-02-25 14:59:41 -08:00
Ben Pfaff
ed951f1577 ofctl: Improve manpage.
This better documents how TCP/IP field matching works, and adds
documentation for ARP.
2010-02-24 13:43:50 -08:00
Ben Pfaff
a9b4a41ae4 Fix excessive white space in manpages.
In nroff manpages, a blank line adds vertical white space.  When this is
followed by another command that also starts a new paragraph, the result
is a vertical skip twice as big as the normal inter-paragraph gap.  The
solution is to use a line that contains just "." for white space within
the manpage, instead of a blank line.  The resulting manpages look better.
2010-02-24 13:42:43 -08:00
Tetsuo NAKAGAWA
5c9a0b820c ovs-dpctl: Fix setting of packet length for "controller" action 2010-02-20 03:03:29 -08:00
Justin Pettit
0c30c8f1c4 ovs-openflowd: Standardize on OpenFlow description option
ovs-vswitchd used a slightly different way to set the manufacturer,
hardware revision, software revision, serial number, and datapath
description than ovs-openflowd.  This standardizes on the ovs-vswitch
style and describes how to use them in the man page.
2010-02-20 02:22:30 -08:00
Justin Pettit
ce640333ea ovs-openflowd: Fix typo in comment describing dp_desc 2010-02-20 02:22:29 -08:00
Justin Pettit
abaad8cf1b ofproto: Querying port stats for individual ports (OpenFlow 1.0)
OpenFlow 1.0 adds "port_no" field to the Port Stat request messages to
allow stats for individual ports to be queried.  Port stats for all ports
can still be requested by specifying OFPP_NONE as the port number.

NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until
the final commit in this OpenFlow 1.0 set.
2010-02-20 02:22:28 -08:00
Justin Pettit
834377ea55 ofproto: Match on IP ToS/DSCP bits (OpenFlow 1.0)
OpenFlow 1.0 adds support for matching on IP ToS/DSCP bits.

NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until
the final commit in this OpenFlow 1.0 set.
2010-02-20 02:22:28 -08:00
Justin Pettit
39997502e4 ofproto: Add support for flow cookies (OpenFlow 1.0)
In OpenFlow 1.0, flows have been extended to include an opaque
identifier, referred to as a cookie. The cookie is specified by the
controller when the flow is installed; the cookie will be returned as
part of each flow stats and flow removed message.

NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until
the final commit in this Openflow 1.0 set.
2010-02-20 02:22:28 -08:00
Justin Pettit
8abc4ed712 ofproto: Add user-specifiable datapath description (OpenFlow 1.0)
In OpenFlow 1.0, a "dp_desc" character array was added to the ofp_desc_stats
structure that allows a human readable description of the datapath to be
provided.

NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until
the final commit in this OpenFlow 1.0 set.
2010-02-20 02:22:27 -08:00