aboutsummaryrefslogtreecommitdiff
path: root/utilities
AgeCommit message (Collapse)Author
2012-12-26ovs-ctl: Exit, instead of resuming, after handling fatal signals.Ben Pfaff
When I wrote the "trap" calls in ovs-ctl, I had the mistaken notion that "trap $cmd $signal" would execute $cmd and then exit when $signal was caught. This is incorrect. Instead, it executes $cmd and then resumes executing the shell script. On the other hand, "trap $cmd 0" does by itself what I wanted: it causes the shell to execute $cmd and then exits due to the signal. So this commit changes the offending traps to use this form. Bug #14290. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
2012-08-06ovs-ctl: Add support for newer name for Open vSwitch kernel module.Ben Pfaff
Open vSwitch 1.4 and later is compatible with the upstream Linux kernel module but the init scripts hadn't been adapted to work with the upstream module name. Debian bug #684057. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-27ovs-ctl: Start the rest of Open vSwitch if loading brcompat module fails.Ben Pfaff
This may be more useful in practice than failing the entire OVS startup sequence. Debian bug #681955. CC: 681955@bugs.debian.org Reported-by: Bastian Blank <waldi@debian.org> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Simon Horman <horms@verge.net.au>
2012-07-23Fix race condition in parallel execution of "make install".Ben Pfaff
ovs-vsctl is listed, incorrectly, in both bin_PROGRAMS and bin_SCRIPTS. This meant that "make install" with the -j option could try to install ovs-vsctl two times in parallel, a race that occasionally caused a build failure, e.g.: http://buildd.debian.org/status/fetch.php?pkg=openvswitch&arch=s390&ver=1.4.2%2Bgit20120612-5&stamp=1342851603 Debian bug #682384. CC: 682384@bugs.debian.org Reported-by: Bastian Blank <waldi@debian.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-20ovs-vsctl: Allow "fake bridges" to be created for VLAN 0.Ben Pfaff
A fake bridge for VLAN 0 is useful, because it provides a way to create access ports for VLAN 0. There is no good reason to prevent it. NIC-464. Reported-by: Rob Hoes <Rob.Hoes@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-26ovs-ctl: Restore ability to create 256 bridges.Ben Pfaff
OVS is supposed to support at least 256 bridges simultaneously, but the file descriptor count was a little too low for that. Build tested only. Bug #8218. Reported-by: Luca Giraudo <lgiraudo@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-04ovs-ofctl: Fix error in man page related to TCI masks.Justin Pettit
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2011-12-22Update FSF address in LGPL notices in bugtool plugins.Chris Wright
This quiets the rpmlint errors: E: incorrect-fsf-address /etc/openvswitch/bugtool-plugins/system-configuration/openvswitch.xml E: incorrect-fsf-address /etc/openvswitch/bugtool-plugins/system-logs/openvswitch.xml E: incorrect-fsf-address /etc/openvswitch/bugtool-plugins/system-configuration.xml E: incorrect-fsf-address /etc/openvswitch/bugtool-plugins/network-status/openvswitch.xml E: incorrect-fsf-address /etc/openvswitch/bugtool-plugins/kernel-info/openvswitch.xml Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09bugtool: move plugins data from /etc/openvswitch to /usr/share/openvswitchChris Wright
This is in repsonse to the following rpmlint warnings: W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-configuration/openvswitch.xml W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-logs/openvswitch.xml W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-configuration.xml W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/network-status/openvswitch.xml W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/kernel-info/openvswitch.xml The xenserver specfile still places them in /etc/xensource/bugtool since that's a distro policy. Of course, the rpmlint warnings are as well, however, this seems like a more logical place for the bugtool plugins. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09utilites: rename ovs-lib.sh to ovs-libChris Wright
Rename this helper script to simply ovs-lib, since it's primarily a library of helper functions. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09utilities: install ovs-lib.sh as data not a scriptChris Wright
Currently, ovs-lib.sh is installed as an executable. It's meant to be sourced by external scripts, so install as data. Fixes rpmlint error: E: script-without-shebang /usr/share/openvswitch/scripts/ovs-lib.sh Could drop the .sh suffix in another commit. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-01ovs-vlan-bugs: Document driver bug with priority tagged packets.Ben Pfaff
Reported-by: Jesse Gross <jesse@nicira.com>
2011-11-30ovs-ofctl: Improve usage message.Ben Pfaff
TARGET and SWITCH are different because TARGET can refer to a switch or a controller whereas SWITCH must be a switch, but TARGET wasn't defined before. Also, TARGET seems a little more user-friendly than the VCONN that was used here before. Reported-by: Reid Price <reid@nicira.com> Bug #7736.
2011-11-21ovs-ofctl: Support OFPPC_NO_FWD.Ethan Jackson
Currently, there is no way to disable forwarding on an OpenFlow port from the command line. This patch adds support for the OFPPC_NO_FWD flag to the ovs-ofctl utility.
2011-11-21utilities: Update gitignore.Ethan Jackson
2011-11-18ovs-test: A new tool that allows to diagnose connectivity and performance issuesAnsis Atteka
This tool will be a replacement for the current ovs-vlan-test utility. Besides from connectivity issues it will also be able to detect performance related issues in Open vSwitch setups. Currently it uses UDP and TCP protocols for stressing. Issue #6976
2011-11-17ovs-dpctl: Suppress compiler warning on 64 bit linux.Ethan Jackson
utilities/ovs-dpctl.c:851:42: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
2011-11-17tests: Rewrite code for comparing sets of ODP actions.Ben Pfaff
The compare-odp-actions.pl utility isn't fully general, even for its intended purpose of allowing sets of ODP actions to be compared ignoring unimportant differences in ordering of output actions and VLAN set actions. I decided that the proper way to do it was to have a utility that can actually parse the actions, instead of just doing textual transformations on them. So, this commit replaces compare-odp-actions.pl by "ovs-dpctl normalize-actions", which is sufficiently general for the intended purpose. The new ovs-dpctl functionality can be easily extended to handle differences in fields other than VLAN, but only VLAN is needed so far. This will be needed in an upcoming commit that in some cases introduces redundant "set vlan" actions into the ODP actions, which compare-odp-actions.pl doesn't tolerate.
2011-11-17odp-util: New function odp_actions_from_string().Ben Pfaff
An upcoming commit will add a user. The only planned users for now are part of unit tests themselves, so it doesn't seem important to unit test it.
2011-11-11ovs-ofctl: Document behavior when table=255 is specified.Ben Pfaff
Reported-by: Michael Mao <mmao@nicira.com>
2011-11-09Support matching and modifying IP TTL.Justin Pettit
Add support matching the IPv4 TTL and IPv6 hop limit fields. This commit also adds support for modifying the IPv4 TTL. Modifying the IPv6 hop limit isn't currently supported, since we don't support modifying IPv6 headers. We will likely want to change the user-space interface, since basic matching and setting the TTL are not generally useful. We will probably want the ability to match on extraordinary events (such as TTL of 0 or 1) and a decrement action. Feature #8024 Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2011-11-09Support matching and modifying IP ECN bits.Justin Pettit
Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2011-11-09Support matching IPv6 flow label.Justin Pettit
Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2011-11-08ovs-ofctl: Clarify that nw_tos doesn't match on ARP.Justin Pettit
2011-11-04ovs-ofctl: Correct bad reference in parse-flows error message.Justin Pettit
2011-10-31ovsdb-idl: Prevent occasional hang when multiple database clients race.Ben Pfaff
When a client of the IDL tries to commit a read-modify-write transaction but the database has changed in the meantime, the IDL tells its client to wait for the IDL to change and then try the transaction again by returning TXN_TRY_AGAIN. The "wait for the IDL to change" part is important because there's no point in retrying the transaction before the IDL has received the database updates (the transaction would fail in the same way all over again). However, the logic was incomplete: the database update can be received *before* the reply to the transaction RPC (I think that in the current ovsdb-server implementation this will always happen, in fact). When this happens, the right thing to do is to retry the transaction immediately; if we wait, then we're waiting for an additional change to the database that may never come, causing an indefinite hang. This commit therefore breaks the "try again" IDL commit status code into two, one that means "try again immediately" and another that means "wait for a change then try again". When an update is processed after a transaction is committed but before the reply is received, the "try again now" tells the IDL client not to wait for another database change before retrying its transaction. Bug #5980. Reported-by: Ram Jothikumar <rjothikumar@nicira.com> Reproduced-by: Alex Yip <alex@nicira.com>
2011-10-28nicira-ext: New action "exit".Ethan Jackson
The exit action causes the switch to immediately halt processing of further actions. It's intended to be used in conjunction with multi table support. It allows a table to force tables which call it to discontinue processing a flow.
2011-10-27Fix manpage-check on RHEL 5.Ben Pfaff
The version of groff on RHEL 5 doesn't include the .SY, .OP, or .YS macros that ovs-benchmark.1 uses, so the manpage-check target fails on that platform. This commit adds the groff definitions of those macros to a file and includes it into ovs-benchmark.1. I tested that this allows RHEL 5 to pass manpage-check.
2011-10-26Implement automatic dependency generation for manpages.Ben Pfaff
This ensures that manpages actually get rebuilt if any of the lib/*.man fragments that they depend upon are modified.
2011-10-24ovs-dpctl: Add new "set-if" command.Ben Pfaff
I have found this useful for testing tunnel configuration.
2011-10-24ovs-bugtool: Improve how Open vSwitch log files are saved.Ben Pfaff
This moves the OVS log files from the "network-status" capability, which has a very small maximum size, to the "system-logs" capability, which is much larger. It ensures that the newest OVS log files are prioritized over old versions of system log files (if we just added the OVS log files after the existing file_output, then new OVS log files would only be included *after* all archived system log files were added). Bug #5443.
2011-10-22ovs-vswitchd: Add support for 802.1D STP.Justin Pettit
Still alpha quality, since only tested for interoperability with Linux bridge's STP implementation.
2011-10-22ovs-vsctl: Fix small formatting error in man page.Justin Pettit
2011-10-21Implement new fragment handling policy.Ben Pfaff
Until now, OVS has handled IP fragments more awkwardly than necessary. It has not been possible to match on L4 headers, even in fragments with offset 0 where they are actually present. This means that there was no way to implement ACLs that treat, say, different TCP ports differently, on fragmented traffic; instead, all decisions for fragment forwarding had to be made on the basis of L2 and L3 headers alone. This commit improves the situation significantly. It is still not possible to match on L4 headers in fragments with nonzero offset, because that information is simply not present in such fragments, but this commit adds the ability to match on L4 headers for fragments with zero offset. This means that it becomes possible to implement ACLs that drop such "first fragments" on the basis of L4 headers. In practice, that effectively blocks even fragmented traffic on an L4 basis, because the receiving IP stack cannot reassemble a full packet when the first fragment is missing. This commit works by adding a new "fragment type" to the kernel flow match and making it available through OpenFlow as a new NXM field named NXM_NX_IP_FRAG. Because OpenFlow 1.0 explicitly says that the L4 fields are always 0 for IP fragments, it adds a new OpenFlow fragment handling mode that fills in the L4 fields for "first fragments". It also enhances ovs-ofctl to allow users to configure this new fragment handling mode and to parse the new field. Signed-off-by: Ben Pfaff <blp@nicira.com> Bug #7557.
2011-10-12ovs-vsctl: Update man page description of controller support.Justin Pettit
ovs-vswitchd supports passive OpenFlow connections, but that was not indicated in the documentation. Add that information as well as a description of Primary (active) and Service (passive) control connections.
2011-10-12ovs-vsctl: Print warning for invalid controller and manager targets.Justin Pettit
2011-10-10ovs-bugtool: Add -s to "ovs-dpctl show" command, to show vport statistics.Ben Pfaff
It would be nice to include this in xen-bugtool output too but that would require Citrix to patch xen-bugtool directly. Bug #7628. Reported-by: Ethan Jackson <ethan@nicira.com>
2011-10-05dpif: Avoid use of "struct ovs_dp_stats" in platform-independent modules.Ben Pfaff
Over time we wish to reduce the number of datapath-protocol.h definitions used directly outside of Linux-specific code. This commit removes use of "struct ovs_dp_stats" from platform-independent code. Bug #7559.
2011-09-29ovs-vsctl: Remove "cfm_remote_mpid" from man page.Justin Pettit
The "cfm_remote_mpid" column is no longer used by the CFM module, so remove the reference from the ovs-vsctl man page.
2011-09-29bugtool: Collect "lacp/show" and "cfm/show" information.Justin Pettit
Feature #7496
2011-09-23ovs-bugtool: Use RUNDIR macro for ovs-appctl target.Justin Pettit
Correct the target path used by ovs-appctl. The previous value was hard-coded to "/var/run", but the common path is actually "/var/run/openvswitch". However, it's better to use RUNDIR, since the default location is build-time configurable.
2011-09-23Include sys/socket.h for SOCK_STREAMSimon Horman
This appears to be required when building using the Android NDK r6b (Android API level 13).
2011-09-22ovs-bugtool: Fix --unlimited option.Daniel Roman
Bug #5443.
2011-09-20ovs-vsctl: Fix typo in documentation.Ben Pfaff
I don't know what was really supposed to go here. Documentation #7371. Reported-by: Reid Price <reid@nicira.com>
2011-09-19ovs-ofctl: Clarify in_port in manpage.Ben Pfaff
Suggestion #7370. Suggested-by: Reid Price <reid@nicira.com>
2011-09-15datapath: Always use generic stats for devices (vports)Pravin Shelar
Currently ovs is using device stats for Linux devices and count them itself in other situations. This leads to overlap with hardware stats, inconsistencies, etc. It's much better to just always count the packets flowing through the switch and let userspace do any merging that it wants. Following patch removes vport->get_stats() interface. vport-stat is changed to use new `struct ovs_vport_stat` rather than rtnl_link_stats64. Definitions of rtnl_link_stats64 is removed from OVS. dipf_port->stat is also removed as aggregate stats are only available at netdev layer. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2011-09-15ovs-vsctl: Improve usage message.Ben Pfaff
Bug #7332. Reported-by: Gordon Good <ggood@nicira.com>
2011-09-15bugtool: Remove "ovs-bugtool" upon "make clean", to fix "make distcheck".Ben Pfaff
2011-09-15bugtool: Uninstall plugins on "make uninstall".Ben Pfaff
This works toward making "make distcheck" succeed.
2011-09-13Implement new "learn" action.Ben Pfaff
There are a few loose ends here. First, learning actions cause too much flow revalidation. Upcoming commits will fix that problem. The following additional issues have not yet been addressed: * Resource limits: nothing yet limits the maximum number of flows that can be learned. It is possible to exhaust all system memory. * Age reporting: there is no way to find out how soon a learned table entry is due to be evicted. To try this action out, here's a recipe for a very simple-minded MAC learning switch. It uses a 10-second MAC expiration time to make it easier to see what's going on: ovs-vsctl del-controller br0 ovs-ofctl del-flows br0 ovs-ofctl add-flow br0 "table=0 actions=learn(table=1, hard_timeout=10, \ NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], \ output:NXM_OF_IN_PORT[]), resubmit(,1)" ovs-ofctl add-flow br0 "table=1 priority=0 actions=flood" You can then dump the MAC learning table with: ovs-ofctl dump-flows br0 table=1