@@ -5612,10 +5612,12 @@ xlate_generic_decap_action(struct xlate_ctx *ctx,
* Delay generating pop_eth to the next commit. */
flow->packet_type = htonl(PACKET_TYPE(OFPHTN_ETHERTYPE,
ntohs(flow->dl_type)));
+ ctx->wc->masks.dl_type = OVS_BE16_MAX;
return false;
case PT_NSH:
- /* decap_nsh */
- /* Delay generating decap_nsh to the next commit. */
+ /* The decap_nsh action is generated at the commit executed as
+ * part of freezing the ctx for recirculation. Here we just set
+ * the new packet type based on the NSH next protocol field. */
switch (flow->nsh.np) {
case NSH_P_ETHERNET:
flow->packet_type = htonl(PT_ETH);
@@ -5638,6 +5640,8 @@ xlate_generic_decap_action(struct xlate_ctx *ctx,
return false;
break;
}
+ ctx->wc->masks.nsh.np = UINT8_MAX;
+ /* Trigger recirculation. */
return true;
default:
xlate_report_debug(ctx, OFT_ACTION,
@@ -122,7 +122,7 @@ bridge("br0")
decap()
Final flow: unchanged
-Megaflow: recirc_id=0,eth,in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=4660,nsh_c1=0x11223344
+Megaflow: recirc_id=0,eth,in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_np=3,nsh_spi=4660,nsh_c1=0x11223344
Datapath actions: pop_eth,decap_nsh(),recirc(0x2)
])
@@ -456,7 +456,7 @@ AT_CHECK([
], [0], [flow-dump from non-dpdk interfaces:
recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=17,frag=no),udp(dst=4789), packets:1, b
recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,encap_nsh(flags=0,mdty
-tunnel(tun_id=0x0,src=30.0.0.1,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(spi=0x00000bb8,si=255), packets:1, bytes:10
+tunnel(tun_id=0x0,src=30.0.0.1,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(np=1,spi=0x00000bb8,si=255), packets:1, byt
tunnel(tun_id=0x0,src=30.0.0.1,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0x1),in_port(4789),packet_type(ns=1,id=0x800),ipv4(frag=no), packets:1, bytes:84, used:0.0s,
])
@@ -513,7 +513,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_ty
recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(src=20.0.0.2,dst=20.0.0.3,proto=17,frag=no),udp(dst=4789), packets:1, b
recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20/255.255.255.248,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,encap_
tunnel(tun_id=0x0,src=20.0.0.1,dst=20.0.0.2,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(spi=0x00000bcc,si=255), packets:1, bytes:10
-tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(spi=0x00000bcc,si=254), packets:1, bytes:10
+tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(np=1,spi=0x00000bcc,si=254), packets:1, byt
tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0x2),in_port(4789),packet_type(ns=1,id=0x800),ipv4(frag=no), packets:1, bytes:84, used:0.0s,
])