Simple software switch pipeline.
Change-Id: Iaaee946967cb339a875564d962d3467899df0d31
Showing
6 changed files
with
31 additions
and
9 deletions
... | @@ -52,6 +52,12 @@ | ... | @@ -52,6 +52,12 @@ |
52 | <artifactId>onos-of-api</artifactId> | 52 | <artifactId>onos-of-api</artifactId> |
53 | </dependency> | 53 | </dependency> |
54 | 54 | ||
55 | + <dependency> | ||
56 | + <groupId>org.onosproject</groupId> | ||
57 | + <artifactId>onos-core-serializers</artifactId> | ||
58 | + <version>1.2.0-SNAPSHOT</version> | ||
59 | + </dependency> | ||
60 | + | ||
55 | <dependency> | 61 | <dependency> |
56 | <groupId>org.easymock</groupId> | 62 | <groupId>org.easymock</groupId> |
57 | <artifactId>easymock</artifactId> | 63 | <artifactId>easymock</artifactId> |
... | @@ -63,6 +69,8 @@ | ... | @@ -63,6 +69,8 @@ |
63 | <artifactId>org.apache.felix.scr.annotations</artifactId> | 69 | <artifactId>org.apache.felix.scr.annotations</artifactId> |
64 | </dependency> | 70 | </dependency> |
65 | 71 | ||
72 | + | ||
73 | + | ||
66 | </dependencies> | 74 | </dependencies> |
67 | 75 | ||
68 | <build> | 76 | <build> | ... | ... |
... | @@ -29,12 +29,11 @@ import org.projectfloodlight.openflow.types.TableId; | ... | @@ -29,12 +29,11 @@ import org.projectfloodlight.openflow.types.TableId; |
29 | import java.util.Collections; | 29 | import java.util.Collections; |
30 | import java.util.concurrent.atomic.AtomicBoolean; | 30 | import java.util.concurrent.atomic.AtomicBoolean; |
31 | 31 | ||
32 | -//import java.util.ArrayList; | ||
33 | 32 | ||
34 | /** | 33 | /** |
35 | - * Corsa switch driver for BGP Router deployment. | 34 | + * Corsa switch handshaker. |
36 | */ | 35 | */ |
37 | -public class OFCorsaSwitchDriver extends AbstractOpenFlowSwitch { | 36 | +public class CorsaSwitchHandShaker extends AbstractOpenFlowSwitch { |
38 | 37 | ||
39 | private AtomicBoolean handShakeComplete = new AtomicBoolean(false); | 38 | private AtomicBoolean handShakeComplete = new AtomicBoolean(false); |
40 | 39 | ... | ... |
... | @@ -13,6 +13,10 @@ import org.onosproject.net.flow.TrafficSelector; | ... | @@ -13,6 +13,10 @@ import org.onosproject.net.flow.TrafficSelector; |
13 | import org.onosproject.net.flow.TrafficTreatment; | 13 | import org.onosproject.net.flow.TrafficTreatment; |
14 | import org.slf4j.Logger; | 14 | import org.slf4j.Logger; |
15 | 15 | ||
16 | +/** | ||
17 | + * Driver for Corsa TTP. | ||
18 | + * | ||
19 | + */ | ||
16 | public class CorsaPipeline extends OVSCorsaPipeline { | 20 | public class CorsaPipeline extends OVSCorsaPipeline { |
17 | 21 | ||
18 | private final Logger log = getLogger(getClass()); | 22 | private final Logger log = getLogger(getClass()); |
... | @@ -37,7 +41,6 @@ public class CorsaPipeline extends OVSCorsaPipeline { | ... | @@ -37,7 +41,6 @@ public class CorsaPipeline extends OVSCorsaPipeline { |
37 | .makePermanent() | 41 | .makePermanent() |
38 | .forTable(VLAN_MPLS_TABLE).build(); | 42 | .forTable(VLAN_MPLS_TABLE).build(); |
39 | 43 | ||
40 | - | ||
41 | ops = install ? ops.add(rule) : ops.remove(rule); | 44 | ops = install ? ops.add(rule) : ops.remove(rule); |
42 | 45 | ||
43 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | 46 | flowRuleService.apply(ops.build(new FlowRuleOperationsContext() { | ... | ... |
... | @@ -102,7 +102,6 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline | ... | @@ -102,7 +102,6 @@ public class OFDPA1Pipeline extends AbstractHandlerBehaviour implements Pipeline |
102 | protected static final int ACL_TABLE = 60; | 102 | protected static final int ACL_TABLE = 60; |
103 | protected static final int MAC_LEARNING_TABLE = 254; | 103 | protected static final int MAC_LEARNING_TABLE = 254; |
104 | 104 | ||
105 | - @SuppressWarnings("unused") | ||
106 | private static final int HIGHEST_PRIORITY = 0xffff; | 105 | private static final int HIGHEST_PRIORITY = 0xffff; |
107 | private static final int DEFAULT_PRIORITY = 0x8000; | 106 | private static final int DEFAULT_PRIORITY = 0x8000; |
108 | private static final int LOWEST_PRIORITY = 0x0; | 107 | private static final int LOWEST_PRIORITY = 0x0; | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -27,17 +27,20 @@ | ... | @@ -27,17 +27,20 @@ |
27 | impl="org.onosproject.driver.pipeline.OVSCorsaPipeline"/> | 27 | impl="org.onosproject.driver.pipeline.OVSCorsaPipeline"/> |
28 | </driver> | 28 | </driver> |
29 | <driver name="spring-open-cpqd" extends="default" | 29 | <driver name="spring-open-cpqd" extends="default" |
30 | - manufacturer="Stanford University, Ericsson Research and CPqD Research" hwVersion="OpenFlow 1.3 Reference Userspace Switch" swVersion=".*"> | 30 | + manufacturer="Stanford University, Ericsson Research and CPqD Research" |
31 | + hwVersion="OpenFlow 1.3 Reference Userspace Switch" swVersion=".*"> | ||
31 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 32 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
32 | impl="org.onosproject.driver.pipeline.SpringOpenTTP"/> | 33 | impl="org.onosproject.driver.pipeline.SpringOpenTTP"/> |
33 | </driver> | 34 | </driver> |
34 | <driver name="spring-open" extends="default" | 35 | <driver name="spring-open" extends="default" |
35 | - manufacturer="Dell " hwVersion="OpenFlow switch HW ver. 1.0" swVersion="OpenFlow switch SW ver. 1.0 and 1.3"> | 36 | + manufacturer="Dell " hwVersion="OpenFlow switch HW ver. 1.0" |
37 | + swVersion="OpenFlow switch SW ver. 1.0 and 1.3"> | ||
36 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 38 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
37 | impl="org.onosproject.driver.pipeline.SpringOpenTTPDell"/> | 39 | impl="org.onosproject.driver.pipeline.SpringOpenTTPDell"/> |
38 | </driver> | 40 | </driver> |
39 | <driver name="linc-oe" extends="default" | 41 | <driver name="linc-oe" extends="default" |
40 | - manufacturer="FlowForwarding.org" hwVersion="Unknown" swVersion="LINC-OE OpenFlow Software Switch 1.1"> | 42 | + manufacturer="FlowForwarding.org" hwVersion="Unknown" |
43 | + swVersion="LINC-OE OpenFlow Software Switch 1.1"> | ||
41 | <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver" | 44 | <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver" |
42 | impl="org.onosproject.driver.handshaker.OFOpticalSwitchImplLINC13"/> | 45 | impl="org.onosproject.driver.handshaker.OFOpticalSwitchImplLINC13"/> |
43 | </driver> | 46 | </driver> |
... | @@ -45,12 +48,22 @@ | ... | @@ -45,12 +48,22 @@ |
45 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 48 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
46 | impl="org.onosproject.driver.pipeline.CorsaPipeline"/> | 49 | impl="org.onosproject.driver.pipeline.CorsaPipeline"/> |
47 | <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver" | 50 | <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver" |
48 | - impl="org.onosproject.driver.handshaker.OFCorsaSwitchDriver"/> | 51 | + impl="org.onosproject.driver.handshaker.CorsaSwitchHandShaker"/> |
49 | </driver> | 52 | </driver> |
50 | <driver name="ofdpa" extends="default" | 53 | <driver name="ofdpa" extends="default" |
51 | manufacturer="Broadcom Corp." hwVersion="OF-DPA 1.0" swVersion="OF-DPA 1.0"> | 54 | manufacturer="Broadcom Corp." hwVersion="OF-DPA 1.0" swVersion="OF-DPA 1.0"> |
52 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 55 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
53 | impl="org.onosproject.driver.pipeline.OFDPA1Pipeline"/> | 56 | impl="org.onosproject.driver.pipeline.OFDPA1Pipeline"/> |
54 | </driver> | 57 | </driver> |
58 | + <!-- The SoftRouter driver is meant to be used by any software/NPU based | ||
59 | + ~ switch that wishes to implement a simple 2-table router. ONOS needs to | ||
60 | + ~ be configured with the dpid of such a device to attach this driver | ||
61 | + ~ to the device. | ||
62 | + --> | ||
63 | + <driver name="softrouter" extends="default" | ||
64 | + manufacturer="Various" hwVersion="various" swVersion="0.0.0"> | ||
65 | + <behaviour api="org.onosproject.net.behaviour.Pipeliner" | ||
66 | + impl="org.onosproject.driver.pipeline.SoftRouterPipeline"/> | ||
67 | + </driver> | ||
55 | </drivers> | 68 | </drivers> |
56 | 69 | ... | ... |
-
Please register or login to post a comment