aboutsummaryrefslogtreecommitdiff
path: root/vswitchd
AgeCommit message (Collapse)Author
2012-08-22stp: port_no counter is off by oneAnsis Atteka
This counter was off by one, because port_num should be less than STP_MAX_PORTS. This caused an assert hit later in stp_get_port(). Issue: 13059 Signed-off-by: Ansis Atteka <aatteka@nicira.com> Reported-by: Ram Jothikumar <rjothikumar@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2012-07-05ovs-brcompatd: Fix sending replies to kernel requests.Ben Pfaff
Commit 7d7447 (netlink: Postpone choosing sequence numbers until send time.) broke ovs-brcompatd because it prevented userspace replies to kernel requests from using the correct sequence numbers. This commit fixes it. Atzm Watanabe found the root cause and provided an alternative patch to avoid the problem. Reported-by: André Ruß <andre.russ@hybris.com> Reported-by: Atzm Watanabe <atzm@stratosphere.co.jp> Tested-by: Atzm Watanabe <atzm@stratosphere.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-29ovs-vswitchd: Call mlockall() from the daemon, not the parent or monitor.Ben Pfaff
mlockall(2) says: Memory locks are not inherited by a child created via fork(2) and are automatically removed (unlocked) during an execve(2) or when the process terminates. which means that --mlockall was ineffective in combination with --detach or --monitor or both. Both are used in the most common production configuration of Open vSwitch, so this means that --mlockall has never been effective in production. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-21bridge: Ignore "null" interfaces as required.Ethan Jackson
Commit bae7208e91a0 (bridge: Refactor bridge_reconfigure().) introduced a regression in which the switch would attempt to instantiate "null" interfaces in the datapath. This would, of course, fail and trigger a warning. Though harmless, these warnings confused users. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-05-02Global replace of Nicira Networks.Raju Subramanian
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01vswitch.xml: Document more details of CFM intervals.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26coverage: Make ovs-appctl command more useful and less alarming.Ben Pfaff
I've had a few complaints that ovs-vswitchd logs its coverage counters at WARN level, but this is mainly wrong: ovs-vswitchd only logs coverage counters at WARN level when the "coverage/log" command is used through ovs-appctl. This was even documented. The reason to log at such a high level was to make it fairly certain that these messages specifically requested by the admin would not be filtered out before making it to the log. But it's even better if the admin just gets the coverage counters as a reply to the ovs-appctl command. So that is what this commit does. This commit also improves the documentation of the ovs-appctl command. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Clean up iface_create().Ben Pfaff
iface_create() did its work in an order that meant it had to do a lot more cleanup on error paths than is otherwise needed. This commit reorders the work to avoid this extra cleanup. bridge_ofproto_port_del() is no longer used after the refactoring so this commit deletes it. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Make reconfiguration update port configuration again.Ben Pfaff
Commit bae7208e91a0 (bridge: Refactor bridge_reconfigure().) introduced a regression in bridge reconfiguration. Previously, reconfiguration would update the configuration of each bridge port, so that if the controller (or the admin) changed a port's options, then that change would propagate to the datapath. Following that commit, that no longer happened. This commit restores that feature. Bug #10972. Reported-by: Michael Hu <mhu@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Make iface_create() return an indication of success.Ben Pfaff
This is the minimal change that gets the job done. There are much nicer ways to do this, but I'll leave that refactoring for later in the series. The return value will have its first user in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Factor code to configure netdevs out of iface_create().Ben Pfaff
An upcoming patch will need the same code in another function. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Refactor iface_refresh_type() into iface_get_type().Ben Pfaff
The calculation that this function does will need to be used in a context where no "struct iface" is available in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Drop 'need_refresh' member from struct iface.Ben Pfaff
It's no longer useful. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitchd: Push ofproto_port declaration down to inner blocks.Ben Pfaff
Just a tiny code cleanup. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23bridge: Ignore null interfaces as required.Ethan Jackson
This issue has been around for quite some time. It doesn't really cause problems beyond some spurious warnings. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-24vswitchd: Report actual port number, not -1, in "added interface" message.Ben Pfaff
CC: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24vswitch.xml: Document Interface external-ids:iface-status.Ben Pfaff
This has been implemented for a long time but we forgot to document it. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23bridge: Refactor bridge_reconfigure().Ethan Jackson
The existing bridge_reconfigure() implementation is suboptimal. When adding lots of new ports, on every pass through the run loop it allocates a bunch of "struct iface"s and "struct port"s, only to destroy them when out of time. Additionally, when there are errors adding or deleting ports, it can fail to converge. Instead it will attempt and fail to add the same set of ports forever. This patch rewrites bridge_reconfigure() using a new strategy. Whenever the database changes, some initial bookkeeping is done, and a list of future work is compiled. The bridge begins whittling down this list, and stops processing database changes until finished. Bug #10902. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-23vswitchd: Remove unused 'tag' from 'struct iface'.Ethan Jackson
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-20vswitchd: Make "cfm_health" column ephemeral.Ben Pfaff
There's no need to log this to the on-disk database. Spotted while examining "ovsdb-tool show-log" output. Reported-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-20vswitchd: Make "cfm_fault_status" column ephemeral.Ben Pfaff
There's no need to log this to the on-disk database. Spotted while examining "ovsdb-tool show-log" output. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-18netlink-socket: Make caller provide message receive buffers.Ben Pfaff
Typically an nl_sock client can stack-allocate the buffer for receiving a Netlink message, which provides a performance boost. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-17lacp: Remove heartbeat mode.Ethan Jackson
The LACP heartbeat mode was used to monitor interfaces for connectivity. It turns out that LACP is inferior to CFM for this purpose. For the sake of simplicity this patch removes the feature. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-17lacp: Remove custom transmission intervals.Ethan Jackson
Open vSwitch allowed users to set a custom LACP PDU transmission interval. This turned out to be an ill conceived idea which was more confusing than useful. This patch reverts Open vSwitch to the behavior supported in the LACP specification: two transmission intervals, fast and slow. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-17vswitch: Use consistent representation of DSCP bits.Ethan Jackson
There are two sensible ways to represent the 6 DSCP bits of an IP packet. One could represent them as an integer in the range 0 to 63. Or one could represent them as they would appear in the tos field (0 to 63) << 2. Before this patch, OVS had used the former method for the DSCP bits in the Queue Table, and the latter for the DSCP in the Controller and Manager tables. Since the ability to set DSCP bits in the Controller and Manager tables is so new that it hasn't been released yet, this patch changes it to use the existing style employed in the Queue table. Hopefully this should make the code and configuration less confusing. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-11bridge: Rate limit port creations and deletions.Ethan Jackson
In some datapaths, adding or deleting OpenFlow ports can take quite a bit of time. If there are lots of OpenFlow ports which needed to be added in a run loop, this can cause Open vSwitch to lock up and stop setting up flows while trying to catch up. This patch lessons the severity of the problem by only doing a few OpenFlow port adds or deletions per run loop allowing other work to be done in between. Bug #10672. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-11bridge: Rate limit default address warnings.Ethan Jackson
This information is typically not more useful if displayed more often. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-12ovsdb-idl: Simplify transaction retry.Ben Pfaff
Originally the IDL transaction state machine had a return value TXN_TRY_AGAIN to signal the client to wait for a change in the database and then retry its transaction. However, this logic was incomplete, because it was possible for the database to change before the reply to the transaction RPC was received, in which case the client would wait for a further change. Commit 4fdfe5ccf84c (ovsdb-idl: Prevent occasional hang when multiple database clients race.) fixed the problem by breaking TXN_TRY_AGAIN into two status codes, TXN_AGAIN_WAIT that meant to wait for a further change and TXN_AGAIN_NOW that meant that a change had already occurred so try again immediately. This is correct enough, but it is more complicated than necessary. It is simpler and just as correct to use a single "try again" status that requires the client to wait for a change relative to the database contents *before* the transaction was committed. This commit makes that change. It also changes ovsdb_idl_run()'s return type from bool to void because its return type is hardly useful anymore. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-09vswitchd: Remove port from datapath if it becomes non-operationalAnsis Atteka
If kernel module rejects config changes then vswitchd sets the ofport column to -1, but does not remove the non-operational port from the datapath. This patch fixes this problem. ovs-vsctl add-br ovsbr ovs-vsctl add-port ovsbr p1 ovs-vsctl add-port ovsbr p2 ovs-vsctl set Interface p1 options:remote_ip=2.1.1.1 options:key=123 type=gre ovs-vsctl set Interface p2 options:remote_ip=1.1.1.1 options:key=123 type=gre ovs-vsctl set Interface p2 options:remote_ip=2.1.1.1 options:key=123 type=gre ovs-dpctl show #observe that p2 does not appear here anymore Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2012-04-06Added handling of previously ignored cfm faults.Mehak Mahajan
The CFM packets that are out of sequence or contain invalid cfm_interval were previously not ignored. The behavior is changed with this patch to not process those CFM frames. Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05Granular link health statistics for cfm.Mehak Mahajan
The changes display the cfm_health of an interface. The cfm_health is an exponential weighted moving average of the health of all remote_mpids. The value can vary from 0 to 100, 100 being very healthy and 0 being unhealthy. Feature #10363 Requested-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05Revert "Granular link health statistics for cfm."Mehak Mahajan
Missed commiting one line of change. This reverts commit c75b7e39d973cc9f4869c84d48eeb3b66afb2971. Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05Granular link health statistics for cfm.Mehak Mahajan
The changes display the cfm_health of an interface. The cfm_health is an exponential weighted moving average of the health of all remote_mpids. The value can vary from 0 to 100, 100 being very healthy and 0 being unhealthy. Feature #10363 Requested-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-03-28Rearrange structures to better fit valgrind's memory leak heuristics.Ben Pfaff
valgrind's memory leak detector considers a pointer to the head of a memory block to be "definitely" a pointer to that memory block but a pointer to the interior of a memory block only "possibly" a pointer to that memory block. Open vSwitch hmap_node and list data structures can go anywhere inside a structure; if they are in the middle of a structure then valgrind considers pointers to them to be possible leaks. Therefore, this commit moves some of these from the middle of data structures to the head, to reduce valgrind's uncertainty. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-27Avoid possibly including an old vswitch-idl.h.Ben Pfaff
Codes that uses #include "vswitch-idl.h" can get an older version of this header, because this header file moved from vswitchd/ to lib/ and the older generated file might still be present. This helps out two ways: * "make clean" will delete the generated files from their old locations. * Use #include "lib/vswitch-idl.h" to explicitly avoid including the files from their old locations. Reported-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-23Allow configuring DSCP on controller and manager connections.Mehak Mahajan
The changes allow the user to specify a separate dscp value for the controller connection and the manager connection. The value will take effect on resetting the connections. If no value is specified a default value of 192 is chosen for each of the connections. Feature #10074 Requested-by: Rajiv Ramanathan <rramanathan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-03-23vswitchd: Do not refresh existing iface on new device addition.Pravin B Shelar
There is no need to refresh status and stats for existing devices if iface mtu is missing in ovs-db as missing MTU could just mean error in last MTU read for that device. So we can refresh stats for devices which are just created. Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2012-03-22idl: New helpers for accessing string maps.Ethan Jackson
This removes some boilerplate from the bridge. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-22bridge: Shorten long lines.Ethan Jackson
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-22netdev: Rename netdev->get_status() to netdev->get_drv_info().Pravin B Shelar
get_status actually returns driver information, so get_drv_info() is better name. Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2012-03-19cfm: Support random VLAN tag for CCM PDUs.Ethan Jackson
CCM PDUs may take a different path through the network depending on the VLAN tag they carry. In order to exercise these paths, it may be advantageous to use a random VLAN tag. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-19idl: Move vswitch-idl to libopenvswitch.Ethan Jackson
This is cleaner then having multiple programs build the idl independently. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-19configure: Remove --with-build-number.Ben Pfaff
From early days, Nicira used the --with-build-number option to configure to stamp our internal builds. We've since switched to another scheme, so this option is obsolete. Good riddance. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-13configure: add configure option to disable building brcompatChris Wright
This adds ability to do: ./configure --disable-brcompat to disable building userspace and kernel module associated with providing linux bridge compatibility. Sources should still be distributed w/ make dist. While there, update comment referring to long removed veth driver which is now relevant for brcompat module. Cc: Jesse Gross <jesse@nicira.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-09datapath: omit _mod from module namesChris Wright
This renames the datapath modules: openvswitch_mod -> openvswitch brcompat_mod -> brcompat The first makes the module name consistent with upstream, and the latter is just for internal consistency. This makes tools, and documentation refer to a common module name regardless if it's coming from upstream linux or built from datapath/ as part of a local build. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-07netdev: Abstract "features" interface away from OpenFlow 1.0.Ben Pfaff
netdev_get_features() and other functions have always used OpenFlow 1.0 "enum ofp_port_features" bits as part of their interface. This commit switches over to using an internally defined interface that is not tied directly to any OpenFlow version, making evolution of each side of the interface easier in the future. Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-07Begin breaking openflow-1.0.h into common and version-specific definitions.Ben Pfaff
The intention is that, as each OpenFlow 1.1 and 1.2 feature is added to Open vSwitch, the corresponding protocol definitions will be broken up this way: - Definitions that are the same in OF1.0 and OF1.1 will retain the "OFP" or "ofp" prefix and move to openflow-common.h. - Definitions that are specific to OF1.0 will be renamed with an "OFP10" or "ofp10" prefix and stay in openflow-1.0.h. - Definitions that are specific to OF1.1 or to OF1.1 and OF1.2 will be renamed with an "OFP11" or "ofp11" prefix and move to openflow-1.1.h. - Definitions that are specific to OF1.2 will be renamed with an "OFP12" or "ofp12" prefix and move to openflow-1.2.h. This commit starts this process with some basic OpenFlow definitions. Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-06xenserver: Add vm-id to the external_ids.Gurucharan Shetty
The vm-id external id in the interface table will uniquely identify a VM that is connected to a bridge through that interface. In xenserver, this will have the same value as the external id - xs-vm-uuid and can be overridden by setting the nicira-vm-id key in the other_config field of VM record of XAPI. Bug #10020. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-03-05vswitchd: Document behavior of 802.1p priorities with VLAN splinters.Ben Pfaff
Reported-by: likunyun <kunyunli@hotmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-05bridge: Remove unwanted ports at time of ofproto creation.Ben Pfaff
The reconfiguration code only deleted unwanted ports for bridges that had been created in previous (re)configurations. In fact, we should run this step even for bridges that are newly added, e.g. to delete ports that were added by a previous run of ovs-vswitchd and deleted from the database between runs. Before this commit, the following left "int" in datapath br0. After this commit, "int" is properly deleted: 1. With ovs-vswitchd running: # ovs-vsctl add-br br0 # ovs-vsctl add-port br0 int -- set interface int type=internal 2. Kill ovs-vswitchd, then: # ovs-vsctl --no-wait -- del-port br0 int 3. Restart ovs-vswitchd. Bug #9957. Reported-by: Hiroshi Tanaka <htanaka@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>