summaryrefslogtreecommitdiff
path: root/vswitchd
Commit message (Collapse)AuthorAgeFilesLines
* bfd: Allow setting OAM bit when encapsulated in tunnel.Jesse Gross2016-06-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | Some tunnel protocols, such as Geneve, have a bit in the tunnel header to indicate that it is an OAM packet. This means that the packet should be processed as a tunnel control frame and not be passed onto connected links. When BFD is used inside of a tunnel it is often used in this control capacity, so this adds an option to enable marking the outer header when the output port is a tunnel that supports the OAM concept. It is also possible to use tunnels as point-to-point links that are simply carrying BFD as payload, so this is not always turned on. Conceptually, this may also apply to other types of packets locally generated by the switch, most obviously CFM. However, BFD seems to be most commonly used for this type of tunnel monitoring application so this only adds the option to BFD for the time being to avoid unnecessarily adding configuration knobs that might never get used. Signed-off-by: Jesse Gross <jesse@kernel.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* bridge: allow OVS to interact with controller through sockets outside run dirAnsis Atteka2016-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Open vSwitch is unable to create or connect to Unix Domain Sockets outside designated 'run' directory, because of fear of potential remote exploits where a hacked remote OVSDB manager would tell Open vSwitch to connect to a unix domain socket owned by other daemon on the same hypervisor. This patch allows to disable this behavior by changing /etc/default/openvswitch (Ubuntu) or /etc/sysconfig/openvswitch (RHEL) file to: ... OVS_CTL_OPTS=--no-self-confinement ... Note, that it is better to stick with default behavior, unless: 1. You have Open vSwitch running under SELinux or AppArmor that would prevent OVS from messing with sockets owned by other daemons; OR 2. You are sure that relying on OpenFlow handshake is enough to prevent OVS to adversely interact with those other daemons running on the same hypervisor; OR 3. You don't have much worries of remote exploits in the first place, because perhaps OVSDB manager is running on the same host as OVS. The initial use-case for this patch is to allow to connect to OpenFlow controller that has its socket outside OVS run directory. However, in the future it could be generalized to allow to disable self-confinement for other things like DPDK vhost-user sockets or anything else that is specifiable in OVSDB with full path. Signed-off-by: Ansis Atteka <aatteka@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org> VMware-BZ: #1525857
* util: New function nullable_xstrdup().Ben Pfaff2016-06-261-6/+2
| | | | | | It's a pretty common pattern so create a function for it. Signed-off-by: Ben Pfaff <blp@ovn.org>
* ipfix: Export user specified virtual observation IDWenyu Zhang2016-06-242-0/+46
| | | | | | | | | | | | In virtual network, users want more info about the virtual point to observe the traffic. It should be a string to provide clear info, not a simple interger ID. Introduce "other-config: virtual_obs_id" in IPFIX, which is a string configured by user. Introduce an enterprise IPFIX entity "virtualObsID"(898) to export the value. The entity is a variable-length string. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Revert "ipfix: Export user specified virtual observation ID".Ben Pfaff2016-06-242-46/+0
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 337bebe91c94d9d201e28811c469869d32e978ff, which caused a crash in test 1048 "ofproto-dpif - Flow IPFIX sanity check" (now test 1051) with the following backtrace: #0 hmap_first_with_hash (hmap=<optimized out>, hmap=<optimized out>, hash=<optimized out>) at ../lib/hmap.h:328 #1 smap_find__ (smap=0x94, key=key@entry=0x817f7ab "virtual_obs_id", key_len=14, hash=2537071222) at ../lib/smap.c:366 #2 0x0812b9d7 in smap_get_node (smap=0x9738a276, key=0x817f7ab "virtual_obs_id") at ../lib/smap.c:198 #3 0x0812ba30 in smap_get (smap=0x94, key=0x817f7ab "virtual_obs_id") at ../lib/smap.c:189 #4 0x08055a60 in bridge_configure_ipfix (br=<optimized out>) at ../vswitchd/bridge.c:1237 #5 bridge_reconfigure (ovs_cfg=0x94) at ../vswitchd/bridge.c:666 #6 0x080568d3 in bridge_run () at ../vswitchd/bridge.c:2972 #7 0x0804c9dd in main (argc=10, argv=0xffd8b934) at ../vswitchd/ovs-vswitchd.c:112 Signed-off-by: Ben Pfaff <blp@ovn.org>
* ipfix: Export user specified virtual observation IDWenyu Zhang2016-06-242-0/+46
| | | | | | | | | | | | | | In virtual network, users want more info about the virtual point to observe the traffic. It should be a string to provide clear info, not a simple interger ID. Introduce "other-config: virtual_obs_id" in IPFIX, which is a string configured by user. Introduce an enterprise IPFIX entity "virtualObsID"(898) to export the value. The entity is a variable-length string. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-linux: Add new QoS type linux-noop.bschanmu@redhat.com2016-06-231-11/+15
| | | | | | | | | | | | Linux ``No operation'' qos type is used to inform the vswitch that the traffic control for the port is managed externally. Any configuration values set for this type will have no effect. This patch provides a solution suggested in this mail - http://openvswitch.org/pipermail/discuss/2015-May/017687.html Signed-off-by: Babu Shanmugam <bschanmu@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ipfix: Support tunnel information for Flow IPFIX.Benli Ye2016-06-172-80/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to export tunnel information for flow-based IPFIX. The original steps to configure flow level IPFIX: 1) Create a new record in Flow_Sample_Collector_Set table: 'ovs-vsctl -- create Flow_Sample_Collector_Set id=1 bridge="Bridge UUID"' 2) Add IPFIX configuration which is referred by corresponding row in Flow_Sample_Collector_Set table: 'ovs-vsctl -- set Flow_Sample_Collector_Set "Flow_Sample_Collector_Set UUID" ipfix=@i -- --id=@i create IPFIX targets=\"IP:4739\" obs_domain_id=123 obs_point_id=456 cache_active_timeout=60 cache_max_flows=13' 3) Add sample action to the flows: 'ovs-ofctl add-flow mybridge in_port=1, actions=sample'('probability=65535,collector_set_id=1, obs_domain_id=123,obs_point_id=456')',output:3' NXAST_SAMPLE action was used in step 3. In order to support exporting tunnel information, the NXAST_SAMPLE2 action was added and with NXAST_SAMPLE2 action in this patch, the step 3 should be configured like below: 'ovs-ofctl add-flow mybridge in_port=1, actions=sample'('probability=65535,collector_set_id=1,obs_domain_id=123, obs_point_id=456,sampling_port=3')',output:3' 'sampling_port' can be equal to ingress port or one of egress ports. If sampling port is equal to output port and the output port is a tunnel port, OVS_USERSPACE_ATTR_EGRESS_TUN_PORT will be set in the datapath flow sample action. When flow sample action upcall happens, tunnel information will be retrieved from the datapath and then IPFIX can export egress tunnel port information. If samping_port=65535 (OFPP_NONE), flow-based IPFIX will keep the same behavior as before. This patch mainly do three tasks: 1) Add a new flow sample action NXAST_SAMPLE2 to support exporting tunnel information. NXAST_SAMPLE2 action has a new added field 'sampling_port'. 2) Use 'other_configure: enable-tunnel-sampling' to enable or disable exporting tunnel information. 3) If 'sampling_port' is equal to output port and output port is a tunnel port, the translation of OpenFlow "sample" action should first emit set(tunnel(...)), then the sample action itself. It makes sure the egress tunnel information can be sampled. 4) Add a test of flow-based IPFIX for tunnel set. How to test flow-based IPFIX: 1) Setup a test environment with two Linux host with Docker supported 2) Create a Docker container and a GRE tunnel port on each host 3) Use ovs-docker to add the container on the bridge 4) Listen on port 4739 on the collector machine and use wireshark to filter 'cflow' packets. 5) Configure flow-based IPFIX: - 'ovs-vsctl -- create Flow_Sample_Collector_Set id=1 bridge="Bridge UUID"' - 'ovs-vsctl -- set Flow_Sample_Collector_Set "Flow_Sample_Collector_Set UUID" ipfix=@i -- --id=@i create IPFIX \ targets=\"IP:4739\" cache_active_timeout=60 cache_max_flows=13 \ other_config:enable-tunnel-sampling=true' - 'ovs-ofctl add-flow mybridge in_port=1, actions=sample'('probability=65535,collector_set_id=1,obs_domain_id=123, obs_point_id=456,sampling_port=3')',output:3' Note: The in-port is container port. The output port and sampling_port are both open flow port and the output port is a GRE tunnel port. 6) Ping from the container whose host enabled flow-based IPFIX. 7) Get the IPFIX template pakcets and IPFIX information packets. Signed-off-by: Benli Ye <daniely@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tunnels: Update schema documentation related to tunnels.Jesse Gross2016-06-071-12/+12
| | | | | | | | As both OVS and tunnel protocols themselves have evolved, some changes have caused the documentation to drift from current reality. Signed-off-by: Jesse Gross <jesse@kernel.org> Acked-by: Ben Pfaff <blp@ovn.org>
* vswitchd: Add --dummy-numa command line option.Daniele Di Proietto2016-06-071-0/+6
| | | | | | | | | | | This option is used to initialize the ovs_numa module with a fake configuration and to avoid pthread_setaffinity_np() calls. It will be useful to test dpif-netdev with pmd threads. Since it is only used for testing it is not documented in the man pages. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
* vswitch.xml: Document interface name length restrictions.Ben Pfaff2016-06-031-12/+47
| | | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* netdev-dpdk.c: Add ingress-policing functionality.Ian Stokes2016-05-241-2/+2
| | | | | | | | | | | | | | | | | This patch provides the modifications required in netdev-dpdk.c and vswitch.xml to enable ingress policing for DPDK interfaces. This patch implements the necessary netdev functions to netdev-dpdk.c as well as various helper functions required for ingress policing. The vswitch.xml has been modified to explain the expected parameters and behaviour when using ingress policing. The INSTALL.DPDK.md guide has been modified to provide an example configuration of ingress policing. Signed-off-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovs-thread: Do not quiesce in ovs_mutex_cond_wait().Daniele Di Proietto2016-05-231-0/+6
| | | | | | | | | | | | | | | ovs_mutex_cond_wait() is used in many functions in dpif-netdev to synchronize with pmd threads, but we can't guarantee that the callers do not hold RCU references, so it's better to avoid quiescing. In system_stats_thread_func() the code relied on ovs_mutex_cond_wait() to introduce a quiescent state, so explicit calls to ovsrcu_quiesce_start() and ovsrcu_quiesce_end() are added there. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Tested-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ben Pfaff <blp@ovn.org>
* Add support for extended netdev statistics based on RFC 2819.mweglicx2016-05-061-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of new statistics extension for DPDK ports: - Add new counters definition to netdev struct and open flow, based on RFC2819. - Initialize netdev statistics as "filtered out" before passing it to particular netdev implementation (because of that change, statistics which are not collected are reported as filtered out, and some unit tests were modified in this respect). - New statistics are retrieved using experimenter code and are printed as a result to ofctl dump-ports. - New counters are available for OpenFlow 1.4+. - Add new vendor id: INTEL_VENDOR_ID. - New statistics are printed to output via ofctl only if those are present in reply message. - Add new file header: include/openflow/intel-ext.h which contains new statistics definition. - Extended statistics are implemented only for dpdk-physical and dpdk-vhost port types. - Dpdk-physical implementation uses xstats to collect statistics. - Dpdk-vhost implements only part of statistics (RX packet sized based counters). Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> [blp@ovn.org made software devices more consistent] Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: Allow arbitrary eal argumentsAaron Conole2016-04-291-0/+11
| | | | | | | | | | | | | | | | | | | A previous change moved some commonly used arguments from commandline to the database, and with it the ability to pass arbitrary arguments to EAL. This change allows arbitrary eal arguments to be provided via a new db entry 'other_config:dpdk-extra' which will tokenize the string and add it to the argument list. The only argument which will not be supported with this change is '--no-huge', which appears to break the system in other ways. Signed-off-by: Aaron Conole <aconole@redhat.com> Tested-by: Sean K Mooney <sean.k.mooney@intel.com> Tested-by: RobertX Wojciechowicz <robertx.wojciechowicz@intel.com> Tested-by: Kevin Traynor <kevin.traynor@intel.com> Acked-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: Kevin Traynor <kevin.traynor@intel.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Restrict vhost_sock_dirAaron Conole2016-04-291-1/+3
| | | | | | | | | | | | Since the vhost-user sockets directory now comes from the database, it is possible for any user with database access to program an arbitrary filesystem location for the sockets directory. This could result in unprivileged users creating or deleting arbitrary filesystem files by using specially crafted names. To prevent this, 'vhost-sock-dir' is now relative to ovs_rundir() and must not contain "..". Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Convert initialization from cmdline to dbAaron Conole2016-04-294-25/+121
| | | | | | | | | | | | | | | | Existing DPDK integration is provided by use of command line options which must be split out and passed to librte in a special manner. However, this forces any configuration to be passed by way of a special DPDK flag, and interferes with ovs+dpdk packaging solutions. This commit delays dpdk initialization until after the OVS database connection is established, at which point ovs initializes librte. It pulls all of the config data from the OVS database, and assembles a new argv/argc pair to be passed along. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Kevin Traynor <kevin.traynor@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* Remove "VLAN splinters" feature.Pravin B Shelar2016-04-272-407/+4
| | | | | | | | | | | The "VLAN splinters" feature works around buggy device drivers in old Linux versions. But support for the old kernel is dropped, So now all supported kernel vlan drivers should be working fine with OVS kernel datapath. Following patch removes this deprecated feature. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* netdev-linux: Fix ingress policing burst rate configuration via tcMiguel Angel Ajo2016-04-211-2/+2
| | | | | | | | | | | | | | | | The tc_police structure was filled with a value calculated in bits instead of bytes while bytes were expected. This led the setting of an x8 higher burst value. Documentation and defaults have been corrected accordingly to minimize nuisances on users sticking to the defaults. The suggested burst value is now 80% of policing rate to make sure TCP works correctly. Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Tested-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Add skeleton for OF1.6 support.Ben Pfaff2016-04-182-5/+7
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* vswitch.xml: OpenFlow 1.5 has been released.Ben Pfaff2016-04-181-10/+2
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* Move lib/ofp-print.h to include/openvswitch directoryBen Warren2016-04-141-11/+11
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-util.h to include/openvswitch directoryBen Warren2016-04-141-1/+1
| | | | | | | | This commit also adds several #include directives in source files in order to make the 'ofp-util.h' move possible Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/meta-flow.h to include/openvswitch directoryBen Warren2016-04-141-1/+1
| | | | | | | | | This commit also moves some bitmap macros into public header files and adds some #include directives in soure files in order to make the 'meta-flow.h' move possible. Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofpbuf.h to include/openvswitch directoryBen Warren2016-03-302-2/+2
| | | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Rename all functions in list.h with ovs_ prefix.Ben Warren2016-03-301-22/+22
| | | | | | | This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Remove lib/list.h completely.Ben Warren2016-03-301-1/+1
| | | | | | | | All code is now in include/openvswitch/list.h. Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-ctl: Store hostname as an external-id.Russell Bryant2016-03-241-0/+4
| | | | | | | | | | | | | | Update ovs-ctl to store the system hostname as an external-id, similar to the system-id. This is largely for convenience. ovn-controller will make use of it in a future commit. Someone in the OpenDaylight community requested the same thing in a discussion earlier this week. While we're at it, set external-ids:hostname in ovs-sandbox as well. Suggested-by: Justin Pettit <jpettit@ovn.org> Suggested-at: http://openvswitch.org/pipermail/dev/2016-March/068225.html Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* tunneling: Enable IPv6 tuneling.Pravin B Shelar2016-03-241-19/+20
| | | | | | | | | | | | There is check to disable IPv6 tunneling. Following patch removes it and reintroduces the tunneling automake tests. This reverts mostly commit 250bd94d1e500a89c76cac944e660bd9c07ac364. There are couple of new autotests and updated documentation related to ipv6 tunneling added in this patch. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* tunneling: Handle multiple ip address for given device.Pravin B Shelar2016-03-241-2/+1
| | | | | | | | | | | | Device can have multiple IP address but netdev_get_in4/6() returns only one configured IPv6 address. Following patch fixes it. OVS router is also updated to return source ip address for given destination, This is required when interface has multiple IP address configured. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* bridge: Dump configurable QoS types.Ian Stokes2016-03-222-0/+44
| | | | | | | | | | This commit adds a new command 'qos/show-types' for use with appctl. This allows a user to query the types of QoS which are configurable via Open vSwitch on a given interface. Signed-off-by: Ian Stokes <ian.stokes@intel.com> [blp@ovn.org made style and message changes] Signed-off-by: Ben Pfaff <blp@ovn.org>
* bridge: Fix qos_unixctl_show bug.Ian Stokes2016-03-221-16/+22
| | | | | | | | | | | | | | | netdev_get_qos returns a value to indicate if an error has occurred while attempting to query the QoS configuration of an interface. If an error does occur the pointer argument passed to it will be set to null before returning. Currently the vswitch will segfault if this occurs as qos_unixctl_show will attempt to access the pointer directly after it calls netdev_get_qos. Avoid this by adding a check for the return value and flagging an appropriate error message to appctl. Signed-off-by: Ian Stokes <ian.stokes@intel.com> [blp@ovn.org changed details of error report] Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/dynamic-string.h to include/openvswitch directoryBen Warren2016-03-193-3/+3
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev_dpdk.c: Add QoS functionality.Ian Stokes2016-03-021-0/+47
| | | | | | | | | | | | | | | | | | | | | | | This patch provides the modifications required in netdev-dpdk.c and vswitch.xml to allow for a DPDK user space QoS algorithm. This patch adds a QoS configuration structure for netdev-dpdk and expected QoS operations 'dpdk_qos_ops'. Various helper functions are also supplied. Also included are the modifications required for vswitch.xml to allow a new QoS implementation for netdev-dpdk devices. This includes a new QoS type `egress-policer` as well as its expected QoS table entries. The QoS functionality implemented for DPDK devices is `egress-policer`. This can be used to drop egress packets at a configurable rate. The INSTALL.DPDK.md guide has also been modified to provide an example configuration of `egress-policer` QoS. Signed-off-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovsdb-server: Refactoring and clean up remote status reporting.Andy Zhou2016-02-281-13/+27
| | | | | | | | | | | | When reporting remote status, A listening remote will randomly pick a session and report its session status. This does not seem to make much sense. It is probably better to leave those fields untouched. Update ovs-vswitchd.conf.db(5) to match the change in implementation. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovsdb: fix a typo in ovs-vswitchd.conf.db(5).Andy Zhou2016-02-281-1/+1
| | | | | | Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* dpif-netdev: Add dpif-netdev/pmd-rxq-show appctl command.Ilya Maximets2016-02-221-0/+3
| | | | | | | | | | | | | This command can be used to check the port/rxq assignment to pmd threads. For each pmd thread of the datapath shows list of queue-ids with port names. Additionally log message from pmd_thread_main() extended with queue-id, and type of this message changed from INFO to DBG. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovs-vswitchd: Preserve datapath ports across graceful shutdown.Ben Pfaff2016-02-051-7/+7
| | | | | | | | | | | | | | | | | | | Until now, asking ovs-vswitchd to shut down gracefully, e.g. with "ovs-appctl exit", would cause it to first remove all the ports from kernel-based datapaths. This has the unfortunate side effect that IP addresses on any removed "internal" ports are lost, even if the ports are added again when ovs-vswitchd is restarted. This is long-standing behavior, but it only became important when the OVS control scripts were changed to try to do graceful shutdown first instead of using a signal. This commit changes graceful shutdown so that it leaves ports in the datapath, fixing the problem. Fixes: 9b5422a98f8 (ovs-lib: Try to call exit before killing.) Reported-by: Edgar Cantu <eocantu@us.ibm.com> Reported-at: http://openvswitch.org/pipermail/discuss/2016-January/020024.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Gurucharan Shetty <guru@ovn.org>
* dpif-netdev: Allow different numbers of rx queues for different ports.Ilya Maximets2016-02-042-11/+15
| | | | | | | | | | | | | | | | | | | Currently, all of the PMD netdevs can only have the same number of rx queues, which is specified in other_config:n-dpdk-rxqs. Fix that by introducing of new option for PMD interfaces: 'n_rxq', which specifies the maximum number of rx queues to be created for this interface. Example: ovs-vsctl set Interface dpdk0 options:n_rxq=8 Old 'other_config:n-dpdk-rxqs' deleted. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* bridge: Do not add bridges with '/' in name.Daniele Di Proietto2016-02-031-2/+3
| | | | | | | | | | | | | | | This effectively stops vswitchd from creating bridges with '/' in the name. OVS used to print a warning but the bridge was created anyway. This restriction is implemented because the bridge name is part of a filesystem path. This check is no substitute for Mandatory Access Control, but it certainly helps to catch the error early. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> [blp@ovn.org added a test] Acked-by: Ben Pfaff <blp@ovn.org>
* bridge: Also prohibit \ in bridge names.Ben Pfaff2016-02-032-6/+15
| | | | | | | | | This is only necessary for Windows but it's no great loss elsewhere. Also, document the restriction on bridge names. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* Use ip_parse() and ipv6_parse() and variants in more places.Ben Pfaff2015-12-151-4/+3
| | | | | | | | | | | This saves some code and improves clarity, in my opinion. Some of these changes just change an inet_pton() call into a similar ip_parse() or ipv6_parse() call. In those cases the benefit is better type safety, since inet_pton()'s output parameter is type "void *". Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* packets: New macro ETH_ADDR_STRLEN.Ben Pfaff2015-12-151-2/+3
| | | | | | | An upcoming commit will introduce another user. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* bfd: improve ovs-vswitchd.conf.db(5) manpageAndy Zhou2015-11-031-6/+6
| | | | | | | | | Use the wording from RFC 5880 to describe the "diagnostic" and "remote_diagnostic" fields. Reported-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* vswitch.xml: Add caveat to flow-limit.Joe Stringer2015-10-151-1/+2
| | | | | | | This option should only be tweaked by developers investigating the behaviour of flow caching, so recommend that this option is not used. Signed-off-by: Joe Stringer <joestringer@nicira.com>
* vswitch.xml: Update docs for max-idle.Joe Stringer2015-10-151-0/+14
| | | | | | | | | | | | | When this configuration parameter was initially introduced into the database, the documentation was not updated to describe where it resides. Add the documentation, with the caveat that in most situations, there is no need to tweak this option and it is primarily present for the benefit of developers working on flow caching. Fixes: 72310b041cfa ("upcall: Configure datapath max-idle through ovs-vsctl.") Reported-by: Hadar Hen Zion <hadarh@dev.mellanox.co.il> Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vswitch.xml: Untabify and reindent.Ben Pfaff2015-10-131-338/+346
| | | | | | | This is a large patch but it is entirely whitespace changes. Suggested-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* bridge: Coding style fix.Ben Pfaff2015-10-121-1/+2
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* automake: Consolidate schema checksum check.Gurucharan Shetty2015-10-021-9/+1
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib/daemon: support --user option for all OVS daemonAndy Zhou2015-09-301-1/+1
| | | | | | | | | | OVS daemons can now support --user option to run as a non-root user with less privileges. See the manpage patch for more descriptions. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>