stats for reverse flow not correct when a evicted flow entry becomes active again

Bug #1521500 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Anand H. Krishnan
Trunk
Fix Committed
High
Anand H. Krishnan

Bug Description

R2.20 Build 111 Ubuntu 14.04 Juno multinode

Steps :

From 219.14.75.4,

send(IP(dst='219.14.75.3')/TCP(flags="S",sport=2000, dport=9099), count=1)

Flow -l shows this :
=====================
root@nodek1:~# flow -l | grep -A 2 2000
155104<=>2993244 219.14.75.4:2000 219.14.75.3:9099 6 (6)
(K(nh):51, Action:F, Flags:, TCP:S, S(nh):51, Stats:1/54, SPort:49690)

--
2993244<=>155104 219.14.75.3:9099 219.14.75.4:2000 6 (6)
(K(nh):51, Action:F, Flags:, TCP:Sr, S(nh):14, Stats:0/0, SPort:61910)

root@nodek1:~#
=====================

From 219.14.75.3,
send(IP(dst='219.14.75.4')/TCP(flags="R",sport=9099, dport=2000), count=1)

Then, flow gets evicted :
root@nodek1:~# flow -l | grep -A 2 2000
root@nodek1:~#

Then, send the first syn packet again
send(IP(dst='219.14.75.3')/TCP(flags="S",sport=2000, dport=9099), count=1)

The same flow indices get used. But the reverse flow would show a count of 1 even when there are no reverse packets for this session

root@nodek1:~# flow -l | grep -A 2 2000
155104<=>2993244 219.14.75.4:2000 219.14.75.3:9099 6 (6)
(K(nh):51, Action:F, Flags:, TCP:S, S(nh):51, Stats:1/54, SPort:49690)

--
2993244<=>155104 219.14.75.3:9099 219.14.75.4:2000 6 (6)
(K(nh):51, Action:F, Flags:, TCP:Sr, S(nh):14, Stats:1/54, SPort:61910)

root@nodek1:~#

The counter seems to accumulate everytime i do this..

Tags: vrouter
Revision history for this message
Anand H. Krishnan (anandhk) wrote :

Reviewed: https://review.opencontrail.org/15477
Committed: http://github.org/Juniper/contrail-vrouter/commit/8d9a87f2c34b61ddb1bb295604515053e2fd7860
Submitter: Zuul
Branch: R2.20

commit 8d9a87f2c34b61ddb1bb295604515053e2fd7860
Author: Anand H. Krishnan <email address hidden>
Date: Mon Nov 30 14:14:14 2015 +0530

Logic to reset statistics of the evicted reverse flow

The point where we reset statistics for an evicted flow is when we
trap the first packet to the agent. The trap message carries the
old statistics. However, for the reverse flow, there is no trap.
Hence, the statistics of the evicted reverse flow entry is sent
back to the agent in the sandesh flow message and reset once the
agent tries to add the reverse flow entry.

Change-Id: Ic67318b9632f39560292512be503f90eb6f33068
Closes-BUG: 1362701

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/15741
Submitter: Anand H. Krishnan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15741
Committed: http://github.org/Juniper/contrail-vrouter/commit/a997fcd812bb7abe16131452086e8cd302161075
Submitter: Zuul
Branch: R2.20

commit a997fcd812bb7abe16131452086e8cd302161075
Author: Anand H. Krishnan <email address hidden>
Date: Thu Dec 10 16:07:45 2015 +0530

Retain the datapath set flag bits

While setting the flags in a flow entry, we are overwriting datapath
set bits. Since the block where we reset the statistics depends on
the datapath set bits, flow entry statistics do not go to zero.

Change-Id: I73cd6a749fee6769049e02ce3c00bd7f6956a814
Closes-BUG: 1521500

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/15828
Submitter: Anand H. Krishnan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15828
Committed: http://github.org/Juniper/contrail-vrouter/commit/764cd954611417a678c276fd68b716dd3f3fbf59
Submitter: Zuul
Branch: master

commit 764cd954611417a678c276fd68b716dd3f3fbf59
Author: Anand H. Krishnan <email address hidden>
Date: Thu Dec 10 16:07:45 2015 +0530

Retain the datapath set flag bits

While setting the flags in a flow entry, we are overwriting datapath
set bits. Since the block where we reset the statistics depends on
the datapath set bits, flow entry statistics do not go to zero.

Change-Id: I73cd6a749fee6769049e02ce3c00bd7f6956a814
Closes-BUG: 1521500

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.