summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ofproto-dpif-xlate: Log flow in XLATE_REPORT_ERROR.Joe Stringer2016-08-111-7/+13
| | | | | | | | | | To assist debugging pipelines when resubmit resource checks fail, print the base_flow from the translation context. This base flow can then be used from ofproto/trace to figure out which parts of the pipeline lead to this translation error. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* datapath: compat: keep skb encapsulation zero on older kernel.Pravin B Shelar2016-08-111-2/+5
| | | | | | | | | When using compat GSO there is no need to turn on skb encapsulation bit since OVS does not use any tunnel GSO functionality from the networking stack. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: vxlan: fix vxlan_notify_add_rx_port().Pravin B Shelar2016-08-111-26/+17
| | | | | | | Same as earlier patch this fixes vxlan recieve offload implementation. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: geneve: fix geneve_notify_add_rx_port()Pravin B Shelar2016-08-114-27/+41
| | | | | | | | Remove mutual exclusion between udp-gro registration and geneve receive port registration. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* ovn: make external_ids naming uniformMauricio Vásquez2016-08-112-10/+10
| | | | | | | | In some places it is called "external-ids" while in others "external_ids" is used. This commit changes it to external_ids in all of them. Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovn-controller: Remove the repeated code.nickcooper-zhangtonghao2016-08-111-1/+0
| | | | | | Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovn-controller: Combine two Logical_Flow loops into one.nickcooper-zhangtonghao2016-08-111-9/+5
| | | | | | Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovs-bugtool: Switch from MD5 to SHA-256.Ben Pfaff2016-08-111-8/+8
| | | | | | | | | | | | | | | | | | While going through a FIPS certification process we discovered that ovs-bugtool uses MD5 to identify the contents of files. FIPS doesn't allow use of the obsolete and broken MD5 algorithm, so this commit switches to SHA-256. In a way, this is a silly requirement. ovs-bugtool only uses MD5 to identify file content, mostly to ensure that the contents of the bug report have not been corrupted. MD5 is perfectly adequate for that purpose; in fact a 16-bit CRC would probably be adequate. On the other hand, there is basically no cost and no disadvantage to switching to SHA-256, so why not do it? That's why I think that this is a reasonable change. VMware-BZ: #1708786 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* netdev-dpdk: vhost: Fix double free and use after free with QoS.Ilya Maximets2016-08-101-15/+9
| | | | | | | | | | | | | | | | | | | | While using QoS with vHost interfaces 'netdev_dpdk_qos_run__()' will free mbufs while executing 'netdev_dpdk_policer_run()'. After that same mbufs will be freed at the end of '__netdev_dpdk_vhost_send()' if 'may_steal == true'. This behaviour will break mempool. Also 'netdev_dpdk_qos_run__()' will free packets even if we shouldn't do this ('may_steal == false'). This will lead to using of already freed packets by the upper layers. Fix that by copying all packets that we can't steal like it done for DPDK_DEV_ETH devices and freeing only packets not freed by QoS. Fixes: 0bf765f753fd ("netdev_dpdk.c: Add QoS functionality.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovn: Fix receive from vxlan in ovn-controller.Darrell Ball2016-08-025-23/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | The changes enable source node replication in OVN for receive from vxlan tunnels. OVN only supports source node replication mode. This is needed for ovn-controller to interoperate with hardware switches. Previously hardware vtep interaction, which uses service node replication by default for multicast/broadcast/unknown unicast traffic partially "worked" by happenstance. Because of limited vxlan encapsulation metadata, received packets were resubmitted to find the egress port(s). This is not correct for multicast, broadcast and unknown unicast traffic as traffic will get resent on the tunnel mesh. ovn-controller is changed not to send traffic received from vxlan tunnels out the tunnel mesh again.  Traffic received from vxlan tunnels is now only sent locally as intended with obvious benefits. This behavior is newly documented in ovn-architecture.7.xml. To support keeping state for receipt from a vxlan tunnel, a MFF logical flags register flag is allocated. As part of this change ovn-controller-vtep is hard-coded to set the replication mode of each logical switch to source node as OVN will only support source node replication. Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Justin Pettit <jpettit@ovn.org>
* Revert "pvector: Expose non-concurrent priority vector."Jarno Rajahalme2016-08-106-257/+182
| | | | | | | | | | | | | | | This reverts commit 8bdfe1313894047d44349fa4cf4402970865950f. I failed to see that lib/dpif-netdev.c actually needs the concurrency provided by pvector prior to this change. More specifically, when a subtable is removed, concurrent lookups may skip over another subtable swapped in to the place of the removed subtable in the vector. Since this was the only use of the non-concurrent pvector, it is cleaner to revert the whole patch. Reported-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovn-controller: Persist desired conntrack groups.Ryan Moats2016-08-108-35/+67
| | | | | | | | | | | | | With incremental processing of logical flows desired conntrack groups are not being persisted. This patch adds this capability, with the side effect of adding a ds_clone method that this capability leverages. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Reported-by: Guru Shetty <guru@ovn.org> Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076320.html Fixes: 70c7cfe ("ovn-controller: Add incremental processing to lflow_run and physical_run") Acked-by: Flavio Fernandes <flavio@flaviof.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Improved Systemd IntegrationAaron Conole2016-08-106-13/+37
| | | | | | | | | | | | | This commit builds upon some of the recent ovs-ctl changes to build a more integrated systemd setup. A new service (ovs-vswitchd) is added to track the ovs-vswitchd, and ovsdb-server service is reserved for the ovsdb-server daemon. The systemd scripts still use ovs-ctl to actually initialize the daemons. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Markos Chandras <mchandras@suse.de> Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel/ovsdb-server.service: Rename the nonetwork serviceAaron Conole2016-08-106-11/+11
| | | | | | | | | | | | | | | Currently, openvswitch.service calls out to start openvswitch-nonetwork.service. However, openvswitch-nonetwork.service will be called ovsdb-server, so that it is a bit more reflective of the dependencies. This commit does make the file a bit of a misnomer as currently the ovsdb-server SERVICE will start the ovs-vswitchd service as well. A future commit will clean this up, and change the ifup configuration in the process. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Markos Chandras <mchandras@suse.de> Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovs-vsctl: simply vsctl_parent_process_info()Andy Zhou2016-08-101-13/+3
| | | | | | | | | Use ds_get_line() instead of hand rolling it. Rearrange the logic to removes some duplication. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* netdev-vport: remove unused functionBinbin Xu2016-08-102-10/+0
| | | | | | | | The function netdev_vport_get_dpif_port_strdup is not used anymore. So we can remove it now. Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-ctl: support populating system info from /etc/os-releasePanu Matilainen2016-08-101-0/+3
| | | | | | | | | | | | On systemd-era hosts, OS name and version are available in sanitized format from /etc/os-release(5) without resorting to calling (and thus requiring) lsb_release. Support populating system-type and system-version from /etc/os-release, prefer it over lsb_release, but permit overriding via the OVS-specific system-type.conf and system-version.conf. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1350550 Signed-off-by: Panu Matilainen <pmatilai@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: Avoid reconfiguration on reconnection of same vhost device.Ilya Maximets2016-08-091-8/+11
| | | | | | | | | | | | | | | | | | Binding/unbinding of virtio driver inside VM leads to reconfiguration of PMD threads. This behaviour may be abused by executing bind/unbind in an infinite loop to break normal networking on all ports attached to the same instance of Open vSwitch. Fix that by avoiding reconfiguration if it's not necessary. Number of queues will not be decreased to 1 on device disconnection but it's not very important in comparison with possible DOS attack from the inside of guest OS. Fixes: 81acebdaaf27 ("netdev-dpdk: Obtain number of queues for vhost ports from attached virtio.") Reported-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Fix egress policer error detection bug.Ian Stokes2016-08-091-2/+27
| | | | | | | | | | | | | | | When egress policer is set as a QoS type for a port, an error may occur during setup if incorrect parameters are used for the rte_meter. If this occurs the egress policer construct and set functions should free any allocated memory relevant to the policer and set the QoS configuration pointer to null. The netdev_dpdk_set_qos function should check the error value returned for any QoS construct/set calls with an assertion to avoid segfault. Also this commit modifies egress_policer_qos_set() to correctly lock the QoS spinlock while the egress policer configuration is updated to avoid segfault. Signed-off-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Fix dead initialization reported by clang.Bhanuprakash Bodireddy2016-08-091-1/+1
| | | | | | | | Clang reports that value stored to 'tok' during initialization is never read. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* INSTALL.DPDK: Update documentation for DPDK 16.07 supportBhanuprakash Bodireddy2016-08-091-8/+8
| | | | | | | | | | | | | Replace 'dpdk_nic_bind.py' references with 'dpdk-devbind.py'. The script name is changed in DPDK 16.07 as the script can be used also on crypto devices along with NICs. Update the command for setting packet forwarding mode in 'testpmd' app from 'set fwd mac_retry' to 'set fwd mac retry'. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Acked-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* INSTALL.DPDK-ADVANCED: Add vhost multiqueue loopback testcase.Bhanuprakash Bodireddy2016-08-091-0/+86
| | | | | | | | Add steps for loopback test using vhost-user configured with multiqueue doing packet forwarding in kernel. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: backport: net: vxlan: lwt: Fix vxlan local traffic.Pravin B Shelar2016-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: commit bbec7802c6948c8626b71a4fe31283cb4691c358 Author: pravin shelar <pshelar@ovn.org> Date: Fri Aug 5 17:45:37 2016 -0700 net: vxlan: lwt: Fix vxlan local traffic. vxlan driver has bypass for local vxlan traffic, but that depends on information about all VNIs on local system in vxlan driver. This is not available in case of LWT. Therefore following patch disable encap bypass for LWT vxlan traffic. Fixes: ee122c79d42 ("vxlan: Flow based tunneling"). Reported-by: Jakub Libosvar <jlibosva@redhat.com> Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: backport: net: vxlan: lwt: Use source ip address during route lookup.Pravin B Shelar2016-08-091-12/+18
| | | | | | | | | | | | | | | | | | | | | | | Upstream commit: commit 272d96a5ab10662691b4ec90c4a66fdbf30ea7ba Author: pravin shelar <pshelar@ovn.org> Date: Fri Aug 5 17:45:36 2016 -0700 net: vxlan: lwt: Use source ip address during route lookup. LWT user can specify destination as well as source ip address for given tunnel endpoint. But vxlan is ignoring given source ip address. Following patch uses both ip address to route the tunnel packet. This consistent with other LWT implementations, like GENEVE and GRE. Fixes: ee122c79d42 ("vxlan: Flow based tunneling"). Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* netdev-dpdk: Fix deadlock in destroy_device().Daniele Di Proietto2016-08-091-10/+24
| | | | | | | | | | | | | | | | | | | | netdev_dpdk_vhost_destruct() calls rte_vhost_driver_unregister(), which can trigger the destroy_device() callback. destroy_device() will try to take two mutexes already held by netdev_dpdk_vhost_destruct(), causing a deadlock. This problem can be solved by dropping the mutexes before calling rte_vhost_driver_unregister(). The netdev_dpdk_vhost_destruct() and construct() call are already serialized by netdev_mutex. This commit also makes clear that dev->vhost_id is constant and can be accessed without taking any mutexes in the lifetime of the devices. Fixes: 8d38823bdf8b("netdev-dpdk: fix memory leak") Reported-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
* ofproto: Consider datapath_type when looking for internal ports.Daniele Di Proietto2016-08-091-7/+9
| | | | | | | | | | | | | | | | Interfaces with type "internal" end up having a netdev with type "tap" in the dpif-netdev datapath, so a strcmp will fail to match internal interfaces. We can translate the types with ofproto_port_open_type() before calling strcmp to fix this. This fixes a minor issue where internal interfaces are considered non-internal in the userspace datapath for the purpose of adjusting the MTU. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
* ovs-vsctl: Change log level of vsctl_parent_process_infoKyle Mestery2016-08-081-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While running the ovn-scale-test [1] port-binding tests [2], I notice a continual stream of messages such as this: 2016-08-04 13:05:28.705 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_cikzNO to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 2016-08-04 13:05:28.712 547 INFO paramiko.transport [-] Connected (version 2.0, client OpenSSH_6.6.1p1) 2016-08-04 13:05:28.805 547 INFO paramiko.transport [-] Authentication (publickey) successful! 2016-08-04T13:05:28Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04 13:05:29.042 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_tvovcK to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04 13:05:29.285 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_HwG7AK to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04 13:05:29.505 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_Lqbv92 to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04 13:05:29.724 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_6f8uQW to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No such file or directory) 2016-08-04 13:05:29.944 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] bind lport_0996bf_nKl2XF to sandbox-172.16.200.24 on ovn-farm-node-uat-dal09-compute-325 Tracing these down, this is due to the check in vsctl_parent_process_info(), which is verifying if the parent process can be opened. Since ovn-scale-test runs sandboxes in containers, and these are run as root, there is no /proc/0 in the container. Thus, the check fails, and the error message is printed out. It's unclear what value this log message provides, so removing it clears up this problem and is probably the best option. For the init process with pid of zero, this patch returns "init", instead of trying to read from /proc/0/cmdline, which does not exist. [1] https://github.com/openvswitch/ovn-scale-test [2] https://github.com/openvswitch/ovn-scale-test/blob/master/rally_ovs/plugins/ovs/scenarios/ovn.py#L255 Signed-off-by: Kyle Mestery <mestery@mestery.com> Acked-by: Andy Zhou <azhou@ovn.org>
* logical-fields: Beautify conntrack definitions.Ben Pfaff2016-08-082-13/+36
| | | | | | | | | | | The previous definitions, in my opinion, were ugly and also went beyond 80 columns. This also adds a test that I generated based on the previous version, to guard against regression. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovn: Use a common symbol table for ovn-controller and test-ovn.Ben Pfaff2016-08-088-269/+296
| | | | | | | | | | | Most of the differences were superficial, so it's better to reduce code duplication. This also adds a test to ensure that the OVN logical registers are built properly out of subfields. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* lflow: Correct register definitions to use subfields for overlaps.Ben Pfaff2016-08-081-5/+45
| | | | | | | | | | | | | | | | | OVN expressions need to know what fields overlap or alias one another. This is supposed to be done via subfields: if two fields overlap, then the smaller one should be defined as a subfield of the larger one. For example, reg0 should be defined as xxreg0[96..127]. The symbol table in lflow didn't do this, so it's possible for confusion to result. (I don't have evidence of this actually happening, because it would only occur in a case where the same bits of a field were referred to with different names.) This commit fixes the problem. It deserves a test, but that's somewhat difficult at this point, so it will actually happen in a future commit. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* logical-fields: Get rid of MFF_LOG_REGS in favor of something sensible.Ben Pfaff2016-08-083-27/+11
| | | | | | | | It's super-awkward to have to define a macro to use MFF_LOG_REGS; this makes more sense. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Give a subfield a direct pointer to its parent in struct expr_symbol.Ben Pfaff2016-08-082-58/+46
| | | | | | | | | | | | | | | | | | Until now, symbols that represent subfields and predicates were both implemented as the same string member, named 'expansion', inside struct expr. This makes it a little inconvenient to find the parent of a subfield for two reasons. First, one must actually parse the string, e.g. to convert "vlan.tci[13..15]" into a pointer to a struct. Second, and more importantly, to parse the string it's necessary to have access to the symbol table, which isn't always convenient to pass around. This commit avoids the problem by breaking apart subfields and predicates and giving the former a direct pointer to the parent symbol. We could do the same thing for predicates by storing a pointer to a pre-built struct expr, but so far it's not necessary. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Track writability as part of expr_symbol.Ben Pfaff2016-08-082-5/+9
| | | | | | | | | | Until now it was only possible to find out whether an expr_symbol was read/write or read-only, for subfields, by chasing down whether the eventual parent field was read/write or read-only. This commit adds a new 'rw' member that indicates directly. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Initialize 'relop' of allocated exprs in crush_and_string().Ben Pfaff2016-08-081-0/+1
| | | | | | | | | | Every relop at this point is always EXPR_R_EQ, and therefore it seems that no code actually examined it, so this doesn't appear to fix an existing bug, but some code I was working on was affected by the uninitialized member. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Refine handling of error parameter to expr_annotate().Ben Pfaff2016-08-081-2/+5
| | | | | | | | | | | | In most cases expr_annotate() set '*errorp' to NULL if it was successful, but there was one case where it did not. This corrects that and refines the comment to better explain the intended behavior. This didn't affect any existing users because all of them passed in a pointer that was already NULL. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Tolerate having no macros.Ben Pfaff2016-08-081-1/+3
| | | | | | | A null set of macros seems reasonable, so tolerate it. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* expr: Fine-tune parser error message for common typo.Ben Pfaff2016-08-082-2/+7
| | | | | | | | | | | | | | | | | | It's easy to type "=" in place of "==" in an expression but the expression parser's error message was far from clear. For multibit numeric fields, it said: Explicit `!= 0' is required for inequality test of multibit field against 0. For string fields, the parser treated such an expression as "<name> != 0" and thus it said: String field <name> is not compatible with numeric constant. This improves the error message in each case to: Syntax error at `=' expecting relational operator. which I hope to be clear. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* smap: New function smap_get_ullong().Ben Pfaff2016-08-085-188/+92
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* smap: New function smap_get_def().Ben Pfaff2016-08-088-71/+47
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovn-nbctl: Add details for common options to manpage.Ben Pfaff2016-08-085-17/+208
| | | | | | | | The new .xml files in this commit are translations to XML of the existing nroff fragments in .man files. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovn: Fix spelling errors in manpages.Ben Pfaff2016-08-082-2/+2
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ofp-actions: Factor OFPACT_PADDED_MEMBERS out into a more general form.Ben Pfaff2016-08-082-14/+22
| | | | | | | This makes it easier to reuse this idea elsewhere. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ofp-actions: Correct member name for write_actions.Ben Pfaff2016-08-081-1/+1
| | | | | | | | | | | For a variable-length action like write_actions, the member name is supposed to be the name of the variable-length array at the end of the action structure. It only makes a real difference if the beginning of the array is not 64-bit aligned, so it did not matter in this case, but it's better to get it right. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovn-sbctl: Remove unused enum.Ben Pfaff2016-08-081-1/+0
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* packets: Improve comment on eth_addr_from_string().Ben Pfaff2016-08-081-0/+3
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* flow: Comment that nw_src holds ARP SPA and nw_dst holds ARP TPA.Ben Pfaff2016-08-081-2/+2
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovsdb-idl: Wake up ovsdb_idl_loop when a transaction commits.Ben Pfaff2016-08-081-6/+3
| | | | | | | | | | | | There is a fair amount of code that defers modifying the database when a transaction cannot be created (because there is already one outstanding). This code tends to assume that the main loop will wake up again when it becomes possible again to modify the database, but the actual ovsdb_id_loop implementation only did this if the database had changed. This is too conservative a policy and may account for some failures I've seen in tests. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* ovn-nbctl: Add "sync" command to wait for previous changes to take effect.Ben Pfaff2016-08-086-11/+69
| | | | | | | | | | It's slow to add --wait to every ovn-nbctl command; only the last command needs it. But it's sometimes inconvenient to add it to the last command if it's in a loop, etc. This makes it possible to separately wait for the OVN southbound or hypervisors to catch up to the northbound. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* check-kernel: Remove '-d' from TESTSUITEFLAGS.Daniele Di Proietto2016-08-051-1/+1
| | | | | | | | | | | | The '-d' flag tells autotest to always keep the testcase output, but prevents '--recheck' from working. If a user wants to always keep the output from the tests, the '-d' flag can be passed explicitly. This is more in line with other test make target ('check', 'check-system-userspace'). CC: Andy Zhou <azhou@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Andy Zhou <azhou@ovn.org>
* system-traffic: Flush conntrack after debug ping6.Daniele Di Proietto2016-08-051-0/+4
| | | | | | | | | | | | We want to discard any state created by the initial ping6 (used to wait for an available IP address). Otherwise some weird state can show up in the connection tracking tables (such as ICMP connection from link-local addresses). Fixes: e5cf8cce2759("system-tests: Add ping through conntrack test.") Reported-by: Joe Stringer <joe@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Joe Stringer <joe@ovn.org>