summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2013-06-17 07:51:00 -0700
committerJesse Gross <jesse@nicira.com>2013-06-20 10:03:36 -0700
commita1c564be1e2ffc31f8da09ab654c8ed987907fe5 (patch)
tree960b355bb8d3d90e2394cb417399050f5c57884e /include/linux
parentc594e2484da2a84b42d7c453ec30e16939a5e207 (diff)
downloadopenvswitch-a1c564be1e2ffc31f8da09ab654c8ed987907fe5.tar.gz
datapath: Mega flow implementation
Add wildcarded flow support in kernel datapath. Wildcarded flow can improve OVS flow set up performance by avoid sending matching new flows to the user space program. The exact performance boost will largely dependent on wildcarded flow hit rate. In case all new flows hits wildcard flows, the flow set up rate is within 5% of that of linux bridge module. Pravin has made significant contributions to this patch. Including API clean ups and bug fixes. Co-authored-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> [jesse: Additional documentation, fix memory leak, and improve validation.] Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/openvswitch.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h
index e890fd82d..a119b149b 100644
--- a/include/linux/openvswitch.h
+++ b/include/linux/openvswitch.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2011 Nicira, Inc.
+ * Copyright (c) 2007-2013 Nicira, Inc.
*
* This file is offered under your choice of two licenses: Apache 2.0 or GNU
* GPL 2.0 or later. The permission statements for each of these licenses is
@@ -410,6 +410,12 @@ struct ovs_key_nd {
* @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the
* last-used time, accumulated TCP flags, and statistics for this flow.
* Otherwise ignored in requests. Never present in notifications.
+ * @OVS_FLOW_ATTR_MASK: Nested %OVS_KEY_ATTR_* attributes specifying the
+ * mask bits for wildcarded flow match. Mask bit value '1' specifies exact
+ * match with corresponding flow key bit, while mask bit value '0' specifies
+ * a wildcarded match. Omitting attribute is treated as wildcarding all
+ * corresponding fields. Optional for all requests. If not present,
+ * all flow key bits are exact match bits.
*
* These attributes follow the &struct ovs_header within the Generic Netlink
* payload for %OVS_FLOW_* commands.
@@ -422,6 +428,7 @@ enum ovs_flow_attr {
OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */
OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */
OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */
+ OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */
__OVS_FLOW_ATTR_MAX
};