summaryrefslogtreecommitdiff
path: root/lib/classifier.c
Commit message (Collapse)AuthorAgeFilesLines
* flow: Get rid of flow_t typedef.Ben Pfaff2010-10-111-19/+20
| | | | | | | | | | When userspace and the kernel were using the same structure for flows, flow_t was a useful way to indicate that a structure was really a userspace flow instead of a kernel one, but now it's better to just write "struct flow" for consistency, since OVS doesn't use typedefs for structs elsewhere. Acked-by: Jesse Gross <jesse@nicira.com>
* flow: Separate "flow_t" from "struct odp_flow_key".Ben Pfaff2010-10-111-1/+0
| | | | | | | | | | The "struct odp_flow_key" used in the kernel datapath is conceptually separate from the "flow_t" used in userspace, but until now we have used the latter as a typedef for the former for convenience. This commit separates them. This makes it possible in upcoming commits to change them independently. This is cross-ported from the "wdp" branch, which has had it for months.
* classifier: Introduce macros for iterating exact-match flows.Ben Pfaff2010-10-071-1/+4
| | | | | This special case of iterating through flows is easier and presumably faster to implement using a macro.
* Switch many macros from using CONTAINER_OF to using OBJECT_CONTAINING.Ben Pfaff2010-10-011-26/+17
| | | | | These macros require one fewer argument by switching, which makes code that uses them shorter and more readable.
* treewide: Remove trailing whitespaceJoe Perches2010-08-301-6/+6
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* tunneling: Add support for tunnel ID.Jesse Gross2010-04-191-9/+11
| | | | | | | | | | | | | | Add a tun_id field which contains the ID of the encapsulating tunnel on which a packet was received (0 if not received on a tunnel). Also add an action which allows the tunnel ID to be set for outgoing packets. At this point there aren't any tunnel implementations so these fields don't have any effect. The matching is exposed to OpenFlow by overloading the high 32 bits of the cookie as the tunnel ID. ovs-ofctl is capable of turning on this special behavior using a new "tun-cookie" command but this command is intentially undocumented to avoid it being used without a full understanding of the consequences.
* classifier: Check all rules of equal priority when inserting.Jesse Gross2010-03-191-3/+3
| | | | | | | | | | | When adding a new classifier rule we check if there is a rule of the same priority first and overwrite it before inserting a new rule. Previously we would stop looking if we found one rule in the correct bucket with the same priority, even if it didn't match. This keeps going until we either find a matching rule or we run out of equal priority rules. Reported-by: Tetsuo NAKAGAWA <nakagawa@mxc.nes.nec.co.jp>
* Merge "master" into "next".Ben Pfaff2010-02-241-0/+13
|\
| * classifier: New function cls_rule_to_string().Ben Pfaff2010-02-121-1/+14
| | | | | | | | | | | | This may be useful for debugging. From Jean Tourrilhes <jt@hpl.hp.com>.
* | ofproto: Match on IP ToS/DSCP bits (OpenFlow 1.0)Justin Pettit2010-02-201-0/+1
| | | | | | | | | | | | | | OpenFlow 1.0 adds support for matching on IP ToS/DSCP bits. NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until the final commit in this OpenFlow 1.0 set.
* | ofproto: Check overlap, emerg flow cache, and error code sync (OpenFlow 0.9)Justin Pettit2010-02-201-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds (some) support for a couple new OpenFlow 0.9 features: - The OFPFF_CHECK_OVERLAP flag in Flow Mod messages allows the controller to prevent flows that would conflict at the same priority. - An emergency flow cache that contains a small flow table that is used if the switch loses connectivity with the controller. I believe the design has fundamental flaws and looks likely to be retired. If a controller attempts to add a flow to the emergency flow cache, OVS always responds that the tables are full. The OpenFlow 0.9 error codes are also sync'd in the commit. NOTE: OVS at this point is not wire-compatible with OpenFlow 0.9 until the final commit in this OpenFlow 0.9 set.
* | ofproto: Match VLAN PCP and rewrite ToS bits (OpenFlow 0.9)Justin Pettit2010-02-201-1/+0
| | | | | | | | | | | | | | | | | | | | Starting in OpenFlow 0.9, it is possible to match on the VLAN PCP (priority) field and rewrite the IP ToS/DSCP bits. This check-in provides that support and bumps the wire protocol number to 0x98. NOTE: The wire changes come together over the set of OpenFlow 0.9 commits, so OVS will not be OpenFlow-compatible with any official release between this commit and the one that completes the set.
* | hmap: Rename hmap_moved() to hmap_node_moved().Ben Pfaff2010-01-281-2/+3
|/ | | | | | | | | This prepares for adding a new function that deals with a "struct hmap" moving, as opposed to a "struct hmap_node". Since there was only a single call to this in the whole tree, and its caller didn't have any callers of its own at all, also move this function from hmap.h to hmap.c.
* Update primary code license to Apache 2.0.Ben Pfaff2009-06-151-10/+10
|
* Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff2009-07-081-0/+832