summaryrefslogtreecommitdiff
path: root/include/openvswitch/automake.mk
Commit message (Collapse)AuthorAgeFilesLines
* ofp-util, ofp-parse: Break up into many separate modules.Ben Pfaff2018-02-131-0/+15
| | | | | | | | | | | | ofp-util had been far too large and monolithic for a long time. This commit breaks it up into units that make some logical sense. It also moves the pieces of ofp-parse that were specific to each unit into the relevant unit. Most of this commit is just moving code around. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
* lib: Move lib/poll-loop.h to include/openvswitchXiao Liang2017-11-031-0/+1
| | | | | | | | Poll-loop is the core to implement main loop. It should be available in libopenvswitch. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* lib: Move lib/rconn.h to include/openvswitchXiao Liang2017-10-311-0/+1
| | | | | | | | Rconn provides useful features over vconn. Make it available to library users. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-atomic: Add C++ compatible implementation.Ben Pfaff2017-10-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | G++ 5 does not implement the _Atomic keyword, which is part of C11 but not C++11, so the existing <stdatomic.h> based atomic implementation doesn't work. This commit adds a new implementation based on the C++11 <atomic> header. In this area, C++ is pickier about types than C, so a few of the definitions in ovs-atomic.h have to be updated to use more precise types for integer constants. This updates the code that generates cxxtest.cc to #include <config.h> (so that HAVE_ATOMIC is defined) and to automatically regenerate when the program is reconfigured (because otherwise the #include <config.h>) won't get added without a "make clean" step). "ovs-atomic.h" is not a public header, but apparently some code was using it anyway. Fixes: 9c463631e8145 ("ovs-atomic: Report error for contradictory configuration.") Reported-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
* userspace: Add support for NSH MD1 match fieldsJan Scheurich2017-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for NSH packet header fields to the OVS control plane and the userspace datapath. Initially we support the fields of the NSH base header as defined in https://www.ietf.org/id/draft-ietf-sfc-nsh-13.txt and the fixed context headers specified for metadata format MD1. The variable length MD2 format is parsed but the TLV context headers are not yet available for matching. The NSH fields are modelled as experimenter fields with the dedicated experimenter class 0x005ad650 proposed for NSH in ONF. The following fields are defined: NXOXM code ofctl name Size Comment ===================================================================== NXOXM_NSH_FLAGS nsh_flags 8 Bits 2-9 of 1st NSH word (0x005ad650,1) NXOXM_NSH_MDTYPE nsh_mdtype 8 Bits 16-23 (0x005ad650,2) NXOXM_NSH_NEXTPROTO nsh_np 8 Bits 24-31 (0x005ad650,3) NXOXM_NSH_SPI nsh_spi 24 Bits 0-23 of 2nd NSH word (0x005ad650,4) NXOXM_NSH_SI nsh_si 8 Bits 24-31 (0x005ad650,5) NXOXM_NSH_C1 nsh_c1 32 Maskable, nsh_mdtype==1 (0x005ad650,6) NXOXM_NSH_C2 nsh_c2 32 Maskable, nsh_mdtype==1 (0x005ad650,7) NXOXM_NSH_C3 nsh_c3 32 Maskable, nsh_mdtype==1 (0x005ad650,8) NXOXM_NSH_C4 nsh_c4 32 Maskable, nsh_mdtype==1 (0x005ad650,9) Co-authored-by: Johnson Li <johnson.li@intel.com> Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* OF support and translation of generic encap and decapJan Scheurich2017-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the OpenFlow actions generic encap and decap (as specified in ONF EXT-382) to the OVS control plane. CLI syntax for encap action with properties: encap(<header>) encap(<header>(<prop>=<value>,<tlv>(<class>,<type>,<value>),...)) For example: encap(ethernet) encap(nsh(md_type=1)) encap(nsh(md_type=2,tlv(0x1000,10,0x12345678),tlv(0x2000,20,0xfedcba9876543210))) CLI syntax for decap action: decap() decap(packet_type(ns=<pt_ns>,type=<pt_type>)) For example: decap() decap(packet_type(ns=0,type=0xfffe)) decap(packet_type(ns=1,type=0x894f)) The first header supported for encap and decap is "ethernet" to convert packets between packet_type (1,Ethertype) and (0,0). This commit also implements a skeleton for the translation of generic encap and decap actions in ofproto-dpif and adds support to encap and decap an Ethernet header. In general translation of encap commits pending actions and then rewrites struct flow in accordance with the new packet type and header. In the case of encap(ethernet) it suffices to change the packet type from (1, Ethertype) to (0,0) and set the dl_type accordingly. A new pending_encap flag in xlate ctx is set to mark that an corresponding datapath encap action must be triggered at the next commit. In the case of encap(ethernet) ofproto generetas a push_eth action. The general case for translation of decap() is to emit a datapath action to decap the current outermost header and then recirculate the packet to reparse the inner headers. In the special case of an Ethernet packet, decap() just changes the packet type from (0,0) to (1, dl_type) without a need to recirculate. The emission of the pop_eth action for the datapath is postponed to the next commit. Hence encap(ethernet) and decap() on an Ethernet packet are OF octions that only incur a cost in the dataplane when a modifed packet is actually committed, e.g. because it is sent out. They can freely be used for normalizing the packet type in the OF pipeline without degrading performance. Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Zoltan Balogh <zoltan.balogh@ericsson.com> Co-authored-by: Zoltan Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Add 'extern "C"' for all relevant public header files, plus a build check.Ben Pfaff2017-07-311-0/+20
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* Automatically verify that OVS header files work OK in C++ also.Ben Pfaff2017-07-311-0/+14
| | | | | | | | | | This should help address a recurring problem. This change makes the OVS header files, when parsed by a C++ compiler, require C++11 or later. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* userspace: add vxlan gpe support to vportGeorg Schmuecking2017-06-021-1/+0
| | | | | | | | | | | | | | This patch is based on the "datapath: enable vxlangpe creation in compat mode" from Yi Yang. It introduces an extension option "gpe" to the vxlan port in the netdev-dpdk datapath. Description of vxlan gpe protocoll was added to header file lib/packets.h. In the vxlan specific methods the different packet are introduced and handled. Added VXLAN GPE tunnel push test. Signed-off-by: Yi Yang <yi.y.yang at intel.com> Signed-off-by: Georg Schmuecking <georg.schmuecking@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-221-0/+3
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-print.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-prop.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-actions.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-msgs.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-util.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | | | | This commit also adds several #include directives in source files in order to make the 'ofp-util.h' move possible Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/type-props.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/meta-flow.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | | | | | This commit also moves some bitmap macros into public header files and adds some #include directives in soure files in order to make the 'meta-flow.h' move possible. Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/match.h to include/openvswitch directoryBen Warren2016-04-141-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Break netdev.h into private and public partsBen Warren2016-04-141-0/+1
| | | | | | | | Public (struct definitions and some prototypes) go in include/openvswitch Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Break uuid.h into private and public partsBen Warren2016-04-141-0/+1
| | | | | | | | Public (struct definitions and some prototypes) go in include/openvswitch Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Break flow.h into private and public partsBen Warren2016-04-141-0/+1
| | | | | | | | Public (struct definitions and some prototypes) go in include/openvswitch Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Break packets.h into private and public partsBen Warren2016-04-141-0/+1
| | | | | | | | Public (struct definitions and some prototypes) go in include/openvswitch Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tun-metadata: Break header file into public and private parts.Ben Warren2016-03-301-0/+1
| | | | | | | | Public (struct definitions and some prototypes) go in include/openvswitch. Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofpbuf.h to include/openvswitch directoryBen Warren2016-03-301-0/+1
| | | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move ofp-parse.h to include/openvswitch directoryBen Warren2016-03-301-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/dynamic-string.h to include/openvswitch directoryBen Warren2016-03-191-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofp-errors.h to include/openvswitch directoryBen Warren2016-03-191-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/geneve.h to include/openvswitch directoryBen Warren2016-03-191-0/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* lib: Move vconn.h to <openvswitch/vconn.h>Thomas Graf2014-12-151-0/+1
| | | | | | | | 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-151-1/+2
| | | | | | | | 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-151-0/+1
| | | | | | | | 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: Move token-bucket.h to <openvswitch/token-bucket.h>Thomas Graf2014-12-151-0/+1
| | | | | 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-151-0/+1
| | | | | | | | 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: Move compiler.h to <openvswitch/compiler.h>Thomas Graf2014-12-151-0/+1
| | | | | | | | | | 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>
* lib: Add API to set program name and versionThomas Graf2014-11-251-0/+1
| | | | | | | 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-251-1/+2
| | | | | | | | | | | | | | 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>
* include: Install openflow/ and openvswitch/ headers.Thomas Graf2014-11-131-1/+2
| | | | | | | 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>
* datapath: Cleanup netlink compat code.Pravin B Shelar2013-09-061-1/+0
| | | | | | | | Patch removes genl, netlink, rtnl compat code and dpif-linux fallback-id compat code. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Tunnel: Cleanup old tunnel infrastructure.Pravin B Shelar2013-03-041-1/+0
| | | | | | | | | | | | | | | | Since userspace flow based tunneling code is checked in, the kernel port based tunneling code can be removed. Patch removes following components: - tunnel ports hash table and moved tunnel ports list to individual vports. - Cleaned per tnl-port config. - OVS_KEY_ATTR_TUN_ID action is removed. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #15078
* openvswitch: Remove Linux bridge compatibility.Pravin B Shelar2012-12-271-1/+0
| | | | | | | | | Currently brcompat does not work on master due to recent datapath changes. We have decided to remove it as it is not used very widely. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath-protocol: Rename to <linux/openvswitch.h>.Ben Pfaff2011-10-121-1/+0
| | | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #7559.
* datapath: Hardcode vport multicast group ID on older kernels.Ethan Jackson2011-09-161-0/+1
| | | | | | | | | | | Older kernels do not advertise the multicast groups of families when requested by userspace. As a workaround, this patch hardcodes the multicast group ID of the ovs_vport family on these kernels. Userspace will be able to fall back to this hardcoded value if the standard mechanism is unavailable. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Fix "make dist" by adding include/openvswitch/types.h to the distribution.Ben Pfaff2010-10-291-1/+2
|
* datapath: Abstract tunneling implementation from GRE.Jesse Gross2010-08-241-2/+2
| | | | | | | | | Much of the code in the GRE implementation is not specific to the GRE protocol but is actually common to all types of tunnels. In order to support future types of tunnels, move this code into a common library. Signed-off-by: Jesse Gross <jesse@nicira.com>
* netdev-vport: Use vport set_stats instead of internal dev.Jesse Gross2010-06-101-1/+0
| | | | | | | | | | In certain cases we require the ability to provide stats that are added to the values collected by the kernel (currently only used by bond fake devices). Internal devices previously implemented this directly but now that their stats are now handled by the vport layer the functionality has been moved there. This removes the userspace code to set the stats and replaces it with a mechanism to access the equivalent functionality in the vport layer.
* Fix broken build by adding forgotten header file to list of headers.Ben Pfaff2010-04-191-0/+1
|
* gre: Add kernel GRE support.Jesse Gross2009-12-071-0/+1
| | | | | | This implements the kernel portion of GRE on Linux. It consists of a backported module that provides the GRE capabilities of 2.6.32 plus bug fixes to kernels 2.6.18+.
* Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff2009-07-081-0/+4