Committed by
Gerrit Code Review
[ONOS] RSVP defect fix in master
Change-Id: I090d389f65a457cf5756ce73fe0c37468b46db5b
Showing
4 changed files
with
11 additions
and
5 deletions
... | @@ -86,10 +86,9 @@ public class PceSetupPathCommand extends AbstractShellCommand { | ... | @@ -86,10 +86,9 @@ public class PceSetupPathCommand extends AbstractShellCommand { |
86 | LspType lspType = LspType.values()[type]; | 86 | LspType lspType = LspType.values()[type]; |
87 | 87 | ||
88 | // Add bandwidth | 88 | // Add bandwidth |
89 | - // bandwidth default data rate unit is in MBPS, since bandwidth value in network config | 89 | + // bandwidth default data rate unit is in BPS |
90 | - //stored in MPBS | ||
91 | if (bandwidth != 0.0) { | 90 | if (bandwidth != 0.0) { |
92 | - listConstrnt.add(BandwidthConstraint.of(bandwidth, DataRateUnit.valueOf("MBPS"))); | 91 | + listConstrnt.add(BandwidthConstraint.of(bandwidth, DataRateUnit.valueOf("BPS"))); |
93 | } | 92 | } |
94 | 93 | ||
95 | // Add cost | 94 | // Add cost | ... | ... |
... | @@ -515,7 +515,14 @@ public class PceManager implements PceService { | ... | @@ -515,7 +515,14 @@ public class PceManager implements PceService { |
515 | } | 515 | } |
516 | 516 | ||
517 | if (existingBwValue != null) { | 517 | if (existingBwValue != null) { |
518 | - shBwConstraint = new SharedBandwidthConstraint(links, existingBwValue, bwConstraint.bandwidth()); | 518 | + if (bwConstraintValue == 0) { |
519 | + bwConstraintValue = existingBwValue.bps(); | ||
520 | + } | ||
521 | + //If bandwidth constraints not specified , take existing bandwidth for shared bandwidth calculation | ||
522 | + shBwConstraint = bwConstraint != null ? new SharedBandwidthConstraint(links, | ||
523 | + existingBwValue, bwConstraint.bandwidth()) : new SharedBandwidthConstraint(links, | ||
524 | + existingBwValue, existingBwValue); | ||
525 | + | ||
519 | constraints.add(shBwConstraint); | 526 | constraints.add(shBwConstraint); |
520 | } | 527 | } |
521 | } else { | 528 | } else { | ... | ... |
... | @@ -72,7 +72,7 @@ public class PcepClientImpl implements PcepClientDriver { | ... | @@ -72,7 +72,7 @@ public class PcepClientImpl implements PcepClientDriver { |
72 | private byte deadTime; | 72 | private byte deadTime; |
73 | private byte sessionId; | 73 | private byte sessionId; |
74 | private PcepPacketStatsImpl pktStats; | 74 | private PcepPacketStatsImpl pktStats; |
75 | - private Map<LspKey, Boolean> lspDelegationInfo; | 75 | + private Map<LspKey, Boolean> lspDelegationInfo = new HashMap<>(); |
76 | private Map<PccId, List<PcepStateReport>> syncRptCache = new HashMap<>(); | 76 | private Map<PccId, List<PcepStateReport>> syncRptCache = new HashMap<>(); |
77 | 77 | ||
78 | @Override | 78 | @Override | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment