Including Spring Open TTP drivers in workaround of Change 12900
Change-Id: Ie08276d66221a33652fff78078326d2997e13bd9
diff --git a/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetPacketNodeManager.java b/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetPacketNodeManager.java
index eb0c124..9b50612 100644
--- a/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetPacketNodeManager.java
+++ b/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetPacketNodeManager.java
@@ -61,7 +61,6 @@
import org.onosproject.net.meter.MeterId;
import org.onosproject.net.meter.MeterRequest;
import org.onosproject.net.meter.MeterService;
-import org.onosproject.openflow.controller.Dpid;
import org.slf4j.Logger;
import java.util.Collection;
@@ -204,8 +203,8 @@
.matchVlanId(fc.vlanId())
.matchInPort(ingressNi.cp().port());
- if (isOfDpa(ingressNi.cp().deviceId())) {
- // workaround for OF-DPA
+ if (requiresEthType(ingressNi.cp().deviceId())) {
+ // workaround for OF-DPA and Spring Open TTP
fwdSelectorBuilder.matchEthType(Ethernet.TYPE_IPV4);
}
@@ -277,6 +276,15 @@
return false;
}
+ private boolean requiresEthType(DeviceId deviceId) {
+ Driver driver = drivers.getDriver(deviceId);
+ if (driver != null) {
+ return driver.swVersion().contains("OF-DPA") ||
+ driver.name().contains("spring-open");
+ }
+ return false;
+ }
+
@Override
public void applyBandwidthProfileResources(CarrierEthernetForwardingConstruct fc, CarrierEthernetUni uni) {
@@ -288,8 +296,6 @@
return;
}
- Dpid dpid = Dpid.dpid(deviceId.uri());
-
// Do not apply meters to OFDPA 2.0 switches since they are not currently supported
if (isOfDpa(deviceId)) {
return;