Saurav Das

Fixes for the Pica8 pipeline and the cpqd emulation of the OFDPA pipeline.

Change-Id: Ib1982cdb7bc580cf86c43ace229388ee1f1106a2
......@@ -29,7 +29,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline {
processIpTable();
//processMcastTable();
processBridgingTable();
//processAclTable();
processAclTable();
//processGroupTable();
}
......@@ -152,7 +152,35 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline {
log.info("Failed to initialize Bridging table");
}
}));
}
private void processAclTable() {
//table miss entry - catch all to executed action-set
FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
selector = DefaultTrafficSelector.builder();
treatment = DefaultTrafficTreatment.builder();
FlowRule rule = DefaultFlowRule.builder()
.forDevice(deviceId)
.withSelector(selector.build())
.withTreatment(treatment.build())
.withPriority(LOWEST_PRIORITY)
.fromApp(driverId)
.makePermanent()
.forTable(ACL_TABLE).build();
ops = ops.add(rule);
flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {
@Override
public void onSuccess(FlowRuleOperations ops) {
log.info("Initialized Acl table");
}
@Override
public void onError(FlowRuleOperations ops) {
log.info("Failed to initialize Acl table");
}
}));
}
}
......
......@@ -529,7 +529,6 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline
.makePermanent()
.forTable(ACL_TABLE);
// XXX bug in OFDPA
return Collections.singletonList(ruleBuilder.build());
}
......
......@@ -84,7 +84,7 @@
impl="org.onosproject.driver.pipeline.CentecV350Pipeline"/>
</driver>
<driver name="pica" extends="default"
manufacturer="Pica8, Inc." hwVersion="ly2" swVersion="PicOS 2.6">
manufacturer="Pica8, Inc." hwVersion=".*" swVersion="PicOS 2.6">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.PicaPipeline"/>
</driver>
......