-int dpif_execute(struct dpif *, const struct nlattr *actions,
- size_t actions_len, const struct ofpbuf *);
+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;
+};
+
+void dpif_operate(struct dpif *, struct dpif_op **ops, size_t n_ops);
+\f
+/* Upcalls. */
+
+enum dpif_upcall_type {
+ DPIF_UC_MISS, /* Miss in flow table. */
+ DPIF_UC_ACTION, /* OVS_ACTION_ATTR_USERSPACE action. */
+ DPIF_N_UC_TYPES
+};
+
+const char *dpif_upcall_type_to_string(enum dpif_upcall_type);