2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpif: Eliminate ODPPF_* constants from client-visible interface.

Following this commit, the ODPPF_* constants are only used in
Linux-specific parts of OVS userspace code.  This allows the actual Linux
datapath interface to evolve more freely.

Reviewed by Justin Pettit.
This commit is contained in:
Ben Pfaff
2011-01-26 07:12:24 -08:00
parent c97fb13280
commit ba25b8f41f
6 changed files with 44 additions and 30 deletions

View File

@@ -506,7 +506,7 @@ dpif_linux_flow_get(const struct dpif *dpif_, int flags,
}
static int
dpif_linux_flow_put(struct dpif *dpif_, int flags,
dpif_linux_flow_put(struct dpif *dpif_, enum dpif_flow_put_flags flags,
const struct nlattr *key, size_t key_len,
const struct nlattr *actions, size_t actions_len,
struct dpif_flow_stats *stats)
@@ -520,7 +520,16 @@ dpif_linux_flow_put(struct dpif *dpif_, int flags,
put.flow.actions = (struct nlattr *) actions;
put.flow.actions_len = actions_len;
put.flow.flags = 0;
put.flags = flags;
put.flags = 0;
if (flags & DPIF_FP_CREATE) {
put.flags |= ODPPF_CREATE;
}
if (flags & DPIF_FP_MODIFY) {
put.flags |= ODPPF_MODIFY;
}
if (flags & DPIF_FP_ZERO_STATS) {
put.flags |= ODPPF_ZERO_STATS;
}
error = do_ioctl(dpif_, ODP_FLOW_PUT, &put);
if (!error && stats) {
odp_flow_stats_to_dpif_flow_stats(&put.flow.stats, stats);