summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* datapath-windows: Fix locking code in OvsGetNetdevCmdHandler().Nithin Raju2014-10-311-5/+0
| | | | | | | | We were acquiring locks twice, and forgotten to release a lock in an error case. Signed-off-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Nuke USE_NEW_VPORT_ADD_WORKFLOW.Nithin Raju2014-10-311-15/+0
| | | | | | | | | We were using USE_NEW_VPORT_ADD_WORKFLOW while transitioning from old workflow for adding ports. We don't need it anymore. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Don't leak NBLs with multiple NBs.Nithin Raju2014-10-311-1/+6
| | | | | | | | | | | | | | Currently, if we receive an NBL with multiple NBs from NDIS, we just ASSERT() and not do anything. The right thing to do obviously is to process the NBL. This is a work in progress. In the meantime, we should complete the NBL and not just leak it. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* classifier: Change type used for priorities from 'unsigned int' to 'int'.Ben Pfaff2014-10-3013-76/+68
| | | | | | | | | | | | | | | | OpenFlow has priorities in the 16-bit unsigned range, from 0 to 65535. In the classifier, it is sometimes useful to be able to have values below and above this range. With the 'unsigned int' type used for priorities until now, there were no values below the range, so some code worked around it by converting priorities to 64-bit signed integers. This didn't seem so great to me given that a plain 'int' also had the needed range. This commit therefore changes the type used for priorities to int. The interesting parts of this change are in pvector.h and classifier.c, where one can see the elimination of the use of int64_t. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* netdev-linux: Avoid depending on kernel definition of rtnl_link_stats64.Ben Pfaff2014-10-302-5/+10
| | | | | | | | | | We have to define our own with some kernel headers, so we might as well do it everywhere, especially since there seems to be a problem with detecting the presence of the definition with at least some kernels. Reported-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Joe Stringer <joestringer@nicira.com>
* utilities: Add bash command-line completion script.Alex Wang2014-10-305-0/+1365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds bash command-line completion script for ovs-appctl, ovs-dpctl, ovs-ofctl and ovsdb-tool command. Right now, the script can do the following: - display available completion or complete on unfinished user input (long option, subcommand, and argument). - once the subcommand (e.g. ofproto/trace) has been given, the script will print the subcommand format. - the script can convert between keywords like 'bridge/port/interface/dp' and the available record in ovsdb. The limitations are: - only support small set of important keywords (dp, datapath, bridge, switch, port, interface, iface). - does not support parsing of nested options (e.g. ovsdb-tool create [db [schema]]). - does not support expansion on repeatitive argument (e.g. ovs-dpctl show [dp...]). - only support matching on long options, and only in the format (--option [arg], i.e. should not use --option=[arg]). To use the script, either copy it inside /etc/bash_completion.d/ or manually run it via . ovs-command-compgen.bash. Also, a unit testsuite is provided as ovs-command-compgen-test.bash. It is suggested that this test script be run only inside tutorial/sandbox directory. For more info please refer to utilities/ovs-command-compgen.INSTALL.md. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* tests: Check the existance of WHY-OVS.md instead of WHY-OVS.Wang Sheng-Hui2014-10-302-2/+2
| | | | | | | | WHY-OVS has been renamed to WHY-OVS.md. Update the filenames in run-oftest and run-ryu scripts Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs_assert, tests: Support NDEBUG.Jarno Rajahalme2014-10-3033-114/+87
| | | | | | | | | | | | | | | | | ./configure accepts --enable-ndebug option. Make ovs_assert() honor it, and make sure all test programs disable it. The order of include files in test programs is also made uniform: 1. #include <config.h> 2. #undef NDEBUG 3. Include file of the test subject (to make sure it itself has sufficient include directives). 4. System includes in alphapetical order. 5. OVS includes in aplhapetical order. Suggested-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* list: Inline all functions.Jarno Rajahalme2014-10-303-222/+211
| | | | | | | | All of the list functions are really small, so inlining them should be beneficial. Requested-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* doc: Add more cross references between docsThomas Graf2014-10-3019-81/+139
| | | | | | | Suggested-by: Lori Jakab <lojakab@cisco.com> Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Reviewed-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* debian: Fix broken build during package creation.Gurucharan Shetty2014-10-291-2/+2
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vswitch.xml: Improve IPFIX documentation.Ben Pfaff2014-10-291-122/+164
| | | | | | | | | | | A coworker came by yesterday with a question about IPFIX in Open vSwitch. I did not know the answer, so I read the documentation. The documentation was harder to understand than necessary. This change should make it easier to understand by providing an overview of the two forms of configuration and grouping together the columns that apply only to one form of configuration. Signed-off-by: Ben Pfaff <blp@nicira.com>
* vswitch.xml: Fix spelling errors in documentation.Ben Pfaff2014-10-291-2/+2
| | | | Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-vsctl: Allow referring to rows whose names are UUIDs by those names.Ben Pfaff2014-10-292-1/+21
| | | | | | | | | | | | | | | | | | | | Every row in the database has a UUID, generated by the database server. Rows in most tables also have a user-assigned name (e.g. a bridge or port or interface name). The ovs-vsctl database commands (e.g. "set", "get", "list", ...) accept both UUIDs and names, but until now if a command's argument had the form of a UUID, then it had to be the database-assigned UUID for a row; that is, ovs-vsctl did not check whether it was the name of a row. This commit changes that: a UUID argument to a database command is now first checked against database UUIDs then, if it is not a database UUID, it is checked as the name of a row. This is prompted by Windows integration with OpenStack, which uses UUIDs as port names. CC: Nithin Raju <nithin@vmware.com> Requested-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* netdev-linux: Add support for 64-bit network device stats.Ben Pfaff2014-10-293-5/+75
| | | | | | Reported-by: Andrey Korolyov <andrey@xdel.ru> Tested-by: Andrey Korolyov <andrey@xdel.ru> Signed-off-by: Ben Pfaff <blp@nicira.com>
* docker: Update documentation to reflect risks of retiring ovs-docker.Gurucharan Shetty2014-10-292-2/+5
| | | | | | Requested-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Flavio Leitner <fbl@redhat.com>
* tests/test-classifier: Properly use ovsrcu_postpone.Jarno Rajahalme2014-10-291-11/+13
| | | | | | | | | | | | | Following patches add stricter checks of RCU memory management of rules removed from a classifier. This patch properly postpones freeing of 'struct cls_rule's that have been removed from a classifier. Also remove all the rules from classifier before destructing it in test_rule_replacement(). Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib/rculist: New RCU-iterator, single-writer doubly-linked list.Jarno Rajahalme2014-10-293-0/+432
| | | | | | | | | | | rculist allows concurrent lockless list iteration, while a writer may be modifying the list. Multiple writers can be supported by using a mutex in addition to rculist. First user will be added in a following patch. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* command-line: Add function to print command usage.Alex Wang2014-10-2815-189/+265
| | | | | | | | | | | | | This commit adds a new variable in 'struct command' for recording the command usage. Also, a new function is added to print the usage given the array of defined commands. Later patch will use the output in bash command-line completion script. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* dpctl: Implement 'list-commands' function.Alex Wang2014-10-283-26/+59
| | | | | | | | | This commit implements the 'list-commands' command for ovs-dpctl and ovs-appctl dpctl/* commands. The function will print the usage string for each subcommand. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ovs-appctl: Rename 'help' to 'list-commands'.Alex Wang2014-10-284-9/+10
| | | | | | | | | | | Having 'ovs-appctl help' and 'ovs-appctl --help' print different output is confusing. This commit renames the 'help' to 'list-commands'. Also, future patches will add the 'list-commands' to other ovs-* commands, and the output will be used by bash command-line completion script. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* command-line: Add function to print all options.Alex Wang2014-10-286-1/+43
| | | | | | | | | | | This commit adds a function that prints (both long and short) options of a ovs-* command. To use this function, option '--option' is added to ovs-appctl/dpctl/ofctl and ovsdb-tool commands. A future patch will use the option output to conduct bash command-line completion. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* netdev-windows: Fix bugs in flag update and MAC address copy functions.Nithin Raju2014-10-281-17/+33
| | | | | | | | | | | | | | | | | The .update_flags function in netdev-windows was dummy. But we need to return the existing flags for link status to be shown as up in the confdb. There was a bug in copying the MAC address. We fix these two issues in this patch. Signed-off-by: Nithin Raju <nithin@vmware.com> Co-Authored-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Allow encapsulation if source is bridge-internal port.Nithin Raju2014-10-281-3/+7
| | | | | | | | | | | | | It has been observed that when userspace generates and executes that packet, the source port of such a packet is set to the bridge-internal port. Currently, we allow encapsulation only if the source port is a VIF port or no port. We relax the check in this patch. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* doc: Convert docs to Markdown languageThomas Graf2014-10-2842-1826/+1900
| | | | | | | | | | | Converts the majority of docs over to use the Markdown language for pretty printing on GitHub. It's a rough first convertion without exploiting the full potential of Markdown at this point. Section titles and indentation are fixed as needed. Minimal docs interlinking is added. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: OvsFindVportByPortIdAndNicIndex() and external port.Nithin Raju2014-10-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use OvsFindVportByPortIdAndNicIndex() to lookup the vport for a packte received from the Hyper-V switch. If a packet was indeed received from the virtual external NIC, we should flag it. Validation: 1. Install and Uninstall the OVS EXT Driver (without enabling the OVS extension on the Hyper-V switch). 2. Install and Uninstall the OVS EXT Driver (with enabling the OVS extension on the Hyper-V switch). Hyper-V switch had a few ports. 3. Install and Uninstall the OVS EXT Driver (with enabling the OVS extension on the Hyper-V switch). Added a few ports before uninstalling. 4. Install the OVS EXT driver, and test the following functionality: a) ping between 2 VMs on the same host b) ping between 2 VMs on 2 Hyper-Vs - one physical and another virtual backed by VLAN (patch port between br-pif and br-int). c) ping between 2 VMs on 2 Hyper-Vs - one physical and another virtual backed by VXLAN. d) Successful uninstallation after these tests. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Update vport add code.Nithin Raju2014-10-285-101/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, we make the following updates to the vport add code: 1. Clarify the roles of the different hash tables, so it is easier to read/write code in the future. 2. Update OvsNewVportCmdHandler() to support adding bridge-internal ports. 3. Fixes in OvsNewVportCmdHandler() to support adding external port. Earlier, we'd hit ASSERTs. 4. I could not figure out way to add a port of type OVS_PORT_TYPE_INTERNAL with name "internal" to the confdb using ovs-vsctl.exe. And, this is needed in order to add the Hyper-V internal port from userspace. To workaround this problem, we treat a port of type OVS_PORT_TYPE_NETDEV with name "internal" as a request to add the Hyper-V internal port. This is a workaround. The end result is that there's a discrepancy between the port type in the datpaath v/s confdb, but this has not created any trouble in testing so far. If this ends up becoming an issue, we can mark the Hyper-V internal port to be of type OVS_PORT_TYPE_NETDEV. No harm. 5. Because of changes indicated in #1, we also update the vport dump code to look at the correct hash table for ports added from userspace. 6. Add a OvsGetTunnelVport() for convenience. 7. Update ASSERTs() while cleaning up the switch. 8. Nuke OvsGetExternalVport() and OvsGetExternalMtu(). Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Refactor core in Vport.c.Nithin Raju2014-10-283-55/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do a bunch of changes that did not make sense to split up into smaller patches: 1. Add descriptive comments to the important functions to clarify purpose. 2. s/OvsInitVportCommon/InitHvVportCommon - this function is common code for every port that shows up on the Hyper-V switch. 3. Introduce a InitOvsVportCommon() that is common code for evrey port that gets added from userspace. This is especially useful for ports that are not present on the Hyper-V switch. ie. tunnel ports and bridge-internal ports. 4. Fix OvsClearAllSwitchVports() to remove ports from both the lists: the ones added from Hyper-V as well as the ones added from OVS userspace. 5. Update OvsInitVxlanTunnel() to not call into InitHvVportCommon (formerly OvsInitVportCommon()) since it is not a port on the Hyper-v switch. In a later patch in the series, we'll call InitOvsVportCommon() for a VXLAN port. 6. 'numNonHvVports' increments and decrements ONLY for ports that are added from OVS userspace but not present on the Hyper-V switch. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: OvsInitTunnelVport() and OvsInitBridgeInternalVport().Nithin Raju2014-10-282-2/+52
| | | | | | | | | | In this patch, we add the init functions for a Tunnel vport and a Bridge-internal vport. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Introduce bridge-internal ports.Nithin Raju2014-10-283-11/+42
| | | | | | | | | | | | | | In this patch, we provide explanation and the reasoning for bridge-internal ports. The code to add such a port in come in later patch in the series. We also fix some formatting issues in PacketIO.c. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Clarify externalVport.Nithin Raju2014-10-286-30/+64
| | | | | | | | | | | | | | In this patch, we add some explanation about the usage of 'externalVport' in the switch context. Also, we rename 'externalVport' to 'virtualExternalVport' in alignment with the explanation. Also, we rename 'numVports' to 'numHvVports' since ports are added from 2 ends now. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Re-init the list entry in OvsDeleteVportCmdHandler().Nithin Raju2014-10-281-1/+4
| | | | | | | | | | | | Without this patch, the kernel crashes when it tries to cleanup a port at unload time when a port has been previously deleted from userspace. Crash is in OvsRemoveAndDeleteVport() when we call into RemoveEntryList(). Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Fix BSOD caused by DV due to memory leaks.Sorin Vinturis2014-10-281-7/+17
| | | | | | | | | | | | If the OVS extension is enabled, Driver Verifier will issue a BSOD due to memory leaks. This issue reproduces each time and the problem is in the filter attach routine when the switch context is initialized. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/50 Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows:Remove user mode instance from pid hash on process terminationEitan Eliahu2014-10-281-0/+6
| | | | | | | | | | | | The instance should be removed from pid-hash when vswitchd.exe terminates so the driver won't access it during packet miss (causing BSOD) Signed-off-by: Eitan Eliahu <eliahue@vmware.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* INSTALL.Windows: minor updates to the SSL sectionNithin Raju2014-10-281-2/+2
| | | | | Signed-off-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* lib/ovs-rcu: Support static initialization.Jarno Rajahalme2014-10-272-3/+3
| | | | | | | | | | | | | | | Currently, OVSRCU_TYPE_INITIALIZER always initializes the RCU pointer as NULL. There is no reason why the RCU pointer could not be initialized with a non-NULL value, however, as statically allocated memory is even more stable than required for RCU. This patch changes the initializer to OVSRCU_INITIALIZER(VALUE), which can take any pointer value as a parameter. This allows rculist, which is introduced in a following patch, to provide an initializer similar to the one in the normal list. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib/ofproto: Add comments about races in ofproto_flush().Jarno Rajahalme2014-10-271-0/+10
| | | | Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib/ofproto: Remove obsolete FIXME comment.Jarno Rajahalme2014-10-271-2/+0
| | | | | | We already implement OFPFUTIL_FF_RESET_COUNTS. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* classifier: Correct comment in classifier_lookup().Ben Pfaff2014-10-271-1/+1
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
* netlink-socket: Fix a couple of compilation warnings.Nithin Raju2014-10-241-4/+6
| | | | | | | | | Reported-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> [blp@nicira.com replaced conventional cast by CONST_CAST] Signed-off-by: Ben Pfaff <blp@nicira.com>
* lib/classifier: Add lib/classifier-private.h.Jarno Rajahalme2014-10-244-268/+292
| | | | | | | | | | | | | tests/test-classifier.c used to include lib/classifier.c to gain access to the internal data structures and some utility functions. This was confusing, so this patch splits the relevant groups of classifier internal definations to a new file (lib/classifier-private.h), which is included by both lib/classifier.c and tests/test-classifier.c. Other use of the new file is discouraged. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Clean up vlog use.Jarno Rajahalme2014-10-242-2/+2
| | | | | | | | | | | Vlog functions assume a vlog module has been defined for the current translation unit. Including lib/vlog.h from a header file makes the vlog API visible even when no vlog module may not have been defined. This patch removes the two cases in the tree where vlog.h was included from a header file. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Avoid BSOD when no event queue found.Alin Serdean2014-10-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kd> ??instance struct _OVS_OPEN_INSTANCE * 0xffffe000`037f2880 +0x000 cookie : 1 +0x008 fileObject : 0xffffe000`02c59f20 _FILE_OBJECT +0x010 eventQueue : (null) +0x018 packetQueue : 0xffffe000`02d50100 _OVS_USER_PACKET_QUEUE +0x020 pid : 2 +0x024 inUse : 0n1 +0x028 dumpState : <unnamed-tag> +0x038 pidLink : _LIST_ENTRY [ 0xffffe000`03ad83f0 - 0xffffe000`03ad83f0 ] kd> k Child-SP RetAddr Call Site ffffd000`2876eb18 fffff801`f364b7c6 nt!DbgBreakPointWithStatus ffffd000`2876eb20 fffff801`f364b0d7 nt!KiBugCheckDebugBreak+0x12 ffffd000`2876eb80 fffff801`f35c21a4 nt!KeBugCheck2+0x8ab ffffd000`2876f290 fffff801`f35cdbe9 nt!KeBugCheckEx+0x104 ffffd000`2876f2d0 fffff801`f35cc43a nt!KiBugCheckDispatch+0x69 ffffd000`2876f410 fffff800`02626666 nt!KiPageFault+0x23a ffffd000`2876f5a0 fffff800`026318d7 OVSExt!OvsWaitEventIoctl+0x116 [c:\work\ovs\datapath-windows\ovsext\event.c @ 472] ffffd000`2876f610 fffff800`026339b4 OVSExt!OvsPendEventCmdHandler+0x57 [c:\work\ovs\datapath-windows\ovsext\datapath.c @ 1056] ffffd000`2876f660 fffff800`0264d9c5 OVSExt!InvokeNetlinkCmdHandler+0xf4 [c:\work\ovs\datapath-windows\ovsext\datapath.c @ 938] ffffd000`2876f6b0 fffff800`006f1c18 OVSExt!OvsDeviceControl+0x855 [c:\work\ovs\datapath-windows\ovsext\datapath.c @ 853] ffffd000`2876f840 fffff801`f383c395 NDIS!ndisDummyIrpHandler+0x88 ffffd000`2876f870 fffff801`f383cd2a nt!IopXxxControlFile+0x845 ffffd000`2876fa20 fffff801`f35cd8b3 nt!NtDeviceIoControlFile+0x56 ffffd000`2876fa90 00000000`775c2772 nt!KiSystemServiceCopyEnd+0x13 00000000`010feef8 00000000`775c2371 wow64cpu!CpupSyscallStub+0x2 00000000`010fef00 00000000`7765323a wow64cpu!DeviceIoctlFileFault+0x31 00000000`010fefb0 00000000`7765317e wow64!RunCpuSimulation+0xa 00000000`010ff000 00007ff8`f1076bd0 wow64!Wow64LdrpInitialize+0x172 00000000`010ff540 00007ff8`f1076aa6 ntdll!_LdrpInitialize+0xd8 00000000`010ff5b0 00000000`00000000 ntdll!LdrInitializeThunk+0xe kd> ??poll struct _OVS_EVENT_POLL * 0xffffd000`2876f640 +0x000 cookie : 0x3a9ae28 +0x004 dpNo : 0 SYMBOL_STACK_INDEX: 6 SYMBOL_NAME: OVSExt!OvsWaitEventIoctl+116 FOLLOWUP_NAME: MachineOwner MODULE_NAME: OVSExt IMAGE_NAME: OVSExt.sys DEBUG_FLR_IMAGE_TIMESTAMP: 54498bc5 BUCKET_ID_FUNC_OFFSET: 116 FAILURE_BUCKET_ID: AV_OVSExt!OvsWaitEventIoctl BUCKET_ID: AV_OVSExt!OvsWaitEventIoctl ANALYSIS_SOURCE: KM FAILURE_ID_HASH_STRING: km:av_ovsext!ovswaiteventioctl FAILURE_ID_HASH: {07550bfb-c3b5-0412-b95d-f89a5c4671a9} Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofproto: Only allow indirect groups with one bucketSimon Horman2014-10-242-0/+30
| | | | | | | | | | | | | OpenFlow 1.1 - 1.4 specify that indirect groups should opperate on the "one defined bucket in the group". OpenFlow 1.2 - 1.4 also state "This group only supports a single bucket." This patch enforces the single bucket limitation for indirect groups when decoding group mod messages. A test is also added to exercise this change. Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: check for 'gOvsSwitchContext' in ValidateNetlinkCmd()Nithin Raju2014-10-241-2/+2
| | | | | | | Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Refactor CreateQueue function to handle vport pid.Ankur Sharma2014-10-247-44/+79
| | | | | | | | | Refactored CreateQueue function so that packets are enqueued to correct corresponding queue. Signed-off-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Add code for OvsGetQueue.Ankur Sharma2014-10-241-5/+16
| | | | | | | Signed-off-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: pid-instance hash table APIs.Ankur Sharma2014-10-242-0/+67
| | | | | | | | | In this patch we have added APIs for insert, delete and search APIs. Signed-off-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
* datapath: Use upstream ipv6_find_hdr().Pravin B Shelar2014-10-234-16/+24
| | | | | | | | | | | ipv6_find_hdr() already fixed in newer upstram kernel by Ansis, we can start using this API safely. This patch also backports fix (ipv6: ipv6_find_hdr restore prev functionality) to compat ipv6_find_hdr(). CC: Ansis Atteka <aatteka@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* datapath: Fix comment style.Pravin B Shelar2014-10-2310-21/+41
| | | | | | | Use netdev comment style. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>