Committed by
Gerrit Code Review
Bug fixes for ofdpa pipeline
Change-Id: Ia532c51d0f348b31bf38aa10c567ba9bf8aa23e3
Showing
3 changed files
with
16 additions
and
10 deletions
... | @@ -80,6 +80,7 @@ import org.onosproject.net.group.GroupEvent; | ... | @@ -80,6 +80,7 @@ import org.onosproject.net.group.GroupEvent; |
80 | import org.onosproject.net.group.GroupKey; | 80 | import org.onosproject.net.group.GroupKey; |
81 | import org.onosproject.net.group.GroupListener; | 81 | import org.onosproject.net.group.GroupListener; |
82 | import org.onosproject.net.group.GroupService; | 82 | import org.onosproject.net.group.GroupService; |
83 | +import org.onosproject.store.serializers.KryoNamespaces; | ||
83 | import org.slf4j.Logger; | 84 | import org.slf4j.Logger; |
84 | 85 | ||
85 | import com.google.common.cache.Cache; | 86 | import com.google.common.cache.Cache; |
... | @@ -137,6 +138,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -137,6 +138,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
137 | private ApplicationId driverId; | 138 | private ApplicationId driverId; |
138 | 139 | ||
139 | private KryoNamespace appKryo = new KryoNamespace.Builder() | 140 | private KryoNamespace appKryo = new KryoNamespace.Builder() |
141 | + .register(KryoNamespaces.API) | ||
140 | .register(GroupKey.class) | 142 | .register(GroupKey.class) |
141 | .register(DefaultGroupKey.class) | 143 | .register(DefaultGroupKey.class) |
142 | .register(OfdpaGroupChain.class) | 144 | .register(OfdpaGroupChain.class) |
... | @@ -574,9 +576,9 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -574,9 +576,9 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
574 | fail(fwd, ObjectiveError.GROUPMISSING); | 576 | fail(fwd, ObjectiveError.GROUPMISSING); |
575 | return Collections.emptySet(); | 577 | return Collections.emptySet(); |
576 | } | 578 | } |
577 | - tb.group(group.id()); | 579 | + tb.deferred().group(group.id()); |
578 | } | 580 | } |
579 | - | 581 | + tb.transition(ACL_TABLE); |
580 | FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() | 582 | FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() |
581 | .fromApp(fwd.appId()) | 583 | .fromApp(fwd.appId()) |
582 | .withPriority(fwd.priority()) | 584 | .withPriority(fwd.priority()) |
... | @@ -634,7 +636,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -634,7 +636,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
634 | .fromApp(driverId) | 636 | .fromApp(driverId) |
635 | .makePermanent() | 637 | .makePermanent() |
636 | .forTable(PORT_TABLE).build(); | 638 | .forTable(PORT_TABLE).build(); |
637 | - ops = ops.add(tmisse); | 639 | + /*ops = ops.add(tmisse); |
638 | 640 | ||
639 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | 641 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { |
640 | @Override | 642 | @Override |
... | @@ -646,7 +648,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -646,7 +648,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
646 | public void onError(FlowRuleOperations ops) { | 648 | public void onError(FlowRuleOperations ops) { |
647 | log.info("Failed to initialize port table"); | 649 | log.info("Failed to initialize port table"); |
648 | } | 650 | } |
649 | - })); | 651 | + }));*/ |
650 | 652 | ||
651 | } | 653 | } |
652 | 654 | ||
... | @@ -716,7 +718,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -716,7 +718,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
716 | .fromApp(driverId) | 718 | .fromApp(driverId) |
717 | .makePermanent() | 719 | .makePermanent() |
718 | .forTable(TMAC_TABLE).build(); | 720 | .forTable(TMAC_TABLE).build(); |
719 | - ops = ops.add(rule); // XXX bug in ofdpa | 721 | + /*ops = ops.add(rule); // XXX bug in ofdpa |
720 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | 722 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { |
721 | @Override | 723 | @Override |
722 | public void onSuccess(FlowRuleOperations ops) { | 724 | public void onSuccess(FlowRuleOperations ops) { |
... | @@ -727,7 +729,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -727,7 +729,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
727 | public void onError(FlowRuleOperations ops) { | 729 | public void onError(FlowRuleOperations ops) { |
728 | log.info("Failed to initialize tmac table"); | 730 | log.info("Failed to initialize tmac table"); |
729 | } | 731 | } |
730 | - })); | 732 | + }));*/ |
731 | } | 733 | } |
732 | 734 | ||
733 | private void processIpTable() { | 735 | private void processIpTable() { |
... | @@ -746,7 +748,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -746,7 +748,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
746 | .fromApp(driverId) | 748 | .fromApp(driverId) |
747 | .makePermanent() | 749 | .makePermanent() |
748 | .forTable(UNICAST_ROUTING_TABLE).build(); | 750 | .forTable(UNICAST_ROUTING_TABLE).build(); |
749 | - ops = ops.add(rule); | 751 | + /*ops = ops.add(rule); |
750 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | 752 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { |
751 | @Override | 753 | @Override |
752 | public void onSuccess(FlowRuleOperations ops) { | 754 | public void onSuccess(FlowRuleOperations ops) { |
... | @@ -757,7 +759,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -757,7 +759,7 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
757 | public void onError(FlowRuleOperations ops) { | 759 | public void onError(FlowRuleOperations ops) { |
758 | log.info("Failed to initialize unicast IP table"); | 760 | log.info("Failed to initialize unicast IP table"); |
759 | } | 761 | } |
760 | - })); | 762 | + }));*/ |
761 | } | 763 | } |
762 | 764 | ||
763 | @SuppressWarnings("unused") | 765 | @SuppressWarnings("unused") | ... | ... |
... | @@ -58,7 +58,7 @@ | ... | @@ -58,7 +58,7 @@ |
58 | impl="org.onosproject.driver.handshaker.CorsaSwitchHandshaker"/> | 58 | impl="org.onosproject.driver.handshaker.CorsaSwitchHandshaker"/> |
59 | </driver> | 59 | </driver> |
60 | <driver name="ofdpa" extends="default" | 60 | <driver name="ofdpa" extends="default" |
61 | - manufacturer="Broadcom Corp." hwVersion="OF-DPA 1.0" swVersion="OF-DPA 1.0"> | 61 | + manufacturer="Broadcom Corp." hwVersion="OF-DPA 2.0-EA1" swVersion="OF-DPA 2.0-EA1"> |
62 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 62 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
63 | impl="org.onosproject.driver.pipeline.OFDPA1Pipeline"/> | 63 | impl="org.onosproject.driver.pipeline.OFDPA1Pipeline"/> |
64 | </driver> | 64 | </driver> | ... | ... |
... | @@ -38,6 +38,7 @@ import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlOut; | ... | @@ -38,6 +38,7 @@ import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlOut; |
38 | import org.projectfloodlight.openflow.protocol.action.OFActionDecMplsTtl; | 38 | import org.projectfloodlight.openflow.protocol.action.OFActionDecMplsTtl; |
39 | import org.projectfloodlight.openflow.protocol.action.OFActionDecNwTtl; | 39 | import org.projectfloodlight.openflow.protocol.action.OFActionDecNwTtl; |
40 | import org.projectfloodlight.openflow.protocol.action.OFActionExperimenter; | 40 | import org.projectfloodlight.openflow.protocol.action.OFActionExperimenter; |
41 | +import org.projectfloodlight.openflow.protocol.action.OFActionGroup; | ||
41 | import org.projectfloodlight.openflow.protocol.action.OFActionOutput; | 42 | import org.projectfloodlight.openflow.protocol.action.OFActionOutput; |
42 | import org.projectfloodlight.openflow.protocol.action.OFActionPopMpls; | 43 | import org.projectfloodlight.openflow.protocol.action.OFActionPopMpls; |
43 | import org.projectfloodlight.openflow.protocol.action.OFActionPushMpls; | 44 | import org.projectfloodlight.openflow.protocol.action.OFActionPushMpls; |
... | @@ -209,6 +210,10 @@ public class GroupBucketEntryBuilder { | ... | @@ -209,6 +210,10 @@ public class GroupBucketEntryBuilder { |
209 | OFActionDecNwTtl decNwTtl = (OFActionDecNwTtl) act; | 210 | OFActionDecNwTtl decNwTtl = (OFActionDecNwTtl) act; |
210 | builder.decNwTtl(); | 211 | builder.decNwTtl(); |
211 | break; | 212 | break; |
213 | + case GROUP: | ||
214 | + OFActionGroup grp = (OFActionGroup) act; | ||
215 | + builder.group(new DefaultGroupId(grp.getGroup().getGroupNumber())); | ||
216 | + break; | ||
212 | case SET_TP_DST: | 217 | case SET_TP_DST: |
213 | case SET_TP_SRC: | 218 | case SET_TP_SRC: |
214 | case POP_PBB: | 219 | case POP_PBB: |
... | @@ -222,7 +227,6 @@ public class GroupBucketEntryBuilder { | ... | @@ -222,7 +227,6 @@ public class GroupBucketEntryBuilder { |
222 | case SET_QUEUE: | 227 | case SET_QUEUE: |
223 | case STRIP_VLAN: | 228 | case STRIP_VLAN: |
224 | case ENQUEUE: | 229 | case ENQUEUE: |
225 | - case GROUP: | ||
226 | default: | 230 | default: |
227 | log.warn("Action type {} not yet implemented.", act.getType()); | 231 | log.warn("Action type {} not yet implemented.", act.getType()); |
228 | } | 232 | } | ... | ... |
-
Please register or login to post a comment