Ben Pfaff [Thu, 26 May 2011 23:23:21 +0000 (16:23 -0700)]
flow: Give flow_wildcards_hash() a 'basis' parameter.
An upcoming commit will add more interesting uses.
Ben Pfaff [Tue, 31 May 2011 23:55:02 +0000 (16:55 -0700)]
ofproto: Better abstract flow stats encoding.
Ben Pfaff [Thu, 26 May 2011 23:02:56 +0000 (16:02 -0700)]
ofproto: Better abstract aggregate stats encoding and decoding.
Ben Pfaff [Tue, 31 May 2011 23:49:06 +0000 (16:49 -0700)]
openflow: Make stats replies more like other OpenFlow messages.
Ben Pfaff [Tue, 24 May 2011 20:30:04 +0000 (13:30 -0700)]
nicira-ext: Separate nx_aggregate_stats_reply from ofp_aggregate_stats_reply.
An upcoming patch will make stats messages much more like other messages,
in that their structures will include all of the headers. This means that
struct ofp_aggregate_stats_reply will no longer be appropriate as a
member of struct nx_aggregate_stats_reply, because it will then include
those additional header members.
Also, struct nx_aggregate_stats_reply doesn't need to use the special
ovs_32aligned_be64 type, since its 64-bit members are correctly aligned,
which is another reasonable reason to keep it separate.
Ben Pfaff [Mon, 23 May 2011 23:07:22 +0000 (16:07 -0700)]
openflow: Merge ofp_flow_stats_request and ofp_aggregate_stats_request.
Ben Pfaff [Thu, 26 May 2011 16:34:05 +0000 (09:34 -0700)]
openflow: Remove 'body' member from struct ofp_stats_msg.
This member does not actually help with anything.
Ben Pfaff [Thu, 26 May 2011 16:30:25 +0000 (09:30 -0700)]
openflow: Merge ofp_stats_request and ofp_stats_reply.
These structures for OpenFlow stats requests and replies have identical
memebers, but until now they have been separate structures. Since in some
cases we actually want to treat both of them the same way, this has led
to various kinds of awkwardness. This commit merges them into a new
"struct ofp_stats_msg" and fixes up the users.
Ben Pfaff [Fri, 20 May 2011 23:37:52 +0000 (16:37 -0700)]
ofproto: Correctly fill in table_id in NXST_FLOW replies.
Ethan Jackson [Mon, 13 Jun 2011 20:45:05 +0000 (13:45 -0700)]
lacp: Loosen lacp_slave_is_current().
The lacp_slave_is_current() function is used to indicate to a
controller failover status of the LACP module. However, the result
of this function is more strict than the failover logic. Thus, the
function will generally return false quite a bit before a failover
actually happens. This patch loosens lacp_slave_is_current() so
that it changes in-line with the failover logic.
Justin Pettit [Tue, 14 Jun 2011 02:26:47 +0000 (19:26 -0700)]
netdev: Add methods to do netdev-specific argument comparisons.
When doing a netdev_open(), a check is first done to make sure the
arguments are equivalent for any open devices with the same name. In
most cases, a simple shash comparison is sufficient. However, IPsec
key configuration is handled by an external program, so it is not pushed
down into the kernel module. Thus, when the "unparse_config" method is
called on an existing IPsec-based vport, a simple comparison with the
returned data will not match the original configuration. This commit
adds code to allow netdev-specific argument comparisons and has
"ipsec_gre" make use of them.
Bug #5575
Ben Pfaff [Mon, 13 Jun 2011 20:19:58 +0000 (13:19 -0700)]
AUTHORS: Add Hao Zheng <hzheng@nicira.com>.
Ben Pfaff [Mon, 13 Jun 2011 16:37:09 +0000 (09:37 -0700)]
python: Fix "make install" on systems without Python.
Reported-by: 冯全树(Crab) <fqs888@126.com>
Jesse Gross [Mon, 13 Jun 2011 18:36:19 +0000 (11:36 -0700)]
datapath: Check for supported kernel versions.
Most of the time kernels older or newer than the ones we support
simply fail to compile. However, sometimes they appear to succeed
but then cause problems later on. This explicitly checks for
supported versions at compile time.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Justin Pettit [Fri, 10 Jun 2011 17:04:43 +0000 (10:04 -0700)]
ofproto: Correct comment describing set_netflow().
Ben Pfaff [Fri, 10 Jun 2011 16:18:58 +0000 (09:18 -0700)]
tests: Add test for printing NXT_FLOW_MOD_TABLE_ID.
Ben Pfaff [Fri, 10 Jun 2011 16:18:42 +0000 (09:18 -0700)]
nicira-ext: Explicitly assign each extension message type a number.
This has no semantic change but it makes the numbering harder to screw up
by reordering.
Ben Pfaff [Thu, 9 Jun 2011 22:18:21 +0000 (15:18 -0700)]
nicira-ext: Renumber NXT_FLOW_MOD_TABLE_ID.
We don't know of anyone using this command in production yet, so it seems
reasonable to give it a new number instead of coping with it having a
conflicting number.
Justin Pettit [Thu, 9 Jun 2011 22:43:18 +0000 (15:43 -0700)]
Remove NXAST_DROP_SPOOFED_ARP action.
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>
Ethan Jackson [Thu, 9 Jun 2011 00:49:01 +0000 (17:49 -0700)]
tests: Unit test autopath action parsing.
Justin Pettit [Thu, 9 Jun 2011 00:34:39 +0000 (17:34 -0700)]
vlog: Output configuration list in alphabetical order.
Ben Pfaff [Wed, 8 Jun 2011 21:03:47 +0000 (14:03 -0700)]
dpif: Improve logging of upcalls.
The kernel now provides the entire flow key for a packet sent up to
userspace, but dpif_recv() would only log the in_port. This change makes
userspace log the entire flow key.
This would have made a bug that I recently looked at a bit easier to
investigate.
Ben Pfaff [Wed, 8 Jun 2011 21:06:21 +0000 (14:06 -0700)]
ovs-brcompatd: Fix uninitialized br_vlan variable in handle_fdb_query_cmd().
Reported-by: Jesse Gross <jesse@nicira.com>
Tested-by: Jesse Gross <jesse@nicira.com>
Jesse Gross [Wed, 8 Jun 2011 19:28:57 +0000 (12:28 -0700)]
datapath: Remove redundant nw_ prefix from fields in flow key.
The fields of the kernel flow key are now grouped by protocol rather
than using generic names. The containing structures describe the
category, so it is no longer necessary to use prefixes. Most of
these prefixes have been removed but nw_proto and nw_tos have
retained them. This renames the fields for consistency and brevity.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Wed, 8 Jun 2011 19:23:05 +0000 (12:23 -0700)]
datapath: IP fragments should include L4 header in flow length.
If we can't parse a header because it is invalid or not present due to
fragmentation, we still need to include the length of that header when
comparing the flow key. The value of the field will be zero to
indicate that header was not present, rather than effectively
wildcarding the value. However, this was not done with fragments on
flow extract but is effectively done on flow setup. Since the flow
length also changes the hash, it caused all fragments to miss the
hash table and be sent to useerspace.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Tested-by: Ben Pfaff <blp@nicira.com>
Sajjad Lateef [Wed, 1 Jun 2011 21:15:51 +0000 (14:15 -0700)]
xenserver: Collect xenserver configured timezone in bugtool report
xenserver logs can be in any timezone, as configured by user
during install time. Also, the timezone data is not currently
recorded in the bugtool report. Therefore, it is currently not
possible to easily correlate logs collected on xenserver with
logs from other devices on the network.
With this change, system-configuration capability of the bugtool plugin
has been added. Also, added an extension to this capability to collect
the time information in RFC3339 format, which includes the system timezone.
Signed-off-by: Sajjad Lateef <slateef@nicira.com>
Ben Pfaff [Wed, 8 Jun 2011 16:15:38 +0000 (09:15 -0700)]
ovs-brcompatd: Run ovs-vsctl instead of accessing database directly.
ovs-vsctl is carefully written to avoid races in database access. It is
much simpler to just call it than to reimplement its capabilities.
This eliminates the requirement that bridges managed by ovs-brcompatd have
no ports at ovs-brcompatd startup time. It also eliminates races between
competing brctl and ovs-vsctl processes.
Ben Pfaff [Fri, 3 Jun 2011 17:46:45 +0000 (10:46 -0700)]
ovs-brcompatd: Properly fix race between device destruction and insertion.
I believe that this actually fixes the race described in the comments,
whereas I'm pretty sure that the old way still left a race window.
Ben Pfaff [Wed, 8 Jun 2011 00:08:48 +0000 (17:08 -0700)]
ovs-brcompatd: Remove --prune-timeout option.
This option had an effect when it was initially implemented, but later it
made essentially a no-op without properly removing it or updating the
documentation. This removes it in favor of keeping the default and only
sensible behavior.
Ben Pfaff [Fri, 3 Jun 2011 17:20:17 +0000 (10:20 -0700)]
ovs-brcompatd: Use rtnetlink_link_notifier instead of open-coding it.
ovs-brcompatd has always had its own code to listen on an RTNL socket, but
I don't see any reason for it. This commit rips it out in favor of
rtnetlink_link_notifier.
This change looks fairly big but a lot of it boils down to changing the
indentation level of rtnl_recv_update().
Ben Pfaff [Mon, 6 Jun 2011 18:40:10 +0000 (11:40 -0700)]
ovs-vsctl: New "comment" command.
This allows processes that call ovs-vsctl to add remarks that explain their
intentions.
Ben Pfaff [Mon, 6 Jun 2011 18:40:41 +0000 (11:40 -0700)]
compiler: Add macro for GCC "sentinel" attribute.
Ben Pfaff [Mon, 6 Jun 2011 18:48:11 +0000 (11:48 -0700)]
process: Let process_run_capture() caller set maximum capture size.
An upcoming patch needs a larger value.
Ben Pfaff [Fri, 3 Jun 2011 17:10:41 +0000 (10:10 -0700)]
rtnetlink-link: Avoid cast in rtnetlink_link_notifier_register().
It's easy enough to avoid this cast by going through a thunk function.
(The other cast in this function is harder to avoid.)
This is just a cleanup that doesn't fix any actual bug.
Ben Pfaff [Tue, 7 Jun 2011 16:22:24 +0000 (09:22 -0700)]
ofp-parse: Add support for dl_dst masks in flow match parsing.
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>
Ben Pfaff [Mon, 6 Jun 2011 21:21:40 +0000 (14:21 -0700)]
Better abstract wildcards for Ethernet destination field.
I think that this makes nx-match.c a little easier to read. The new
functions added here will have more users in an upcoming patch.
Ben Pfaff [Mon, 6 Jun 2011 21:25:37 +0000 (14:25 -0700)]
ofp-parse: Fix wildcard bits for dl_dst in flow parsing.
This fixes a really minor corner case in flow parsing that doesn't make
much sense anyway.
Ben Pfaff [Tue, 7 Jun 2011 20:16:37 +0000 (13:16 -0700)]
list: Clarify description of list_moved().
This function doesn't have any users, but an upcoming commit will add one.
Ben Pfaff [Tue, 7 Jun 2011 20:19:41 +0000 (13:19 -0700)]
bridge: Fix memory leak in port_configure().
Ben Pfaff [Tue, 7 Jun 2011 20:19:24 +0000 (13:19 -0700)]
ofproto: Fix memory leak in ofproto_destroy__().
Ben Pfaff [Tue, 7 Jun 2011 20:17:57 +0000 (13:17 -0700)]
signals: New function signal_unregister().
Fixes a very minor memory leak in ovs-vswitchd reported by valgrind.
Ben Pfaff [Tue, 7 Jun 2011 20:15:46 +0000 (13:15 -0700)]
dpif-linux: Fix memory and file descriptor leak in dpif_linux_close().
Found with valgrind.
Ben Pfaff [Tue, 7 Jun 2011 16:40:53 +0000 (09:40 -0700)]
ovs-openflowd: Rename test-openflowd and move to "tests" directory.
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.
Alexey I. Froloff [Tue, 7 Jun 2011 13:33:10 +0000 (17:33 +0400)]
ovs-save: Fix address label processing.
If there is a string in ip addr show output, that "coincide with the
name of the device or ... prefixed with the device name followed by
colon", consider this is an address label string.
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 1 Jun 2011 20:50:24 +0000 (13:50 -0700)]
learning-switch: Also wildcard VLAN priority bits.
There's no need to learn based on the priority bits so we might as well
wildcard them too.
Reported-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Mon, 6 Jun 2011 18:27:44 +0000 (11:27 -0700)]
ovsdb: Better document possible commit-time error results.
CC: Jeremy Stribling <strib@nicira.com>
Ethan Jackson [Sat, 4 Jun 2011 00:15:12 +0000 (17:15 -0700)]
dpif-linux: Avoid duplicate code in dpif_linux_vport_send().
dpif_linux_vport_send() had duplicated most of the code in
dpif_linux_execute() in order to execute output actions in the
kernel. This forces developers to remember to change both
functions whenever the kernel interface changes. In particular,
commit
80e5eed9 "datapath: Get packet metadata from userspace in
odp_packet_cmd_execute()." broke netdev_linux_vport_send(). This
commit reorganizes the code and fixes the regression.
Bug #5818.
Ben Pfaff [Mon, 6 Jun 2011 16:43:48 +0000 (09:43 -0700)]
stream-ssl: Disable SSL session caching.
SSL session caching causes mysterious connection failure problems.
Bug #4448.
Bug #4501.
Ben Pfaff [Mon, 6 Jun 2011 16:21:45 +0000 (09:21 -0700)]
vswitchd: Add unique indexes for some columns.
This is mainly intended to make life easier for database clients that don't
already have code to avoid creating records with duplicate names in various
OVS database tables. With this commit, the database server itself rejects
attempts to add Port or Interface records with duplicate names or
Controller or Manager records with duplicate targets.
Ben Pfaff [Mon, 6 Jun 2011 16:09:47 +0000 (09:09 -0700)]
python ovsdb: Fix one style inconsistency.
Reported-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Mon, 6 Jun 2011 16:09:10 +0000 (09:09 -0700)]
ovsdb: Implement table uniqueness constraints ("indexes").
Ben Pfaff [Mon, 6 Jun 2011 16:02:01 +0000 (09:02 -0700)]
ovsdb: Add functions for formatting column sets and data in columns sets.
These will be used for formatting error messages in an upcoming commit.
Ben Pfaff [Thu, 2 Jun 2011 17:47:18 +0000 (10:47 -0700)]
util: New function for forming English lists.
This follows the rules I learned in school. Some locales may prefer to
omit the comma before "and" in a list of three or more items.
Ben Pfaff [Wed, 1 Jun 2011 23:17:00 +0000 (16:17 -0700)]
ovsdb: Move ovsdb_table_put_row() into test program.
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.
Ben Pfaff [Wed, 1 Jun 2011 23:14:46 +0000 (16:14 -0700)]
ovsdb: Make ovsdb_column_set_from_json() take table schema instead of table.
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.
Jesse Gross [Thu, 2 Jun 2011 22:50:47 +0000 (15:50 -0700)]
tunneling: Warn if CAPWAP is not available on this kernel.
For most of our kernel module we support back to 2.6.18 but we only
work with 2.6.26 or newer for CAPWAP. On later kernels support for
CAPWAP silently disappears. In these situations, emit a warning so
that people aren't suprised when their tunnels fail.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Fri, 27 May 2011 17:48:58 +0000 (10:48 -0700)]
ofproto: Optimize datapath actions.
The translation from ofproto to datapath actions has historically
been fairly naive. Since redundant ODP actions result in more code
execution in the fast path, this patch changes xlate_actions() to
emit fewer ODP actions for a given flow.
This change is not simply a theoretical optimization. It actually
reduces the number of ODP actions for real flow tables which
Nicira's controllers use in practice. Furthermore, removing
unnecessary modification actions after the last output action has
the added benefit of saving a whole skb_clone() in the fast path.
Ethan Jackson [Tue, 31 May 2011 23:44:09 +0000 (16:44 -0700)]
ofproto: Enqueue improperly resets priority.
Before this patch, enqueue would reset the priority of a flow to
its original value instead of the value it had immediately before
the enqueue action.
Thus, these openflow actions:
set_queue:2,enqueue:1:1,output:1
Would get translated into these incorrect datapath actions:
set_priority(0x10003),set_priority(0x10002),1,pop_priority,1
Instead of these correct datapath actions:
set_priority(0x10003),set_priority(0x10002),1,set_priority(0x10003),1
A future patch will remove the redundant "set_priority(0x10003)".
Found by inspection.
Ben Pfaff [Wed, 1 Jun 2011 20:39:51 +0000 (13:39 -0700)]
datapath: Get packet metadata from userspace in odp_packet_cmd_execute().
Until now, the tun_id and in_port have been lost when a packet is sent from
the kernel to userspace and then back to the kernel. I didn't think that
this was a problem, but recent behavior made me look closer and see that
it makes a difference if sFlow is turned on or if an
ODP_ATTR_ACTION_CONTROLLER action is present. We could possibly kluge
around those, but for future-proofing it seems better to pass the packet
metadata from userspace to the kernel. That is what this commit does.
This commit introduces a user-kernel protocol break. We could avoid that,
if it is desirable, by making ODP_PACKET_ATTR_KEY optional for
ODP_PACKET_CMD_EXECUTE commands.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Wed, 1 Jun 2011 17:53:53 +0000 (10:53 -0700)]
learning-switch: Don't limit message queued by --with-flows.
queue_tx() intentionally limits the number of outstanding OpenFlow messages
queued to the switch. This was unintentionally being applied to the
messages queued to the switch at startup by ovs-ofctl's --with-flows
command. This patch should fix the problem, by calling rconn_send()
directly instead of through queue_tx().
Ahmed reported that with this patch there was still a problem when 30,000
flows were specified in the file.
Reported-by: Ahmed Bilal <numan252@gmail.com>
Ben Pfaff [Wed, 1 Jun 2011 16:09:20 +0000 (09:09 -0700)]
ovs-controller: Allow --wildcards to specify a wildcard set.
Based on a patch by Jean Tourrilhes <jt@hpl.hp.com>. According to Jean,
besides increasing flexibility, this reduces normalization warnings.
Tested-by: Jean Tourrilhes <jt@hpl.hp.com>
Ben Pfaff [Tue, 31 May 2011 23:15:45 +0000 (16:15 -0700)]
ofp-util: Factor wildcard translation out of ofputil_cls_rule_from_match().
This seems like a small cleanup, plus the new function for translating
wildcards will be independently useful in an upcoming commit.
Ben Pfaff [Tue, 31 May 2011 23:15:44 +0000 (16:15 -0700)]
ofp-util: Simplify logic for computing vlan_tci and vlan_tci_mask.
I believe that this is completely equivalent to, but simpler than, the code
that was here before.
Ethan Jackson [Thu, 26 May 2011 21:48:50 +0000 (14:48 -0700)]
netdev: Remove monitors and notifiers.
Neither of these constructs are used anymore.
Ethan Jackson [Thu, 26 May 2011 21:45:11 +0000 (14:45 -0700)]
bond: Discontinue use of netdev_monitor.
Ethan Jackson [Thu, 26 May 2011 21:40:05 +0000 (14:40 -0700)]
ofproto: Discontinue use of netdev_monitor.
Ethan Jackson [Thu, 26 May 2011 21:28:11 +0000 (14:28 -0700)]
netdev: New Function netdev_change_seq().
This new function will provide a much simpler replacement for
netdev_monitor in the future.
Ben Pfaff [Tue, 31 May 2011 19:50:57 +0000 (12:50 -0700)]
ovsdb: Check ovsdb_mutation_set_execute() return value in transactions.
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.
Ben Pfaff [Tue, 31 May 2011 19:48:49 +0000 (12:48 -0700)]
ovsdb: Add test for number-of-elements constraints.
This test already passes, but I did not see any existing test that checked
for this problem.
Ben Pfaff [Tue, 31 May 2011 18:30:16 +0000 (11:30 -0700)]
ovsdb: Fix spelling of "constraint violation" in error tag.
Jesse Gross [Fri, 27 May 2011 22:57:28 +0000 (15:57 -0700)]
datapath: Don't call genlmsg_reply() under rcu_read_lock().
genlmsg_reply() indirectly makes a call to kmalloc but takes no
GFP flags, instead using GFP_ATOMIC if in a softirq and GFP_KERNEL
otherwise. However, here we hold rcu_read_lock(), which requires
GFP_ATOMIC but is not a softirq. Since we've already built the
reply message, it is safe to release rcu_read_lock(), so do that
before calling genlmsg_reply().
Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Hao Zheng <hzheng@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 10 May 2011 15:59:21 +0000 (08:59 -0700)]
ovs-ofctl: Report attempts to add (remove, etc.) non-normalized flows.
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.
Ben Pfaff [Mon, 9 May 2011 23:25:48 +0000 (16:25 -0700)]
ofp-util: Export (again) a generalized function for normalizing rules.
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.
Ben Pfaff [Mon, 9 May 2011 23:21:00 +0000 (16:21 -0700)]
nx-match: Check prerequisites for ICMPv6 before outputting subfields.
nicira-ext.h documents that NXM_NX_ND_TARGET requires ND_NEIGHBOR_SOLICIT
or ND_NEIGHBOR_ADVERT, that NXM_NX_ND_SLL requires ND_NEIGHBOR_SOLICIT,
and that NXM_NX_ND_TLL requires ND_NEIGHBOR_ADVERT, but nx_put_match()
would add them to the match regardless of whether these prerequisites were
satisfied. On the other side, nx_pull_match() did check the prerequisites,
so this was a case where OVS could output flows that it would refused to
parse. This fixes the problem.
Found by inspection.
Ben Pfaff [Mon, 9 May 2011 23:03:26 +0000 (16:03 -0700)]
ofp-util: Also force nw_tos to be wildcarded for ARP flows.
OVS doesn't fill nw_tos with anything meaningful for ARP flows so we should
also force nw_tos to be wildcarded for ARP.
Ben Pfaff [Fri, 27 May 2011 16:13:50 +0000 (09:13 -0700)]
poll-loop: Fix typo in comment.
Reported-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Thu, 26 May 2011 01:23:31 +0000 (18:23 -0700)]
CFM: Revert default MA and MD name.
Commit
84c5d450 "cfm: No longer allow configuration of ma_name and
md_name." changed the default MA and MD name for no reason. This
could add needless complexity to situations where OVS instances
built before and after this commit need to speak CFM to each other.
This commit reverts to the old values.
Ben Pfaff [Thu, 26 May 2011 17:14:30 +0000 (10:14 -0700)]
ovs-vsctl: Clarify meaning of --may-exist options.
CC: Jeremy Stribling <strib@nicira.com>
Ben Pfaff [Thu, 26 May 2011 16:06:10 +0000 (09:06 -0700)]
ovsdb-doc: Omit E-R diagram from ASCII version of manpage.
The E-R diagram is illegible when rendered in ASCII, so exclude it from
that version only. The E-R diagram is still included in other versions of
the manpage (e.g. for PostScript output).
Ben Pfaff [Tue, 24 May 2011 18:04:22 +0000 (11:04 -0700)]
test-csum: Avoid "cast increases required alignment of target type" warning.
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.
Ben Pfaff [Tue, 24 May 2011 18:02:31 +0000 (11:02 -0700)]
bridge: Avoid "cast increases required alignment of target type" warning.
This pointer arithmetic caused a warning on sparc. One alternative would
be to add a cast through "void *", but it seems at least as reasonable to
just use a few macros to do direct assignments.
Ben Pfaff [Thu, 26 May 2011 16:03:03 +0000 (09:03 -0700)]
in-band: Avoid "cast increases required alignment of target type" warning.
Casting a struct ofp_action_output object's address to type union
ofp_action * provokes a warning on sparc. It's easier to just declare
the object as having type union ofp_action, even though I don't think that
there is a real problem here.
Ben Pfaff [Tue, 24 May 2011 17:56:11 +0000 (10:56 -0700)]
sha1: Avoid unused variable warnings on big-endian systems.
Ben Pfaff [Tue, 24 May 2011 17:55:26 +0000 (10:55 -0700)]
netlink: Avoid "cast increases required alignment of target type" on RISC.
This warning doesn't indicate a genuine problem, since 'nla' must be
aligned properly and NLA_ALIGN ensures that the offset is aligned properly
too. Casting via void * suppresses the warning.
Ethan Jackson [Wed, 25 May 2011 20:23:49 +0000 (13:23 -0700)]
bridge: Interface may be configured with incorrect QoS.
Bug #5739.
Ethan Jackson [Mon, 23 May 2011 23:21:42 +0000 (16:21 -0700)]
cfm: Log sequence number of incoming CCMs.
Ethan Jackson [Mon, 23 May 2011 23:10:25 +0000 (16:10 -0700)]
cfm: Include cfm->name in log messages.
Ethan Jackson [Mon, 23 May 2011 23:05:41 +0000 (16:05 -0700)]
cfm: Require 'name' field for 'cfm' objects.
This commit also fixes a memory leak upon cfm_destroy() and
converts the 'all_cfms' list to a hash map.
Ethan Jackson [Tue, 24 May 2011 22:12:13 +0000 (15:12 -0700)]
ofproto: Fix possible core dump during flow revalidation.
This patch also prevents OVS from forwarding any LACP packets
whether or not LACP is enabled. This is consistent with the
pre-next behavior.
Bug #5738.
Ben Pfaff [Tue, 24 May 2011 20:03:58 +0000 (13:03 -0700)]
ovs-vsctl: Add "show" command for printing an overview of configuration.
Ben Pfaff [Tue, 24 May 2011 19:32:01 +0000 (12:32 -0700)]
ovsdb: Annotate E-R diagram with number of allowed values.
This makes the diagram even more informative.
Ben Pfaff [Tue, 24 May 2011 19:23:42 +0000 (12:23 -0700)]
poll-loop: Automatically log reason for wakeup when CPU usage spikes.
For a long time, the poll-loop module has had the ability to log the reason
for wakeups, which is valuable for debugging excessive use of CPU time.
But I have to ask users to turn up the log level for the module, which
wastes their time and mine. This commit improves the situation by
automatically logging the reason for a wakeup whenever a process's
estimated CPU usage rises above 50%. (ovs-vswitchd often uses less than
1% CPU; more than 5% CPU is uncommon.)
Ben Pfaff [Wed, 18 May 2011 21:28:24 +0000 (14:28 -0700)]
ofproto-dpif: Fix statistics busted by bad merge.
This reimplements the statistics fixes originally implemented by the
following commits, which became broken by bad merges during the previous
"next" branch development cycle:
827ab71c97f "ofproto: Datapath statistics accounted twice."
6f1435fc8f7 "ofproto: Resubmit statistics improperly account during..."
Ben Pfaff [Fri, 13 May 2011 21:20:10 +0000 (14:20 -0700)]
tests: Fix the two Python XFAIL tests.
OVS has two Python tests that have always failed, for reasons not
understood, since they were added to the tree. This commit fixes them.
One problem was that Python was assuming that stdout was encoded in ASCII.
Apparently the only way to "fix" this at runtime is to set PYTHONIOENCODING
to utf_8 in the environment, so this change does that.
Second, it appears that Python really doesn't like to print invalid UTF-8,
so this avoids doing that in python/ovs/json.py, instead just printing
the hexadecimal values of the invalid bytes. For consistency, it makes
the same change to the C version.
Third, the C version of test-ovsdb doesn't check UTF-8 for consistency, it
just sends it blindly to the OVSDB server, but Python does check it and so
it bails out earlier. This commit changes the Python version of the
"no invalid UTF-8 sequences in strings" to allow for the slight difference
in output that occurs for that reason.
Finally, test-ovsdb.py needs to convert error messages to Unicode
explicitly before printing them in the "parse-atoms" function. I don't
really understand why, but now it works.
Ben Pfaff [Fri, 13 May 2011 17:38:35 +0000 (10:38 -0700)]
flow: Convert tunnel IDs to host byte order for formatting.
Reported-by: Pankaj Thakkar <thakkar@nicira.com>
Ben Pfaff [Thu, 5 May 2011 18:25:51 +0000 (11:25 -0700)]
stream-ssl: Log unexpected errors from 'stat'.
A user report possibly implicates problems reading the mtime of the CA
cert file. Until now, nothing has logged these errors. This commit adds
such logging.
NICS-9.
Ben Pfaff [Thu, 5 May 2011 17:59:50 +0000 (10:59 -0700)]
stream-ssl: Force CA cert file to be read when it appears during bootstrap.
A user report shows the message "reading CA cert
/etc/openvswitch/vswitchd.cacert created by another process" appearing
hundreds of times over a long period of time in the log. The only way I
can see that this would happen is if update_ssl_config() returned false,
indicating that the CA cert does not need to be re-read because it has not
changed. This commit should prevent that from happening.
We don't want to simply skip calling update_ssl_config() in this case,
because then the next call to stream_ssl_set_ca_cert_file() would usually
re-read the CA certificate, which is a waste of time.
Also, we might as well rate-limit the message.
NICS-9.
Ben Pfaff [Thu, 19 May 2011 23:18:57 +0000 (16:18 -0700)]
ofproto: Properly initialize table_id when creating rules.
Nothing was initializing table_id, and there was no "hook" to choose an
appropriate table. This fixes both problems.
Found by inspection.
Ben Pfaff [Mon, 23 May 2011 20:31:17 +0000 (13:31 -0700)]
debian: Package ovsdbmonitor.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 3 May 2011 16:53:41 +0000 (09:53 -0700)]
ovsdbmonitor: Add brief manpage.