dpif: Allow execute to modify the packet.
[sliver-openvswitch.git] / lib / odp-execute.h
index 5d9fa90..90a6788 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef EXECUTE_ACTIONS_H
 #define EXECUTE_ACTIONS_H 1
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
 #include "openvswitch/types.h"
@@ -26,13 +27,14 @@ 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);
+
 void
 odp_execute_actions(void *dp, struct ofpbuf *packet, struct flow *key,
                     const struct nlattr *actions, size_t actions_len,
-                    void (*output)(void *dp, struct ofpbuf *packet,
-                                   const struct flow *key,
-                                   odp_port_t out_port),
-                    void (*userspace)(void *dp, struct ofpbuf *packet,
-                                      const struct flow *key,
-                                      const struct nlattr *action));
+                    odp_output_cb output, odp_userspace_cb userspace);
 #endif