From: Isaku Yamahata Date: Wed, 27 Jun 2012 04:26:57 +0000 (+0900) Subject: lib/meta-flow: use symbolic value instead of ~7 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24016f5a45e873dd83feb41c0ca255377a6902d2;p=openvswitch lib/meta-flow: use symbolic value instead of ~7 mf_is_value_valid() use symbolic value instead of 7 for vlan pcp Signed-off-by: Isaku Yamahata Signed-off-by: Ben Pfaff --- diff --git a/lib/meta-flow.c b/lib/meta-flow.c index b3a4bffa..719c0d94 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -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));