summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ovsdb: Force strong references to non-root tables to be persistent.Ben Pfaff2011-03-314-32/+107
| | | | | | | | | | | | | | | | | | | | | | 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>
* ovsdb-types: Fix bug in ovsdb_base_type_is_ref().Ben Pfaff2011-03-311-2/+2
| | | | | | | | | | 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.
* ovs-brcompatd: Convert svecs to ssets.Ben Pfaff2011-03-311-30/+24
|
* bridge: Convert svecs to ssets.Ben Pfaff2011-03-311-6/+5
|
* ovs-openflowd: Use sset in place of svec.Ben Pfaff2011-03-313-49/+46
| | | | Also deletes svec_split() since this was the only user.
* ofproto: Change string sets in interface from svec to sset.Ben Pfaff2011-03-3111-65/+75
|
* ovsdb-parser: Use sset instead of svec for detecting unused members.Ben Pfaff2011-03-312-11/+9
| | | | Should be slightly cheaper than sorting a list (O(n) vs. O(n lg n)).
* netdev: Use sset instead of svec in netdev interface.Ben Pfaff2011-03-314-31/+30
|
* dpif: Use sset instead of svec in dpif interface.Ben Pfaff2011-03-316-49/+46
|
* Convert shash users that don't use the 'data' value to sset instead.Ben Pfaff2011-03-317-116/+109
| | | | | | 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.
* sset: New data type for a set of strings.Ben Pfaff2011-03-313-0/+343
| | | | | | 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.
* learning-switch: Remove dead assignment.Ethan Jackson2011-03-311-2/+0
|
* ovs-ofctl: Remove dead assignment.Ethan Jackson2011-03-311-2/+0
|
* netdev-linux: Remove dead assignments.Ethan Jackson2011-03-311-10/+4
|
* ofproto: Use new timer library.Ethan Jackson2011-03-311-6/+7
|
* cfm: Use new timer library.Ethan Jackson2011-03-311-18/+23
|
* lacp: Use new timer library.Ethan Jackson2011-03-311-15/+15
|
* lib: Create new timer library.Ethan Jackson2011-03-313-0/+123
| | | | | | | | | | | 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.
* cfm: Fix appctl negative report.Ethan Jackson2011-03-311-2/+5
| | | | | When the cfm module has never received a bad CCM message, it would report a negative time.
* bridge: Destroy ofproto before deleting dpif.Ben Pfaff2011-03-311-1/+1
| | | | | Otherwise the ofproto's attempt to flush flows from the dpif will fail with an error, causing a spurious log message.
* connmgr: Fix wild pointer dereference in connmgr_broadcast().Ben Pfaff2011-03-311-1/+1
| | | | Fixes a segfault when fail-open goes into effect.
* ofproto: Fix order of destruction in ofproto_destroy().Ben Pfaff2011-03-311-3/+1
| | | | | | | | | 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>
* datapath: Update for changes in 2.6.39-rc1Simon Horman2011-03-311-0/+11
| | | | | | | | | 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>
* ofpbuf: Make ofpbufs initialized with ofpbuf_use_stack() not expandable.Ben Pfaff2011-03-304-15/+5
| | | | | | | | | | | | | | 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.
* odp-util: Replace ODPUTIL_FLOW_KEY_U32S by new struct odputil_keybuf.Ben Pfaff2011-03-303-14/+15
| | | | This seems to me to better encapsulate the inherent ugliness.
* datapath: Fix mysterious GRE-over-IPSEC problems.Ben Pfaff2011-03-301-3/+6
| | | | | | | | | | | | | | 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.
* mac-learning: Fix mac_entry_is_grat_arp_locked().Ben Pfaff2011-03-301-1/+1
| | | | | The lock is asserted if its expiration time has not arrived yet, not the reverse.
* ofproto: Get rid of send_port_status() trivial wrapper function.Ben Pfaff2011-03-301-11/+5
|
* ofp-util: Remove flow_stats_iterator, flows_stats_first(), flow_stats_next()Ben Pfaff2011-03-302-52/+0
| | | | | Nothing uses these anymore. ofputil_decode_flow_stats_reply() is a better alternative.
* timeval: Only log poll intervals longer than 50 ms.Ben Pfaff2011-03-301-3/+4
| | | | | | | | | | | 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.
* AUTHORS: Add Gaetano Catalli <gaetano.catalli@gmail.com>.Ben Pfaff2011-03-301-0/+1
|
* Fix compilation of openvswitch-1.1.0pre2 on FreeBSD-8.1Gaetano Catalli2011-03-302-0/+3
|
* ofproto: Factor OpenFlow connection management into new "connmgr".Ben Pfaff2011-03-298-1130/+1529
| | | | | This removes a lot of code from ofproto.c and makes the ofproto code easier to understand.
* ofproto: New function ofconn_pktbuf_retrieve().Ben Pfaff2011-03-291-5/+16
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Add functions to get and set ofconn type and role.Ben Pfaff2011-03-291-13/+40
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Add ofconn_get_miss_send_len(), ofconn_set_miss_send_len().Ben Pfaff2011-03-291-2/+16
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Add ofconn_get_flow_format(), ofconn_set_flow_format().Ben Pfaff2011-03-291-7/+24
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Use ofconn_send_reply() for sending OpenFlow replies.Ben Pfaff2011-03-291-23/+31
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Introduce ofconn_get_ofproto() accessor function.Ben Pfaff2011-03-291-25/+45
| | | | | This helps to increase the level of abstraction of "struct ofconn", in preparation for moving it from ofproto.c into a new file.
* ofproto: Move hton_ofp_phy_port() to ofp-util.Ben Pfaff2011-03-293-13/+15
| | | | | This removes some code from ofproto.c that doesn't really seem to belong there to begin with.
* ofproto: Break packet_in encoding out of ofproto into ofp-util.Ben Pfaff2011-03-293-39/+78
| | | | This removes some code from ofproto.c.
* ofproto: Factor building of flow_removed messages out into ofp-util.Ben Pfaff2011-03-293-53/+74
| | | | This removes some code from ofproto.c.
* ovs-vsctl: Remove dead assignment.Ethan Jackson2011-03-291-4/+2
| | | | | Noticed this last night while playing around with the clang static analyzer.
* ovs-vsctl: Remove dead code.Ethan Jackson2011-03-291-3/+0
| | | | Coverity #10710.
* bridge: Always wait for MAC learning table and ports.Ben Pfaff2011-03-291-5/+0
| | | | | | | | | | The test ofproto_has_primary_controller() is meaningless, since OFPP_NORMAL can cause the MAC learning table and port bonding to be in use even when there is a controller. I see that this bug has been here since early 2009, when the OFPP_NORMAL feature was introduced in the bridge. (Obviously it's not a severe problem.)
* xenserver: Wait for ovs-xapi-sync to exit in "stop" command.Ben Pfaff2011-03-291-3/+3
| | | | | | | | | | | | It seems possible that "restart" or a quick application of "stop" then "start" could kill ovs-xapi-sync without starting it again, if ovs-xapi-sync takes a little while to die, long enough for the next instance of it to see that its pidfile is still open and locked. I hope that this fixes some odd races that we've noticed in the "restart" command. Signed-off-by: Ben Pfaff <blp@nicira.com>
* daemon: Avoid redundant code in already_running().Ben Pfaff2011-03-293-60/+48
| | | | | This function substantially duplicated read_pidfile(), so reuse that code instead.
* daemon: Write "already running" message to log also.Ben Pfaff2011-03-292-2/+6
| | | | | Otherwise it's hard to diagnose later if the daemon failed to start because it thinks that it is already running.
* cfm: No longer keep track of bad remote MPs and MAIDS.Ethan Jackson2011-03-282-111/+26
| | | | | | | | | | | | | | Ben pointed out that an attacker could cause OVS to use infinite memory by sending a series of CCMs with different MAIDs. Each message would cause a remote_maid to be allocated and stored for several seconds. Since Commit 1c2e2d2fc8 (cfm: Don't report unexpected remote endpoints) no longer reports unexpected remote MAIDS and MPs in the database, the only reason to keep track of this information is for debugging purposes. In my judgment, it provides negligible useful debugging information at the expense of significantly increased code complexity. This commit rips it out entirely.
* ovsdb-tool: Fix cut-and-paste error in manpage.Ben Pfaff2011-03-281-2/+2
| | | | Reported-by: Paul Ingram <paul@nicira.com>