Committed by
Gerrit Code Review
CpqdOfpda pipeline table miss entry for multicast IP table.
Change-Id: I4efb76819007cc757dce123f3fd1ba83e2bc2c74
Showing
1 changed file
with
38 additions
and
12 deletions
... | @@ -15,19 +15,11 @@ | ... | @@ -15,19 +15,11 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.driver.pipeline; | 16 | package org.onosproject.driver.pipeline; |
17 | 17 | ||
18 | -import static org.slf4j.LoggerFactory.getLogger; | ||
19 | - | ||
20 | -import java.util.ArrayList; | ||
21 | -import java.util.Collection; | ||
22 | -import java.util.Collections; | ||
23 | -import java.util.Deque; | ||
24 | -import java.util.List; | ||
25 | - | ||
26 | import com.google.common.collect.ImmutableList; | 18 | import com.google.common.collect.ImmutableList; |
27 | import com.google.common.collect.ImmutableSet; | 19 | import com.google.common.collect.ImmutableSet; |
28 | import org.onlab.packet.Ethernet; | 20 | import org.onlab.packet.Ethernet; |
29 | -import org.onlab.packet.MacAddress; | ||
30 | import org.onlab.packet.IpPrefix; | 21 | import org.onlab.packet.IpPrefix; |
22 | +import org.onlab.packet.MacAddress; | ||
31 | import org.onlab.packet.VlanId; | 23 | import org.onlab.packet.VlanId; |
32 | import org.onosproject.core.ApplicationId; | 24 | import org.onosproject.core.ApplicationId; |
33 | import org.onosproject.core.CoreService; | 25 | import org.onosproject.core.CoreService; |
... | @@ -66,6 +58,14 @@ import org.onosproject.net.group.GroupKey; | ... | @@ -66,6 +58,14 @@ import org.onosproject.net.group.GroupKey; |
66 | import org.onosproject.net.group.GroupService; | 58 | import org.onosproject.net.group.GroupService; |
67 | import org.slf4j.Logger; | 59 | import org.slf4j.Logger; |
68 | 60 | ||
61 | +import java.util.ArrayList; | ||
62 | +import java.util.Collection; | ||
63 | +import java.util.Collections; | ||
64 | +import java.util.Deque; | ||
65 | +import java.util.List; | ||
66 | + | ||
67 | +import static org.slf4j.LoggerFactory.getLogger; | ||
68 | + | ||
69 | 69 | ||
70 | /** | 70 | /** |
71 | * Driver for software switch emulation of the OFDPA 2.0 pipeline. | 71 | * Driver for software switch emulation of the OFDPA 2.0 pipeline. |
... | @@ -713,6 +713,7 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { | ... | @@ -713,6 +713,7 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { |
713 | // which can be accomplished without a table-miss-entry. | 713 | // which can be accomplished without a table-miss-entry. |
714 | processTmacTable(); | 714 | processTmacTable(); |
715 | processIpTable(); | 715 | processIpTable(); |
716 | + processMulticastIpTable(); | ||
716 | processMplsTable(); | 717 | processMplsTable(); |
717 | processBridgingTable(); | 718 | processBridgingTable(); |
718 | processAclTable(); | 719 | processAclTable(); |
... | @@ -781,9 +782,6 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { | ... | @@ -781,9 +782,6 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { |
781 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | 782 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); |
782 | TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); | 783 | TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); |
783 | TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); | 784 | TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); |
784 | - selector = DefaultTrafficSelector.builder(); | ||
785 | - treatment = DefaultTrafficTreatment.builder(); | ||
786 | - treatment.deferred().setOutput(PortNumber.CONTROLLER); | ||
787 | treatment.transition(ACL_TABLE); | 785 | treatment.transition(ACL_TABLE); |
788 | FlowRule rule = DefaultFlowRule.builder() | 786 | FlowRule rule = DefaultFlowRule.builder() |
789 | .forDevice(deviceId) | 787 | .forDevice(deviceId) |
... | @@ -807,6 +805,34 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { | ... | @@ -807,6 +805,34 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline { |
807 | })); | 805 | })); |
808 | } | 806 | } |
809 | 807 | ||
808 | + protected void processMulticastIpTable() { | ||
809 | + //table miss entry | ||
810 | + FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | ||
811 | + TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); | ||
812 | + TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); | ||
813 | + treatment.transition(ACL_TABLE); | ||
814 | + FlowRule rule = DefaultFlowRule.builder() | ||
815 | + .forDevice(deviceId) | ||
816 | + .withSelector(selector.build()) | ||
817 | + .withTreatment(treatment.build()) | ||
818 | + .withPriority(LOWEST_PRIORITY) | ||
819 | + .fromApp(driverId) | ||
820 | + .makePermanent() | ||
821 | + .forTable(MULTICAST_ROUTING_TABLE).build(); | ||
822 | + ops = ops.add(rule); | ||
823 | + flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | ||
824 | + @Override | ||
825 | + public void onSuccess(FlowRuleOperations ops) { | ||
826 | + log.info("Initialized multicast IP table"); | ||
827 | + } | ||
828 | + | ||
829 | + @Override | ||
830 | + public void onError(FlowRuleOperations ops) { | ||
831 | + log.info("Failed to initialize multicast IP table"); | ||
832 | + } | ||
833 | + })); | ||
834 | + } | ||
835 | + | ||
810 | protected void processMplsTable() { | 836 | protected void processMplsTable() { |
811 | //table miss entry | 837 | //table miss entry |
812 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | 838 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | ... | ... |
-
Please register or login to post a comment