Committed by
Gerrit Code Review
Set VLAN ID at the OLT.
Change-Id: I399d8f10da88687fd44328c4dd2c4ad8f17d7bf2
Showing
3 changed files
with
10 additions
and
3 deletions
| ... | @@ -352,7 +352,6 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -352,7 +352,6 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 352 | 352 | ||
| 353 | 353 | ||
| 354 | provisionVlanOnPort(OLT_DEVICE_ID, OLT_UPLINK_PORT, onuPort, subscriberVlan.toShort()); | 354 | provisionVlanOnPort(OLT_DEVICE_ID, OLT_UPLINK_PORT, onuPort, subscriberVlan.toShort()); |
| 355 | - //provisionDataPlane(tenantToCreate); | ||
| 356 | 355 | ||
| 357 | String retJson = postRest(json); | 356 | String retJson = postRest(json); |
| 358 | 357 | ||
| ... | @@ -389,7 +388,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -389,7 +388,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 389 | private void provisionVlanOnPort(DeviceId deviceId, int uplinkPort, PortNumber p, short vlanId) { | 388 | private void provisionVlanOnPort(DeviceId deviceId, int uplinkPort, PortNumber p, short vlanId) { |
| 390 | 389 | ||
| 391 | TrafficSelector upstream = DefaultTrafficSelector.builder() | 390 | TrafficSelector upstream = DefaultTrafficSelector.builder() |
| 392 | - .matchVlanId(VlanId.vlanId(vlanId)) | 391 | + .matchVlanId(VlanId.ANY) |
| 393 | .matchInPort(p) | 392 | .matchInPort(p) |
| 394 | .build(); | 393 | .build(); |
| 395 | 394 | ||
| ... | @@ -399,10 +398,12 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -399,10 +398,12 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 399 | .build(); | 398 | .build(); |
| 400 | 399 | ||
| 401 | TrafficTreatment upstreamTreatment = DefaultTrafficTreatment.builder() | 400 | TrafficTreatment upstreamTreatment = DefaultTrafficTreatment.builder() |
| 401 | + .setVlanId(VlanId.vlanId(vlanId)) | ||
| 402 | .setOutput(PortNumber.portNumber(uplinkPort)) | 402 | .setOutput(PortNumber.portNumber(uplinkPort)) |
| 403 | .build(); | 403 | .build(); |
| 404 | 404 | ||
| 405 | TrafficTreatment downstreamTreatment = DefaultTrafficTreatment.builder() | 405 | TrafficTreatment downstreamTreatment = DefaultTrafficTreatment.builder() |
| 406 | + .popVlan() | ||
| 406 | .setOutput(p) | 407 | .setOutput(p) |
| 407 | .build(); | 408 | .build(); |
| 408 | 409 | ... | ... |
| ... | @@ -530,7 +530,11 @@ public class FlowEntryBuilder { | ... | @@ -530,7 +530,11 @@ public class FlowEntryBuilder { |
| 530 | vlanId = VlanId.ANY; | 530 | vlanId = VlanId.ANY; |
| 531 | } | 531 | } |
| 532 | } else { | 532 | } else { |
| 533 | - vlanId = VlanId.vlanId(match.get(MatchField.VLAN_VID).getVlan()); | 533 | + if (!match.get(MatchField.VLAN_VID).isPresentBitSet()) { |
| 534 | + vlanId = VlanId.NONE; | ||
| 535 | + } else { | ||
| 536 | + vlanId = VlanId.vlanId(match.get(MatchField.VLAN_VID).getVlan()); | ||
| 537 | + } | ||
| 534 | } | 538 | } |
| 535 | if (vlanId != null) { | 539 | if (vlanId != null) { |
| 536 | builder.matchVlanId(vlanId); | 540 | builder.matchVlanId(vlanId); | ... | ... |
| ... | @@ -208,6 +208,8 @@ public abstract class FlowModBuilder { | ... | @@ -208,6 +208,8 @@ public abstract class FlowModBuilder { |
| 208 | if (vid.vlanId().equals(VlanId.ANY)) { | 208 | if (vid.vlanId().equals(VlanId.ANY)) { |
| 209 | mBuilder.setMasked(MatchField.VLAN_VID, OFVlanVidMatch.PRESENT, | 209 | mBuilder.setMasked(MatchField.VLAN_VID, OFVlanVidMatch.PRESENT, |
| 210 | OFVlanVidMatch.PRESENT); | 210 | OFVlanVidMatch.PRESENT); |
| 211 | + } else if (vid.vlanId().equals(VlanId.NONE)) { | ||
| 212 | + mBuilder.setExact(MatchField.VLAN_VID, OFVlanVidMatch.NONE); | ||
| 211 | } else { | 213 | } else { |
| 212 | mBuilder.setExact(MatchField.VLAN_VID, | 214 | mBuilder.setExact(MatchField.VLAN_VID, |
| 213 | OFVlanVidMatch.ofVlanVid(VlanVid.ofVlan(vid.vlanId().toShort()))); | 215 | OFVlanVidMatch.ofVlanVid(VlanVid.ofVlan(vid.vlanId().toShort()))); | ... | ... |
-
Please register or login to post a comment