summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* vlog: Ability to override the default log facility.Gurucharan Shetty2015-01-281-0/+13
| | | | | | | | | | | | | | | When Open vSwitch is run in hundreds of hypervisors, it is useful to collect log messages through log collectors. To collect log messages like this, it is useful to log them in a particular RFC5424 facility in the local system. The log collectors can then be used to collect logs anytime desired. This commit provides a sysadmin the ability to specify the facility through which the log messages are logged. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vlog: Logging option '--syslog-target' needs one argument.Gurucharan Shetty2015-01-261-1/+1
| | | | | | | | Without this commit, starting a daemon with just '--syslog-target' causes a segmentation fault. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vconn: Move struct definitions back to provider interface.Ben Pfaff2015-01-201-25/+5
| | | | | | | | | | Commit 4a1f523f2d760 (lib: Move vconn.h to <openvswitch/vconn.h>) moved the definitions of struct vconn and struct pvconn into the public vconn.h header. This is unnecessary because the size and content of these structs is not part of the ABI. This commit moves them back. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
* vconn: Avoid using C++ keyword 'class' as variable name in headersAmit Bose2015-01-131-2/+2
| | | | | Signed-off-by: Amit Bose <bose@noironetworks.com> Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
* vlog: Rename the currently used term 'facility' as 'destination'.Gurucharan Shetty2015-01-081-19/+21
| | | | | | | | | | | | In OVS, we currently use the term 'facility' to mean the place where we log (syslog, console or file). In Linux's syslog() and rfc5424, the term 'facility' is used to specify what type of program is logging the message (e.g: LOG_DAEMON). This causes confusion while reading vlog's code. This commit changes the term 'facility' to 'destination'. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Move vconn.h to <openvswitch/vconn.h>Thomas Graf2014-12-152-0/+114
| | | | | | | | Also moves definitions for struct vconn and pvconn to the public header. The provider interface is kept private. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Move vlog.h to <openvswitch/vlog.h>Thomas Graf2014-12-152-1/+298
| | | | | | | | A new function vlog_insert_module() is introduced to avoid using list_insert() from the vlog.h header. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Expose struct ovs_list definition in <openvswitch/list.h>Thomas Graf2014-12-152-0/+28
| | | | | | | | Expose the struct ovs_list definition in <openvswitch/list.h>. Keep the list access API private for now. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Expose SAT_MUT as OVS_SAT_MUL in <openvswitch/util.h>Thomas Graf2014-12-151-0/+6
| | | | | | | | Insted of exposing the full sat-math.h API, only the macros used in headers is exposed through <openvswitch/util.h> Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Move token-bucket.h to <openvswitch/token-bucket.h>Thomas Graf2014-12-152-0/+43
| | | | | Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Expose ovs_mutex and ovsthread_once in <openvswitch/thread.h>Thomas Graf2014-12-152-0/+138
| | | | | | | | This picks the ovs_mutex and ovsthread_once API from lib/ovs-thread.h and exposes it in <openvswitch/thread.h>. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Expose SOURCE_LOCATOR as OVS_SOURCE_LOACATORThomas Graf2014-12-151-0/+8
| | | | | | | Required to expose headers which depend on SOURCE_LOCATOR Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Move compiler.h to <openvswitch/compiler.h>Thomas Graf2014-12-152-0/+225
| | | | | | | | | | The following macros are renamed to avoid conflicts with other headers: * WARN_UNUSED_RESULT to OVS_WARN_UNUSED_RESULT * PRINTF_FORMAT to OVS_PRINTF_FORMAT * NO_RETURN to OVS_NO_RETURN Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* include/openvswitch/util: Add extern "C" { ... }.Ben Pfaff2014-12-081-0/+8
| | | | | | Requested-by: Alan Shieh <ashieh@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
* Add Netronome vendor Id: NMX_VENDOR_ID = 0x00001540.Simon Horman2014-11-251-0/+1
| | | | | | | | | | This is based on the Netronome IEEE OUI, 00154D. And it has been registered with the ONF: https://rs.opennetworking.org/wiki/display/PUBLIC/ONF+Registry Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* lib: Add API to set program name and versionThomas Graf2014-11-252-0/+32
| | | | | | | Required to have reasonable logging messages. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* lib: Add new header <openvswitch/version.h> to versioning infoThomas Graf2014-11-253-1/+31
| | | | | | | | | | | | | | Exposes the package version as string and the library versioning as numeric macro. OVS_LIB_VERSION may be used to check for a particular version of the interface. OVS_LIB_REVISION and OVS_LIB_AGE exist to map a set of installed headers to a particular shared library instance. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* hash: Add 128-bit murmurhash.Joe Stringer2014-11-251-0/+14
| | | | | | | | Add the 128-bit murmurhash by Austin Appleby, r150 from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* openflow: Use *_array_len names in struct ofp15_bucket and ofp15_group_modSimon Horman2014-11-251-4/+4
| | | | | | | | | | | | The spec has been clarified to use _list_len in palce of _list_len terminology to make it clearer that the data is not an ordered list (it is a set). The code present in Open vSwitch already avoided the _list_len terminology. This change brings the code into line with the updated spec. ONF-JIRA: EXT-350 Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* openflow: Value 4 of enum ofp15_group_mod_command is reserved.Simon Horman2014-11-251-0/+1
| | | | | | | | | | The spec has been clarified to note that element 4 of enum ofp_group_mod_command is reserved. This patch reflects that change. ONF-JIRA: EXT-350 Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Fix build break in ofproto/tunnel.c for windows platform.Saurabh Shah2014-11-201-0/+1
| | | | | | | | | | The breakage was introduced by commit: a36de779 ("openvswitch: Userspace tunneling."). Reported-by: Edwin Chiu <echiu@nicira.com> Signed-off-by: Saurabh Shah <ssaurabh@vmware.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* openflow: Add OpenFlow 1.4 packet-in reasons.Shu Shen2014-11-131-1/+4
| | | | | Signed-off-by: Shu Shen <shu.shen@radisys.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* include: Install openflow/ and openvswitch/ headers.Thomas Graf2014-11-132-2/+4
| | | | | | | Suggested-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Fix misspellings of "OpenFlow".Ben Pfaff2014-11-121-2/+2
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Flavio Leitner <fbl@redhat.com>
* include: Use #include <.*> in public headers.Thomas Graf2014-11-129-15/+15
| | | | | | | | 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>
* openflow: Add types for (draft) OpenFlow 1.5 group mod.Simon Horman2014-11-111-1/+112
| | | | | | ONF-JIRA: EXT-350 Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Add support for OpenFlow 1.4+ "importance" values.Rishi Bamba2014-11-101-2/+3
| | | | | | | | | | | | | | | This patch enables a user to set importance for a new rule via add-flow OF1.4+ in the OVS and display the same via dump-flows command OF1.4+. The changes are made in accordance with OpenFlow 1.4 specs to implement eviction on the basis of "importance". This patch also enhances the diff-flows & replace-flows CLI for addition of importance parameter in a rule. This doesn't actually implement eviction on the basis of importance, which will happen in a later patch. Signed-off-by: Rishi Bamba <rishi.bamba@tcs.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* openflow.h: Add header for OpenFlow v1.5.Jean Tourrilhes2014-11-043-0/+49
| | | | | Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* flow: Support OF1.5+ (draft) actset_output field.Ben Pfaff2014-11-031-3/+4
| | | | | | | | | 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>
* nicira-ext.h: Update commentsYAMAMOTO Takashi2014-10-141-4/+9
| | | | | Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* nx-match: Move all knowledge of OXM/NXM here.Ben Pfaff2014-10-072-48/+0
| | | | | | | | | | | | | 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-072-586/+1
| | | | | | | | | | | 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>
* Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.Ben Pfaff2014-09-292-2/+2
| | | | | | | | The Open vSwitch "make" output was still pretty verbose even when configured with --enable-silent-rules. This cleans it up. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Joe Stringer <joestringer@nicira.com>
* netinet/in.h: Add definition for IPPROTO_GRE.Gurucharan Shetty2014-08-181-0/+22
| | | | | | | | | Commit b7ea2d480338(Extend OVS IPFIX exporter to export tunnel headers) added a usage for IPROTO_GRE. But that does not look available in any Visual Studio headers. So add it. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Extend OVS IPFIX exporter to export tunnel headersWenyu Zhang2014-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | Extend IPFIX exporter to export tunnel headers when both input and output of the port. Add three other_config options in IPFIX table: enable-input-sampling, enable-output-sampling and enable-tunnel-sampling, to control whether sampling tunnel info, on which direction (input or output). Insert sampling action before output action and the output tunnel port is sent to datapath in the sampling action. Make datapath collect output tunnel info and send it back to userpace in upcall message with a new additional optional attribute. Add a tunnel ports map to make the tunnel port lookup faster in sampling upcalls in IPFIX exporter. Make the IPFIX exporter generate IPFIX template sets with enterprise elements for the tunnel info, save the tunnel info in IPFIX cache entries, and send IPFIX DATA with tunnel info. Add flowDirection element in IPFIX templates. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Romain Lenglet <rlenglet@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* Prepare include headersAlin Serdean2014-08-134-0/+60
| | | | | | | Preparing the include headers needed to compile dpif-linux.c with MSVC. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* No newline at end of fileAlin Serdean2014-08-132-2/+2
| | | | | | | Adding newline at end of the following files: packet.h, uio.h. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofp-errors: Use EXT-444 extension error codes for properties in OF1.3.Ben Pfaff2014-08-121-0/+3
| | | | | | | | | | | | These error codes are proposed in the ONF extensibility working group as an OpenFlow 1.3 extension. Error codes are also proposed for the other three "bad property" error codes, but those already have standardized OpenFlow 1.3 error codes and the proposal says that implementations should use the standard ones. ONF-JIRA: EXT-444. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofp-actions: Centralize all OpenFlow action code for maintainability.Ben Pfaff2014-08-116-1299/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, knowledge about OpenFlow has been somewhat scattered around the tree. Some of it is in ofp-actions, some of it is in ofp-util, some in separate files for individual actions, and most of the wire format declarations are in include/openflow. This commit centralizes all of that in ofp-actions. Encoding and decoding OpenFlow actions was previously broken up by OpenFlow version. This was OK with only OpenFlow 1.0 and 1.1, but each additional version added a new wrapper around the existing ones, which started to become hard to understand. This commit merges all of the processing for the different versions, to the extent that they are similar, making the version differences clearer. Previously, ofp-actions contained OpenFlow encoding and decoding, plus ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which seems an odd division. This commit moves the parsing code into ofp-actions with the rest of the code. Before this commit, the four main bits of code associated with a particular ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were all found far away from each other. This often made it hard to see what was going on for a particular ofpact, since you had to search around to many different pieces of code. This commit reorganizes so that all of the code for a given ofpact is in a single place. As a code refactoring, this commit has little visible behavioral change. The update to ofproto-dpif.at illustrates one minor bug fix as a side effect: a flow that was added with the action "dec_ttl" (a standard OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira extension to specifically direct packets bounced to the controller because of too-low TTL), but after this commit it is correctly formatted as "dec_ttl". The other visible effect is to drop support for the Nicira extension dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent standard action. It seems unlikely that anyone was really using the Nicira extension in OF1.1 or later. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* ofp-actions: Add instructions bitmaps and fix related bug.Ben Pfaff2014-08-112-8/+0
| | | | | | | | | | | | This will allow, later, to centralize all of the knowledge of instruction encoding inside ofp-actions. OFPIT11_ALL and OFPIT13_ALL are no longer used, so this commit removes them. Their definitions were wrong (they did not shift each bit into position correctly), so this commit is also a small bug fix. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* ofp-actions: Add action bitmap abstraction.Ben Pfaff2014-08-111-2/+10
| | | | | | | | | | | | | | | Until now, sets of actions have been abstracted separately outside ofp-actions, as enum ofputil_action_bitmap. Drawing sets of actions into ofp-actions, as done in this commit, makes for a better overall abstraction of actions, with better consistency. A big part of this commit is shifting from using ofp12_table_stats as if it were an abstraction for OpenFlow table stats, toward using a new struct ofputil_table_stats, which is what we generally do with other OpenFlow structures and fits better with the rest of the code. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* Do not seemingly #include Linux-specific headers on other platforms.Ben Pfaff2014-08-046-720/+13
| | | | | | | | | | | | | | | | | | Until now, the OVS source tree has had a whole maze of header files that make "#include <linux/openvswitch.h>" work OK regardless of platform, but this confuses everyone new to the tree, at first glance, and is difficult to understand at second glance too. This commit renames include/linux/openvswitch.h to datapath/linux/compat/include/linux/openvswitch.h without other change, then modifies the userspace build to generate a header that makes sense in portable Open vSwitch userspace from that header. It then removes all the remaining include/linux/* files since they are now unused. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Add defines, enums and headers for MSVCAlin Serdean2014-07-295-0/+163
| | | | | | | | | | | Add defines needed to compile netlink-socket.c and netlink.c. Add a wrapper and the functionality behind it for syconf. Add the newly created files to the noinst_HEADERS in windows/automake.mk Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* meta-flow: Add 64-bit registers.Ben Pfaff2014-07-281-0/+4
| | | | | | | | | These 64-bit registers are intended to conform with the OpenFlow 1.5 draft specification. EXT-244. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* datapath: reorder action netlink attribute definition for upstreamingAndy Zhou2014-07-241-3/+4
| | | | | | | | | | | | | | | | | Keeping the order of netlink attribute definition in the order of upstreaming is the best way to keep all released user space program forward compatible with upstreamed kernel modules. Adjust action netlink attribute order to match with the current upstreaming plan. Recirc and hash actions are introduced in branch 2.3, which will be fixed by the patch. The MPLS actions have been released since branch-2.1 but there is no kernel implementation of them prior to branch 2.3. Thus the ordering change should not affect them. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Add basic MPLS support to kernelSimon Horman2014-06-241-5/+4
| | | | | | | | | | | | | | Allow datapath to recognize and extract MPLS labels into flow keys and execute actions which push, pop, and set labels on packets. Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer. Cc: Ravi K <rkerur@gmail.com> Cc: Leo Alterman <lalterman@nicira.com> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Joe Stringer <joe@wand.net.nz> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* doc: Additional documentation updates for Geneve.Jesse Gross2014-06-201-3/+3
| | | | Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Add support for Geneve tunneling.Jesse Gross2014-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | This adds support for Geneve - Generic Network Virtualization Encapsulation. The protocol is documented at http://tools.ietf.org/html/draft-gross-geneve-00 The kernel implementation is completely agnostic to the options that are in use and can handle newly defined options without further work. It does this by simply matching on a byte array of options and allowing userspace to setup flows on this array. Userspace currently implements only support for basic version of Geneve. It can work with the base header (including the VNI) and is capable of parsing options but does not currently support any particular option definitions. Over time, the intention is to allow options to be matched through OpenFlow without requiring explicit support in OVS userspace. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* tunnel: Add support for matching on OAM packets.Jesse Gross2014-06-191-0/+1
| | | | | | | | | | | Some tunnel formats have mechanisms for indicating that packets are OAM frames that should be handled specially (either as high priority or not forwarded beyond an endpoint). This provides support for allowing those types of packets to be matched. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Wrap struct ovs_key_ipv4_tunnel in a new structure.Jesse Gross2014-06-191-1/+1
| | | | | | | | | | | | | | | | Currently, the flow information that is matched for tunnels and the tunnel data passed around with packets is the same. However, as additional information is added this is not necessarily desirable, as in the case of pointers. This adds a new structure for tunnel metadata which currently contains only the existing struct. This change is purely internal to the kernel since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version of OVS_KEY_ATTR_TUNNEL that is translated at flow setup. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>