summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: disable ssl for backup ovn southbound dbLance Richardson2017-06-131-1/+0
| | | | | | | | | | | | | | | Since the sandbox environment was changed to enable SSL usage for OVN_Southbound connections, the backup southbound server emits the log message "socket_util|ERR|6642: bind: Address already in use" every 2.5 seconds. Fix by configuring the backup db server to not use remote configuration from the database (the unix: socket can still be used, as was the case before SSL was enabled). Fixes: 0ced2a5c5e47 ("sandbox: use ssl for ovn-controller to sb db connection") Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* conntrack: Reset nat_info in un_nat conns.Darrell Ball2017-06-131-0/+1
| | | | | | | | | | | | | | | Un-nat conns have no nat_info as do default conns. However, un-nat conns are originally templated from the corresponding default conns and therefore need to have their nat_info explicitly nulled. This otherwise exposes a double free if conntrack_destroy() were to be used to destroy the connection tracker. This would apply to cleaning the datapath after testing. Fixes: 286de2729955 ("dpdk: Userspace Datapath: Introduce NAT Support.") Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Greg Rose <gvrose8192@gmail.com>
* redhat: make the rpm aware of the lock fileAaron Conole2017-06-131-0/+2
| | | | | | | | | | | | | | Currently, the db lockfile will cause the openvswitch directory to linger after uninstall because the rpm database isn't aware that it should be treated as part of the system. This commit informs the rpmdb properly as a 'ghost' so that when the package is uninstalled, it will be removed automatically. This means that if no extra files exist in /etc/openvswitch, the whole directory will be removed from /etc/. Acked-by: Flavio Leitner <fbl@sysclose.org> Reviewed-by: Markos Chandras <mchandra@suse.de> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* sandbox: ovn rbac support for sandbox environmentLance Richardson2017-06-131-4/+13
| | | | | | | | Enable OVN_Southbound RBAC by default in the sandbox environment, provide a new option "--no-ovn-rbac" to disable it. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* treewide: Avoid undefined behavior passing null in nonnull parameters.Lance Richardson2017-06-136-12/+40
| | | | | | | | | | Eliminate a number of instances of undefined behavior related to passing NULL in parameters having "nonnull" annotations. Found with gcc's undefined behavior sanitizer. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* hash: Remove conflicting hash_finish() prototype.Ben Pfaff2017-06-131-1/+0
| | | | | | | | | | | | | | | | | | | | | Normally, hash_finish() is declared as: static inline uint32_t hash_finish(uint32_t hash, uint32_t final) When __SSE4_2__ && __x86_64__, it is declared as: static inline uint32_t hash_finish(uint64_t hash, uint64_t final) A recent commit added an unneeded prototype in the first form, which caused an error due to the redeclaration of a different type when the second form was actually used. This removes the prototype, fixing the problem. It may not be a great idea to have two different forms for this function, but it's long standing and so I don't want to change it immediately without proper consideration. Reported-by: "Fischetti, Antonio" <antonio.fischetti@intel.com> Fixes: 67702b79d845 ("hash: New helper functions for adding words in a buffer to a hash.") Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Darrell Ball <dlu998@gmail.com>
* byte-order: Fix undefined behavior of BYTES_TO_BE32.Ben Pfaff2017-06-132-9/+14
| | | | | | | | | | | | | | | | | A left shift that would produce a result that is not representable by the type of the expression's result has "undefined behavior" according to the C language standard. Avoid this by casting values that could set the upper bit to unsigned types. Also document and convert a macro to a function. While we're at it, delete the unused macro BE16S_TO_BE32. Found via gcc's undefined behavior sanitizer. Reported-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Lance Richardson <lrichard@redhat.com>
* conntrack: Add hash_finish() to conn_key_hash().Darrell Ball2017-06-121-7/+3
| | | | | | | | | | The function conn_key_hash() is updated to include a call to hash_finish() and also to make use of a new hash abstraction - ct_endpoint_hash_add(). Fixes: a489b16854b5 ("conntrack: New userspace connection tracker.") Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* conntrack: Hash entire NAT data structure in nat_range_hash().Darrell Ball2017-06-122-21/+30
| | | | | | | | | | | | Part of the hash input for nat_range_hash() was accidentally omitted, so this fixes the problem. Also, add a missing call to hash_finish(). Fixes: 286de2729955 ("dpdk: Userspace Datapath: Introduce NAT Support.") Co-authored-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* hash: New helper functions for adding words in a buffer to a hash.Ben Pfaff2017-06-121-18/+48
| | | | | | | | | These will receive their first user (outside of hash.h) in the following commit. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* testsuite: exit gracefully if it fails.Flavio Leitner2017-06-122-1/+34
| | | | | | | | | | | | The daemon is killed leaving resources behind when a test fails. This fixes to first signal the daemon to exit gracefully. Fixes: 0f28164be02ac ("netdev-linux: make tap devices persistent") Suggested-by: Joe Stringer <joe@ovn.org> Co-authored-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* windows-datapath: Temporary workaround checksum issue with NATAlin Gabriel Serdean2017-06-121-0/+38
| | | | | | | | | | There is a known bug with NAT where checksum computation is wrong on the RX path if offload is enabled. This patch works around the problem by always computing a software checksum and should be reverted once we figure out the root cause of checksum error. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: NAT integration with conntrackYin Lin2017-06-125-85/+282
| | | | | | | | | This patch integrates NAT module with existing conntrack module. NAT action is now supported. Signed-off-by: Yin Lin <linyi@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Add NAT module in conntrackYin Lin2017-06-123-0/+474
| | | | | | Signed-off-by: Yin Lin <linyi@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Add support for NAT in conntrackAnand Kumar2017-06-123-4/+100
| | | | | | | | | | | | | Add support for parsing netlink attributes related to NAT in conntrack. Co-Authored-by: Yin Lin <linyi@vmware.com> Co-Authored-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Anand Kumar <kumaranand@vmware.com> Signed-off-by: Yin Lin <linyi@vmware.com> Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* treewide: Fix spelling of "prerequisites".Ben Pfaff2017-06-124-8/+8
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Greg Rose <gvrose8192@gmail.com>
* ofp-actions: Properly interpret "output:in_port".Ben Pfaff2017-06-122-17/+21
| | | | | | | | | | | | | It was being misinterpreted as output:NXM_OF_IN_PORT[]. This interpretation is incorrect because of OpenFlow rules that say that only the special form generated by output:in_port (or "in_port" on its own) actually outputs to the input port. The interpretation here was a no-op. Fixes: 21b2fa617126 ("ofp-parse: Allow match field names in actions and brackets in matches.") Reported-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ofp-util: Initialize tunnel metadata for OpenFlow 1.0 matches.Ben Pfaff2017-06-121-0/+1
| | | | | | | | Found by valgrind. Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Lance Richardson <lrichard@redhat.com> Acked-by: Lance Richardson <lrichard@redhat.com>
* dpdk: Deprecate vhost-user server ports.Aaron Conole2017-06-083-8/+22
| | | | | | | | | | | | | | | | Since vhost-user server mode ports are the preferred mechanism for interconnecting Open vSwitch with VMs when using DPDK, and since there are currently no known use cases for vhost-user server mode ports apart from version incompatibilities with QEMU, announce that server mode ports are considered deprecated and will be removed in a future release. Cc: Ciara Loftus <ciara.loftus@intel.com> Cc: Kevin Traynor <ktraynor@redhat.com> Suggested-by: Darrell Ball <dball@vmware.com> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rstp: Add the 'ovs-appctl rstp/show' command.nickcooper-zhangtonghao2017-06-083-2/+124
| | | | | | | | | The rstp/show command will help users and developers to get more details about rstp. This patch works together with the previous patches. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rstp: Add internal functions without locks.nickcooper-zhangtonghao2017-06-082-14/+49
| | | | | | | | | This patch adds some internal functions which does not use the locks. This patch is used for next patch. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rstp: Add rstp port name for human reading.nickcooper-zhangtonghao2017-06-084-3/+17
| | | | | | | | | | This patch is useful to debug rstp subsystem and log the port name instead of port number. This patch will also be used to display rstp info for next patches. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Acked-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn-sbctl: support setting rbac role for remote connectionsLance Richardson2017-06-081-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add support for specifying rbac "role" when setting remote connection configuration in the southbound database. Prior to this change, usage examples included: ovn-sbctl set-connection ptcp:6642 ovn-sbctl set-connection pssl:6642 \ read-only ptcp:7777 \ read-write punix:/tmp.foo With this change, in addition to the above: ovn-sbctl set-connection role=ovn-controller pssl:6642 \ read-only role= ptcp:7777 \ read-write punix:/tmp/foo As with the "read-only"/"read-write" attributes, the specified role is applied to all subsequent connections until changed. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: add rbac tables to ovn southbound schemaLance Richardson2017-06-085-2/+418
| | | | | | | | | Add rbac "roles" and "permissions" tables to ovn southbound database schema, add support to ovn-northd for managing these tables. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: add support for role-based access controlsLance Richardson2017-06-0826-16/+1092
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suport for ovsdb RBAC (role-based access control). This includes: - Support for "RBAC_Role" table. A db schema containing a table by this name will enable role-based access controls using this table for RBAC role configuration. The "RBAC_Role" table has one row per role, with each row having a "name" column (role name) and a "permissions" column (map of table name to UUID of row in separate permission table.) The permission table has one row per access control configuration, with the following columns: "name" - name of table to which this row applies "authorization" - set of column names and column:key pairs to be compared against client ID to determine authorization status "insert_delete" - boolean, true if insertions and authorized deletions are allowed. "update" - Set of columns and column:key pairs for which authorized updates are allowed. - Support for a new "role" column in the remote configuration table. - Logic for applying the RBAC role and permission tables, in combination with session role from the remote connection table and client id, to determine whether operations modifying database contents should be permitted. - Support for specifying RBAC role string as a command-line option to ovsdb-tool (Ben Pfaff). Signed-off-by: Lance Richardson <lrichard@redhat.com> Co-authored-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: Show Rx checksum status when false.Kevin Traynor2017-06-081-0/+2
| | | | | | | | | Currently ovs-appctl dpctl/show only shows the Rx checksum offload status when true. Change to also show the status when false. CC: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* datapath-windows: Add original conntrack tuple to FlowKeySairam Venugopal2017-06-083-8/+78
| | | | | | | | | Add the original tuple to Flow Key. In case of ICMP and UDP, default the parent entry to NULL until related connections is supported. Signed-off-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* checkpatch: Also allow .at files to have leading tabs.Ben Pfaff2017-06-081-2/+8
| | | | | | | | | Autotest .at files often have lines with samples of expected output from various programs, which fairly often includes leading tabs, so this warning causes false positives there. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Aaron Conole <aconole@redhat.com>
* testsuite: release resources when vswitch exits.Flavio Leitner2017-06-071-1/+3
| | | | | | | | | | | | | This change the testsuite macro to release the resources configured by ovs-vswitchd when exiting as it used to be. Fixes: 0f28164be02ac ("netdev-linux: make tap devices persistent") Fixes: fe13ccdca6a22 ("vswitchd: Add --cleanup option to the 'appctl exit' command") Reported-by: Eric Garver <e@erig.me> Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Joe Stringer <joe@ovn.org>
* test-hash: Fix unaligned pointer value error.Joe Stringer2017-06-071-10/+10
| | | | | | | | | | | | | | | | | | | | Clang 4.0 complains: ../tests/test-hash.c:160:16: error: taking address of packed member 'b' of class or structure 'offset_ovs_u128' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] in0 = &in0_data.b; Set the bit in the aligned u128 first then copy the contents into the offset u128 so that we don't have to take the address of the non-aligned u128 and pass it to set_bit128. For the 256byte_hash, fix it up so that it's actually testing the 256B hash inside a 32-bit offset u128 as well. Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* docs: Update dpdk vdev naming instructions.Ciara Loftus2017-06-072-5/+6
| | | | | | Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Stephen Finucane <stephen@that.guru>
* ovn-sb.xml: Update and improve documentation.Ben Pfaff2017-06-071-39/+50
| | | | | | | | | | | | | | | | Some of the abbreviations at the head of this document, like LN and PN, turn out to not be very useful, so expand them for clarity. Some of the statements in this document are more about planning the design than the current design. Remove these for clarity. Port_Binding rows used to all be about physical locations, except for patch ports, but there are more kinds of rows now. Elaborate for clarity. Expand on the purpose of the Datapath_Binding table. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* Copy external_ids from Logical_Switch_Port to SB databaseDaniel Alvarez Sanchez2017-06-073-4/+23
| | | | | | | | | | | | | | | | This patch makes ovn-northd copy all string-string pairs in external_ids column of the Logical_Switch_Port table in Northbound database to the equivalent column of the Port_Binding table in Southbound database. OpenStack Neutron will add some useful data to NB database that can be later read by networking-ovn-metadata-agent without the need of maintaining a connection to NB database. This data would include the CIDR's of a port or the project and device ID's which are needed when talking to Nova to request metadata. Signed-off-by: Daniel Alvarez <dalvarez@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovn-sb.xml: Fix indentation.Dong Jun2017-06-071-7/+7
| | | | | Signed-off-by: Dong Jun <dongj@dtdream.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovn: ssl proto/cipher configuration in nb/sb dbLance Richardson2017-06-0710-10/+64
| | | | | | | | | | | Add SSL protocol and cipher columns to SSL tables in northbound and southbound databases. Start nb/sb ovsdb-server with command- line options to use these columns. Add support to ovn-nbctl and ovn-sbctl "set-ssl" commands for user-friendly management of these settings. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* flow: Refactor ct_orig_tuple check in miniflow_extract().Darrell Ball2017-06-071-1/+4
| | | | | | | | | | | | | The checks to populate ct_orig_tuple in miniflow_extract include recirc_id being non-zero. Now, ct_orig_tuple is only populated if the packet has passed through the connection tracker, which is a prerequisite for having valid ct_orig_tuple information. This is recognized by having a non-zero ct_state. This has an added benefit of saving some processing time. Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dpdk: Move tcp_payload_length to include file.Darrell Ball2017-06-072-7/+13
| | | | | | | | | | | The function tcp_payload_length is moved to a private include file to be used by other conntrack files. A sanity check is added for general use, although previous usage was safe in that filtering is already done by the time it is called. Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Export PYTHONCOERCECLOCALE=0 for python3 testsTimothy Redaelli2017-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | This patch exports PYTHONCOERCECLOCALE=0 when you have Python3 tests enabled. This is needed since testsuite forces LC_ALL=C and Python 3, with PEP 538, prints the following warning on stderr: "Python runtime initialized with LC_CTYPE=C (a locale with default ASCII encoding), which may cause Unicode compatibility problems. Using C.UTF-8, C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is recommended." AT_CHECK reports it as an error since stderr is not empty as it should be. This patch is needed, at least, on Fedora 26 and Rawhide (backported PEP 538 on Python 3.6). This will also be needed on any distribution with Python 3.7 (PEP 538). Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* stream: include ssl protocol/cipher options in run-time helpLance Richardson2017-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | | Include --ssl-protocols and --ssl-ciphers options in run-time help output. Sample output with this change: PKI configuration (required to use SSL): -p, --private-key=FILE file with private key -c, --certificate=FILE file with certificate for private key -C, --ca-cert=FILE file with peer CA certificate --bootstrap-ca-cert=FILE file with peer CA certificate to read or create SSL options: --ssl-protocols=PROTOS list of SSL protocols to enable --ssl-ciphers=CIPHERS list of SSL ciphers to enable Output formatting options: Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-linux: maintain original device's stateFlavio Leitner2017-06-061-0/+1
| | | | | | | | It is important to maintain the original state when the device already exists in the system. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-linux: make tap devices persistent.Flavio Leitner2017-06-061-0/+8
| | | | | | | | | | | When using data path type "netdev", bridge port is a tun device and when OVS restarts, that device and its network configuration is lost. This patch enables the tap device to persist instead. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-router: fix refcnt leak when program terminates.Flavio Leitner2017-06-061-9/+26
| | | | | | | | Install a handler to flush routes and release devices when the program is terminating. Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* docs: Document dpdkr portsStephen Finucane2017-06-064-4/+86
| | | | | | | | | | | | I has an idea what these were but that idea was somewhat incorrect and out-of-date. Add a minimal guide to fill in these gaps, along with a warning about how useless these things generally are now (yay, vhost-user). Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Ciara Loftus <ciara.loftus@intel.com> Cc: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* docs: Clarify the superiority of dpdkvhostuserclientStephen Finucane2017-06-061-2/+6
| | | | | | | | | | | Apparently dpdkvhostuser interfaces are inferior to dpdkvhostuserclient. Explain why. Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Ciara Loftus <ciara.loftus@intel.com> Cc: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Kevin Traynor <ktraynor@redhat.com>
* ovn-controller: refactor and abstract ovs_idl registeringHan Zhou2017-06-061-30/+36
| | | | | | | Abstract as a function so that it can be used by other modules. Signed-off-by: Han Zhou <zhouhan@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* bfd: Detect Multiplier configurationSzucs Gabor2017-06-064-11/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mult value (bfd.DetectMult in RFC5880) is hard-coded and equal to 3 in current openvswitch. As a consequence remote and local mult is the same. In this commit the mult (Detect Multiplier/bfd.DetectMult/Detect Mult) can be set on each interface setting the mult=<value> in bfd Column in Interface table of ovsdb database. Example: ovs-vsctl set Interface p1 bfd:mult=4 sets mult=4 on p1 interface The modification based on RFC5880 June 2010. The relevant paragraphs are: 4.1. Generic BFD Control Packet Format 6.8.4. Calculating the Detection Time 6.8.7. Transmitting BFD Control Packets 6.8.12. Detect Multiplier Change The mult value is set to default 3 if it is not set in ovsdb. This provides backward compatibility to previous openvswitch behaviour. The RFC5880 says in 6.8.1 that DetectMult shall be a non-zero integer. In RFC5880 4.1. "Detect Mult" has 8 bit length and is declared as a 8 bit unsigned integer in bfd.c. Consequently mult value shall be greater than 0 and less then 256. In case of incorrect mult value is given in ovsdb the default value (3) will be set and a message is logged into ovs-vswitchd.log on that. Local or remote mult value change is also logged into ovs-vswitchd.log. Since remote and local mult is not the same calculation of detect time has been changed. Due to RFC5880 6.8.4 Detection Time is calculated using mult value of the remote system. Detection time is recalculated due to remote mult change. The BFD packet transmission jitter is different in case of mult=1 due to RFC5880 6.8.7. The maximum interval of the transmitted bfd packet is 90% of the transmission interval. The value of remote mult is printed in the last line of the output of ovs-appctl bfd/show command with label: Remote Detect Mult. There is a feature in openvswitch connected with forwarding_if_rx that is not the part of RFC5880. This feature also uses mult value but it is not specified if local or remote since it was the same in original code. The relevant description in code: /* When 'bfd->forwarding_if_rx' is set, at least one bfd control packet * is required to be received every 100 * bfd->cfg_min_rx. If bfd * control packet is not received within this interval, even if data * packets are received, the bfd->forwarding will still be false. */ Due to lack of specification local mult value is used for calculation of forwarding_if_rx_detect_time. This detect time is recalculated at mult change if forwarding_if_rx is true and bfd is in UP state. A new unit test has been added: "bfd - Edit the Detect Mult values" The following cases are tested: - Without setting mult the mult will be the default value (3). - The setting of the lowest (1) and highest (255) valid mult value and the detection of remote mult value. - The setting of out of range mult value (0, 256) in ovsdb results sets default value in ovs-vswitchd - Clearing non default mult value from ovsdb results sets default value in ovs-vswitchd. Signed-off-by: Gábor Szűcs <gabor.sz.cs@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Fix spelling error in test name.Ben Pfaff2017-06-021-1/+1
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* dpdk: Update feature alert documentation.Darrell Ball2017-06-022-1/+3
| | | | | | | Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dpdk: Enable NAT tests for userspace datapath.Darrell Ball2017-06-021-5/+2
| | | | | | | Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Add some system test fixes.Darrell Ball2017-06-021-2/+2
| | | | | | | Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>