flow: Use vlan_tci_to_pcp() helper.
authorBen Pfaff <blp@nicira.com>
Tue, 26 Oct 2010 20:09:28 +0000 (13:09 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 29 Oct 2010 16:48:47 +0000 (09:48 -0700)
This is just a small cleanup that should not change any behavior.

lib/flow.c

index 964877655b51e10a3748bd47b08e5068d95d01c0..82e60eb9525a44a2b9fe5f68ae1e9e0e351bd85e 100644 (file)
@@ -88,7 +88,7 @@ parse_vlan(struct ofpbuf *b, struct flow *flow)
     if (b->size >= sizeof(struct qtag_prefix) + sizeof(ovs_be16)) {
         struct qtag_prefix *qp = ofpbuf_pull(b, sizeof *qp);
         flow->dl_vlan = qp->tci & htons(VLAN_VID_MASK);
-        flow->dl_vlan_pcp = (ntohs(qp->tci) & VLAN_PCP_MASK) >> VLAN_PCP_SHIFT;
+        flow->dl_vlan_pcp = vlan_tci_to_pcp(qp->tci);
     }
 }