[ovs-dev] [nxm 09/42] flow: Use vlan_tci_to_pcp() helper.

Justin Pettit jpettit at nicira.com
Thu Oct 28 14:19:21 PDT 2010


Looks good.

--Justin


On Oct 28, 2010, at 10:27 AM, Ben Pfaff wrote:

> This is just a small cleanup that should not change any behavior.
> ---
> lib/flow.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/flow.c b/lib/flow.c
> index 6bd9ffa..b32c17f 100644
> --- a/lib/flow.c
> +++ b/lib/flow.c
> @@ -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);
>     }
> }
> 
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list