summaryrefslogtreecommitdiff
path: root/lib/odp-execute.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2013-12-30 15:58:58 -0800
committerJarno Rajahalme <jrajahalme@nicira.com>2013-12-30 15:58:58 -0800
commit09f9da0bcaf0f6fd4221b28ecedc3d4db6235fe5 (patch)
tree14c222ee2bd4a8418f503581c506e3d1110f717d /lib/odp-execute.h
parent125bf01da3c0fba506c606ba87a2e8a8fb12d9eb (diff)
downloadopenvswitch-09f9da0bcaf0f6fd4221b28ecedc3d4db6235fe5.tar.gz
odp-execute: Consolidate callbacks.
Use one callback instead of many, helps in adding new functionality later on. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/odp-execute.h')
-rw-r--r--lib/odp-execute.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/odp-execute.h b/lib/odp-execute.h
index 90a6788ce..993ff471f 100644
--- a/lib/odp-execute.h
+++ b/lib/odp-execute.h
@@ -27,14 +27,16 @@ struct flow;
struct nlattr;
struct ofpbuf;
-typedef void (*odp_output_cb)(void *dp, struct ofpbuf *packet,
- const struct flow *key, odp_port_t out_port);
-typedef void (*odp_userspace_cb)(void *dp, struct ofpbuf *packet,
- const struct flow *key,
- const struct nlattr *action, bool may_steal);
+typedef void (*odp_execute_cb)(void *dp, struct ofpbuf *packet,
+ struct flow *metadata,
+ const struct nlattr *action, bool may_steal);
+/* Actions that need to be executed in the context of a datapath are handed
+ * to 'dp_execute_action', if non-NULL. Currently this is called only for
+ * actions OVS_ACTION_ATTR_OUTPUT and OVS_ACTION_ATTR_USERSPACE so
+ * 'dp_execute_action' needs to handle only these. */
void
-odp_execute_actions(void *dp, struct ofpbuf *packet, struct flow *key,
+odp_execute_actions(void *dp, struct ofpbuf *packet, struct flow *metadata,
const struct nlattr *actions, size_t actions_len,
- odp_output_cb output, odp_userspace_cb userspace);
+ odp_execute_cb dp_execute_action);
#endif