aboutsummaryrefslogtreecommitdiff
path: root/ofproto/ofproto.h
AgeCommit message (Collapse)Author
2013-09-16rule_ofpacts: keep datapath meter_id.Jarno Rajahalme
This allows datapaths to operate without referring to the ofproto-level meter configuration for mater ID mapping, which reduces needs for locking. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-22ipfix: implement flow caching and aggregation in exporterRomain Lenglet
Implement a per-exporter flow cache with active timeout expiration. Add columns "cache_active_timeout" and "cache_max_flows" into table "IPFIX" to configure each cache. Add per-flow elements "octetDeltaSumOfSquares", "minimumIpTotalLength", and "maximumIpTotalLength" to replace "ethernetTotalLength". Add per-flow element "flowEndReason" to indicate whether a flow has expired because of an active timeout, the cache size limit being reached, or the exporter being stopped. Signed-off-by: Romain Lenglet <rlenglet@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-15ofproto: Make number of packet handler threads runtime configurable.Alex Wang
This commit adds a new column "n-handler-threads" to the Open_vSwitch table. This is used to set the number of upcall handler threads created by the ofproto-dpif-upcall module. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-02tag: Retire the venerable tag library.Ethan Jackson
This patch retires a venerable library whose inception dates before the first patch of the current repository: tags. They have served us well, but their time has come for the reasons listed below. 1) They don't actually help much. In theory, tags had been used to reduce revalidation necessary when using bonds, mac-learning, and frequently changing flow tables. With bonds and mac-learning, things change happen so rarely that tagging isn't worth it. That leaves flow table changes. With the complex flow tables in my testing, the revalidate_set gets so overwhelmed with tags, that we end up revalidating every facet every time through the run loop. In other words, they tags are giving us no benefit. 2) They complicate the code. This patch simplifies the code and removes a couple of rather ugly kludges. 3) They complicated locking once threading hits. Because of the calculate_flow_tag() function, the table_dpif structure would require locking in a multi-threaded OVS. Though this problem isn't insurmountable, it's annoying and probably would cause lock contention. Of course, we could try to work around these problems with a more advanced tagging infrastructure, but this moves in the opposite of the direction we should be. Ideally we'll have a more-or-less stateless ofproto-dpif supporting a massive number of datapath flows. Tags (or facets for that matter) aren't going to work in this new world. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-08-01cfm: Make the CFM module thread safe.Ethan Jackson
Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-06-28ofproto: Implement OpenFlow 1.3 meter table.Jarno Rajahalme
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-26ofproto-dpif: Add 'force-miss-model' configurationJoe Stringer
This adds support for specifying flow miss handling behaviour at runtime, through a new "other-config" option in the Open_vSwitch table. This takes precedence over flow-eviction-threshold. By default, the behaviour is the same as before. If force-miss-model is set to 'with-facets', then flow miss handling will always result in the creation of new facets and flow-eviction-threshold will be ignored. If force-miss-model is set to 'without-facets', then flow miss handling will never result in the creation of new facets (effectively the same as setting the flow-eviction-threshold to 0, which is not currently configurable). We intend to use this configuration option in the testsuite to force particular code paths to be used, allowing us to improve test coverage. Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-20Create specific types for ofp and odp portAlex Wang
Until now, datapath ports and openflow ports were both represented by unsigned integers of various sizes. With implicit conversions, etc., it is easy to mix them up and use one where the other is expected. This commit creates two typedefs, ofp_port_t and odp_port_t. Both of these two types are marked by "__attribute__((bitwise))" so that sparse can be used to detect any misuse. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-07ofproto-dpif: Set flow-eviction-threshold globally.Ethan Jackson
With the single datapath, it no longer makes sense to have a per ofproto flow eviction threshold. This patch moves the flow eviction threshold to the Open_vSwitch table making the setting global, though still treated separately for each ofproto. A future patch will unify flow eviction on a per datapath basis. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-05-30ovs-vswitchd: An option to wait for userspace flow restore to complete.Gurucharan Shetty
While upgrading openvswitch, it helps to restore openflow flows before starting packet processing. Typically we want to restart openvswitch, add the openflow flows and then start packet processing. To do this, we look for the other_config:flow-restore-wait column in the Open_vSwitch table during startup. If set as true, we disable receiving packets from the datapath, expiring or flushing flows and running any periodic ofproto activities. This option does not prevent the addition and deletion of ports. Once this option is set to false, we return to normal processing. An upcoming commit will use this feature in Open vSwitch startup scripts. Bug #16086. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-05-07bfd: Implement Bidirectional Forwarding Detection.Ethan Jackson
Traditionally, Open vSwitch has used a variant of 802.1ag "CFM" for interface liveness detection. This has served us well until now, but has several serious drawbacks which have steadily become more inconvenient. First, the 802.1ag standard does not implement several useful features forcing us to (optionally) break compatibility. Second, 802.1.ag is not particularly popular outside of carrier grade networking equipment. Third, 802.1ag is simply quite awkward. In an effort to solve the aforementioned problems, this patch implements BFD which is ubiquitous, well designed, straight forward, and implements required features in a standard way. The initial cut of the protocol focuses on getting the basics of the specification correct, leaving performance optimizations, and advanced features as future work. The protocol should be considered experimental pending future testing. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-04-22Implement IPFIX exportRomain Lenglet
Define a new NXAST_SAMPLE OpenFlow vendor action and the corresponding OFPACT_SAMPLE OVS action, to do per-flow packet sampling, translated into a new SAMPLE "flow_sample" dp action. Make the userspace action's userdata size vary depending on the union member used. Add a new "flow_sample" upcall to do per-flow packet sampling. Add a new "ipfix" upcall to do per-bridge packet sampling to IPFIX collectors. Extend the OVSDB schema to support configuring IPFIX collector sets. Add support for configuring multiple IPFIX collectors for per-flow packet sampling. Add support for configuring per-bridge IPFIX sampling. Automatically generate standard IPFIX entity definitions from the IANA specs. Send one IPFIX data record message for every packet sampled by an OpenFlow sample action or received by a bridge configured with IPFIX sampling, and periodically send IPFIX template set messages. Signed-off-by: Romain Lenglet <rlenglet@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-04-01ofproto: Increase default flow-eviction-threshold.Ethan Jackson
The flow-eviction-threshold presents a trade off between the expense of maintaining large numbers of datapath flows, and the benefit of avoid unnecessary flow misses. In some large Open vSwitch deployments, we've seen the previous default flow eviction threshold negatively impact performance with reasonably typical traffic patterns. This patch increases the default to a level which should represent a better trade off: still relatively safe, but much more amenable to large numbers of long lived flows. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-03-12ofproto: Remove unnecessary struct forward declaration.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06bridge: Fix interpretation of 'health' member of struct ofproto_cfm_status.Ben Pfaff
Commit 9a9e3786b3a8 (ofproto: Merge all the CFM query functions into one.) mistakenly interpreted struct ofproto_cfm_status as always being in the range [0,100]. It can in fact take the value -1 if the health status is not currently well-defined. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06bridge: Fix remote_opstate bug recently introduced.Ben Pfaff
Commit 9a9e3786b3a8 (ofproto: Merge all the CFM query functions into one.) mistakenly transformed a tristate variable into a Boolean one. This commit fixes the problem. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06ofproto: Merge all the CFM query functions into one.Ben Pfaff
This eliminates several function calls and in particular several hash table lookups to find structures corresponding to a port number from iface_refresh_cfm_stats(). This does not seem to reduce CPU use, but the code is shorter and more readable. Bug #15171. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-11ofp-util: Simplify struct ofputil_role_request.Ben Pfaff
It makes more sense to use enum ofp12_controller_role here than to use enum nx_role, because the former is a superset of the latter and we can then get rid of a bool member too. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-05bond: Remove stable bond mode.Ethan Jackson
Stable bond mode, along with autopath, were trying to implement functionality close to what we get from the bundle action. Unfortunately, they are quite clunky, and generally less useful than bundle, so they're being removed. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-12-26ovs-vswitch: Make OpenFlow "dp_desc" configurable.Ben Pfaff
Signed-off-by: Felician Nemeth <nemethf@tmit.bme.hu> [blp@nicira.com refactored the code that this was based on and revised the patch accordingly] Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-26ofproto: Use NULL "desc" values to indicate defaults.Ben Pfaff
This saves a small amount of memory. It should also save a small amount of time for reconfiguration starting with an upcoming commit where it becomes possible to change the dp_desc away from the default (because it will not be necessary to compare the current value against the default). Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-26ofproto: Remove ofproto_set_desc().Ben Pfaff
Nothing calls it, and it's a lousy interface. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-08vswitchd: Make the maximum size of MAC learning tables user-configurable.Ben Pfaff
We've had a couple of requests for this over the years. It's easy to do, so let's implement it. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
2012-11-16Add functions to determine how port should be opened based on type.Justin Pettit
Depending on the port and type of datapath, a port may need to be opened as a different type of device than it's configured. For example, an "internal" port on a "dummy" datapath should opened as a "dummy" port. This commit adds the ability for a dpif to provide this information to a caller. It will be used in a future commit. Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-12ofproto, connmgr: Parameterise OpenFlow versions for adding controllerSimon Horman
Allow allowed Open Flow versions to be passed rather than relying on hard-coded defaults. This is in preparation for allowing configuration of the allowed OpenFlow versions. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-01ofproto: Add type "run", "run_fast", and "wait" provider methods.Justin Pettit
Add the ability for ofproto providers to have top-level "run", "run_fast", and "wait" methods, similar to the current ofproto ones. There are no current users, but this will be useful in a future commit. Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-01ofproto: Add initialization function.Justin Pettit
A future commit will make all bridges of a particular dpif share a single backing datapath. In order to handle restart, the datapath will need to have some idea of what the initial state looks like. Otherwise, it won't know which ports belong to which bridges and orphaned ports may never be cleaned up. This commit introduces an initialization method to ofproto, which takes as an argument a high-level description of the bridges and ports. An ofproto provider can then use this information to initialize its state. Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-10-12ofproto: Fix typo in macro name.Ben Pfaff
I like the sound of "evicton" but it isn't a real word. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2012-08-13cfm: Expose remote CFM opstate in the database.Ethan Jackson
A controller may want to know the remote CFM opstate of a given CFM enabled interface. This patch makes this data available in the database. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-07-05ovs-vswitchd: Log datapath ID in a more user-friendly way.Ben Pfaff
The layering between ofproto and ovs-vswitchd caused the datapath ID to be logged in a needlessly confusing way. First, ofproto would log its default datapath ID: using datapath ID 0000505400000004 then the bridge code would immediately determine the datapath ID that it wanted and call ofproto_set_datapath_id(), which would log the change datapath ID changed to 0000111122223333 This commit stops logging the default datapath ID, which is never actually visible in OpenFlow. This should make the log files easier to understand. Bug #12164. Reported-by: Jacob Cherkas <jcherkas@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-22Add support for tracking and logging daemon memory usage.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02Global replace of Nicira Networks.Raju Subramanian
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>
2012-04-05Granular link health statistics for cfm.Mehak Mahajan
The changes display the cfm_health of an interface. The cfm_health is an exponential weighted moving average of the health of all remote_mpids. The value can vary from 0 to 100, 100 being very healthy and 0 being unhealthy. Feature #10363 Requested-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05Revert "Granular link health statistics for cfm."Mehak Mahajan
Missed commiting one line of change. This reverts commit c75b7e39d973cc9f4869c84d48eeb3b66afb2971. Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05Granular link health statistics for cfm.Mehak Mahajan
The changes display the cfm_health of an interface. The cfm_health is an exponential weighted moving average of the health of all remote_mpids. The value can vary from 0 to 100, 100 being very healthy and 0 being unhealthy. Feature #10363 Requested-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-03-23Allow configuring DSCP on controller and manager connections.Mehak Mahajan
The changes allow the user to specify a separate dscp value for the controller connection and the manager connection. The value will take effect on resetting the connections. If no value is specified a default value of 192 is chosen for each of the connections. Feature #10074 Requested-by: Rajiv Ramanathan <rramanathan@nicira.com> Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-03-23treewide: Convert tabs to spaces in C source files written in OVS style.Ben Pfaff
The Open vSwitch C style doesn't use hard tabs. This commit doesn't touch files written in kernel style or that are imported from other projects where we want to minimize changes from upstream (the sflow files). Reported-by: Mehak Mahajan <mmahajan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19configure: Remove --with-build-number.Ben Pfaff
From early days, Nicira used the --with-build-number option to configure to stamp our internal builds. We've since switched to another scheme, so this option is obsolete. Good riddance. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-09vswitchd: Add "enable-async-messages" setting for controllers.Ben Pfaff
An OpenFlow connection can start receiving asynchronous messages such as "packet-ins" immediately at connect time. If there is a lot of traffic on the network then this can swamp the controller before it gets a chance to set up an initial flow table. This setting overrides this OpenFlow behavior, changing it so that the connection initially enables no asynchronous messages at all. The controller can enable any messages that it actually wants when it is ready for them. Feature #7086. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-01vswitchd: Make the MAC entry aging time configurable.Ben Pfaff
NICS-11. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-01Add support for limiting the number of flows in an OpenFlow flow table.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-08ofproto: Device stats should include packets generated by userspace/controllerPravin B Shelar
Following patch account packets consumed and composed in userspace as received on and transmitted from local port. Bug #7551
2011-11-28ofproto: Add "fast path".Ben Pfaff
The key to getting good performance on the netperf CRR test seems to be to handle the first packet of each new flow as quickly as possible. Until now, we've only had one opportunity to do that on each trip through the main poll loop. One way to improve would be to make that poll loop circulate more quickly. My experiments show, however, that even just commenting out the slower parts of the poll loop yield minimal improvement. This commit takes another approach. Instead of making the poll loop overall faster, it invokes the performance-critical parts of it more than once during each poll loop. My measurements show that this commit improves netperf CRR performance by 24% versus the previous commit, for an overall improvement of 87% versus the baseline just before the commit that removed the poll_fd_woke(). With this commit, ovs-benchmark performance has also improved by 13% overall since that baseline.
2011-11-23ovs-vswitchd: Track packet and byte statistics sent on mirrors.Justin Pettit
This commit adds support for tracking the number of packets and bytes sent through a mirror. The numbers are kept in the new "statistics" column on the mirror table in the "tx_packets" and "tx_bytes" keys.
2011-11-23Implement new "VLAN splinters" feature.Ben Pfaff
The "VLAN splinters" feature works around buggy device drivers in old Linux versions. This feature is deprecated. When broken device drivers are no longer in widespread use, we will delete this feature. I tested earlier versions of this commit, but I have not tested this version. See ovs-vswitchd.conf.db(5) for more information.
2011-11-23vswitch: Implement dscp column of the Queue table.Ethan Jackson
The dscp column of the queue table instructs Open vSwitch to mark all traffic egressing the queue with the given DSCP bits in its tos field. Bug #7046.
2011-11-17Implement a new port setting "other-config:priority-tags".Ben Pfaff
Linux hosts (and probably others) tend to ignore priority-tagged frames, so this new setting allows Open vSwitch to suppress sending them. Reported-by: Michael Mao <mmao@nicira.com> Bug #8320.
2011-11-15stp: Track BPDU tx and rx counts.Justin Pettit
When debugging spanning tree, it's useful to have counters about how many BPDUs have been sent and received. This commit keeps track of these counters and stores them in a new "statistics" column of the Port table. Feature #8103
2011-10-22ovs-vswitchd: Add support for 802.1D STP.Justin Pettit
Still alpha quality, since only tested for interoperability with Linux bridge's STP implementation.
2011-10-22ofproto: Mark 'ofproto' arg in is_mirror_output_bundle() as const.Justin Pettit
No changes are made to 'ofproto', so it's safe to mark the argument as const. This will be useful in a later commit.