aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-04-07cfm: Fix broken fault logic.v1.1.0Ethan Jackson
If the last receive time for a remote MP was before the last fault check, the CFM code would not declare a fault. This is, of course, exactly the wrong response. Bug #5303.
2011-04-07bridge: Run once before configuring CFM.Ethan Jackson
CFM configuration requires the ofproto_run function to have been executed at least once in order to guarantee that the relevant ports exist. Bug #5303.
2011-04-06Release Open vSwitch 1.1.0Justin Pettit
2011-04-06Update top-level documentation to bring it up to date with latest features.Ben Pfaff
2011-04-05dpif-linux: Choose port numbers more prudently.Ethan Jackson
Before this patch the kernel chose the lowest available number for newly created datapath ports. This patch moves the port number choosing responsibility to user space, and implements a least recently used port number queue in an attempt to avoid reuse. Bug #2140.
2011-04-05xenserver: Fix up iface-id after it changes or disappears too.Ben Pfaff
ovs-xapi-sync is supposed to always keep external-ids:iface-id up to date, but in fact it would only set it when an interface initially appeared. If the interface quickly disappeared and reappeared, then it failed to notice that iface-id had changed or disappeared. This happens in practice on Citrix XenServer, where VM "tap" devices often disappear and then reappear almost immediately during VM boot. This commit fixes the problem. This also fixes the similar problem for external-ids:bridge-id in Bridge records. Bridges aren't ordinarily destroyed and re-created quickly, so this problem might never have manifested in practice for bridges. Many thanks to Reid Price <reid@nicira.com> for identifying the problem and supplying an initial fix. Bug #5239. Reported-by: Henrik Amren <henrik@nicira.com>
2011-04-01ovsdb-server: Avoid intermittent test failures due to lockfile log message.Ben Pfaff
Sometimes lockfile will emit a message saying that it took a little while to get the lock, which caused spurious test failures. This commit suppresses the message. With this change, I was able to run these tests continuously for some time without failures. This was a bug in the testsuite, not in the code under test.
2011-04-01cfm: Allow time for CCM reception after cfm_configure();Ethan Jackson
Before this (and the previous) patch, whenever cfm_configure was called it would set the fault_timer to expired. Thus, the next call to cfm_run would notice a lack of CCM reception and trigger a faulted status. This is a bug in and of itself, but normally would not be a big deal because cfm_configure should only be called infrequently (when the database changes). However due to an unrelated bug, cfm_configure() was getting called approximately once per second. This resulted in all monitors showing faults all of the time. This patch fixes the problem by not expiring the timer at cfm_configure(). Instead it gives it the appropriate fault_interval amount of time to miss heartbeats. Bug #5244.
2011-04-01cfm: cfm_configure() only update when necessary.Ethan Jackson
Calling cfm_configure often could cause timers to be reset resulting in unexpected behavior. This commit only updates when cfm configuration actually changed. Bug #5244.
2011-03-31ovsdb: Truncate bad transactions from database log.Ben Pfaff
When ovsdb-server reads a database file that is corrupted at the transaction level (that is, the transaction is valid JSON and has the correct SHA-1 hash, but it does not describe a valid database transaction), then ovsdb-server should truncate it and overwrite it by valid transactions. However, until now, it didn't. Instead, it would keep the invalid transaction and possibly every transaction in the database file (depending on in what way the transaction was invalid), which would just cause the same trouble again the next time the database was read. This fixes the problem. An invalid transaction will be deleted from the database file at the first write to the database. Bug #5144. Bug #5149.
2011-03-31ovsdb: Check that ovsdb-server truncates corrupted database logs.Ben Pfaff
When ovsdb-server reads a database that is corrupted at the log level (that is, when ovsdb_log detects the corruption by checking the SHA-1 hash of the record or JSON parser error reporting), then writing to the database should discard the corrupted data and thereby fix the problem for future ovsdb-server runs. This already worked OK. This just adds an extra test.
2011-03-31ovsdb: Raise database corruption log level from warning to error.Ben Pfaff
If there's database corruption then it indicates that something went wrong, e.g. the machine was powered-off by power failure. It's definitely something that the admin should know about. This sounds like an error to me, so use that log level.
2011-03-31ovsdb: Force strong references to non-root tables to be persistent.Ben Pfaff
When a strong reference to a non-root table is ephemeral, the database log can contain inconsistencies. In particular, if the column in question is the only reference to a row, then the row will be created in one logged transaction but the reference to it will not be logged (because it is ephemeral). Thus, any later occurrence of the row later in the log (to modify it, to delete it, or just to reference it) will yield a transaction error and reading the database will abort at that point. This commit fixes the problem by forcing any column with a strong reference to a non-root table to be persistent. The change to ovsdb_schema_from_json() looks bigger than it really is: it just swaps the order of two operations on the schema and updates their comments. Similarly for the update to ovs.db.DbSchema.__init__(). Bug #5144. Reported-by: Sujatha Sumanth <ssumanth@nicira.com> Bug #5149. Reported-by: Ram Jothikumar <rjothikumar@nicira.com>
2011-03-31ovsdb-types: Fix bug in ovsdb_base_type_is_ref().Ben Pfaff
This function only worked properly inside OVSDB itself, because that is the only place where the 'refTable' member of ovsdb_base_type is set. Both inside and outside OVSDB, 'refTableName' is set for reference types, so it's better to check for that. This doesn't fix any existing bug because this function was only used inside OVSDB until now.
2011-03-31ovs-brcompatd: Convert svecs to ssets.Ben Pfaff
2011-03-31bridge: Convert svecs to ssets.Ben Pfaff
2011-03-31ovs-openflowd: Use sset in place of svec.Ben Pfaff
Also deletes svec_split() since this was the only user.
2011-03-31ofproto: Change string sets in interface from svec to sset.Ben Pfaff
2011-03-31ovsdb-parser: Use sset instead of svec for detecting unused members.Ben Pfaff
Should be slightly cheaper than sorting a list (O(n) vs. O(n lg n)).
2011-03-31netdev: Use sset instead of svec in netdev interface.Ben Pfaff
2011-03-31dpif: Use sset instead of svec in dpif interface.Ben Pfaff
2011-03-31Convert shash users that don't use the 'data' value to sset instead.Ben Pfaff
In each of the cases converted here, an shash was used simply to maintain a set of strings, with the shash_nodes' 'data' values set to NULL. This commit converts them to use sset instead.
2011-03-31sset: New data type for a set of strings.Ben Pfaff
Many uses of "shash" or "svec" data structures really call for a "set of strings" data type. This commit introduces such a data structure. Later commits convert inappropriate uses of shash and svec to use sset instead.
2011-03-31learning-switch: Remove dead assignment.Ethan Jackson
2011-03-31ovs-ofctl: Remove dead assignment.Ethan Jackson
2011-03-31netdev-linux: Remove dead assignments.Ethan Jackson
2011-03-31ofproto: Use new timer library.Ethan Jackson
2011-03-31cfm: Use new timer library.Ethan Jackson
2011-03-31lacp: Use new timer library.Ethan Jackson
2011-03-31lib: Create new timer library.Ethan Jackson
Scattered throughout the code base we use long integers to implement timers. When the result of timer_msec() is greater than the time stored, we preform some action. This commit creates a new timer library intended to replace these manually managed timers. Code using the timer library will be more obviously correct, and more consistent with other code using the library.
2011-03-31cfm: Fix appctl negative report.Ethan Jackson
When the cfm module has never received a bad CCM message, it would report a negative time.
2011-03-31bridge: Destroy ofproto before deleting dpif.Ben Pfaff
Otherwise the ofproto's attempt to flush flows from the dpif will fail with an error, causing a spurious log message.
2011-03-31connmgr: Fix wild pointer dereference in connmgr_broadcast().Ben Pfaff
Fixes a segfault when fail-open goes into effect.
2011-03-31ofproto: Fix order of destruction in ofproto_destroy().Ben Pfaff
ofproto_flush_flows() calls into the connmgr (via connmgr_flushed()) so it must be called before destroying the connmgr to avoid a use-after-free error. Bug #5231. Reported-by: Krishna Miriyala <krishna@nicira.com>
2011-03-31datapath: Update for changes in 2.6.39-rc1Simon Horman
Update for flowi4 and ip_route_output_flow() changes in 2.6.39-rc1. Signed-off-by: Simon Horman <horms@verge.net.au> [Jesse: drop redundant unlikely() from IS_ERR()] Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-03-30ofpbuf: Make ofpbufs initialized with ofpbuf_use_stack() not expandable.Ben Pfaff
My original intent for ofpbufs initialized with ofpbuf_use_stack() was that the caller was providing enough space on the stack for the common case, with dynamic allocation as a fallback. But in practice, none of the clients actually do this. Instead, all of them actually know that the stack-allocated buffer is big enough and, since they don't want to bother with having to call ofpbuf_delete(), they instead assert that the buffer wasn't reallocated. Since this is a bit of a pain, this commit changes the semantics of ofpbuf_use_stack() to be that the stack-allocated buffer cannot be reallocated at all. This is more convenient for the existing clients.
2011-03-30odp-util: Replace ODPUTIL_FLOW_KEY_U32S by new struct odputil_keybuf.Ben Pfaff
This seems to me to better encapsulate the inherent ugliness.
2011-03-30datapath: Fix mysterious GRE-over-IPSEC problems.Ben Pfaff
We've noticed that packets that go up to userspace and then back down to the kernel and then enter an GRE tunnel that is then ESP encapsulated by IPSEC end up with a bad ESP "next header" value: it ends up as zero instead of 0x2f (IPPROTO_GRE). Just putting packets from userspace into a freshly allocated skb fixes the problem. The underlying problem that this works around is still unknown. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #4769.
2011-03-30mac-learning: Fix mac_entry_is_grat_arp_locked().Ben Pfaff
The lock is asserted if its expiration time has not arrived yet, not the reverse.
2011-03-30ofproto: Get rid of send_port_status() trivial wrapper function.Ben Pfaff
2011-03-30ofp-util: Remove flow_stats_iterator, flows_stats_first(), flow_stats_next()Ben Pfaff
Nothing uses these anymore. ofputil_decode_flow_stats_reply() is a better alternative.
2011-03-30timeval: Only log poll intervals longer than 50 ms.Ben Pfaff
When poll interval-based logging was introduced a long time, we were actively interested in looking at almost every long poll interval. But these days, with OVS working rather well, with pretty good latency, most of the messages are red herrings that bother some administrators and provoke false reports. So this commit suppresses all but the most egregious long poll intervals that may in fact be worth looking at. NIC-366.
2011-03-30AUTHORS: Add Gaetano Catalli <gaetano.catalli@gmail.com>.Ben Pfaff
2011-03-30Fix compilation of openvswitch-1.1.0pre2 on FreeBSD-8.1Gaetano Catalli
2011-03-29ofproto: Factor OpenFlow connection management into new "connmgr".Ben Pfaff
This removes a lot of code from ofproto.c and makes the ofproto code easier to understand.
2011-03-29ofproto: New function ofconn_pktbuf_retrieve().Ben Pfaff
This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
2011-03-29ofproto: Add functions to get and set ofconn type and role.Ben Pfaff
This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
2011-03-29ofproto: Add ofconn_get_miss_send_len(), ofconn_set_miss_send_len().Ben Pfaff
This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
2011-03-29ofproto: Add ofconn_get_flow_format(), ofconn_set_flow_format().Ben Pfaff
This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
2011-03-29ofproto: Use ofconn_send_reply() for sending OpenFlow replies.Ben Pfaff
This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.