summaryrefslogtreecommitdiff
path: root/build-aux
Commit message (Collapse)AuthorAgeFilesLines
...
* Add skeleton for OF1.6 support.Ben Pfaff2016-04-182-2/+4
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* Move lib/ofp-errors.h to include/openvswitch directoryBen Warren2016-03-191-1/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Build Windows include runtimeAlin Serdean2016-03-141-2/+2
| | | | | | | | | | | | | | | | This patch adds the Visual Studio runtime to the binaries by adding the code generation compile flags: MT (release version) and MTd (debug version). More on the subject can be found under: https://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=vs.120%29.aspx This helps shipping binaries and guaranteeing the runtime uses the specific version Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ofp-msgs: Add support for ONF extension messages.Ben Pfaff2016-02-191-1/+1
| | | | | | | | | | | | | | | ONF introduced a number of "standard extensions" that use its own vendor (experimenter) ID. This commit adds support for such extensions to ofp-msgs. These extensions were already half-supported, so there's barely any change to build-aux/extract-ofp-msgs. This isn't fully tested, since nothing adds support for such a message yet. Requested-by: Jarno Rajahalme <jarno@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* dist-docs: Convert tabs to spaces.Russell Bryant2016-02-091-16/+16
| | | | | | | | This file used mixed indentation. Convert the tabs to spaces for consistency. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* dist-docs: Fix relative links.Russell Bryant2016-02-091-0/+1
| | | | | | | | | | There are some relative links designed to work on github. These links are broken within dist-docs. Adding a symbolic link from the original filename to the plain text version makes these links work within dist-docs. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* dist-docs: Install plaintext files properly.Ben Pfaff2016-02-091-5/+20
| | | | | | We shouldn't try to treat every file as Markdown. Signed-off-by: Ben Pfaff <blp@ovn.org>
* dist-docs: Make GNU make aware of sub-make.Ben Pfaff2016-02-091-1/+1
| | | | | | | | | | | | | | | When GNU make sees that a command to be executed contains the string $(MAKE), it makes the jobserver that limits parallelism available to the command. Otherwise, any sub-make that executes sees that parallelism is enabled but does not have access to the jobserver, so it prints a warning and turns off parallel job execution. This also makes the dist-docs process run the same "make" that is executed at the top level, in case that's different from the default "make" found in $PATH. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* xml2nroff: Fix build breakage when srcdir differs from builddir.Ben Pfaff2016-01-121-7/+23
| | | | | | | | | | | When the source directory and build directory differ, xml2nroff needs to pull include files from the source directory, but it was blindly using the current working directory (the build directory) instead. Signed-off-by: Ben Pfaff <blp@ovn.org> Fixes: 7ba0c32f610 ("ovn-nbctl: add db commands help and manpage") Tested-by: Joe Stringer <joe@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* ovn-nbctl: add db commands help and manpageWei Li2016-01-121-0/+9
| | | | | | | | | | db-ctl-base: add xml format db help xml2nroff: support xinclude Submitted-at: https://github.com/openvswitch/ovs/pull/93 Signed-off-by: l0310 <liw@dtdream.com> [russell@ovn.org updated lib/automake.mk] Signed-off-by: Russell Bryant <russell@ovn.org>
* xml2nroff: Read whole file instead of line by line.Russell Bryant2015-12-111-7/+5
| | | | | | | | | | | The previous code processed the input file line by line, but I think it looks a little more straight forward to just process the whole file at once. This patch also explicitly closes the file after reading its contents. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* xml2nroff: Don't use built-in function name.Russell Bryant2015-12-111-3/+3
| | | | | | | | Don't use "input" as a variable name, as input is a built-in Python function. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* xml2nroff: Fix issues pointed out by flake8.Russell Bryant2015-12-111-4/+3
| | | | | | | | | | This patch includes a few minor fixes pointed out by the flake8 tool. It drops an unused variable and the related imports, adds some blank lines where the PEP8 formatting standard indicates they should be, and does a comparison with None as "is None" instead of "== None". Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* xml2nroff: Don't use import *.Russell Bryant2015-12-111-5/+5
| | | | | | | | It's generally considered bad style to do a wildcard import. It makes it more difficult to figure out where things come from. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* xml2nroff: Drop duplicated usage().Russell Bryant2015-12-111-12/+0
| | | | | | | | The usage() function was included twice. Drop the one that was out of date. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* extract-odp-netlink-h: Portablitiy improvementYAMAMOTO Takashi2015-11-261-1/+1
| | | | | | | \t is GNU sed extension. Use [[:space:]] instead. Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com> Acked-by: Ben Pfaff <blp@ovn.org>
* dist-docs: Fix text and HTML manpage generation with some groff versions.Ben Pfaff2015-11-111-2/+2
| | | | | | | | | | | | | | Some versions of groff use termcap sequences for bold, italic, etc. by default. The dist-docs script doesn't cope with those; it expects sequences based on backspacing and overprinting. This commit fixes the problem by setting an environment variable GROFF_NO_SGR that forces groff to use backspacing. Found on Fedora. Reported-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <rbryant@redhat.com>
* Add support for connection tracking.Joe Stringer2015-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new action and fields to OVS that allow connection tracking to be performed. This support works in conjunction with the Linux kernel support merged into the Linux-4.3 development cycle. Packets have two possible states with respect to connection tracking: Untracked packets have not previously passed through the connection tracker, while tracked packets have previously been through the connection tracker. For OpenFlow pipeline processing, untracked packets can become tracked, and they will remain tracked until the end of the pipeline. Tracked packets cannot become untracked. Connections can be unknown, uncommitted, or committed. Packets which are untracked have unknown connection state. To know the connection state, the packet must become tracked. Uncommitted connections have no connection state stored about them, so it is only possible for the connection tracker to identify whether they are a new connection or whether they are invalid. Committed connections have connection state stored beyond the lifetime of the packet, which allows later packets in the same connection to be identified as part of the same established connection, or related to an existing connection - for instance ICMP error responses. The new 'ct' action transitions the packet from "untracked" to "tracked" by sending this flow through the connection tracker. The following parameters are supported initally: - "commit": When commit is executed, the connection moves from uncommitted state to committed state. This signals that information about the connection should be stored beyond the lifetime of the packet within the pipeline. This allows future packets in the same connection to be recognized as part of the same "established" (est) connection, as well as identifying packets in the reply (rpl) direction, or packets related to an existing connection (rel). - "zone=[u16|NXM]": Perform connection tracking in the zone specified. Each zone is an independent connection tracking context. When the "commit" parameter is used, the connection will only be committed in the specified zone, and not in other zones. This is 0 by default. - "table=NUMBER": Fork pipeline processing in two. The original instance of the packet will continue processing the current actions list as an untracked packet. An additional instance of the packet will be sent to the connection tracker, which will be re-injected into the OpenFlow pipeline to resume processing in the specified table, with the ct_state and other ct match fields set. If the table is not specified, then the packet is submitted to the connection tracker, but the pipeline does not fork and the ct match fields are not populated. It is strongly recommended to specify a table later than the current table to prevent loops. When the "table" option is used, the packet that continues processing in the specified table will have the ct_state populated. The ct_state may have any of the following flags set: - Tracked (trk): Connection tracking has occurred. - Reply (rpl): The flow is in the reply direction. - Invalid (inv): The connection tracker couldn't identify the connection. - New (new): This is the beginning of a new connection. - Established (est): This is part of an already existing connection. - Related (rel): This connection is related to an existing connection. For more information, consult the ovs-ofctl(8) man pages. Below is a simple example flow table to allow outbound TCP traffic from port 1 and drop traffic from port 2 that was not initiated by port 1: table=0,priority=1,action=drop table=0,arp,action=normal table=0,in_port=1,tcp,ct_state=-trk,action=ct(commit,zone=9),2 table=0,in_port=2,tcp,ct_state=-trk,action=ct(zone=9,table=1) table=1,in_port=2,ct_state=+trk+est,tcp,action=1 table=1,in_port=2,ct_state=+trk+new,tcp,action=drop Based on original design by Justin Pettit, contributions from Thomas Graf and Daniele Di Proietto. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ofp-actions: Pass ofp_version to decode functions.Joe Stringer2015-10-131-4/+5
| | | | | | | | | A future patch will make use of this version parameter to pass nested attributes. Prepare for that by adding the parameter as an unused variable for the existing functions. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* meta-flow: Rename IPv6 type to be128.Joe Stringer2015-10-131-1/+1
| | | | | Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* automake: Consolidate schema checksum check.Gurucharan Shetty2015-10-021-0/+14
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* userspace: Define and use struct eth_addr.Jarno Rajahalme2015-08-282-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define struct eth_addr and use it instead of a uint8_t array for all ethernet addresses in OVS userspace. The struct is always the right size, and it can be assigned without an explicit memcpy, which makes code more readable. "struct eth_addr" is a good type name for this as many utility functions are already named accordingly. struct eth_addr can be accessed as bytes as well as ovs_be16's, which makes the struct 16-bit aligned. All use seems to be 16-bit aligned, so some algorithms on the ethernet addresses can be made a bit more efficient making use of this fact. As the struct fits into a register (in 64-bit systems) we pass it by value when possible. This patch also changes the few uses of Linux specific ETH_ALEN to OVS's own ETH_ADDR_LEN, and removes the OFP_ETH_ALEN, as it is no longer needed. This work stemmed from a desire to make all struct flow members assignable for unrelated exploration purposes. However, I think this might be a nice code readability improvement by itself. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
* nroff: Fix style of names.Ben Pfaff2015-07-061-2/+3
| | | | | | | | | | | | | The recommended Google Python style is multi_word_names, not multiWordNames. There are lots of other places where the style could be improved. I started here because I was working in this code anyway and because this code is only used at build time and not installed, so that it can't break any third-party code. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* ofp-msgs: Add function ofptype_get_name().Ben Pfaff2015-07-061-0/+9
| | | | | | | An upcoming commit will make use of this. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* tunnel: Geneve TLV handling support for OpenFlow.Jesse Gross2015-06-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current support for Geneve in OVS is exactly equivalent to VXLAN: it is possible to set and match on the VNI but not on any options contained in the header. This patch enables the use of options. The goal for Geneve support is not to add support for any particular option but to allow end users or controllers to specify what they would like to match. That is, the full range of Geneve's capabilities should be exposed without modifying the code (the one exception being options that require per-packet computation in the fast path). The main issue with supporting Geneve options is how to integrate the fields into the existing OpenFlow pipeline. All existing operations are referred to by their NXM/OXM field name - matches, action generation, arithmetic operations (i.e. tranfer to a register). However, the Geneve option space is exactly the same as the OXM space, so a direct mapping is not feasible. Instead, we create a pool of 64 NXMs that are then dynamically mapped on Geneve option TLVs using OpenFlow. Once mapped, these fields become first-class citizens in the OpenFlow pipeline. An example of how to use Geneve options: ovs-ofctl add-geneve-map br0 {class=0xffff,type=0,len=4}->tun_metadata0 ovs-ofctl add-flow br0 in_port=LOCAL,actions=set_field:0xffffffff->tun_metadata0,1 This will add a 4 bytes option (filled will all 1's) to all packets coming from the LOCAL port and then send then out to port 1. A limitation of this patch is that although the option table is specified for a particular switch over OpenFlow, it is currently global to all switches. This will be addressed in a future patch. Based on work originally done by Madhu Challa. Ben Pfaff also significantly improved the comments. Signed-off-by: Madhu Challa <challa@noironetworks.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* metaflow: Allow fields to be marked as variable length.Jesse Gross2015-06-251-8/+15
| | | | | | | | | | | | | | | Until now, all fields that OVS can match against have been fixed size (variable length headers can be skipped during parsing but the match is fixed). However, Geneve options can vary in size so we must not require the size of these fields to be known at compile time. This allows data types to be annotated with not only their size but whether the field can be smaller than that. The following patches will change OpenFlow parsing based on that. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* xml2nroff: Add support for variable substitutions.Ben Pfaff2015-06-161-5/+24
| | | | | | | | | This allows XML-generated manpages in the source tree to include correct directory names for the local configuration, instead of just the plain nroff ones. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
* metaflow: Convert hex parsing to use new utility functions.Jesse Gross2015-06-011-10/+10
| | | | | | | | | | | | | | We now have functions that can do parsing and printing of long hex strings, so we should use them for meta flow fields to ensure consistent behavior. Since these functions can handle infinitely long strings, we can also increase the maximum field size for MFS_HEXADECIMAL types to the limit allowed by NXM/OXM. This is useful for future large fields, such as Geneve options. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* extract-ofp-fields: Detect duplicate fields.Joe Stringer2015-05-271-0/+13
| | | | | | | | | Figure out if a developer accidentally defines new NXM fields using an existing number, and warn them. Useful particularly if new fields are introduced upstream while rebasing an in-progress patchset. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* extract-ofp-fields: Port to python3.Joe Stringer2015-05-221-11/+11
| | | | | | | | | Mostly "print foo" -> "print(foo)" and "iteritems() -> items()". The latter may be less efficient in python2, but we're not dealing with massive numbers of items here so it shouldn't noticably slow the build. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* extract-ofp-fields: Fix most pep8 style issues.Joe Stringer2015-05-221-31/+46
| | | | | Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* Remove compiler warningAlin Serdean2015-04-231-0/+4
| | | | | | | | | | | | When linking executables on windows the following argument is passed to the linker -Qunused-arguments. This results in the following warning: Command line warning D9002 : ignoring unknown option '-Qunused-arguments' This patch removes that warning. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* build-aux/cccl: Enhance --with-debug optionAlin Serdean2015-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the behaviour in case the configure argument: --with-debug was specified. Currently the optimization flag in the case of debugging is the following: https://msdn.microsoft.com/en-us/library/f9534wye.aspx which does not fully disable optimization, that is why it was changed with the following flag: https://msdn.microsoft.com/en-us/library/aafb762y.aspx which disables all code optimization. Also this patch includes the definition of the following preprocessor definitions: _DEBUG - in case --with-debug is specified The above definitions usually are defined when compiling with the following flags: https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx Since we are not compiling with the above flag, mimic the behaviour the debug becahviour. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* xml2nroff: New program to generate a manpage from XML input.Ben Pfaff2015-02-191-0/+123
| | | | | | | | | I really can't stand nroff syntax. This makes it possible to install nroff but write in a more sensible XML syntax. The following commit adds the first user. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofp-actions: Support "copy_field" ONF extension to OpenFlow 1.3.Ben Pfaff2014-12-051-0/+1
| | | | | | ONF-JIRA: EXT-320 Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
* cccl: Respect silent flags.Joe Stringer2014-12-041-1/+3
| | | | | | | | | Automake sets $V to tell the compiler whether to print verbose messages as it compiles or not. Add support for this variable in cccl, allowing more quiet build output on windows if the build is configured with --silent or the developer runs make V=0. Signed-off-by: Joe Stringer <joestringer@nicira.com>
* dist-docs: New utility to generate a documentation bundle for the website.Ben Pfaff2014-12-021-0/+153
| | | | | | | | | | | | | | This utility isn't going to be as portable as most of the Open vSwitch utilities, unfortunately. I'm happy to take improvements to make it able to work with, e.g., the "man" program from BSD. (I haven't tested with that program, but I suspect that it is somewhat different from the GNU version.) The output of this program can already be viewed at: http://openvswitch.org/support/dist-docs/ Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
* include: Use #include <.*> in public headers.Thomas Graf2014-11-121-1/+1
| | | | | | | | Required to make the headers installable. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* flow: Support OF1.5+ (draft) actset_output field.Ben Pfaff2014-11-031-0/+1
| | | | | | | | | This field allows a flow table to match on the output port currently in the action set. ONF-JIRA: EXT-233 Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* nx-match: Add support for multiple OXM field assignments for one field.Ben Pfaff2014-11-031-18/+12
| | | | | | | | | | | | actset_output, to be added in an upcoming commit, has one OXM assignment in OpenFlow 1.3 and another one in OpenFlow 1.5. This commit allows both of them to be supported in appropriate OpenFlow versions. This feature is difficult to test on its own, so the same commit that adds actset_output support also tests this feature. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* datapath-windows: Increase the maximum size of port name.Nithin Raju2014-10-311-2/+1
| | | | | | | | | | | | | | | | | | | | In userspace, port name sizes are restricted to IFNAMSIZ which is defined to IF_NAME_SIZE in: C:\Program Files (x86)\Windows Kits\8.1\Include\shared\netioapi.h In the kernel, since IFNAMSIZ was not available, we previously defined a value of 16 for the kernel. This is restrictive for Openstack integration where we use UUID as the name. In this patch, we make the kernel code also use the same value as the userspace. Also updated is the OVS.psm1 powershell script which now allows friendly names to be upto 48 bytes. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* cccl: Ignore -fno-strict-aliasing.Alin Serdean2014-10-081-0/+4
| | | | | | | | Add a case for the gcc flag fno-strict-aliasing into cccl Under MSVC Strict aliasing is off by default. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* nx-match: Add support for experimenter OXM.Ben Pfaff2014-10-081-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenFlow 1.2+ defines a means for vendors to define vendor-specific OXM fields, called "experimenter OXM". These OXM fields are expressed with a 64-bit OXM header instead of the 32-bit header used for standard OXM (and NXM). Until now, OVS has not implemented experimenter OXM, and indeed we have had little need to do so because of a pair of special 32-bit OXM classes grandfathered to OVS as part of the OpenFlow 1.2 standardization process. However, I want to prototype a feature for OpenFlow 1.5 that uses an experimenter OXM as part of the prototype, so to do this OVS needs to support experimenter OXM. This commit adds that support. Most of this commit is a fairly straightforward change: it extends the type used for OXM/NXM from 32 to 64 bits and adds code to encode and decode the longer headers when necessary. Some other changes are necessary because experimenter OXMs have a funny idea of the division between "header" and "body": the extra 32 bits for experimenter OXMs are counted as part of the body rather than the header according to the OpenFlow standard (even though this does not entirely make sense), so arithmetic in various places has to be adjusted, which is the reason for the new functions nxm_experimenter_len(), nxm_payload_len(), and nxm_header_len(). Another change that calls for explanation is the new function mf_nxm_header() that has been split from mf_oxm_header(). This function is used in actions where the space for an NXM or OXM header is fixed so that there is no room for a 64-bit experimenter type. An upcoming commit will add new variations of these actions that can support experimenter OXM. Testing experimenter OXM is tricky because I do not know of any in widespread use. Two ONF proposals use experimenter OXMs: EXT-256 and EXT-233. EXT-256 is not suitable to implement for testing because its use of experimenter OXM is wrong and will be changed. EXT-233 is not suitable to implement for testing because it requires adding a new field to struct flow and I am not yet convinced that that field and the feature that it supports is worth having in Open vSwitch. Thus, this commit assigns an experimenter OXM code point to an existing OVS field that is currently restricted from use by controllers, "dp_hash", and uses that for testing. Because controllers cannot use it, this leaves future versions of OVS free to drop the support for the experimenter OXM for this field without causing backward compatibility problems. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* nx-match: Move all knowledge of OXM/NXM here.Ben Pfaff2014-10-071-93/+113
| | | | | | | | | | | | | This improves the general abstraction of OXM/NXM by eliminating direct knowledge of it from the meta-flow code and other places. Some function renaming might be called for; for example, mf_oxm_header() may not be the best name now that the function is implemented within nx-match. However, these renamings would make this commit larger and harder to review, so I'm postponing them. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* meta-flow: Autogenerate mf_field data structures.Ben Pfaff2014-10-071-0/+458
| | | | | | | | | | | This is a first step toward improving the abstraction of OXM and NXM in the tree. As an immediate improvement, this commit removes all of the definitions of the OXM and NXM constants from the top-level header files, because they are no longer used anywhere. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* extract-ofp-msgs: Correct some user messages.Ben Pfaff2014-09-291-2/+2
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* extract-odp-netlink-windows-dp-h: add definition of IFNAMSIZNithin Raju2014-09-191-1/+2
| | | | | | | | | | The Windows kernel datapath needs the definition of 'IFNAMSIZ' for specifying attribute sizes in netlink policies. Adding the definition of 'IFNAMSIZ' to be part of OvsDpInterface.h similar to ETH_ADDR_LEN. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* cccl: Ability to enable compiler optimization.Gurucharan Shetty2014-09-041-0/+8
| | | | | | | | | | | | | | | | | | | | MSVC has a '-O2' compiler optimization flag which makes code run fast and is the recommended option for released code. For e.g., running "./tests/ovstest.exe test-cmap benchmark 1000000 3 1" shows a 3x improvement for some cmap micro-benchmarks. In the Visual Studio world, there is a concept of "release" build (fast code, harder to debug) and a "debug" build (easier to debug). The IDE provides this option and the IDE users expect something similar for command line build. So this commit, introduces a "--with-debug" configure option for Windows and does not use '-O2' as a compiler option when specified. This can be extended further if there are more compiler options that distinguish a "release" build vs "debug" build. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Saurabh Shah <ssaurabh@vmware.com>
* cccl: Enable ability to parallel build.Gurucharan Shetty2014-09-041-1/+1
| | | | | | | | | | | The /FS option allows serial access to PDB file creation letting parallel builds succeed with mingw32-make (with some tricks). The 'make' that comes with MSYS has a bug that causes hangs with parallel builds which supposedly has been fixed in the upcoming 1.0.19 release. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Saurabh Shah <ssaurabh@vmware.com>
* ofp-errors: Fix bugs in treatment of OpenFlow experimenter errors.Ben Pfaff2014-09-041-6/+24
| | | | | | | | | | | | | | | | | | | | OpenFlow 1.2 and later have "experimenter errors". The OVS implementation was buggy in a few ways. First, a bug in extract-ofp-errors prevented OF1.2+ experimenter errors from being properly decoded. Second, OF1.2+ experimenter errors have only a type, not a code, whereas all other types of errors (standard errors, OF1.0/1.1 Nicira extension errors) have both, but extract-ofp-errors didn't properly enforce that. This commit fixes both problems and improves existing tests to verify that encoding and decoding of experimenter errors now works properly. This commit also fixes the definition of OFPBIC_DUP_INST. It claimed to have an OF1.1 experimenter error value although OF1.1 didn't have experimenter errors. This commit changes it to use a Nicira extension error in OF1.1 instead. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>