- /* Stores in 'ports' the port numbers of up to 'n' ports that belong to
- * 'group' in 'dpif'. Returns the number of ports in 'group' (not the
- * number stored), if successful, otherwise a negative errno value. */
- int (*port_group_get)(const struct dpif *dpif, int group,
- uint16_t ports[], int n);
-
- /* Changes port group 'group' in 'dpif' to consist of the 'n' ports whose
- * numbers are given in 'ports'.
- *
- * Use the get_stats member function to obtain the number of supported port
- * groups. */
- int (*port_group_set)(struct dpif *dpif, int group,
- const uint16_t ports[], int n);
-
- /* For each flow 'flow' in the 'n' flows in 'flows':
- *
- * - If a flow matching 'flow->key' exists in 'dpif':
- *
- * Stores 0 into 'flow->stats.error' and stores statistics for the flow
- * into 'flow->stats'.
- *
- * If 'flow->n_actions' is zero, then 'flow->actions' is ignored. If
- * 'flow->n_actions' is nonzero, then 'flow->actions' should point to
- * an array of the specified number of actions. At most that many of
- * the flow's actions will be copied into that array.
- * 'flow->n_actions' will be updated to the number of actions actually
- * present in the flow, which may be greater than the number stored if
- * the flow has more actions than space available in the array.
- *
- * - Flow-specific errors are indicated by a positive errno value in
- * 'flow->stats.error'. In particular, ENOENT indicates that no flow
- * matching 'flow->key' exists in 'dpif'. When an error value is stored,
- * the contents of 'flow->key' are preserved but other members of 'flow'
- * should be treated as indeterminate.
- *
- * Returns 0 if all 'n' flows in 'flows' were updated (whether they were
- * individually successful or not is indicated by 'flow->stats.error',
- * however). Returns a positive errno value if an error that prevented
- * this update occurred, in which the caller must not depend on any
- * elements in 'flows' being updated or not updated.
- */
- int (*flow_get)(const struct dpif *dpif, struct odp_flow flows[], int n);
-
- /* Adds or modifies a flow in 'dpif' as specified in 'put':
- *
- * - If the flow specified in 'put->flow' does not exist in 'dpif', then
- * behavior depends on whether ODPPF_CREATE is specified in 'put->flags':
- * if it is, the flow will be added, otherwise the operation will fail
- * with ENOENT.
- *
- * - Otherwise, the flow specified in 'put->flow' does exist in 'dpif'.
- * Behavior in this case depends on whether ODPPF_MODIFY is specified in
- * 'put->flags': if it is, the flow's actions will be updated, otherwise
- * the operation will fail with EEXIST. If the flow's actions are
- * updated, then its statistics will be zeroed if ODPPF_ZERO_STATS is set
- * in 'put->flags', left as-is otherwise.
- */
- int (*flow_put)(struct dpif *dpif, struct odp_flow_put *put);
-
- /* Deletes a flow matching 'flow->key' from 'dpif' or returns ENOENT if
- * 'dpif' does not contain such a flow.
- *
- * If successful, updates 'flow->stats', 'flow->n_actions', and
- * 'flow->actions' as described in more detail under the flow_get member
- * function below. */
- int (*flow_del)(struct dpif *dpif, struct odp_flow *flow);
-