2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

1150 Commits

Author SHA1 Message Date
Jesse Gross
1cb20095c3 tunnel: Support matching on the presence of Geneve options.
Sometimes it is useful to match only on whether a Geneve option
is present even if the specific value is unimportant. A special
case of this is zero length options where there is no value at all
and the only information conveyed is whether the option was included
in the packet.

This operation was partially supported before but it was not consistent -
in particular, options were never serialized through NXM/OXM unless
they had a non-zero mask. Furthermore, zero length options were rejected
altogether when they were installed through the Geneve map OpenFlow
command.

This adds support for these types of matches by making any NXM/OXM for
tunnel metadata force a match on that field. In the case of a zero length
option, both the value and mask of the NXM are ignored.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-08-28 18:02:00 -07:00
Jarno Rajahalme
74ff3298c8 userspace: Define and use struct eth_addr.
Define struct eth_addr and use it instead of a uint8_t array for all
ethernet addresses in OVS userspace.  The struct is always the right
size, and it can be assigned without an explicit memcpy, which makes
code more readable.

"struct eth_addr" is a good type name for this as many utility
functions are already named accordingly.

struct eth_addr can be accessed as bytes as well as ovs_be16's, which
makes the struct 16-bit aligned.  All use seems to be 16-bit aligned,
so some algorithms on the ethernet addresses can be made a bit more
efficient making use of this fact.

As the struct fits into a register (in 64-bit systems) we pass it by
value when possible.

This patch also changes the few uses of Linux specific ETH_ALEN to
OVS's own ETH_ADDR_LEN, and removes the OFP_ETH_ALEN, as it is no
longer needed.

This work stemmed from a desire to make all struct flow members
assignable for unrelated exploration purposes.  However, I think this
might be a nice code readability improvement by itself.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-08-28 14:55:11 -07:00
Thadeu Lima de Souza Cascardo
c6f4d2988f ovs-ctl: Fix indentation when deleting bridges.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-27 09:02:04 -07:00
Gurucharan Shetty
d1cec3c6e3 ovs-pki: Handle Windows style path.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-08-25 13:43:24 -07:00
Justin Pettit
c5a4125524 ovs-ofctl: Document missing shorthand notations.
Some new shorthands were added to ovs-ofctl, but not documented in the
man page.  This adds most of them.  A couple were left out that would
print differently than they would be input.  For example, we accept
"ip6" and "ipv6", but we would output it as "ipv6", so "ip6" is not
documented.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-08-25 13:10:07 -07:00
Gurucharan Shetty
6b777e472e ovs-vsctl: Add the missing ssl bootstrapping option parsing.
'man ovs-vsctl' mentions that ovs-vsctl can bootstrap itself
by getting the certificate from the server. But the option
was never parsed in the code.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-08-21 15:07:20 -07:00
Simon Horman
24605d4e58 ovs-ctl: do not attempt to restore flows when called with --delete-bridges
When called with --delete-bridges saved flows cannot be restored as the
bridges to which they belong no longer exist. This results in the following
error messages on restart.

ovs-ofctl: br0 is not a bridge or a socket
Restoring saved flows ... failed!

Although there is no effect of this error other than the message
it seems worth avoiding. This patch does so by skipping saving of flows
when --delete-bridges is in effect.

As flows are no longer saved when --delete-bridges is in effect
a side-effect of this change is that restart may be faster when
there are many flows.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-08-21 11:03:02 -07:00
Alex Wang
016e46846d db-ctl-base: Allow print rows that weak reference to table in
'cmd_show_table'.

Sometimes, it is desirable to print the table with weak reference to
the table specified in 'struct cmd_show_table'.  For example the
Port_Binding table rows in OVN_Southbound database that refer to the
same Chassis table row can be printed under the same chassis entry
in 'ovn-sbctl show' output.

To achieve it, this commit adds a new struct in 'struct cmd_show_table'
that allows users to print a table with weak reference to 'table'
specified in 'struct cmd_show_table'.  The 'ovn-sbctl' which now prints
the Port_Binding entries with Chassis table, is the first user of this
new feature.

Requested-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-08-13 00:58:59 -07:00
Alex Wang
5b5c922b0c ovn-nbctl: Move ovn-nbctl to utilities directory.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-08-08 09:49:34 -07:00
Ben Pfaff
898dcef1cc treewide: Fix doubled "the".
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-08-03 16:50:01 -07:00
Ben Pfaff
1e71b9444d ovs-ofctl: Refine documentation of Geneve option mapping.
The text didn't say how to actually match on them.  I took the liberty of
massaging the text a little further, too.

Suggested-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-08-03 16:46:31 -07:00
Ben Pfaff
8811fc0ae1 ofp-print: Abbreviate duplicated table features.
I spent some time recently looking at the results of "ovs-ofctl
dump-table-features".  It was really distressing because of the volume of
information.  Every table yielded well over 100 lines of output and for 253
(visible) tables that meant over 25,300 lines of output total, which is
basically unusable.

This commit cuts the volume of output greatly by eliminating most of the
duplication from one table to the next.  The command now prints the full
output only for table 0, and for each subsequent table prints only the
parts that differ.  That reduces the output volume for tables after the
first to only 9 lines each (one of which is blank), for a total of more
like 2,400 lines, which is still not short but reasonably manageable.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2015-07-28 15:18:48 -07:00
Andy Zhou
d33340a56b db-ctl-base: make cmd_show_table private
Instead of requiring user to declare a global variable, pass the value
via ctl_init().

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-23 13:31:55 -07:00
Andy Zhou
6530be3ba0 db-ctl-base: remove the recurse member from struct cmd_show_table
The 'recurse' is used during run time to suppress duplicated prints.
It is not essential to describe how show command should work.

This patch remove the 'recurse' member. Duplicated prints is now
suppressed by maintaining an 'sset' of tables that have been printed
at run time.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-23 13:18:01 -07:00
Russell Bryant
73cd29796f ovs-sim: Don't install man page.
The build system was set up to install the ovs-sim manpage, but not
ovs-sim itself.  I noticed this because the fedora rpm build is
currently broken because the man page was installed but not packaged
yet.  Fix this up by not installing the manpage.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-07-21 11:31:43 -07:00
Andy Zhou
ce6f1d1fc5 db-ctl-base: make use of user supplied exit function
The user is required to expose the_idl and the_idl_txn global variables,
so that memory can be cleaned up on fatal errors. This patch changes to
ask user to supply an exit function via ctl_init(). What user needs to
do on exit can now remain private.

Signed-off-by: Andy Zhou <azhou@nicira.com>
2015-07-17 13:01:49 -07:00
Joe Stringer
2bb0bea827 ovs-vsctl: Remove redundant checks.
In several places, "br" is dereferenced just before a check such as
"if (br ...)". These checks may be optimised out, and they provide no
additional safety, so this patch removes them.

Found by MIT STACK undefined behaviour checker.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-17 10:24:46 -07:00
Jesse Gross
b666962be3 tunneling: Allow matching and setting tunnel 'OAM' flag.
Several encapsulation formats have the concept of an 'OAM' bit
which typically is used with networking tracing tools to
distinguish test packets from real traffic. OVS already internally
has support for this, however, it doesn't do anything with it
and it also isn't exposed for controllers to use. This enables
support through OpenFlow.

There are several other tunnel flags which are consumed internally
by OVS. It's not clear that it makes sense to use them externally
so this does not expose those flags - although it should be easy
to do so if necessary in the future.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-15 20:33:41 -07:00
Justin Pettit
421e818cd4 ovs-ofctl.8: Specify correct variable in "snoop" description.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-15 00:03:04 -07:00
Andy Zhou
802cb46ebc db-ctl-base: do not require client to expose the "tables" variable
Instead, client now pass it via the modified ctl_init() API.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-07-13 00:40:59 -07:00
Andy Zhou
15ffc20282 db-ctl-base: do not expose get_table() API
Both get_table() and set_cloum() APIs are mostly used within db-ctl-base
library. This patch makes both private to the library.

Add a new ctl_set_colum() API for library client.

The changes are cleanups. No functional changes.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-07-13 00:40:58 -07:00
Jeroen van Bemmel
4249b5470e hash: Add symmetric L3/L4 hash functions for multipath, bundle hashing.
Signed-off-by: Jeroen van Bemmel <jvb127@gmail.com>
[blp@nicira.com made code style fixes, expanded documentation]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-07-08 08:33:27 -07:00
Jarno Rajahalme
bd53aa1723 classifier: Make versioning more explicit.
Now that struct cls_match has 'add_version' the 'version' in cls_match
was largely redundant.  Remove 'version' from struct cls_rule, and add
it to function prototypes that need it.  This makes versioning more
explicit (or less indirect) in the API.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-06 11:46:34 -07:00
Huanle Han
adfb6580f0 ovs-bugtool: Remove argument of "ovs-appctl dpif/show".
"ovs-appctl dpif/show" no longer takes any argument after commit dc54ef36
(ofproto: Track subfacet stats in the backer).

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-07-06 08:15:59 -07:00
Ben Pfaff
03c72922c2 Implement OpenFlow 1.4+ OFPMP_TABLE_DESC message.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Co-authored-by: Saloni Jain <saloni.jain@tcs.com>
Signed-off-by: Saloni Jain <saloni.jain@tcs.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-07-03 08:46:40 -07:00
Ben Pfaff
82c22d34b5 Implement OpenFlow 1.4+ OFPTC_EVICTION.
OpenFlow 1.4 introduces the ability to turn on flow table eviction with an
OFPT_TABLE_MOD message specifying OFPTC_EVICTION.  It also adds related
machinery to other messages that mention OFPTC_* fields.  This commit adds
support for the new feature, implementing it as a second, parallel way to
enable flow table eviction.  It takes more work than it seems like it
should because there is so much weirdness with the treatment of OFPTC_*
flags over the evolution of OpenFlow; please refer to the explanation in
DESIGN.md for more information.

This commit also adds related support to ovs-ofctl, plus tests.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Co-authored-by: Saloni Jain <saloni.jain@tcs.com>
Signed-off-by: Saloni Jain <saloni.jain@tcs.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-07-03 08:46:20 -07:00
Jesse Gross
35303d715b tunnels: Don't initialize unnecessary packet metadata.
The addition of Geneve options to packet metadata significantly
expanded its size. It was reported that this can decrease performance
for DPDK ports by up to 25% since we need to initialize the whole
structure on each packet receive.

It is not really necessary to zero out the entire structure because
miniflow_extract() only copies the tunnel metadata when particular
fields indicate that it is valid. Therefore, as long as we zero out
these fields when the metadata is initialized and ensure that the
rest of the structure is correctly set in the presence of a tunnel,
we can avoid touching the tunnel fields on packet reception.

Reported-by: Ciara Loftus <ciara.loftus@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-01 15:24:04 -07:00
Gurucharan Shetty
a1d5e45991 ovs-lib: Ability to move ip address and routes.
The ability to move IP address and routes between two interfaces
is useful when we want to make a physical interface (say eth0)
as a port of OVS bridge (say breth0) with all its IP address and route
information transferred to OVS bridge. An upcoming commit
uses the new ability.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-01 09:00:27 -07:00
Gurucharan Shetty
7a62e5ccbb ovs-save: Refactor and move some code to ovs-lib.
An upcoming commit becomes the second user of the
new functions.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-01 08:59:52 -07:00
Ansis Atteka
532e1463fc vlog: add "vlog/list-pattern" command
This patch allows to query logging format at the runtime for each destination
with "vlog/list-pattern" command.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-27 12:38:33 -07:00
Ben Pfaff
f08e39dd02 ofp-actions: Support mixing "conjunction" and "note" actions.
It doesn't make sense to mix "conjunction" actions with most other kinds
of actions.  That's because flows with "conjunction" actions aren't ever
actually executed, so any actions mixed up with them would never do
anything useful.  "note" actions are a little different because they never
do anything useful anyway: they are just there to allow a controller to
annotate flows.  It makes as much sense to annotate a flow with
"conjunction" actions as it does to annotate any other flow, so this
commit makes this possible.

Requested-by: Soner Sevinc <sevincs@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2015-06-26 08:14:20 -07:00
Jesse Gross
9558d2a548 tunnel: Geneve TLV handling support for OpenFlow.
The current support for Geneve in OVS is exactly equivalent to VXLAN:
it is possible to set and match on the VNI but not on any options
contained in the header. This patch enables the use of options.

The goal for Geneve support is not to add support for any particular option
but to allow end users or controllers to specify what they would like to
match. That is, the full range of Geneve's capabilities should be exposed
without modifying the code (the one exception being options that require
per-packet computation in the fast path).

The main issue with supporting Geneve options is how to integrate the
fields into the existing OpenFlow pipeline. All existing operations
are referred to by their NXM/OXM field name - matches, action generation,
arithmetic operations (i.e. tranfer to a register). However, the Geneve
option space is exactly the same as the OXM space, so a direct mapping
is not feasible. Instead, we create a pool of 64 NXMs that are then
dynamically mapped on Geneve option TLVs using OpenFlow. Once mapped,
these fields become first-class citizens in the OpenFlow pipeline.

An example of how to use Geneve options:
ovs-ofctl add-geneve-map br0 {class=0xffff,type=0,len=4}->tun_metadata0
ovs-ofctl add-flow br0 in_port=LOCAL,actions=set_field:0xffffffff->tun_metadata0,1

This will add a 4 bytes option (filled will all 1's) to all packets
coming from the LOCAL port and then send then out to port 1.

A limitation of this patch is that although the option table is specified
for a particular switch over OpenFlow, it is currently global to all
switches. This will be addressed in a future patch.

Based on work originally done by Madhu Challa. Ben Pfaff also significantly
improved the comments.

Signed-off-by: Madhu Challa <challa@noironetworks.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-25 11:08:58 -07:00
Jesse Gross
6159c531d0 openflow: Table maintenance commands for Geneve options.
In order to work with Geneve options, we need to maintain a mapping
table between an option (defined by <class, type, length>) and
an NXM field that can be operated on for the purposes of matches,
actions, etc. This mapping must be explicitly specified by the
user.

Conceptually, this table could be communicated using either OpenFlow
or OVSDB. Using OVSDB requires less code and definition of extensions
than OpenFlow but introduces the possibility that mapping table
updates and flow modifications are desynchronized from each other.
This is dangerous because the mapping table signifcantly impacts the
way that flows using Geneve options are installed and processed by
OVS. Therefore, the mapping table is maintained using OpenFlow commands
instead, which opens the possibility of using synchronization between
table changes and flow modifications through barriers, bundles, etc.

There are two primary groups of OpenFlow messages that are introduced
as Nicira extensions: modification commands (add, delete, clear mappings)
and table status request/reply to dump the current table along with switch
information.

Note that mappings should not be changed while they are in active use by
a flow. The result of doing so is undefined.

This only adds the OpenFlow infrastructure but doesn't actually
do anything with the information yet after the messages have been
decoded.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-25 11:08:58 -07:00
Alex Wang
f6a2e15619 db-ctl-base: Librarize database command manual.
This commit extracts the database command manual and puts it into
db-ctl-base.man.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-23 09:43:24 -07:00
Alex Wang
af046a16ec db-ctl-base: Librarize show command.
This commit extracts the 'show' command code and puts it into the
db-ctl-base module.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-23 09:43:24 -07:00
Alex Wang
51a73ff06e db-ctl-base: Librarize code in parse_options().
This commit extracts general code from parse_options() and puts it into
db-ctl-base module.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-23 09:43:24 -07:00
Alex Wang
07ff77ccb8 db-ctl-base: Make common database command code into library.
This commit extracts common database command (e.g. ovs-vsctl, vtep-ctl)
code into a new library module, db-ctl-base.  Specifically, the module
unifies the command syntax and common database-operating commands like
(get, list, find, set ...), and provides apis which allow user to create
more specific commands.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-23 09:43:23 -07:00
Alex Wang
29c3a9f5d8 ovs-vsctl: Simplify code.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-23 09:43:23 -07:00
Gurucharan Shetty
2dd7d60c64 Add a few OVN files as part of DISTCLEANFILES.
Reported-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Tested-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-06-23 09:37:26 -07:00
Alin Serdean
d54ac8032c utilities: Ignore generated files.
Add
utilities/ovs-sim
utilities/ovs-sim.1

Found by issuing make.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-06-19 19:48:37 -07:00
Justin Pettit
2d34dbd9e1 Merge remote-tracking branch 'origin/master' into ovn4 2015-06-18 22:02:55 -07:00
Ben Pfaff
6901639bc8 ovs-sim: New utility for multi-node OVS and OVN simulation.
Please see the examples in ovs-sim(1) for some examples of how this
can be useful.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-06-16 08:38:46 -07:00
Sabyasachi Sengupta
9fc789b906 ovs-ctl: let openvswitch startup to NOT hold up system boot upon error
Abort openvswitch startup script if ovsdb startup fails for
some reason. This helps in getting the system startup to NOT hang
indefinitely, as was seen in a recent report when ovsdb failed with
"I/O error: /etc/openvswitch/conf.db: failed to lock lockfile
(Resource temporarily unavailable)" and system remained in hung state
forever, unless manually rebooted from console.

Signed-off-by: Sabyasachi Sengupta <sabyasachi.sengupta@alcatel-lucent.com>
[blp@nicira.com changed an 'if' statement to '||']
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-06-15 15:00:21 -07:00
Jarno Rajahalme
39c9459355 Use classifier versioning.
Each rule is now added or deleted in a specific tables version.  Flow
tables are versioned with a monotonically increasing 64-bit integer,
where positive values are valid version numbers.

Rule modifications are implemented as an insertion of a new rule and a
deletion of the old rule, both taking place in the same tables
version.  Since concurrent lookups may use different versions, both
the old and new rule must be available for lookups at the same time.

The ofproto provider interface is changed to accomodate the above.  As
rule's actions need not be modified any more, we no longer need
'rule_premodify_actions', nor 'rule_modify_actions'.  'rule_insert'
now takes a pointer to the old rule and adds a flag that tells whether
the old stats should be forwarded to the new rule or not (this
replaces the 'reset_counters' flag of the now removed
'rule_modify_actions').

Versioning all flow table changes has the side effect of making
learned flows visible for future lookups only.  I.e., the upcall that
executes the learn action, will not see the newly learned action in
it's classifier lookups.  Only upcalls that start executing after the
new flow was added will match on it.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-11 15:53:43 -07:00
Jarno Rajahalme
2b7b1427c1 classifier: Support table versioning
This patch allows classifier rules to become visible and invisible in
specific versions.  A 'version' is defined as a positive monotonically
increasing integer, which never wraps around.

The new 'visibility' attribute replaces the prior 'to_be_removed' and
'visible' attributes.

When versioning is not used, the 'version' parameter should be passed
as 'CLS_MIN_VERSION' when creating rules, and 'CLS_MAX_VERSION' when
looking up flows.

This feature enables the support for atomic OpenFlow bundles without
significant performance penalty on 64-bit systems. There is a
performance decrease in 32-bit systems due to 64-bit atomics used.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-10 16:17:47 -07:00
Jarno Rajahalme
db5076eee4 ovs-ofctl: Add bundle support and unit testing.
All existing ovs-ofctl flow mod commands now take an optional
'--bundle' argument, which executes the flow mods as a single
transaction.  OpenFlow 1.4+ is implicitly assumed when '--bundle' is
specified.

ovs-ofctl 'add-flow' and 'add-flows' commands now accept flow
specifications that start with an optional 'add', 'modify', 'delete',
'modify_strict', or 'delete_strict' keyword, so that arbitrary flow
table modifications may be specified.  For backwards compatibility, a
missing keyword is treated as an 'add'.  With the new '--bundle'
option all the modifications are executed as a single transaction
using an OpenFlow 1.4 bundle.

OpenFlow 1.4 requires bundles to support at least flow and port mods.
This implementation does not yet support port mods in bundles.

Another restriction is that the atomic transactions are not yet
supported.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-10 13:19:34 -07:00
Zang MingJie
53d9f3838f ovs-appctl-bashcomp: bash_completion shouldn't modify user environment.
Signed-off-by: Zang MingJie <zealot0630@gmail.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-06-07 13:23:39 -07:00
Jarno Rajahalme
fc02ecc717 classifier: Add support for invisible flows.
This makes it possible to tentatively add flows to the classifier
without the datapath seeing them.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-01 13:24:09 -07:00
Gurucharan Shetty
6dd3cc3989 ovs-docker: Ability to set the MTU of the container interface.
When containers are connected to a OVS bridge and tunnels
are created, it makese sense to reduce the MTU of the interafce.

Reported-by: Aurélien Poulai <aurepoulain@viacesi.fr>
Signed-off-by: Gurucharan Shetty <shettyg@nicira.com>
2015-05-27 08:06:09 -07:00
Gurucharan Shetty
05444f0724 ovs-docker: Add the ability to set the mac address.
For testing OVN, it is useful to set the mac address
of the container. Since ovs-docker hasn't been part
of any released versions of OVS, it is probably OK
to change the options style.

Signed-off-by: Gurucharan Shetty <shettyg@nicira.com>
2015-05-27 08:06:05 -07:00