| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
By convention, unused arguments should be named "_" and top level
definitions should be separated by two spaces.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few loose ends here. First, learning actions cause too much
flow revalidation. Upcoming commits will fix that problem. The following
additional issues have not yet been addressed:
* Resource limits: nothing yet limits the maximum number of flows that
can be learned. It is possible to exhaust all system memory.
* Age reporting: there is no way to find out how soon a learned table
entry is due to be evicted.
To try this action out, here's a recipe for a very simple-minded MAC
learning switch. It uses a 10-second MAC expiration time to make it easier
to see what's going on:
ovs-vsctl del-controller br0
ovs-ofctl del-flows br0
ovs-ofctl add-flow br0 "table=0 actions=learn(table=1, hard_timeout=10, \
NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], \
output:NXM_OF_IN_PORT[]), resubmit(,1)"
ovs-ofctl add-flow br0 "table=1 priority=0 actions=flood"
You can then dump the MAC learning table with:
ovs-ofctl dump-flows br0 table=1
|
| |
|
|
|
|
|
|
| |
This allows a command like "test-openflowd --enable-dummy dummy@br0
--ports=dummy@eth0,dummy@eth1,dummy@eth2" to create a dummy datapath with
a number of dummy ports. This is more useful for testing than a dummy
datapath with just an internal port, since output to "flood" and "normal"
has less pathological results.
|
| |
|
|
|
|
|
| |
We had these functions scattered around the source tree anyway. packets.h
is a good place to centralize them.
I do plan to introduce some additional callers.
|
| |
|
|
|
| |
This patch adds a unit test which would have caught the issue fixed
in Commit 2446268e "ofproto-dpif: set_tunnel when required to."
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The prefix "ODP_*" is not overly descriptive in the context of the
larger Linux tree. This commit changes the prefix to "OVS_*" for the
userpace to kernel interactions. The userspace libraries still use
"ODP_" in many of their interfaces since it is more descriptive in the
OVS oeuvre.
Feature #6904
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| |
|
|
|
| |
The NXAST_OUTPUT_REG action outputs to the OpenFlow port contained
in a supplied NXM field.
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes multiple table support in ofproto-dpif useful, by allowing
resubmits into tables other than 0.
|
| |
|
|
|
| |
Tables other than 0 can be modified and dumped, but they are not yet useful
because actions and flow table lookups never use them.
|
| |
|
|
| |
This will be used in upcoming commits.
|
| |
|
|
|
| |
Now that netdev_options only has two members, we might as well pass them
directly as parameters.
|
| |
|
|
| |
Useful in an upcoming commit.
|
| |
|
|
|
|
|
| |
Until now, "emer" has effectively been "off" because no messages were ever
logged at "emer" level. Justin points out that it is useful to use "emer"
for messages that indicate a fatal error. This commit makes that change
and adds a new "off" level to really turn off all logging to a facility.
|
| |
|
|
| |
I've found this makes debugging a bit easier.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
These ovs-ofctl commands have been sending malformed stats requests since
commit 63f2140a553 "openflow: Make stats replies more like other OpenFlow
messages." This commit fixes the problem and adds basic unit tests that
should prevent similar regressions.
Reported-by: Hao Zheng <hzheng@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the output of "ovs-ofctl show" from printing ports like this:
1(eth1): addr:50:54:00:00:00:02, config: 0x11, state:0x1
to this:
1(eth1): addr:50:54:00:00:00:02
config: PORT_DOWN NO_FLOOD
state: LINK_DOWN
which seems much easier to read.
It also eliminates trailing white space from the output.
Reported-by: Ethan Jackson <ethan@nicira.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This provides clients a way to coordinate their access to the database.
This is a voluntary, not mandatory, locking protocols, that is, clients
are not prevented from modifying the database unless they cooperate with
the locking protocol. It is also not related to any of the ACID properties
of database transactions. It is strictly a way for clients to coordinate
among themselves.
The following commit will introduce one user.
|
| |
|
|
|
|
|
| |
An upcoming commit will need to expose the concept of a database session
to the execution engine, to allow the execution engine to query the locks
held by the session. This commit prepares for that by making sessions a
publicly visible data structure.
|
| |
|
|
|
| |
In practice these arguments are almost always the defaults, so this change
makes ovsdb-client much more usable interactively.
|
| |
|
|
|
| |
The bundle_load action behaves the same as the bundle action,
except instead of outputting, it writes its result to a register.
|
| |
|
|
|
|
|
| |
I don't expect this bundling algorithm to be particularly useful in
software switches. However, hardware switches will probably only
support this bundling algorithm, so it's implemented here as an
example and a reference.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch creates two new helper functions, nxm_reg_load() and
nxm_dst_check(). The new nxm_dst_check() function may be used to
check the validity of destination fields used by actions. The new
nxm_reg_load() function may be used by actions which need to write
to NXM fields.
This patch also allows multipath and autopath to write their result
to non-register NXM fields.
|
| |
|
|
|
| |
Calculates the position of the most significant bit in a 32 bit
word.
|
| |
|
|
|
| |
This has been helpful finding bugs in my development environment.
It's good to exercise this code.
|
| |
|
|
|
|
| |
This patch creates a new action called "bundle". Bundles are a way
to implement a simple form of multipath in OpenFlow by grouping
several ports in a single output-like action.
|
| |
|
|
|
|
|
| |
This causes tests to fail on my system with the following error.
Use of qw(...) as parentheses is deprecated at
/home/root/ovs/tests/flowgen.pl line 35.
|
| |
|
|
|
| |
"opcode" is not very specific. All the other ARP fields have an "arp_"
prefix, so this commit adds one for the opcode too.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The state machine didn't have a proper state for "not yet committed or
aborted", which meant that destroying an ovsdb_idl_txn without committing
or aborting it caused a segfault. This fixes the problem by adding a new
state TXN_UNCOMMITTED to the state machine.
This is related to commit 79554078d "ovsdb-idl: Fix bad logic in
ovsdb_idl_txn_commit() state transitions", which fixed a related bug.
Bug #2438.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A pool configured for secure fail-mode can block dom0 traffic on hosts joining
the pool or if the host reboots while the controller is unavailable. This
commit sets default flows on a host under these conditions to allow management
traffic. Once the connection with the controller is re-established, these
default flows are replaced by the controller.
tests/interface-reconfigure.at updated by Ben Pfaff.
NIC-376.
Signed-off-by: David Tsai <dtsai@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
| |
|
|
|
|
|
| |
This fixes "ovs-ofctl add-flow <bridge> table=<number>,..." and similar
commands.
Reported-by: Hao Zheng <hzheng@nicira.com>
|
| |
|
|
|
|
|
| |
Flow dumps printed the OpenFlow table ID under the name "table_id", but
the flow parser only accepted "table". This makes them consistent by
changing the output. (Another alternative would be to change the accepted
input name.)
|
| |
|
|
|
| |
Until now, the flow parser has supported dl_vlan and dl_vlan_pcp but not
the fully maskable vlan_tci that NXM allows. This adds that support.
|
| |
|
|
|
|
|
|
|
|
| |
We had no tests that exercised OFPST_AGGREGATE or NXST_AGGREGATE. At one
point in development I screwed up aggregate stats badly enough that they
caused an immediate and reproducible segfault, which this simple test would
have caught.
Also, it's best to test everything in both NXM and OpenFlow 1.0 flow
formats, since they have slightly different code.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The NXAST_DROP_SPOOFED_ARP action has been deprecated in favor of
defining flows using the NXM_NX_ARP_SHA flow match for a while. This
commit removes it.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
|
| | |
|
| |
|
|
|
|
|
|
| |
This makes it possible to add flows that match on the Ethernet multicast
bit with ovs-ofctl.
CC: Paul Ingram <paul@nicira.com>
CC: Amar Padmanabhan <amar@nicira.com>
|
| |
|
|
|
| |
Too many users thought that they needed to run ovs-openflowd at the same
time as ovs-vswitchd. I hope that this change discourages them.
|
| | |
|
| |
|
|
|
|
| |
This function is not useful inside ovsdb itself but only in the
"test-ovsdb" test program. To avoid the temptation to use it incorrectly
inside ovsdb, this commit moves it into the test program.
|
| |
|
|
|
|
|
| |
This function took a struct ovsdb_table but only used the 'schema' member.
An upcoming patch needs to parse a column set when only the schema is
available, so to prepare for that this patch changes
ovsdb_column_set_from_json() to only take the schema that it really needs.
|
| |
|
|
|
|
|
|
|
| |
Errors from this function were being ignored, which meant that transactions
could use "mutate" to bypass number-of-elements constraints on sets and
maps. This fixes the problem and adds a test to prevent the problem from
recurring.
Bug #5781.
|
| |
|
|
|
| |
This test already passes, but I did not see any existing test that checked
for this problem.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 0b3f27253 (ovs-ofctl: Warn about flows not in normal form) made
ovs-ofctl warn about non-normalized flows, that is, flows some of whose
specified fields will be ignored by the switch. This was convenient for
users, who are understandably confused by flow normalization. However,
later commit 8050b31d6 (ofp-parse: Refactor flow parsing) accidentally
deleted the warning. This commit restores it and adds a test to ensure
that it doesn't get deleted again later.
Reported-by: Reid Price <reid@nicira.com>
Bug #5029.
|
| |
|
|
|
|
|
|
|
|
|
| |
Feature #5029 requests that "ovs-ofctl add-flow" report an attempt to add
a flow that is not properly normalized, that is, a flow to which the switch
will add extra wildcards, ignoring some fields specified by the user. This
requires that ofp-util make flow normalization directly available (again).
Until now, flow normalization has only been applied to OpenFlow 1.0 flows,
but the concept applies equally to NXM, so this commit generalizes the
implementation to NXM also.
|
| |
|
|
|
| |
OVS doesn't fill nw_tos with anything meaningful for ARP flows so we should
also force nw_tos to be wildcarded for ARP.
|
| |
|
|
|
|
|
| |
Casting a character pointer to uint16_t * or uint32_t * provokes this
warning on sparc. There is no actual problem, because all of the accesses
to data occurs through calls to the get_unaligned_*() functions, so this
commit suppresses the warning by using "void *" as an intermediate type.
|