Skip to content

Commit 1845280

Browse files
committed
Including Spring Open TTP drivers in workaround of Change 12900
Change-Id: Ie08276d66221a33652fff78078326d2997e13bd9
1 parent a7808ce commit 1845280

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetPacketNodeManager.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import org.onosproject.net.meter.MeterId;
6262
import org.onosproject.net.meter.MeterRequest;
6363
import org.onosproject.net.meter.MeterService;
64-
import org.onosproject.openflow.controller.Dpid;
6564
import org.slf4j.Logger;
6665

6766
import java.util.Collection;
@@ -204,8 +203,8 @@ private void createFlowObjectives(CarrierEthernetForwardingConstruct fc, Carrier
204203
.matchVlanId(fc.vlanId())
205204
.matchInPort(ingressNi.cp().port());
206205

207-
if (isOfDpa(ingressNi.cp().deviceId())) {
208-
// workaround for OF-DPA
206+
if (requiresEthType(ingressNi.cp().deviceId())) {
207+
// workaround for OF-DPA and Spring Open TTP
209208
fwdSelectorBuilder.matchEthType(Ethernet.TYPE_IPV4);
210209
}
211210

@@ -277,6 +276,15 @@ private boolean isOfDpa(DeviceId deviceId) {
277276
return false;
278277
}
279278

279+
private boolean requiresEthType(DeviceId deviceId) {
280+
Driver driver = drivers.getDriver(deviceId);
281+
if (driver != null) {
282+
return driver.swVersion().contains("OF-DPA") ||
283+
driver.name().contains("spring-open");
284+
}
285+
return false;
286+
}
287+
280288
@Override
281289
public void applyBandwidthProfileResources(CarrierEthernetForwardingConstruct fc, CarrierEthernetUni uni) {
282290

@@ -288,8 +296,6 @@ public void applyBandwidthProfileResources(CarrierEthernetForwardingConstruct fc
288296
return;
289297
}
290298

291-
Dpid dpid = Dpid.dpid(deviceId.uri());
292-
293299
// Do not apply meters to OFDPA 2.0 switches since they are not currently supported
294300
if (isOfDpa(deviceId)) {
295301
return;

0 commit comments

Comments
 (0)