Skip to content

Commit

Permalink
Do not consider evicted flows as active flow in flow utility
Browse files Browse the repository at this point in the history
Change-Id: Ia9ae864af98a645b60c5880db29ba8ff1b3c494f
Closes-Bug: #1517665
  • Loading branch information
krharsh committed Feb 23, 2016
1 parent 9a15230 commit 412a41d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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++;
Expand Down

0 comments on commit 412a41d

Please sign in to comment.