[ONOS-4612]Update SFC flows inline with the Official OVS NSH patch
Change-Id: If58517841096a939860d88aa78eca7cae46b9935
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
index 3ca0979..8c3cb92 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
@@ -511,6 +511,18 @@
builder.setUdpSrc(TpPort.tpPort(udpsrc.getValue().getPort()));
break;
case TUNNEL_IPV4_DST:
+ case NSP:
+ case NSI:
+ case NSH_C1:
+ case NSH_C2:
+ case NSH_C3:
+ case NSH_C4:
+ case NSH_MDTYPE:
+ case NSH_NP:
+ case ENCAP_ETH_SRC:
+ case ENCAP_ETH_DST:
+ case ENCAP_ETH_TYPE:
+ case TUN_GPE_NP:
if (treatmentInterpreter != null) {
try {
builder.extension(treatmentInterpreter.mapAction(action), deviceId);
@@ -900,6 +912,36 @@
ip = Ip4Address.valueOf(match.get(MatchField.ARP_TPA).getInt());
builder.matchArpTpa(ip);
break;
+ case NSP:
+ if (selectorInterpreter != null) {
+ try {
+ OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.NSP);
+ builder.extension(selectorInterpreter.mapOxm(oxm), deviceId);
+ } catch (UnsupportedOperationException e) {
+ log.debug(e.getMessage());
+ }
+ }
+ break;
+ case NSI:
+ if (selectorInterpreter != null) {
+ try {
+ OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.NSI);
+ builder.extension(selectorInterpreter.mapOxm(oxm), deviceId);
+ } catch (UnsupportedOperationException e) {
+ log.debug(e.getMessage());
+ }
+ }
+ break;
+ case ENCAP_ETH_TYPE:
+ if (selectorInterpreter != null) {
+ try {
+ OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.ENCAP_ETH_TYPE);
+ builder.extension(selectorInterpreter.mapOxm(oxm), deviceId);
+ } catch (UnsupportedOperationException e) {
+ log.debug(e.getMessage());
+ }
+ }
+ break;
case MPLS_TC:
default:
log.warn("Match type {} not yet implemented.", field.id);