summaryrefslogtreecommitdiff
path: root/vswitchd
Commit message (Collapse)AuthorAgeFilesLines
* cfm: Update cfm_remote_mpids documentation.Ethan Jackson2011-09-161-0/+8
|
* notifiers: Create and destroy nln_notifiers.Ethan Jackson2011-09-161-4/+3
| | | | | | | | This patch changes the interface of netlink-notifier and rtnetlink-link. Now nln_notifiers are allocated and destroyed by the module instead of passed in by callers. This allows the definition of nln_notifier to be hidden, and generally cleans up the code.
* notifiers: Rename run and wait functions.Ethan Jackson2011-09-161-3/+3
| | | | | | | | It makes more sense to call nln_notifier_run() and nln_notifier_wait() simply nln_run() and nln_wait() since they don't operate on notifiers but the entire nln object. This patch changes the nln and the rtnetlink-link modules to the new convention.
* ovs-brcompatd: Delete ports when netdevs on fake bridges disappear.Ben Pfaff2011-09-151-1/+1
| | | | | | | | | | | | | | | Until now, when a network device disappeared, netdev_changed_cb() passed the name of the bridge that contained the network device to ovs-vsctl as part of the "del-port" command. However, when the network device was actually a "fake bridge", it would pass the name of the real bridge, which ovs-vsctl rejected as wrong (expecting the name of the fake bridge) and not remove the port. This fixes the problem by dropping the bridge name, which is simpler than trying to get the name of the fake bridge in this case. Reported-by: Tyler Coumbes <coumbes@gmail.com> Tested-by: Tyler Coumbes <coumbes@gmail.com>
* bridge: Don't update CFM on synthetic interfaces.Ethan Jackson2011-09-121-0/+4
| | | | | | | | | | Synthetic interfaces don't have database records so it doesn't make sense to update them. In some situations this could cause a segmentation fault. Reported-by: Paul Ingram <paul@nicira.com> Bug #7278.
* datapath: Strip down vport interface : OVS_VPORT_ATTR_MTUPravin Shelar2011-09-121-1/+1
| | | | | | | | | | | | | | There is no need to have vport attribute MTU (OVS_VPORT_ATTR_MTU) as linux net-dev-ioctl can be used to get/set MTU for linux device. Following patch removes OVS_VPORT_ATTR_MTU from datapath protocol. This patch also adds netdev_set_mtu interface. So that MTU adjustments can be done from OVS userspace. get_mtu() interface is also changed, now get_mtu() returns EOPNOTSUPP rather than returning 0 and setting *pmtu to INT_MAX in case there is no MTU attribute for given device. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: add key support to CAPWAP tunnelValient Gough2011-09-091-0/+26
| | | | | | | | | | | | | Add tunnel key support to CAPWAP vport. Uses the optional WSI field in a CAPWAP header to store a 64bit key. It can also be used without keys, in which case it is backward compatible with the old code. Documentation about the WSI field format is in CAPWAP.txt. Signed-off-by: Valient Gough <vgough@pobox.com> [horms@verge.net.au: Various minor fixes (v4.1)] Signed-off-by: Simon Horman <horms@verge.net.au> [jesse: Additional parsing fixes] Signed-off-by: Jesse Gross <jesse@nicira.com>
* bridge: Avoid reading uninitialized data in bridge_pick_local_hw_addr().Ben Pfaff2011-09-091-1/+1
| | | | | | | | Commit 3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason" didn't initialize 'ea' before trying to compare against it. We need to check that an address has been found. Found by valgrind.
* cfm: Write remote MPIDs to the database.Ethan Jackson2011-09-092-2/+19
| | | | | | | | A controller may want to know which MPIDs are reachable from an interface configured with CFM. This patch regularly writes this information to the database. Bug #7014.
* cfm: Eight byte MPIDs in extended mode.Ethan Jackson2011-09-091-2/+2
| | | | | | | | | 802.1ag only allows for MPIDs in the range [1, 8191]. This is restrictive enough to make assignment of MPIDs to instances of OVS awkward. This patch allows eight byte MPIDs when running in extended mode. Bug #7014.
* cfm: Allow accurate transmission intervals in extended mode.Ethan Jackson2011-09-091-1/+4
| | | | | | | | | | | | | | The standard CFM protocol only allows a handful of transmission rates. This is particularly problematic if you want to support a transmission rate slower than 100 ms and faster than 1000 ms. This patch allows arbitrary transmission rates (between 1 ms and 65535 ms). It does this by commandeering parts of a reserved "zero" field in the ccm message. This breaks wire compatibility with standard 802.1ag implementations, and thus is only supported in extended mode. Bug #7014.
* cfm: New cfm extended mode.Ethan Jackson2011-09-092-0/+10
| | | | | | | | The new extended mode introduced in this patch will be used for features which break wire compatibility with 802.1ag compliant implementations. Bug #7014.
* cfm: Remove cfm_remote_mpid configuration.Ethan Jackson2011-09-093-24/+27
| | | | | | | | | | | | | | | | | | | According to the 802.1ag specification, users should be able to configure the CFM module with a list of remote endpoints with which the local endpoint should have connectivity. Commit 93b8df3853 "cfm: Remove Maintenance_Point and Monitor tables." changed the behavior so that only one remote endpoint could be specified. This commit takes it further, by disallowing specification of any remote endpoints. Due to this change, the semantics of the fault flag are slightly different. Before, a fault was triggered if any of the configured remote endpoints were unreachable (or with RDI), or if any unconfigured remote endpoints were reachable. Now a fault is triggered if no remote endpoints are reachable at all, or if reachable endpoints have set their RDI. Bug #7014.
* bridge: Clear fault when CFM is not configured.Ethan Jackson2011-09-091-0/+2
|
* bridge: Write CFM changes more aggressively.Ethan Jackson2011-09-091-13/+33
| | | | | | | This patch no longer rate limits database updates due to CFM changes. Due to recent changes, the fault status of CFM only changes once per 3.5 tx_interval seconds. There doesn't seem to be a good reason to add an additional rate limit on top of this.
* bridge: ovsdb_idl_omit_alert() on additional columns.Ethan Jackson2011-09-091-0/+2
| | | | | The bridge owns the lacp_current and cfm_fault columns and should not be alerted when they change.
* vswitch.xml: Whitespace cleanup.Ethan Jackson2011-09-081-6/+6
|
* netlink-notifier: Rename rtnetlink code.Ethan Jackson2011-09-011-1/+1
| | | | | | This patch renames the rtnetlink module's code to "nln" for "netlink notifier". Callers are now required to pass in the netlink protocol to he newly renamed nln_create() function.
* lib: Rename rtnetlink.[ch] files.Ethan Jackson2011-09-011-1/+1
| | | | | | | | | | The only rtnetlink specific functionality contained in the rtnetlink module is the use of the NETLINK_ROUTE protocol. This can easily be passed in by callers. In preparation for generalization, this patch renames rtnetlink.[ch] to netlink-notifier.[ch]. Future patches will complete the transition.
* lacp: Clarify documentation.Ethan Jackson2011-09-011-2/+2
| | | | Requested-by: Dan Wendlandt <dan@nicira.com>
* bridge: Make bridge_pick_local_hw_addr() easier to reason.Justin Pettit2011-08-261-5/+6
| | | | | | The use of eth_addr_is_multicast() to see if a reasonable address was found always caused me momentary confusion. This commit uses a flag instead, and also saves a bit of unnecessary array reading and writing.
* docs: Suppress "warning: macro `DD' not defined" warningSimon Horman2011-08-241-0/+1
| | | | | | | | | | | | | | | | Suppress "warning: macro `DD' not defined" warning for ovs-brcompatd.8. As per the description by Ben Pfaff for the same problem effecting other files: deamon.man allows the file that is including it to include extra text in the description of --detach by defining a macro named DD. Only some of the manpages that included it did this (only those manpages that needed extra text there). But it's better to be quiet in "man --warnings", so this defines DD to an empty value in the other manpages that include daemon.man. Reported by lintian
* Drop spurious 'H' cases from daemon option parsing switch statements.Ben Pfaff2011-08-222-2/+0
| | | | Help is 'h'. I don't see how 'H' can ever happen.
* vswitch.xml: Remove unused "hwaddr" other-config key.Justin Pettit2011-08-151-3/+0
|
* Option to forward BPDU (Ethernet control class) framesSanjay Sane2011-08-092-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a NORMAL action bridge drops reserved-multicast-mac addresses; 01-80-c2-00-00-[f0:ff]. A node that does not implement STP should have an option to forward such frames. This commit proposes to have a configuration option to allow forwarding of BPDU class frames. To ensure backward compatibility, this option is disabled by default. This config can be set using bridge's other-config column, for e.g ovs-vsctl set bridge br0 other-config:forward-bpdu=true Changing this option can revalidate all flows in a software-OVS implementation (ofproto-dpif) -------- unit tests: ------------ make config changes, test runtime behavior -- test runtime behavior -- continuously send packets to br0 with dest-mac=01:80:c2:00:00:00 ovs-dpctl dump-flows br0 ovs-vsctl set bridge br0 other-config:forward-bpdu=true ovs-dpctl dump-flows br0 ovs-vsctl set bridge br0 other-config:forward-bpdu=false ovs-dpctl dump-flows br0 ovs-vsctl set bridge br0 other-config:forward-bpdu=true ovs-dpctl dump-flows br0 ovs-vsctl remove bridge br0 other-config forward-bpdu=true ovs-dpctl dump-flows br0 --result-- ovs-dpctl dump-flows br0 in_port(1),eth(src=00:0c:29:d1:39:42,dst=01:80:c2:00:00:00), packets:29550, bytes:1773000, used:0.004s, actions:drop ovs-vsctl set bridge br0 other-config:forward-bpdu=true ovs-dpctl dump-flows br0 in_port(1),eth(src=00:0c:29:d1:39:42,dst=01:80:c2:00:00:00), packets:8209, bytes:492540, used:0.000s, actions:2,0 ovs-vsctl set bridge br0 other-config:forward-bpdu=false ovs-dpctl dump-flows br0 in_port(1),eth(src=00:0c:29:d1:39:42,dst=01:80:c2:00:00:00), packets:19, bytes:1140, used:0.000s, actions:drop ovs-vsctl set bridge br0 other-config:forward-bpdu=true ovs-dpctl dump-flows br0 in_port(1),eth(src=00:0c:29:d1:39:42,dst=01:80:c2:00:00:00), packets:29, bytes:1740, used:0.000s, actions:2,0 ovs-vsctl remove bridge br0 other-config forward-bpdu=true ovs-dpctl dump-flows br0 in_port(1),eth(src=00:0c:29:d1:39:42,dst=01:80:c2:00:00:00), packets:0, bytes:0, used:never, actions:drop Bug #6624 Reported-by: Niklas Andersson <nandersson@nicira.com>
* netdev: Get rid of struct netdev_options and netdev_open_default().Ben Pfaff2011-08-082-9/+3
| | | | | Now that netdev_options only has two members, we might as well pass them directly as parameters.
* netdev: Decouple creating and configuring network devices.Ben Pfaff2011-08-081-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, each call to netdev_open() for a particular network device had to either specify a set of network device arguments that was either empty or (for devices that already existed) equal to the existing device's configuration. Unfortunately, the definition of "equality" in the latter case was mostly done in terms of strict equality of string-to-string maps, which caused problems in cases where, for example, one set of arguments specified the default value of an optional argument explicitly and the other omitted it. The netdev interface does have provisions for defining equality other ways, but this had only been done in one case that was especially problematic in practice. One way to solve this particular problem would be to carefully define equality in all the problematic cases. This commit takes another approach based on the realization that there is really no need to do any comparisons. Instead, it removes configuration at netdev_open() time entirely, because almost all of netdev_open()'s callers are not interested in creating and configuring a netdev. Most of them just want to open a configured device and use it. Therefore, this commit stops providing any configuration arguments to netdev_open() and the provider functions that it calls. Instead, a caller that does want to configure a device does so after it opens it, by calling netdev_set_config(). This change allows us to simplify the netdev interface a bit. There is no longer any need to implement argument comparisons. As a result, there is also no need for "struct netdev_dev" to keep track of configuration at all. Instead, the network devices that have configuration keep track of it in their own internal form. This new interface does mean that it becomes possible to accidentally create and try to use an unconfigured netdev that requires configuration. Bug #6677. Reported-by: Paul Ingram <paul@nicira.com>
* netdev: Clean up and refactor packet receive interface.Ben Pfaff2011-08-081-2/+0
| | | | | | | | | | | | | | | | | | | | | The Open vSwitch tree only has one user of the ability for a netdev to receive packets from a network device. Thus, this commit simplifies the common-case use of the netdev interface by replacing the "ethertype" option from "struct netdev_options" by a new netdev_listen() call. The only user of netdev_listen() wants to receive all packets from a network device, so this commit also removes the ability to restrict the received packets to a particular protocol. (This ability was once used by the Open vSwitch integrated DHCP client, but that code has been removed.) This commit also simplifies and improves the implementation of the code in netdev-linux that started listening to a network device. Before, I had not figured out how to avoid receiving all packets on all devices before binding to a particular device, but I took a closer look at the kernel code and figured it out. I've tested that the userspace datapath (dpif-netdev), the only user of netdev_recv(), still works after this change.
* bridge: Add port to datapath before trying to retrieve device stats.Ben Pfaff2011-08-081-6/+6
| | | | | | | | Virtual ports such as GRE tunnels don't exist until after the port is added to the datapath, so without this change adding such a port yields a warning like the following: netdev|WARN|failed to retrieve MTU for network device gre0: No such device
* Document and warn that mirroring to a VLAN is incompatible with SLB bonding.Ben Pfaff2011-08-082-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | vswitchd/INTERNALS explains the incompatibility: 2. When Open vSwitch forwards a multicast or broadcast packet to a link in the SLB bond other than the active slave, the remote switch will forward it to all of the other links in the SLB bond, including the active slave. Without special handling, this would mean that Open vSwitch would forward a second copy of the packet to each switch port (other than the bond), including the port that originated the packet. Open vSwitch deals with this case by dropping packets received on any SLB bonded link that have a source MAC+VLAN that has been learned on any other port. (This means that SLB as implemented in Open vSwitch relies critically on MAC learning. Notably, SLB is incompatible with the "flood_vlans" feature.) We could go farther than this and automatically change the bonding mode to a safer one (e.g. active-backup) when flood_vlans are enabled. However, that would still leave the SLB fallback for LACP modes in place; perhaps active-backup would have to be the fallback for LACP modes when flood_vlans are enabled.
* Document that mirroring to a GRE tunnel works and is better than RSPAN.Ben Pfaff2011-08-081-8/+16
|
* util: Introduce get_program_version function.Justin Pettit2011-08-042-2/+2
| | | | Useful in an upcoming commit.
* ofproto-dpif: Allow setting of flow eviction thresholdSimon Horman2011-07-282-0/+33
| | | | | | | | | | | | | | | | | | Allow setting the number of flows present in the flow hash at which point eviction of entries from the kernel flow hash will begin to occur. The value may be set using a bridge's other-config column. e.g. ovs-vsctl set bridge br3 other-config:flow-eviction-threshold=10000 default is 1000, reflecting constant value previously used. Increasing this value can result in reduced CPU usage and packet loss in situations where the number of active flows is significantly larger than 1000.
* Remove spurious blank line.Ben Pfaff2011-07-271-1/+0
|
* vswitchd: Prevent multiple ovs-vswitchd processes from acting together.Ben Pfaff2011-07-261-12/+29
| | | | | | Once in a while someone reports a problem caused by running multiple ovs-vswitchd processes at the same time. This fixes the problem by requiring ovs-vswitchd to obtain a database lock before taking any actions.
* ovsdb: Implement a "lock" feature in the database protocol.Ben Pfaff2011-07-262-2/+13
| | | | | | | | | | | 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.
* ovsdb: Report the number of connections for inbound Managers.Ben Pfaff2011-07-261-0/+17
| | | | | | | | Inbound managers (e.g. "ptcp:") can have multiple active connections, but the database schema doesn't allow us to report the status of more than one at a time. This commit adds a status key-value pair that, when there is more than one active connection, reports the number that are active. This at least helps to clarify the issue.
* ovs-vswitchd: Make database socket command-line argument optional.Ben Pfaff2011-07-262-16/+23
| | | | | In practice the default location is the only one used, so we might as well make it easy.
* INTERNALS: Describe SLB bonding.Ben Pfaff2011-07-221-0/+85
|
* bridge: Log a warning when QoS misconfiguration is likely.Ben Pfaff2011-07-201-0/+13
| | | | | | | | | Queue 0 is documented as the "default queue" used when a packet is not directed to any specific queue. Many qdiscs drop packets not directed to a queue if the default queue is not configured. This is therefore likely to be a misconfiguration, so warn about it. Bug #5583.
* ofproto-dpif: Do not mirror L2 multicast switch protocols to VLANs.Ben Pfaff2011-07-181-0/+31
| | | | | | | | Mirroring certain protocols interpreted by switches to a VLAN can deceive the switch that receives it. Drop such packets instead of mirroring them. CC: David Tsai <dtsai@nicira.com> NIC-401.
* bridge: Update controller connection status correctly.Andrew Evans2011-07-011-3/+10
| | | | | | | | | | | Updates to status-related columns in the Controller table can be lost if there are multiple bridges with different sets of controllers. This commit fixes this behavior by first accumulating status for all controllers on all bridges, then making one pass over all rows in the Controller tables, updating the status of each. Bug #6185. Reported-by: Michael Hu <mhu@nicira.com>
* bridge: Fix null pointer dereference.Ben Pfaff2011-07-011-1/+1
| | | | | | | | | | | If the netdev_open() fails then iface->netdev will be NULL and iface_refresh_stats() will cause a null pointer dereference in netdev_get_stats(). Fixes a problem introduced by commit 1101a0b47 "bridge: Populate interface status/statistics as soon as a port is added." Reported-by: Aaron Rosen <arosen@clemson.edu>
* bridge: Populate interface status/statistics as soon as a port is added.Andrew Evans2011-06-281-1/+9
| | | | | | | | | Currently there's a lag of up to five seconds before the status and statistics columns in the Interface table are populated when a port is first added to a bridge. This may confuse systems that expect those columns to be populated right away. Bug #6145.
* vswitch.xml: Use new <ref key> attribute where appropriate.Andrew Evans2011-06-221-38/+49
| | | | | I've looked at all the <code> tags and changed them to use <ref column=".." key=".."/> where appropriate (I hope).
* bridge: Enable system stats only if turned on in the database.Ben Pfaff2011-06-213-3/+42
| | | | | | | | | | Most hypervisors have no use for this column, so populating it just wastes CPU time. It can still be enabled explicitly via other-config. CC: Peter Balland <peter@nicira.com> CC: David Tsai <dtsai@nicira.com> Bug #5961. NIC-397.
* ovsdb-doc: Add support for references to specific keys.Ben Pfaff2011-06-211-4/+3
| | | | | | | | Now a specific key can be referenced with syntax like <ref table="Bridge" column="other-config" key="datapath-id"/>. Also fixes up an existing place that needed this feature already (and had a typo, too).
* schema: Update schema version due to xenserver changes.Ethan Jackson2011-06-211-2/+2
| | | | | | | | | | Commit 32abfca0 "xenserver: New iface-status external id." and Commit 40043044 "xenserver: Give tap devices iface-ids.", changed the way a controller interprets the external_ids column of the Interface table. This patch increments the schema version number to reflect that change. Requested-by: Pankaj Thakkar <thakkar@nicira.com>
* vswitchd: Install vswitch.ovsschema to $(pkgdatadir).Ben Pfaff2011-06-201-0/+1
| | | | | | | This way, the xenserver spec file and the upcoming RHEL 5.6 spec file don't have to install it by hand. Signed-off-by: Ben Pfaff <blp@nicira.com>
* bridge: Avoid duplicate logging when netdev_get_etheraddr() fails.Ben Pfaff2011-06-171-3/+0
| | | | | | | get_etheraddr() in netdev-linux.c logs when the Ethernet address cannot be obtained so there is no need to log again in the caller. Bug #5844.