Committed by
Pavlin Radoslavov
ONOS-991: The event listener in OpenFlowRuleProvider needs to check the event ty…
…pe because GROUP_STATS are also published now. Change-Id: I3b61fcc4b59f1b47b11debdb1863d87d36db7744
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -71,6 +71,7 @@ import org.projectfloodlight.openflow.protocol.OFInstructionType; | ... | @@ -71,6 +71,7 @@ import org.projectfloodlight.openflow.protocol.OFInstructionType; |
71 | import org.projectfloodlight.openflow.protocol.OFMessage; | 71 | import org.projectfloodlight.openflow.protocol.OFMessage; |
72 | import org.projectfloodlight.openflow.protocol.OFPortStatus; | 72 | import org.projectfloodlight.openflow.protocol.OFPortStatus; |
73 | import org.projectfloodlight.openflow.protocol.OFStatsReply; | 73 | import org.projectfloodlight.openflow.protocol.OFStatsReply; |
74 | +import org.projectfloodlight.openflow.protocol.OFStatsType; | ||
74 | import org.projectfloodlight.openflow.protocol.OFVersion; | 75 | import org.projectfloodlight.openflow.protocol.OFVersion; |
75 | import org.projectfloodlight.openflow.protocol.action.OFAction; | 76 | import org.projectfloodlight.openflow.protocol.action.OFAction; |
76 | import org.projectfloodlight.openflow.protocol.action.OFActionOutput; | 77 | import org.projectfloodlight.openflow.protocol.action.OFActionOutput; |
... | @@ -328,7 +329,9 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr | ... | @@ -328,7 +329,9 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr |
328 | providerService.flowRemoved(fr); | 329 | providerService.flowRemoved(fr); |
329 | break; | 330 | break; |
330 | case STATS_REPLY: | 331 | case STATS_REPLY: |
331 | - pushFlowMetrics(dpid, (OFStatsReply) msg); | 332 | + if (((OFStatsReply) msg).getStatsType() != OFStatsType.FLOW) { |
333 | + pushFlowMetrics(dpid, (OFFlowStatsReply) msg); | ||
334 | + } | ||
332 | break; | 335 | break; |
333 | case BARRIER_REPLY: | 336 | case BARRIER_REPLY: |
334 | future = pendingFutures.get(msg.getXid()); | 337 | future = pendingFutures.get(msg.getXid()); |
... | @@ -359,10 +362,9 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr | ... | @@ -359,10 +362,9 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr |
359 | // Do nothing here for now. | 362 | // Do nothing here for now. |
360 | } | 363 | } |
361 | 364 | ||
362 | - private void pushFlowMetrics(Dpid dpid, OFStatsReply stats) { | 365 | + private void pushFlowMetrics(Dpid dpid, OFFlowStatsReply replies) { |
363 | 366 | ||
364 | DeviceId did = DeviceId.deviceId(Dpid.uri(dpid)); | 367 | DeviceId did = DeviceId.deviceId(Dpid.uri(dpid)); |
365 | - final OFFlowStatsReply replies = (OFFlowStatsReply) stats; | ||
366 | 368 | ||
367 | List<FlowEntry> flowEntries = replies.getEntries().stream() | 369 | List<FlowEntry> flowEntries = replies.getEntries().stream() |
368 | .filter(entry -> !tableMissRule(dpid, entry)) | 370 | .filter(entry -> !tableMissRule(dpid, entry)) | ... | ... |
-
Please register or login to post a comment