aboutsummaryrefslogtreecommitdiff
path: root/lib/dpif-linux.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-01-26 07:12:24 -0800
committerBen Pfaff <blp@nicira.com>2011-01-27 21:08:39 -0800
commitba25b8f41f4db5ed5c91f53b9b83b57f242a82d6 (patch)
tree550e641f2b396fb21d27a8bb203c8b1a82fe2c81 /lib/dpif-linux.c
parentc97fb13280c565f55ed0de7cf0bf06ffe8320b70 (diff)
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.
Diffstat (limited to 'lib/dpif-linux.c')
-rw-r--r--lib/dpif-linux.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
index 98acebed..8d5c4896 100644
--- a/lib/dpif-linux.c
+++ b/lib/dpif-linux.c
@@ -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);