+\f
+/* Packet operations. */
+
+int dpif_execute(struct dpif *,
+ const struct nlattr *key, size_t key_len,
+ const struct nlattr *actions, size_t actions_len,
+ const struct ofpbuf *);
+\f
+/* Operation batching interface.
+ *
+ * Some datapaths are faster at performing N operations together than the same
+ * N operations individually, hence an interface for batching.
+ */
+
+enum dpif_op_type {
+ DPIF_OP_FLOW_PUT = 1,
+ DPIF_OP_EXECUTE
+};
+
+struct dpif_flow_put {
+ /* Input. */
+ enum dpif_flow_put_flags flags; /* DPIF_FP_*. */
+ const struct nlattr *key; /* Flow to put. */
+ size_t key_len; /* Length of 'key' in bytes. */
+ const struct nlattr *actions; /* Actions to perform on flow. */
+ size_t actions_len; /* Length of 'actions' in bytes. */
+
+ /* Output. */
+ struct dpif_flow_stats *stats; /* Optional flow statistics. */
+};
+
+struct dpif_execute {
+ const struct nlattr *key; /* Partial flow key (only for metadata). */
+ size_t key_len; /* Length of 'key' in bytes. */
+ const struct nlattr *actions; /* Actions to execute on packet. */
+ size_t actions_len; /* Length of 'actions' in bytes. */
+ const struct ofpbuf *packet; /* Packet to execute. */
+};
+
+struct dpif_op {
+ enum dpif_op_type type;
+ int error;
+ union {
+ struct dpif_flow_put flow_put;
+ struct dpif_execute execute;
+ } u;
+};