summaryrefslogtreecommitdiff
path: root/tests/test-multipath.c
Commit message (Collapse)AuthorAgeFilesLines
* Move lib/ofp-actions.h to include/openvswitch directoryBen Warren2016-04-141-2/+2
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs_assert, tests: Support NDEBUG.Jarno Rajahalme2014-10-301-4/+2
| | | | | | | | | | | | | | | | | ./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>
* unit-test: Link 29 test programs into ovstestAndy Zhou2014-04-031-4/+7
| | | | | | | | | | | | | | Improve link speed by linking 29 test programs into ovstest. On my machine, running the following command against a fully built tree: $ touch lib/random.c; time make Improve the overall build time from 7 seconds to 3.5 seconds. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Rename NOT_REACHED to OVS_NOT_REACHEDHarold Lim2013-12-171-1/+1
| | | | | | | | This allows other libraries to use util.h that has already defined NOT_REACHED. Signed-off-by: Harold Lim <haroldl@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* More accurate wildcarding and fragment handling.Jarno Rajahalme2013-10-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gets rid of the need for having explicit padding in struct flow as new fields are being added. flow_wildcards_init_exact(), which used to set bits in both compiler generated and explicit padding, is removed. match_wc_init() is now used instead, which generates the mask based on a given flow, setting bits only in fields which make sense. Places where random bits were placed in struct flow have been changed to only set random bits on fields that are significant in the given context. This avoids setting padding bits. - lib/flow: - Properly initialize struct flow also in places we used to zero out padding before. - Add flow_random_hash_fields() used for testing. - Remove flow_wildcards_init_exact() to avoid initializing masks where compiler generated padding has bits set. - lib/match.c match_wc_init(): Wildcard transport layer fields for later fragments, remove match_init_exact(), which used flow_wildcards_init_exact(). - tests/test-flows.c: use match_wc_init() instead of match_init_exact() - tests/flowgen.pl: generate more accurate packets and flows when fragmenting, mark unavailable fields as wildcarded. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Remove mpls_depth field from flowSimon Horman2013-09-271-2/+0
| | | | | | | | | | | | | | | | | | | | | Rather than tracking the MPLS depth as a field in the flow, which is an entirely poor place for it, just track the delta to the MPLS depth during translation. This logic was developed while implementing recirculation and intended to be used to detect when recirculation should occur. This variant of the patch uses the logic to determine if processing of actions should stop due to an MPLS action which cannot be translated (without recirculation). A side-effect of this patch is that it resolves a bug whereby ovs-vswitchd will abort due to to an assertion on eth_type_mpls(ctx->xin->flow.dl_type) in compose_mpls_pop_action(() if the actions of a flow include pop_mpls twice without a push_mpls in between. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofp-parse: Do not exit() upon a parse error.Ben Pfaff2013-07-081-2/+7
| | | | | | | | | Until now, failure to parse a flow in the ofp-parse module has caused the program to abort immediately with a fatal error. This makes it hard to use these functions from any long-lived program. This commit fixes the problem. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ofproto-dpif: Store relevant fields for wildcarding in facet.Justin Pettit2013-06-111-2/+3
| | | | | | | | | | | | | | | | | | | | | Dynamically determines the flow fields that were relevant in processing flows based on the OpenFlow flow table and switch configuration. The immediate use for this functionality is to cache action translations for similar flows in facets. This yields a roughly 80% improvement in flow set up rates for a complicated flow table. More importantly, these wildcards will be used to determine what to wildcard for the forthcoming kernel wildcard (megaflow) patches that will allow wildcarding in the kernel, which will provide significant flow set up improvements. The approach to tracking fields and caching action translations in facets was based on an impressive prototype by Ethan Jackson. Co-authored-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Justin Pettit <jpettit@nicira.com>
* User-Space MPLS actions and matchesSimon Horman2013-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements use-space datapath and non-datapath code to match and use the datapath API set out in Leo Alterman's patch "user-space datapath: Add basic MPLS support to kernel". The resulting MPLS implementation supports: * Pushing a single MPLS label * Poping a single MPLS label * Modifying an MPLS lable using set-field or load actions that act on the label value, tc and bos bit. * There is no support for manipulating the TTL this is considered future work. The single-level push pop limitation is implemented by processing push, pop and set-field/load actions in order and discarding information that would require multiple levels of push/pop to be supported. e.g. push,push -> the first push is discarded pop,pop -> the first pop is discarded This patch is based heavily on work by Ravi K. Cc: Ravi K <rkerur@gmail.com> Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vswitchd: fix 32-bit buildsAnsis Atteka2012-11-231-0/+1
| | | | | | | | | | | My previous 72e8bf28bb38e8816435c64859fb350215b6a9e6 (datapath: add skb mark matching and set action) commit broke 32-bit builds. This patch assures that size of struct flow is equal on both 32-bit and 64-bit architectures so that build asserts would not fire anymore. Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
* Use ODP ports in dpif layer and below.Justin Pettit2012-11-011-1/+0
| | | | | | | | | | | | | | | | The current code has a simple mapping between datapath and OpenFlow port numbers (the port numbers were the same other than OFPP_LOCAL which maps to datapath port 0). Since the translation was know at compile time, this allowed different layers to easily translate between the two, so the translation often occurred late. A future commit will break this simple mapping, so this commit draws a line between where datapath and OpenFlow port numbers are used. The ofproto-dpif layer will be responsible for the translations. Callers above will use OpenFlow port numbers. Providers below will use datapath port numbers. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* flow: Ensure that padding is always zeroed.Ben Pfaff2012-09-041-0/+1
| | | | Signed-off-by: Ben Pfaff <blp@nicira.com>
* Introduce ofpacts, an abstraction of OpenFlow actions.Ben Pfaff2012-07-031-5/+6
| | | | | | | | | | | | | | | | | | | | | | OpenFlow actions have always been somewhat awkward to handle. Moreover, over time we've started creating actions that require more complicated parsing. When we maintain those actions internally in their wire format, we end up parsing them multiple times, whenever we have to look at the set of actions. When we add support for OpenFlow 1.1 or later protocols, the situation will get worse, because these newer protocols support many of the same actions but with different representations. It becomes unrealistic to handle each protocol in its wire format. This commit adopts a new strategy, by converting OpenFlow actions into an internal form from the wire format when they are read, and converting them back to the wire format when flows are dumped. I believe that this will be more maintainable over time. Thanks to Simon Horman and Pravin Shelar for reviews. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Implement a new Nicira extension action for multipath link selection.Ben Pfaff2010-12-171-0/+131