flow_set_dl_vlan(struct flow *flow, ovs_be16 vid)
{
    if (vid == htons(OFP10_VLAN_NONE)) {
        flow->vlans[0].tci = htons(0);
    } else {
        vid &= htons(VLAN_VID_MASK);
        flow->vlans[0].tci &= ~htons(VLAN_VID_MASK);
        flow->vlans[0].tci |= htons(VLAN_CFI) | vid;
    }
}
flow_set_dl_vlan(struct flow *flow, ovs_be16 vid)
{
    if (vid == htons(OFP10_VLAN_NONE)) {
        flow->vlans[0].tci = htons(0);
    } else {
        vid &= htons(VLAN_VID_MASK);
        flow->vlans[0].tci &= ~htons(VLAN_VID_MASK);
        flow->vlans[0].tci |= htons(VLAN_CFI) | vid;
    }
}