From 412a41d45efabb71c5c3e2f7d69d44f2b1d77eae Mon Sep 17 00:00:00 2001 From: harsh Date: Tue, 23 Feb 2016 15:23:23 +0530 Subject: [PATCH] Do not consider evicted flows as active flow in flow utility Change-Id: Ia9ae864af98a645b60c5880db29ba8ff1b3c494f Closes-Bug: #1517665 --- utils/flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/flow.c b/utils/flow.c index 05b0efb1b..c06c87861 100644 --- a/utils/flow.c +++ b/utils/flow.c @@ -599,6 +599,9 @@ flow_stats(void) fe = (struct vr_flow_entry *)((char *)ft->ft_entries + (i * sizeof(*fe))); if (fe->fe_flags & VR_FLOW_FLAG_ACTIVE) { + if (fe->fe_flags & VR_FLOW_FLAG_EVICTED) { + continue; + } total_entries++; if (fe->fe_action != VR_FLOW_ACTION_HOLD) { active_entries++; @@ -706,6 +709,9 @@ flow_rate(void) for (i = 0; i < ft->ft_num_entries; i++) { fe = (struct vr_flow_entry *)((char *)ft->ft_entries + (i * sizeof(*fe))); if (fe->fe_flags & VR_FLOW_FLAG_ACTIVE) { + if (fe->fe_flags & VR_FLOW_FLAG_EVICTED) { + continue; + } total_entries++; if (fe->fe_action != VR_FLOW_ACTION_HOLD) active_entries++;