Minor fix P4 DPN communicator
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
index 83afb22..b22f63f 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
@@ -59,6 +59,8 @@
private final Logger log = LoggerFactory.getLogger(getClass());
+ private static String HDR = "hdr.";
+
private static final PiTableId TBL_ID_UE_FILTER = PiTableId
.of("spgw_ingress.ue_filter_table");
private static final PiTableId TBL_ID_S1U_FILTER = PiTableId
@@ -67,9 +69,9 @@
.of("spgw_ingress.dl_sess_lookup");
private static final PiMatchFieldId MF_ID_IPV4_DST = PiMatchFieldId
- .of("ipv4.dst_addr");
+ .of(HDR + "ipv4.dst_addr");
private static final PiMatchFieldId MF_ID_GTPU_IPV4_DST = PiMatchFieldId
- .of("gtpu_ipv4.dst_addr");
+ .of(HDR + "gtpu_ipv4.dst_addr");
private static final PiActionId ACT_ID_SET_DL_SESS_INFO = PiActionId
.of("spgw_ingress.set_dl_sess_info");
@@ -284,7 +286,7 @@
private FlowRule ueFilterRule(Ip4Address ueAddr) {
final PiCriterion piCriterion = PiCriterion.builder()
- .matchExact(MF_ID_IPV4_DST, ueAddr.toOctets())
+ .matchLpm(MF_ID_IPV4_DST, ueAddr.toOctets(), 32)
.build();
return flowRuleBuilder()
@@ -377,7 +379,5 @@
final FlowRuleOperations.Builder opsBuilder = FlowRuleOperations.builder();
rules.forEach(opsBuilder::remove);
flowRuleService.apply(opsBuilder.build());
-
-
}
}