1) Currently the number of delete marked hash entries in Hash bucket is used
for triggering the work item for the deletion. Work item is triggered
when the first entry is delete marked. But due to contention in handling
"number of delete marked entries", the next work item is never
triggered.
As a fix, a new variable is used per hash bucket to trigger the work
item.
2) When Agent gives soft reset, Vrouter marks vr_not_ready. Once
vr_not_ready is set, Work items and RCU callbacks should not be
registered any more. In hash table deletion process, once this is set,
hash bucket is directly manipulated without work item. This results in
issues, if any pending work item is currently being executed. If work
item and hash entry deletion (vr_htable_release_hentry()) access the
same hash bucket, the hash bucket list goes bad.
As a fix, a new API vr_htable_reset() is introduced.
vr_htable_release_hentry() does not manipulate the hash entry if
vr_not_ready is setup. Modules are expected to call vr_htable_reset() to
reset the hash table. Call backs are invoked to act on the reset hash
entries.
Reviewed: https:/ /review. opencontrail. org/23853 github. org/Juniper/ contrail- vrouter/ commit/ 93ec45929ead2a7 4cd24bcc97ec14f 15afb06dda
Committed: http://
Submitter: Zuul
Branch: R3.0
commit 93ec45929ead2a7 4cd24bcc97ec14f 15afb06dda
Author: Divakar <email address hidden>
Date: Thu Aug 18 11:17:21 2016 +0530
Hash table fixes
1) Currently the number of delete marked hash entries in Hash bucket is used
for triggering the work item for the deletion. Work item is triggered
when the first entry is delete marked. But due to contention in handling
"number of delete marked entries", the next work item is never
triggered.
As a fix, a new variable is used per hash bucket to trigger the work
item.
2) When Agent gives soft reset, Vrouter marks vr_not_ready. Once release_ hentry( )) access the
vr_not_ready is set, Work items and RCU callbacks should not be
registered any more. In hash table deletion process, once this is set,
hash bucket is directly manipulated without work item. This results in
issues, if any pending work item is currently being executed. If work
item and hash entry deletion (vr_htable_
same hash bucket, the hash bucket list goes bad.
As a fix, a new API vr_htable_reset() is introduced. release_ hentry( ) does not manipulate the hash entry if
vr_htable_
vr_not_ready is setup. Modules are expected to call vr_htable_reset() to
reset the hash table. Call backs are invoked to act on the reset hash
entries.
Change-Id: I9edc2c9e7718e3 e0eae74a29fd4fa aab8c3055b5
closes-bug: #1614382