aboutsummaryrefslogtreecommitdiff
path: root/lib/dpif-netdev.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-11-20 07:46:41 -0800
committerBen Pfaff <blp@nicira.com>2012-11-20 07:46:41 -0800
commit0135dc8b4e91886b0e9f5c3e1c3e973d9ee575c7 (patch)
tree2580de3eb4a80a7953608d2beb108a90835a75dd /lib/dpif-netdev.c
parenta32f0904a7ed4b9cdc05165920d33cfe45349933 (diff)
dpif-netdev: Make odp_flow_key_to_flow() check more explicit.
ODP_FIT_PERFECT has value 0 but this 'if' statement doesn't make much sense unless you happen to know that. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r--lib/dpif-netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index cd4ab282..92108df1 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -670,7 +670,7 @@ static int
dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len,
struct flow *flow)
{
- if (odp_flow_key_to_flow(key, key_len, flow)) {
+ if (odp_flow_key_to_flow(key, key_len, flow) != ODP_FIT_PERFECT) {
/* This should not happen: it indicates that odp_flow_key_from_flow()
* and odp_flow_key_to_flow() disagree on the acceptable form of a
* flow. Log the problem as an error, with enough details to enable