Committed by
Yuta Higuchi
DistributedFlowRuleStore: always add FlowEntry on batchStore
related to ONOS-481 Change-Id: I9f82c7d9736dab7326062af9c38ae6e290a9b818
Showing
1 changed file
with
7 additions
and
4 deletions
| ... | @@ -417,10 +417,13 @@ public class DistributedFlowRuleStore | ... | @@ -417,10 +417,13 @@ public class DistributedFlowRuleStore |
| 417 | } else if (op.equals(FlowRuleOperation.ADD)) { | 417 | } else if (op.equals(FlowRuleOperation.ADD)) { |
| 418 | StoredFlowEntry flowEntry = new DefaultFlowEntry(flowRule); | 418 | StoredFlowEntry flowEntry = new DefaultFlowEntry(flowRule); |
| 419 | DeviceId deviceId = flowRule.deviceId(); | 419 | DeviceId deviceId = flowRule.deviceId(); |
| 420 | - if (!flowEntries.containsEntry(deviceId, flowEntry)) { | 420 | + Collection<StoredFlowEntry> ft = flowEntries.get(deviceId); |
| 421 | - flowEntries.put(deviceId, flowEntry); | 421 | + |
| 422 | - toAdd.add(batchEntry); | 422 | + // always add requested FlowRule |
| 423 | - } | 423 | + // Note: 2 equal FlowEntry may have different treatment |
| 424 | + ft.remove(flowEntry); | ||
| 425 | + ft.add(flowEntry); | ||
| 426 | + toAdd.add(batchEntry); | ||
| 424 | } | 427 | } |
| 425 | } | 428 | } |
| 426 | if (toAdd.isEmpty() && toRemove.isEmpty()) { | 429 | if (toAdd.isEmpty() && toRemove.isEmpty()) { | ... | ... |
-
Please register or login to post a comment