summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tunnel, tests: Sort flow output in ERSPAN v1/v2 metadataAlin Gabriel Serdean2018-08-221-2/+1
| | | | | | | | | | | | | Sort the flows by input port in the test: tunnel.at:512: testing tunnel - ERSPAN v1/v2 metadata ... This tests fails on Windows due to the hash function sensitivity described in: https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/350685.html Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* tests: Fix hash function dependencies in "tunnel - ERSPAN v1/v2 metadata".Ben Pfaff2018-08-211-22/+31
| | | | | | | | | | | | | | | | | | | This test only worked if each OpenFlow port was assigned a particular datapath port number: p1 to port 3, p2 to port 2, p3 and p4 to port 1. This happened consistently on little-endian architectures because of the use of a particular hash function, but on big-endian architectures it failed because the hash function was different. This commit fixes the problem by adding the non-dummy ports separately. (Dummy ports try to take the datapath port number corresponding to their name, when it is available.) This does result in swapping a couple of datapaths port numbers, so that p1 has port 1, p2 has port 2, and the erspan ports have port 3, hence the size of the patch. Reported-by: James Page <james.page@canonical.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/351382.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* ovn-northd: Support learning neighbor from ARP request.Han Zhou2018-08-211-26/+219
| | | | | | | | | | Current LR dynamic ARP learning support only ARP responses. If a IP-MAC binding is learned, it will not get updated even if a host send a GARP *request* to inform the new binding. This patch supports learning neighbor changes from ARP requests, including GARP requests. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-northd: LR respond ARP from valid subnet only.Han Zhou2018-08-211-6/+17
| | | | | | | | | | | Currently ovn LR datapath responds ARP requests even if the ARP requestor's src IP doesn't belong to the LR port's subnets. This may generate unnecessary ARP responses and there could also be security concerns. This patch restricts the ARP response only if the requestor's IP matches the LR port's subnets. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: Add DHCP support for option 252.Mark Michelson2018-08-212-3/+4
| | | | | | | | This adds DHCP support for web proxy auto detection. Signed-off-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Numan Siddique <nusiddiq@redhat.com>
* ovsdb-idl: Fix recently introduced Python 3 tests.Ben Pfaff2018-08-181-2/+2
| | | | | | | | | CC: Numan Siddique <nusiddiq@redhat.com> Fixes: c1aa16d191d2 ("ovs python: ovs.stream.open_block() returns success even if the remote is unreachable") Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/351311.html Reported-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* ovsdb-client: Make "wait" command logging more sensible.Ben Pfaff2018-08-174-5/+11
| | | | | | | | | | | | | | | | The "wait" command in ovsdb-client (which was introduced as part of the clustering support) fairly often logs things that are normal for it but in other circumstances might be cause for concern, for example messages about being unable to connect to a remote. Until now, it has tried to suppress some of those itself by raising log levels. Unfortunately, in some cases this had the opposite effect because it overrode any settings on the command line, such as an attempt in ovsdb-cluster.at to suppress all logging related to the timeval module. This commit drops the special log levels from the "wait" command and puts equivalents into the tests themselves. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* system-traffic: Add conntrack per zone limit test caseYi-Hung Wei2018-08-171-0/+89
| | | | | Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Justin Pettit <jpettit@ovn.org>
* ovsdb-idl: Adjust indexes during transactions.Ben Pfaff2018-08-161-3/+14
| | | | | | | | | | | | | When transactions modified tables with indexes, the indexes were not properly updated to reflect the changes. For deleted rows, in particular, this could cause use-after-free errors. This commit fixes the problem and adds some simple test cases provided by Han Zhou that, without the fix, cause a crash. Reported-by: Han Zhou <zhouhan@gmail.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-August/047185.html Signed-off-by: Ben Pfaff <blp@ovn.org>
* checkpatch: support macro continuationBala Sankaran2018-08-161-0/+223
| | | | | | | | | | | | | Added a test to identify a macro and skip printing errors if the condition or loop is part of a macro. Additional tests are added to checkpatch testsuite that cover conditionals and loop constructs. Signed-off-by: Bala Sankaran <bsankara@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* system-traffic: Add 5 new tunnel tests that don't need native linux modulesYifeng Sun2018-08-161-0/+264
| | | | | | | | | | | | | Introduce 5 new tests that don't require native gre or erspan tunnels but sends simulated raw packets. These tests are supposed to only run for kernel version from 3.10.x to 4.15.x where compatible gre is being used by OVS kernel module. Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* system-traffic: Skip 5 tunnel tests on certain kernel versionsYifeng Sun2018-08-161-0/+5
| | | | | | | | | | Skip gre, erspan and ip6erspan related tests on kernel version from 3.10.x to 4.15.x because compatible gre is used and these tests will always fail. Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* tests: Add two m4 functions to skip tests for certain kernel versionsYifeng Sun2018-08-162-0/+38
| | | | | | | | | | | | | | Some tests depend on native Linux gre modules to setup testing environments. However, some kernel versions require OVS to use compatible gre modules. In this case, these tests always fail. This patch helps to skip a test if it fails due to this reason. The new m4 functions will be used by later patches. Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* ovn-nbctl test: Add different search string for getopt BSD variantAlin Gabriel Serdean2018-08-161-1/+1
| | | | | | | | | | | | | | | | | 2714. ovn-nbctl.at:1443: testing ovn-nbctl - commands parser error paths fails due to: ovn-nbctl.at:1443: ovn-nbctl --if-exists=foo list Logical_Switch stderr: ovn-nbctl: option '--if-exists=foo' requires an argument ./ovn-nbctl.at:1443: grep 'option .* doesn'\''t allow an argument' stderr stdout: ./ovn-nbctl.at:1443: exit code was 1, expected 0 This is due to the difference between getopt BSD and GNU variant. Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* dpctl: Make opt_dpif_open() more general.Darrell Ball2018-08-151-5/+5
| | | | | | | | | | By making opt_dpif_open() more general, it can be used effectively by all potential callers and avoids trying to open potentially bogus datapaths provided by the user. Also, the error handling is improved by reducing bogus errors and having more specific real errors. Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Drop setting aliases for control utils.Ilya Maximets2018-08-151-41/+0
| | | | | | | Not needed anymore. 'OVS_CTL_TIMEOUT' env used instead. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Use environment variable for default timeout.Ilya Maximets2018-08-154-6/+11
| | | | | | | | | | | Introduce new 'OVS_CTL_TIMEOUT' environment variable that, if set, will be used as a default timeout for OVS control utilities. Setting it in 'atlocal.in' will cover all the hangs inside the testsuite, even when utils called in a subshell. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* utilities: Fix and unify parsing of timeout option.Ilya Maximets2018-08-151-5/+3
| | | | | | | | | | | | | | Parsing of the '--timeout' option implemented differently for every single control utility and, which is more important, highly inaccurate. In most cases unsigned result of 'strtoul' stored in signed variable. Parsing failures are not tracked. 'ovs-appctl' even uses just 'atoi' without any checking of the argument or result. This patch unifies the parsing by using 'str_to_uint'. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* test-unixctl.py: Don't suppress exceptions.Ben Pfaff2018-08-151-9/+1
| | | | | | | | | | | | | | A user reported a failure of test 2364 "vlog - RFC5424 facility - Python2" with an exit code that says that the test-unixctl process died from an uncaught exception. Unfortunately the exception didn't show up in the log. This commit should make the exception show up (it deletes some boilerplate we use in our Python-based daemons to make them restart themselves on failure, which isn't needed or appropriate for a test script). Reported-by: Sanket Sudake <sanket@infracloud.io> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-May/046840.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Numan Siddique <nusiddiq@redhat.com>
* python jsonrpc: Allow jsonrpc_session to have more than one remote.Numan Siddique2018-08-142-3/+64
| | | | | | | | | | | | | | Python IDL implementation doesn't have the support to connect to the cluster dbs. This patch adds this support. We are still missing the support in python idl class to connect to the cluster master. That support will be added in an upcoming patch. This patch is similar to the commit 8cf6bbb184 which added multiple remote support in the C jsonrpc implementation. Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs python: ovs.stream.open_block() returns success even if the remote is ↵Numan Siddique2018-08-143-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unreachable The python function ovs.socket_util.check_connection_completion() uses select() (provided by python) to monitor the socket file descriptor. The select() returns 1 when the file descriptor becomes ready. For error cases like - 111 (Connection refused) and 113 (No route to host) (POLLERR), ovs.poller._SelectSelect.poll() expects the exceptfds list to be set by select(). But that is not the case. As per the select() man page, writefds list will be set for POLLERR. Please see "Correspondence between select() and poll() notifications" section of select(2) man page. Because of this behavior, ovs.socket_util.check_connection_completion() returns success even if the remote is unreachable or not listening on the port. This patch fixes this issue by using poll() to check the connection status similar to the C implementation of check_connection_completion(). A new function 'get_system_poll() is added in ovs/poller.py which returns the select.poll() object. If select.poll is monkey patched by eventlet/gevent, it gets the original select.poll() and returns it. The test cases added in this patch fails without the fix. Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* ovsdb-idl.c: Fix IDL index problem when rows are updated.Han Zhou2018-08-132-12/+44
| | | | | | | | | | | In current IDL index code it doesn't updated index when handling "update2" messages, which is the default case. The consequence is that when a row is updated, the index is not updated accordingly, and even worse, it causes crash when calling ovsdb_idl_destroy(). It can be easily reproduced by the test cases added in this patch. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* test-ovsdb.c: Fix wrong indent.Han Zhou2018-08-131-82/+82
| | | | | Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* checkpatch: Improve accuracy and specificity of sign-off checking.Ben Pfaff2018-08-133-0/+160
| | | | | | | | This also makes a start at a testsuite for checkpatch. CC: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@bytheb.org>
* tests: Use the default key length when generating RSA keysTimothy Redaelli2018-08-102-6/+6
| | | | | | | | | This commit removes the explicit set of 1024-bit RSA keys when ovs-pki is launched and so the default (2048-bit) is used. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
* ofproto-dpif-xlate: Improve log message.Ben Pfaff2018-08-091-1/+1
| | | | | | | | | Until now, the bridge name was at the end of the log message, after the flow, which made it easy to miss. This commit moves it before the flow where it is easier to spot. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org>
* tests: Don't log to syslog during tests.Ben Pfaff2018-08-091-0/+4
| | | | | | | | Until now, "make check" generated a huge amount of output to syslog. This commit suppresses it. Acked-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Ignore recirc_id in "MPLS xlate action" test.Ben Pfaff2018-08-071-3/+6
| | | | | | | | | | | When I run this test with DPDK enabled, it fails because it ends up using a different recirculation ID when DPDK is not enabled. I guess that's a little weird but the recirculation IDs are not supposed to be significant, so this change makes the test ignore it. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Aaron Conole <aconole@redhat.com>
* ovn-nbctl: Make daemon mode more transparent.Ben Pfaff2018-08-071-158/+88
| | | | | | | | | | | | | This makes ovn-nbctl transparently use daemon mode if an appropriate environment variable is set. It also transforms ovn-nbctl.at so that it runs each ovn-nbctl test in "direct" mode and in daemon mode. It uses a combination of m4 macros and shell functions to keep from expanding the generated testsuite more than necessary. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* unixctl: Make path to unixctl_server socket available to the client.Ben Pfaff2018-08-071-2/+2
| | | | | | Acked-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Test for ovs-ofctl snoop commandAshish Varma2018-08-061-0/+27
| | | | | | | | Added test for snoop command to check for the initial handshake messages when a bridge connects to a controller via 'unix' connection method. Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb-cluster: Add comment to test.Ben Pfaff2018-08-031-0/+1
| | | | | | | I thought I had added this while revising a previous patch but oops. Fixes: 7ee9c6e03416 ("tests: Fix cluster torture test.") Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Suppress "long poll interval" messages for ovsdb-cluster tests.Ben Pfaff2018-08-031-2/+2
| | | | | | | | The cluster torture tests can provoke these messages, especially if run in parallel or with valgrind, and they shouldn't cause a failure. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* tests: Fix use of variable in cluster torture test.Ben Pfaff2018-08-031-1/+1
| | | | | | | | | remove_server() is supposed to deal with its argument $i, not $victim. In this case they happen to have the same value so the difference is moot, but it's still best to be clear. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* tests: Fix cluster torture test.Ben Pfaff2018-08-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous commit to improve timing also caused the cluster torture test to be skipped (unless it failed early). This is related to the shell "while" loop's use of a variable $phase to indicate how far it got in the test procedure. A very fast machine, or one on which the races went just the right way, might finish the test before all the torture properly starts, so the code is designed to just skip the test if that happens. However, a commit to improve the accuracy ended up skipping it all the time. Prior to the timing commit, the loop looked something like this: phase=0 while :; do ...things that eventually increment $phase to 2... done AT_SKIP_IF([test $phase != 2]) This works fine. The timing commit changed the "while :" to "(...something...) | while read". This looks innocuous but it actually causes everything inside the "while" loop to run in a subshell. Thus, the increments to $phase are not visible after the loop ends, and the test always gets skipped. This commit fixes the problem by storing the phase in a file instead of a shell variable. Fixes: 0f03ae3754ec ("ovsdb: Improve timing in cluster torture test.") Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* ovn: Add '--restart' flag to ovn-controller exit.Mark Michelson2018-08-021-0/+186
| | | | | | | | | | | | | | | | | When "--restart" is passed to ovn-controller's exit command, then database entries are not removed for this hypervisor. This means that * Encaps * Chassis * OVS ports are not removed. The reasoning is that if the intent is to restart ovn-controller, this will allow for tunnels to remain up and allow for traffic not to be interrupted during the restart. When ovn-controller is started again, it picks back up from where it was. Signed-off-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: Allow for automatic dynamic updates of IPAMMark Michelson2018-08-021-26/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OVN offers a method of IP address management that allows for an IPv4 subnet or IPv6 prefix to be specified on a logical switch. Then by specifying a switch port's address as "dynamic" or "<mac address> dynamic", OVN will automatically assign addresses to the switch port. While this works great for initial assignment of addresses, addresses do not automatically adjust when changes are made to the switch's configuration. For instance: * If the subnet, ipv6_prefix, or exclude_ips for a logical switch changes, the affected switch ports are not updated. * If a switch port with a static IP address is added to the switch, and that address conflicts with a dynamically assigned IP address, the dynamic address is not updated. * If a MAC address switched from being statically assigned to dynamically assigned, the MAC address would not be updated. * If a statically assigned MAC address changed, then the IPv6 address would not be updated. This patch solves all of the above issues by changing the algorithm for IPAM assignment. There are essentially three steps. 1) While joining logical ports, all statically-assigned addresses (i.e. any ports without "dynamic" addresses) have their addresses registered to IPAM. This gives them top priority. 2) All logical ports with dynamic addresses are inspected. Any changes that must be made to the addresses are collected to be made later. Any addresses that do not require change are registered to IPAM. This allows for previously assigned dynamic addresses to be kept. 3) All gathered changes are enacted. The change contains new tests that ensure that dynamic addresses are updated when appropriate. This patch also alters some existing IPAM tests. Those tests assumed that dynamic addresses would not be updated automatically, so those tests either had to be altered or removed. Signed-off-by: Mark Michelson <mmichels@redhat.com> Acked-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: Fix typos in "ovn -- Address Set generation..." test.Ben Pfaff2018-08-021-2/+2
| | | | | | | | | These caused the test to fail. CC: Jakub Sitnicki <jkbs@redhat.com> Fixes: 984c7d5ea8fe ("ovn-northd: Propagate dynamic addresses to port group address sets.") Signed-off-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Simon Horman <simon.horman@netronome.com>
* Introduce ovs-appctl command to monitor HVs sb connection statusLorenzo Bianconi2018-07-311-0/+34
| | | | | | | | | | | Add 'connection-status' command to ovs-appctl utility in order to check if a given chassis is currently connected to SB db Acked-by: Mark Michelson <mmichels@redhat.com> Co-authored-by: aginwala <aginwala@ebay.com> Signed-off-by: aginwala <aginwala@ebay.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-northd: Propagate dynamic addresses to port group address sets.Jakub Sitnicki2018-07-311-0/+59
| | | | | | | | | | If a logical switch port belongs to a port group and has dynamic addresses assigned, propagate the addresses to the auto-generated address sets for the port group. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Acked-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-northd: Make use of svec for storing lists of addresses.Jakub Sitnicki2018-07-311-0/+50
| | | | | | | | Get rid of what is, esentially, an open-coded version of svec. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Acked-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-nbctl: Allow referring to port groups by name.Jakub Sitnicki2018-07-311-0/+14
| | | | | | | | | Be user-friendly and allow using port group's name as its identifier in database commands. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Acked-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: Clean up log() action parsing errors.Justin Pettit2018-07-311-0/+19
| | | | | | | | This also add some OVN action parsing tests. Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* ovn: Add rate-limiting for ACL logs.Justin Pettit2018-07-301-0/+73
| | | | | Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovn: Add Meter and Meter_Band tables to the NB and SB databases.Justin Pettit2018-07-301-0/+68
| | | | | | | | | | | Add support for configuring meters through the Meter and Meter_Band tables in the Northbound database. This commit also has ovn-northd sync those tables between the Northbound and Southbound databases. Add support for configuring meters with ovn-nbctl. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* Permit to build OVS with only Python3 installedTimothy Redaelli2018-07-2412-55/+59
| | | | | | | | | | | | | | | | | | This commit renames HAVE_PYTHON to HAVE_PYTHON2 and PYTHON to PYTHON2 and adds HAVE_PYTHON and PYTHON with a different semantics: - If PYTHON environment variable is set, use it as PYTHON - If a python2 interpreter is available, PYTHON became the python2 interpreter - If a python3 interpreter is available, PYTHON became the python3 interpreter PYTHON is only used to run the python scripts needed by the build system NOTE: Since currently most of the utilities and bugtool doesn't support Python3, they're installed only if python2 is available. This will be fixed in later commits. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dpif-netdev: Add SMC cache after EMC cacheYipeng Wang2018-07-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | This patch adds a signature match cache (SMC) after exact match cache (EMC). The difference between SMC and EMC is SMC only stores a signature of a flow thus it is much more memory efficient. With same memory space, EMC can store 8k flows while SMC can store 1M flows. It is generally beneficial to turn on SMC but turn off EMC when traffic flow count is much larger than EMC size. SMC cache will map a signature to an dp_netdev_flow index in flow_table. Thus, we add two new APIs in cmap for lookup key by index and lookup index by key. For now, SMC is an experimental feature that it is turned off by default. One can turn it on using ovsdb options. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Co-authored-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Acked-by: Billy O'Mahony <billy.o.mahony@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
* tests: Add test for ovn-nbctl's command parser error paths.Jakub Sitnicki2018-07-231-0/+76
| | | | | | | Preparatory work for getting rid of ctl_fatal() in command parser. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Add test for oneline-formatted output for ovn-nbctl.Jakub Sitnicki2018-07-231-0/+21
| | | | | Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Add test for ovn-nbctl dry run mode.Jakub Sitnicki2018-07-231-0/+21
| | | | | Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>