2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofproto-dpif: Fix MPLS multiple Push pop action.

vSwitchd does not generate correct MPLS actions for multiple
MPLS push or pop action.
Datapath can handle multiple push action for in single action list.
But for after first MPLS pop it needs to recirculate packet to
refill packet key. Following patch fixes it accordingly.

Reported-by: Stefano Salsano <stefano.salsano@uniroma2.it>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Pier Luigi Ventre <pl.ventre@gmail.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
Pravin B Shelar
2014-11-25 07:39:20 -08:00
parent 43e2a6214e
commit 5af43325c9
7 changed files with 92 additions and 39 deletions

View File

@@ -1422,18 +1422,21 @@ flow_count_mpls_labels(const struct flow *flow, struct flow_wildcards *wc)
/* dl_type is always masked. */
if (eth_type_mpls(flow->dl_type)) {
int i;
int len = FLOW_MAX_MPLS_LABELS;
int cnt;
for (i = 0; i < len; i++) {
cnt = 0;
for (i = 0; i < FLOW_MAX_MPLS_LABELS; i++) {
if (wc) {
wc->masks.mpls_lse[i] |= htonl(MPLS_BOS_MASK);
}
if (flow->mpls_lse[i] & htonl(MPLS_BOS_MASK)) {
return i + 1;
}
if (flow->mpls_lse[i]) {
cnt++;
}
}
return len;
return cnt;
} else {
return 0;
}