summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* doc: Populate 'topics' sectionStephen Finucane2016-12-125-10/+9
| | | | | | | | | | | There are many docs that don't need to kept at the top level, along with many more hidden in random folders. Move them all. This also allows us to add the '-W' flag to Sphinx, ensuring unindexed docs result in build failures. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev: Set the default number of queues at removal from the databaseIlya Maximets2016-12-092-3/+3
| | | | | | | | | | | | | | | | | | | | | Expected behavior for attribute removal from the database is resetting it to default value. Currently this doesn't work for n_rxq/n_txq options of pmd netdevs (last requested value used): # ovs-vsctl set interface dpdk0 options:n_rxq=4 # ovs-vsctl remove interface dpdk0 options n_rxq # ovs-appctl dpif/show | grep dpdk0 <...> dpdk0 1/1: (dpdk: configured_rx_queues=4, <...> \ requested_rx_queues=4, <...>) Fix that by using NR_QUEUE or 1 as a default value for 'smap_get_int'. Fixes: a14b8947fd13 ("dpif-netdev: Allow different numbers of rx queues for different ports.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* csum: Fix csum_continue() on big endian with an odd number of bytes.Daniele Di Proietto2016-12-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though it reads 16 bits at a time, csum_continue() is almost neutral to endianness (see RFC 1071 1.2 (B), "Byte Order Independence"). Consider a buffer like the following: 00000000: XX YY XX YY XX YY XX YY ZZ Each couple of bytes is interpreted on little endian as: *data = 0xYYXX while on big endian *data = 0xXXYY The last byte "ZZ" should be treated as the two bytes "ZZ 00" little endian: *data = 0x00ZZ big endian: *data = 0xZZ00 which means that the last byte (for odd buffers) should be left shifted by 8 bits on big endian platforms. This fixes a couple of connection tracking tests in userspace for big endian platforms. I guess RFC1071 4.1 (implementation example of the checksum in C), would manifest the same problem on big endian. Reported-at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840770 Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* ovs-vswitchd: Avoid segfault for "netdev" datapath.nickcooper-zhangtonghao2016-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the datapath, whose type is "netdev", processes packets in userspce action, it may cause a segmentation fault. In the dp_execute_userspace_action(), we pass the "wc" argument to dp_netdev_upcall() using NULL. In the dp_netdev_upcall() call tree, the "wc" will be used. For example, dp_netdev_upcall() uses the &wc->masks for debugging, and flow_wildcards_init_for_packet() uses the "wc" if we disable megaflow, which is described in more detail below. Segmentation fault in flow_wildcards_init_for_packet: #0 0x0000000000468fe8 flow_wildcards_init_for_packet lib/flow.c:1275 #1 0x0000000000436c0b upcall_cb ofproto/ofproto-dpif-upcall.c:1231 #2 0x000000000045bd96 dp_netdev_upcall lib/dpif-netdev.c:3857 #3 0x0000000000461bf3 dp_execute_userspace_action lib/dpif-netdev.c:4388 #4 dp_execute_cb lib/dpif-netdev.c:4521 #5 0x0000000000486ae2 odp_execute_actions lib/odp-execute.c:538 #6 0x00000000004607f9 dp_netdev_execute_actions lib/dpif-netdev.c:4627 #7 packet_batch_per_flow_execute lib/dpif-netdev.c:3927 #8 dp_netdev_input__ lib/dpif-netdev.c:4229 #9 0x0000000000460ba8 dp_netdev_input lib/dpif-netdev.c:4238 #10 dp_netdev_process_rxq_port lib/dpif-netdev.c:2873 #11 0x000000000046126e dpif_netdev_run lib/dpif-netdev.c:3000 #12 0x000000000042baf5 type_run ofproto/ofproto-dpif.c:504 #13 0x00000000004192bf ofproto_type_run ofproto/ofproto.c:1687 #14 0x0000000000409965 bridge_run__ vswitchd/bridge.c:2875 #15 0x000000000040f145 bridge_run vswitchd/bridge.c:2938 #16 0x00000000004062e5 main vswitchd/ovs-vswitchd.c:111 Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* dpctl: Fix usage for most dpctl commands.Ben Pfaff2016-12-061-10/+10
| | | | | | | | The usage should not repeat the command name, but most of the dpctl commands' usage did repeat it. This fixes the problem. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Aaron Conole <aconole@redhat.com>
* ovs-appctl: Add usage content to "dpctl/*" command.nickcooper-zhangtonghao2016-12-061-2/+6
| | | | | Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-dpdk: Don't use dev->vhost_id without mutex.Ilya Maximets2016-12-061-1/+1
| | | | | | | | | The copy should be used here. Additionally, 'strlen' changed to the faster check. Fixes: 821b86649a90 ("netdev-dpdk: Don't try to unregister empty vhost_id.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-bsd: Fix compiling error in netbsd.Hui Kang2016-12-061-0/+4
| | | | | | | In some netbsd version, RTF_LLINFO is undefined. Signed-off-by: Hui Kang <hkang.sunysb@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* mpls: Fix MPLS restoration after patch port and group bucket.Jarno Rajahalme2016-12-023-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes problems with MPLS handling related to patch ports and group buckets. If a group bucket or a peer bridge across a patch port pushes MPLS headers to a non-MPLS packet and outputs, the flow translation after returning from the group bucket or patch port would undo the packet transformations so that the processing could continue with the packet as it was before entering the patch port. There were two problems with this: 1. As part of the first MPLS push on a non-MPLS packet, the flow translation would first clear the L3/4 headers of the 'flow' to mark those fields invalid. Later, when committing 'flow' changes to datapath actions before output, the necessary datapath MPLS actions are created and the corresponding changes updated to the 'base flow'. This was done using the same flow_push_mpls() function that clears the L2/3 headers, so also the 'base flow' L2/3 headers were cleared. Then, when translation returns from a patch port or group bucket, the original 'flow' is restored, now showing no sign of the MPLS labels. Since the 'base flow' now has the MPLS labels, following translations know to issue MPLS POP actions before any output actions. However, as part of checking for changes to IP headers we test that the IP protocol type was not changed. But now the 'base flow's 'nw_proto' field is zero and an assert fail crashes OVS. This is solved by not clearing the L3/4 fields of the 'base flow'. This allows the processing after the patch port to continue with L3/4 fields as if no MPLS was done, after first issuing the necessary MPLS POP actions. 2. IP header updates were done before the MPLS POP actions were issued. This caused incorrect packet output after, e.g., group action or patch port. For example, with actions: group 1234: all bucket=push_mpls,output:LOCAL ip actions=group:1234,dec_ttl,output:LOCAL,output:LOCAL the dec_ttl would only be executed before the last output to LOCAL, since at the time of committing IP changes after the group action the packet was still an MPLS packet. This is solved by checking the dl_type of both 'flow' and 'base flow' and issuing MPLS actions if they can transform the packet from an MPLS packet to a non-MPLS packet. For an IP packet the change in ttl can then be correctly committed before the last two output actions. Two test cases are added to prevent future regressions. Reported-by: Thomas Morin <thomas.morin@orange.com> Suggested-by: Takashi YAMAMOTO <yamamoto@ovn.org> Fixes: 8bfd0fdac ("Enhance userspace support for MPLS, for up to 3 labels.") Fixes: 1b035ef20 ("mpls: Allow l3 and l4 actions to prior to a push_mpls action") Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: YAMAMOTO Takashi <yamamoto@ovn.org>
* ovs-numa: Allow leading 0x on pmd-cpu-mask.billyom2016-12-021-2/+9
| | | | | | | | | | | | | | | pmd-cpu-mask is interpreted as a hex bit mask. So it should be written with a leading 0x to indicate this. But if this is done, while the value is interpreted correctly and the PMDs pinned as expected, a confusing warning message is also issued. This patch allows but does not require a leading 0x or 0X to be used without a warning. Existing functionality is not affected. Relevant DPDK docs also updated. Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Tested-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Don't try to unregister empty vhost_id.Ilya Maximets2016-12-021-0/+5
| | | | | | | | | | | | | | If 'vhost-server-path' not provided for vhostuserclient port, 'netdev_dpdk_vhost_destruct()' will try to unregister an empty string. This leads to error message in log: netdev_dpdk|ERR|vhost2: Unable to unregister vhost driver for socket ''. CC: Ciara Loftus <ciara.loftus@intel.com> Fixes: 2d24d165d6a5 ("netdev-dpdk: Add new 'dpdkvhostuserclient' port type") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* ofp-actions: Add "ingress" and "egress" options to "sample" action.Ben Pfaff2016-11-303-24/+99
| | | | | | | | | | | | | | | | | | | | Before Open vSwitch 2.5.90, IPFIX reports from Open vSwitch didn't include whether the packet was ingressing or egressing the switch. Starting in OVS 2.5.90, this information was available but only accurate if the action included a port number that indicated a tunnel. Conflating these two does not always make sense (not every packet involves a tunnel!), so this patch makes it possible for the sample action to simply say whether it's for ingress or egress. This is difficult to test, since the "tests" directory of OVS does not have a proper IPFIX listener. This passes those tests, plus a couple that just verify that the actions are properly parsed and formatted. Benli did test it end-to-end in a VMware use case. Requested-by: Benli Ye <daniely@vmware.com> Tested-by: Benli Ye <daniely@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Simon Horman <simon.horman@netronome.com>
* netdev-dpdk: Assign value '0' to unsupported netdev featuresBinbin Xu2016-11-281-3/+5
| | | | | | | | | When OVS&DPDK is used, DPDK doesn't support features 'advertised', 'supported' and 'peer'. If a physical port added to bridge, features descirbed above can't be assigned, and the values are random. Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn> Signed-off-by: Ben Pfaff <blp@ovn.org>
* odp-util: Fix incorrect comment.Ben Pfaff2016-11-261-2/+1
| | | | | | | | The user_action_cookie was once limited to 8 bytes, but that limitation was eliminated a long time ago. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Simon Horman <simon.horman@netronome.com>
* netdev-dpdk: Add support for DPDK 16.11Ciara Loftus2016-11-251-1/+2
| | | | | | | | | This commit announces support for DPDK 16.11. Compatibility with DPDK v16.07 is not broken yet thanks to only minor code changes being needed for the upgrade. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
* ovs-router: add missing newline in lookup outputThadeu Lima de Souza Cascardo2016-11-251-1/+1
| | | | | Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
* ofp-print: Fix memory leak in ofp_print_queue_get_config_reply().Yi-Hung Wei2016-11-221-0/+1
| | | | | | | | | | | | | | | | In testcase "OFPT_QUEUE_GET_CONFIG_REPLY - OF1.0", valgrind reports a memory leak with the following call stack. xrealloc (util.c:123) ofp_print_queue_get_config_reply (ofp-print.c:1233) ofp_to_string__ (ofp-print.c:3458) ofp_to_string (ofp-print.c:3681) ofp_print (ofp-print.c:3713) ofctl_ofp_print (ovs-ofctl.c:4399) ovs_cmdl_run_command__ (command-line.c:115) main (ovs-ofctl.c:151) Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs: optimize 'ip_parse_port' function.nickcooper-zhangtonghao2016-11-211-8/+8
| | | | | Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* lib: Use nl_attr_get_odp_port().Joe Stringer2016-11-162-3/+3
| | | | | | | This helper is a little tidier than the alternative. Use it treewide. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Simon Horman <simon.horman@netronome.com>
* netdev: Count ports within mutex.Joe Stringer2016-11-161-1/+1
| | | | | | | | | | | | | | netdev_get_vports() previously counted the number of ports outside the mutex, allocated enough memory for that number, then grabbed the mutex to iterate through them and filled the array with the pointers. This is logically wrong; in theory the number of ports could change between allocating the memory and grabbing the mutex. In practice, only the main thread manages these so there is no chance for a segfault. Fix it up anyway. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* netdev: Fix sockaddr cast warning.Pravin B Shelar2016-11-161-2/+2
| | | | | | | | | | | | | | | | | | Following warning was reported by Travis:- lib/netdev.c:1916:19: error: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 2 to 4 [-Werror,-Wcast-align] sin = (struct sockaddr_in *) ifa->ifa_netmask; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/netdev.c:1924:20: error: cast from 'struct sockaddr *' to 'struct sockaddr_in6 *' increases required alignment from 2 to 4 [-Werror,-Wcast-align] sin6 = (struct sockaddr_in6 *) ifa->ifa_netmask; Fixes: 3f31aded6 ("netdev: fix netmask in netdev_get_addrs"). Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
* ovs-router: report error when failing to insert routeThadeu Lima de Souza Cascardo2016-11-151-1/+1
| | | | | Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* netdev-dpdk: Return rx/tx queue sizes only for ETH devices.Ilya Maximets2016-11-151-6/+11
| | | | | | | | | | | | 'dev->requested_{rxq,txq}_size' and 'dev->{rxq,txq}_size' are relevant only for DPDK_DEV_ETH devices and should be skipped in 'netdev_dpdk_get_config()' for other ports. CC: Ciara Loftus <ciara.loftus@intel.com> Fixes: b685696b8c81 ("netdev-dpdk: Allow configurable queue sizes for 'dpdk' ports") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* dpif-netdev: Honor rxq affinity during pmd threads creation.Ilya Maximets2016-11-151-9/+39
| | | | | | | | | | | Currently, If user will set up 'pmd-rxq-affinity' to cores on different numa node, they may not be polled, because pmd threads will not be created there even if this cores are in 'pmd-cpu-mask'. Fix that by creating threads on all numa nodes rxqs assigned to. Fixes: 3eb67853c481 ("dpif-netdev: Introduce pmd-rxq-affinity.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* dpif-netdev: non-pmd thread static_tx_qid should be constantPatrik Andersson2016-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | The non-pmd thread static_tx_qid is assumed to be equal to the highest core ID + 1. The function dp_netdev_del_pmds_on_numa() invalidates this assumption by re-distributing the static_tx_qid:s on all pmd and non-pmd threads of the "other" numa. There might be a number of unwanted effects due to the non-pmd thread static_tx_qid being changed. The actual fault, observed in OVS 2.5, was a crash due to the TX burst queues containing a NULL packet buffer pointer in the range of valid buffers, presumably caused by a race condition. In OVS 2.6 TX burst queues have been removed, nevertheless the current behavior is incorrect. The correction makes dp_netdev_del_pmds_on_numa() honor the constancy of the non-pmd static_tx_qid value by excluding all non-pmd threads from the deletion and from the re-ordering of the static_tx_qid. Signed-off-by: Patrik Andersson <patrik.r.andersson@ericsson.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Fix the issue of physical port's admin state configurationxu.binbin1@zte.com.cn2016-11-151-0/+2
| | | | | | | | | When we set physical port's admin state via ovs-appctl, the application seems to work and returns "OK". But the application doesn't work perfectly, the state stored in database doesn't change. Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* netdev-dpdk: Can't set specified vhost port's admin statexu.binbin1@zte.com.cn2016-11-151-2/+4
| | | | | | | | | When we set a vhost port's admin state via ovs-appctl, the application doesn't work and returns the information "Not a DPDK Interface". Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* ovs-router: Fix selection of source IP address when a gateway ip is introducedAriel Waizel2016-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When adding a VXLAN tunnel that connects to a VTEP residing in a different IP network, the tunnel source ip needs to be selected by best fit (longest matching netmask), based on the destination VTEP ip, and the specific route's gateway ip. A bug in ovs-router.c made the source ip to be decided only based on the destination ip. Thus, if all source ips available to OVS and the destination ip are in different ip networks - no source ip is selected, and an error is returned. This error occurred when using OVS-DPDK and configuring a VXLAN tunnel, where source ip and destination ip are in different networks, and a gateway ip was in place for the specific route. The fix tries to match a source ip based on the gateway ip, if no matching source ip was found based on the destination ip. This way, the gateway becomes the first hop only if the tunnel crosses between ip networks. Signed-off-by: Ariel Waizel <ariel.waizel@hpe.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* netdev: fix netmask in netdev_get_addrsThadeu Lima de Souza Cascardo2016-11-151-2/+2
| | | | | | | | | | | | | | | | When iterating on getifaddrs result, ifa_netmask is dereferenced, but it's already a pointer to struct sockaddr. This would result in wrong masks being used when comparing addresses while calculating the source address given a destination address at the routing code. For example, the mask ::ffff:116.85.0.0 would be used, causing 172.16.100.0/24 to match 172.16.101.1, though they should not match. This will not happen when using a dummy netdev, as netdev_get_addrs is not used by it. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* dpif-provider: Use ODPP_NONE in dp_netdev_flow_add()Simon Horman2016-11-151-1/+1
| | | | | | | This appears to be the only place where ODPP_NONE is not used but could be. Signed-off-by: Simon Horman <simon.horman@netronome.com> Acked-by: Joe Stringer <joe@ovn.org>
* netdev-dpdk: Fix crash in QoS.Daniele Di Proietto2016-11-141-1/+1
| | | | | | | | | | | | | | | | qos_conf can be NULL. This can be easily reproduced by setting egress QoS on a port: ``` ovs-vsctl set port dpdk2 qos=@newqos -- --id=@newqos create qos type=egress-policer other-config:cir=46000000 other-config:cbs=2048 ``` Reported-by: Ian Stokes <ian.stokes@intel.com> Fixes: 78bd47cf44a5 ("netdev-dpdk: Use RCU for egress QoS.") Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Ian Stokes <ian.stokes@intel.com>
* dpcls: Use 32 packet batches for lookups.Bhanuprakash Bodireddy2016-11-141-65/+45
| | | | | | | | | | | | This patch increases the number of packets processed in a batch during a lookup from 16 to 32. Processing batches of 32 packets improves performance and also one of the internal loops can be avoided here. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Co-authored-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> Acked-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* flow: Add comments to mf_get_next_in_map().Bhanuprakash Bodireddy2016-11-141-5/+27
| | | | | | | | | | This patch adds comments to mf_get_next_in_map() to make it more comprehensible. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* flow: Skip invoking expensive count_1bits() with zero input.Bhanuprakash Bodireddy2016-11-141-5/+6
| | | | | | | | | | | This patch checks if trash is non-zero and only then resets the flowmap bit and increment the pointer by set bits as found in trash. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Co-authored-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> Acked-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* dpif-netdev: Drop unused function.Joe Stringer2016-11-141-7/+0
| | | | | Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Simon Horman <simon.horman@netronome.com>
* dpif-provider: Update port_add documentation.Joe Stringer2016-11-141-1/+1
| | | | | | | The implementations these days use ODPP_NONE rather than UINT32_MAX. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Simon Horman <simon.horman@netronome.com>
* ofproto: Return the OFPC_BUNDLES bit in switch features reply.Jarno Rajahalme2016-11-142-2/+8
| | | | | | | | | Add definitions for the OpenFlow 1.4.1/1.5 specific capabilities bits OFPC14_BUNDLES and OFPC14_FLOW_MONITORING. Return the bundles capability bit in switch features reply. Reported-by: Andrej Leitner <andrej.leitner@pantheon.tech> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* Add support for specifying SSL connection parameters to ovsdbEthan Rahn2016-11-106-3/+117
| | | | | Signed-off-by: Ethan Rahn <erahn@arista.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* netdev-windows: use bitwise comparison for flagsAlin Serdean2016-11-041-2/+2
| | | | | | | | | Use bitwise comparison when checking flags set by the kernel for the device. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* netdev-windows: fix ofpbuf initializationAlin Serdean2016-11-041-1/+1
| | | | | | | | | | | | | | | | | | | ofpbuf_const_initializer takes only two parameters see: https://github.com/openvswitch/ovs/blob/master/include/openvswitch/ofpbuf.h#L96 the compiler only gives the following warning: lib/netdev-windows.c(229) : warning C4020: 'ofpbuf_const_initializer' : too many actual parameters which in result will put junk data into "ofpbuf b". This patch fixes the initialization. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* doc: Convert vswitchd/INTERNALS to rSTStephen Finucane2016-11-032-2/+3
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* doc: Convert datapath/README to rSTStephen Finucane2016-11-031-1/+1
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* doc: Convert DESIGN to rSTStephen Finucane2016-11-031-1/+1
| | | | | | | This is a top-level document, so plain old rST is preferred. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* dpif-netdev: Fix windows build.Daniele Di Proietto2016-10-191-1/+1
| | | | | | | | | | | OVS_ALIGNED_VAR(...) should be at the beginning of a definition, as the example in include/openvswitch/compiler.h shows. Fixes: 38ee0814978c ("dpif-netdev: Cache align netdev_flow_keys.") Reported-by: Joe Stringer <joe@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com>
* ovsdb-idl: Check internal graph in OVSDB tests.Ben Pfaff2016-10-192-0/+124
| | | | | | | | | Some upcoming tests will add extra trickiness to the IDL internal graph. This worries me, because the IDL doesn't have any checks for its graph consistency. This commit adds some. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb-idl: Mark ovsdb_idl_get_row_arc() parameter const.Ben Pfaff2016-10-192-2/+2
| | | | | | | | This function doesn't modify its 'dst_table' parameter, so it might as well be marked const. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb-idl: Add some more implementation comments.Ben Pfaff2016-10-192-2/+38
| | | | | | | | I wrote this code and if I have to rediscover how it works, it's time to improve the commnts. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb-idl: Sort and unique-ify datum in ovsdb_idl_txn_write().Ben Pfaff2016-10-191-5/+12
| | | | | | | | | | | | I noticed that there were lots of calls to ovsdb_datum_sort_unique() from "set" functions in generated IDL code. This moves that call into common code, reducing redundancy. There are more calls to the same function that are a little harder to remove. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb-idl: Improve comment on ovsdb_idl_txn_write[_clone]().Ben Pfaff2016-10-191-17/+19
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovsdb-idlc: Use ovsdb_datum_from_smap() instead of open-coding it.Ben Pfaff2016-10-192-14/+11
| | | | | | | | | | | | There's no reason to have three copies of this code for every smap-type column. The code wasn't a perfect match for ovsdb_datum_from_smap(), so this commit also changes ovsdb_datum_from_smap() to better suit it. It only had one caller and the new design is adequate for that caller. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>