lib/meta-flow: use symbolic value instead of ~7
authorIsaku Yamahata <yamahata@valinux.co.jp>
Wed, 27 Jun 2012 04:26:57 +0000 (13:26 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 27 Jun 2012 04:30:17 +0000 (21:30 -0700)
mf_is_value_valid() use symbolic value instead of 7 for vlan pcp

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/meta-flow.c

index b3a4bffa68a8c94bdf916329748f8a22644506e5..719c0d94f66cd8e765f83598d50e6094d87fca23 100644 (file)
@@ -968,7 +968,7 @@ mf_is_value_valid(const struct mf_field *mf, const union mf_value *value)
         return !(value->be16 & htons(VLAN_CFI | VLAN_PCP_MASK));
 
     case MFF_VLAN_PCP:
-        return !(value->u8 & ~7);
+        return !(value->u8 & ~(VLAN_PCP_MASK >> VLAN_PCP_SHIFT));
 
     case MFF_IPV6_LABEL:
         return !(value->be32 & ~htonl(IPV6_LABEL_MASK));