tests: Add bundle action test with buffer realloc.
[cascardo/ovs.git] / lib / odp-execute.h
index 89dd66b..c602bb4 100644 (file)
 #ifndef EXECUTE_ACTIONS_H
 #define EXECUTE_ACTIONS_H 1
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
+#include "openvswitch/types.h"
 
-struct flow;
 struct nlattr;
-struct ofpbuf;
+struct dp_packet;
+struct pkt_metadata;
 
-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,
-                                   uint32_t out_port),
-                    void (*userspace)(void *dp, struct ofpbuf *packet,
-                                      const struct flow *key,
-                                      const struct nlattr *a));
+typedef void (*odp_execute_cb)(void *dp, struct dp_packet **packets, int cnt,
+                               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 dp_packet **packets, int cnt,
+                         bool steal,
+                         const struct nlattr *actions, size_t actions_len,
+                         odp_execute_cb dp_execute_action);
 #endif