Add stratum-tofino driver
This patch also introduces a new driver property flag to indicate
whether a P4Runtime target supports default table entries or not.
Stratum targets built against the current version of p4lang/PI do not.
Change-Id: I1fbb57521516bee99057319ed1695cb05b68ee7c
diff --git a/drivers/barefoot/BUILD b/drivers/barefoot/BUILD
index f86f1e3..ee63540 100644
--- a/drivers/barefoot/BUILD
+++ b/drivers/barefoot/BUILD
@@ -15,9 +15,10 @@
onos_app(
app_name = "org.onosproject.drivers.barefoot",
category = "Drivers",
- description = "Adds support for Barefoot Networks devices",
+ description = "Adds support for switches based on Barefoot Networks ASICs",
included_bundles = BUNDLES,
required_apps = [
+ "org.onosproject.drivers.stratum",
"org.onosproject.drivers.p4runtime",
],
title = "Barefoot Drivers",
diff --git a/drivers/barefoot/src/main/resources/barefoot-drivers.xml b/drivers/barefoot/src/main/resources/barefoot-drivers.xml
index 68c9aec..d712fb4 100644
--- a/drivers/barefoot/src/main/resources/barefoot-drivers.xml
+++ b/drivers/barefoot/src/main/resources/barefoot-drivers.xml
@@ -15,10 +15,21 @@
~ limitations under the License.
-->
<drivers>
- <driver name="barefoot" manufacturer="Barefoot Networks" hwVersion="1.0" swVersion="1.0" extends="p4runtime">
+ <driver name="barefoot" manufacturer="Barefoot Networks" hwVersion="1.0"
+ swVersion="1.0" extends="p4runtime">
<behaviour api="org.onosproject.net.behaviour.PiPipelineProgrammable"
impl="org.onosproject.drivers.barefoot.TofinoPipelineProgrammable"/>
<property name="tableDeleteBeforeUpdate">true</property>
</driver>
+
+ <driver name="stratum-tofino" manufacturer="Barefoot Networks"
+ hwVersion="Tofino" swVersion="Stratum" extends="stratum">
+ <behaviour api="org.onosproject.net.behaviour.PiPipelineProgrammable"
+ impl="org.onosproject.drivers.barefoot.TofinoPipelineProgrammable"/>
+ <!-- The current version of p4lang/PI used in Stratum does not
+ support reading default table entries -->
+ <property name="supportDefaultTableEntry">false</property>
+ </driver>
+
</drivers>