[CORD-801] OFDPA pipeline for OpenvSwitch
Drops TTL_IN, TTL_OUT and MPLS_BOS instructions which are not supported by OpenvSwitch.
This will allow us to run OFDPA pipeline with OpenvSwitch >= 2.6.0
Change-Id: Icfa6f2fdaa857877a57ae4c719354483b24c5816
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2Pipeline.java
index 890af99..cadca75 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2Pipeline.java
@@ -147,10 +147,6 @@
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
- // Initialize OFDPA group handler
- groupHandler = new Ofdpa2GroupHandler();
- groupHandler.init(deviceId, context);
-
serviceDirectory = context.directory();
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
@@ -158,12 +154,22 @@
flowObjectiveStore = context.store();
deviceService = serviceDirectory.get(DeviceService.class);
- driverId = coreService.registerApplication(
- "org.onosproject.driver.Ofdpa2Pipeline");
+ initDriverId();
+ initGroupHander(context);
initializePipeline();
}
+ protected void initDriverId() {
+ driverId = coreService.registerApplication(
+ "org.onosproject.driver.Ofdpa2Pipeline");
+ }
+
+ protected void initGroupHander(PipelinerContext context) {
+ groupHandler = new Ofdpa2GroupHandler();
+ groupHandler.init(deviceId, context);
+ }
+
protected void initializePipeline() {
// OF-DPA does not require initializing the pipeline as it puts default
// rules automatically in the hardware. However emulation of OFDPA in