Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Read reverse flow entry after acquiring the lock
In case of short lived TCP session using same 5 tuple we might end up accesssing a reverse flow entry which might be already deleted and present in free list. Below set of events lead to this issue 1. F1 and R1 flow are added to flow table 2. R1 is written to vrouter 3. F1 is written to vrouter 4. R1 flow add response is received, triggering update of F1(not needed now as reverse flow index is not written to kernel?) 5. In the meantime flow is evicted in vrouter, hence flow update for F1 would result in error from vrouter resulting in short flow 6. Since F1 is shortflow Flow delete gets enqueued 7. Since R1 is evict marked, flow evict gets enqueued 8. Both event F1 and R1 delete and evict event can run in parallel,and hence reverse flow pointer obtained before FLOW lock could be invalid, hence read back the same Was able to simulate the same in UT, UT is disabled as it need some instrumentation to run it to hit the issue Change-Id: I368f465f9d446b43dfe0e4baa547d8c8cbfd6840 Closes-bug: #1714371 (cherry picked from commit a0cb166)
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters