Fixes for the Pica8 pipeline and the cpqd emulation of the OFDPA pipeline.
Change-Id: Ib1982cdb7bc580cf86c43ace229388ee1f1106a2
Showing
4 changed files
with
30 additions
and
3 deletions
... | @@ -29,7 +29,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { | ... | @@ -29,7 +29,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { |
29 | processIpTable(); | 29 | processIpTable(); |
30 | //processMcastTable(); | 30 | //processMcastTable(); |
31 | processBridgingTable(); | 31 | processBridgingTable(); |
32 | - //processAclTable(); | 32 | + processAclTable(); |
33 | //processGroupTable(); | 33 | //processGroupTable(); |
34 | } | 34 | } |
35 | 35 | ||
... | @@ -152,7 +152,35 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { | ... | @@ -152,7 +152,35 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { |
152 | log.info("Failed to initialize Bridging table"); | 152 | log.info("Failed to initialize Bridging table"); |
153 | } | 153 | } |
154 | })); | 154 | })); |
155 | + } | ||
155 | 156 | ||
157 | + private void processAclTable() { | ||
158 | + //table miss entry - catch all to executed action-set | ||
159 | + FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | ||
160 | + TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); | ||
161 | + TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); | ||
162 | + selector = DefaultTrafficSelector.builder(); | ||
163 | + treatment = DefaultTrafficTreatment.builder(); | ||
164 | + FlowRule rule = DefaultFlowRule.builder() | ||
165 | + .forDevice(deviceId) | ||
166 | + .withSelector(selector.build()) | ||
167 | + .withTreatment(treatment.build()) | ||
168 | + .withPriority(LOWEST_PRIORITY) | ||
169 | + .fromApp(driverId) | ||
170 | + .makePermanent() | ||
171 | + .forTable(ACL_TABLE).build(); | ||
172 | + ops = ops.add(rule); | ||
173 | + flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | ||
174 | + @Override | ||
175 | + public void onSuccess(FlowRuleOperations ops) { | ||
176 | + log.info("Initialized Acl table"); | ||
177 | + } | ||
178 | + | ||
179 | + @Override | ||
180 | + public void onError(FlowRuleOperations ops) { | ||
181 | + log.info("Failed to initialize Acl table"); | ||
182 | + } | ||
183 | + })); | ||
156 | } | 184 | } |
157 | 185 | ||
158 | } | 186 | } | ... | ... |
... | @@ -529,7 +529,6 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -529,7 +529,6 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
529 | .makePermanent() | 529 | .makePermanent() |
530 | .forTable(ACL_TABLE); | 530 | .forTable(ACL_TABLE); |
531 | 531 | ||
532 | - // XXX bug in OFDPA | ||
533 | return Collections.singletonList(ruleBuilder.build()); | 532 | return Collections.singletonList(ruleBuilder.build()); |
534 | } | 533 | } |
535 | 534 | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
84 | impl="org.onosproject.driver.pipeline.CentecV350Pipeline"/> | 84 | impl="org.onosproject.driver.pipeline.CentecV350Pipeline"/> |
85 | </driver> | 85 | </driver> |
86 | <driver name="pica" extends="default" | 86 | <driver name="pica" extends="default" |
87 | - manufacturer="Pica8, Inc." hwVersion="ly2" swVersion="PicOS 2.6"> | 87 | + manufacturer="Pica8, Inc." hwVersion=".*" swVersion="PicOS 2.6"> |
88 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 88 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
89 | impl="org.onosproject.driver.pipeline.PicaPipeline"/> | 89 | impl="org.onosproject.driver.pipeline.PicaPipeline"/> |
90 | </driver> | 90 | </driver> | ... | ... |
-
Please register or login to post a comment