+\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 {
+ enum dpif_op_type type; /* Always DPIF_OP_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. */
+ int error; /* 0 or positive errno value. */
+};
+
+struct dpif_execute {
+ enum dpif_op_type type; /* Always DPIF_OP_EXECUTE. */
+
+ /* Input. */
+ 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. */
+
+ /* Output. */
+ int error; /* 0 or positive errno value. */
+};
+
+union dpif_op {
+ enum dpif_op_type type;
+ struct dpif_flow_put flow_put;
+ struct dpif_execute execute;
+};
+
+void dpif_operate(struct dpif *, union dpif_op **ops, size_t n_ops);
+\f
+/* Upcalls. */