flow_pop_mpls(struct flow *flow, int n, ovs_be16 eth_type,
              struct flow_wildcards *wc)
{
    int i;

    if (n == 0) {
        /* Nothing to pop. */
        return false;
    } else if (n == FLOW_MAX_MPLS_LABELS) {
        if (wc) {
            wc->masks.mpls_lse[n - 1] |= htonl(MPLS_BOS_MASK);
        }
        if (!(flow->mpls_lse[n - 1] & htonl(MPLS_BOS_MASK))) {
            /* Can't pop because don't know what to fill in mpls_lse[n - 1]. */
            return false;
        }
    }

    if (wc) {
        memset(&wc->masks.mpls_lse[1], 0xff,
               sizeof *wc->masks.mpls_lse * (n - 1));
    }
    for (i = 1; i < n; i++) {
        flow->mpls_lse[i - 1] = flow->mpls_lse[i];
    }
    flow->mpls_lse[n - 1] = 0;
    flow->dl_type = eth_type;
    return true;
}
flow_pop_mpls(struct flow *flow, int n, ovs_be16 eth_type,
              struct flow_wildcards *wc)
{
    int i;

    if (n == 0) {
         
        return false;
    } else if (n == FLOW_MAX_MPLS_LABELS) {
        if (wc) {
            wc->masks.mpls_lse[n - 1] |= htonl(MPLS_BOS_MASK);
        }
        if (!(flow->mpls_lse[n - 1] & htonl(MPLS_BOS_MASK))) {
             
            return false;
        }
    }

    if (wc) {
        memset(&wc->masks.mpls_lse[1], 0xff,
               sizeof *wc->masks.mpls_lse * (n - 1));
    }
    for (i = 1; i < n; i++) {
        flow->mpls_lse[i - 1] = flow->mpls_lse[i];
    }
    flow->mpls_lse[n - 1] = 0;
    flow->dl_type = eth_type;
    return true;
}