[lte][agw] Updating deletion of s1ap imsi map entry when UE context is deleted#6800
[lte][agw] Updating deletion of s1ap imsi map entry when UE context is deleted#6800ardzoht merged 2 commits intomagma:masterfrom
Conversation
9d06c20 to
ca0efc8
Compare
| s1ap_imsi_map->mme_ue_id_imsi_htbl, (const hash_key_t) mme_ue_s1ap_id, | ||
| &imsi64); | ||
| delete_s1ap_ue_state(imsi64); | ||
| hashtable_uint64_ts_free(s1ap_imsi_map->mme_ue_id_imsi_htbl, mme_ue_s1ap_id); |
There was a problem hiding this comment.
what is the difference between free vs remove?
There was a problem hiding this comment.
same question came to me, after investigating:
- for
hashtable_uint64implementation, there is no difference between thets_freeandts_removehandlers, both of them callfree_wrapperon the node to be removed, and update the nodes accordingly - for
hashtable,ts_freefrees the object on the hashtable, andts_removeremoves the object on the hashtable nodes, but does not free the object itself
There was a problem hiding this comment.
I see that hashtable_uint64_ts_remove used everywhere except for one. Let's eliminate the usage of hashtable_uint64_ts_free as it would lead to confusion. on a separate PR maybe we should revisit hashtable itself and use a better naming than remove if it is not freeing but simply popping the entry.
There was a problem hiding this comment.
@ulaskozat Removed hashtable_uint64_ts_free usage and function
ca0efc8 to
f875b47
Compare
f875b47 to
9d569f1
Compare
|
Nice find! Ideally, I'd like to see us get in the habit of adding the missing unit test (or else a presubmit CI test) that could have caught this every time we fix a critical bug (or a SEV). I understand that sometimes it's not practical, thought. Thoughts on that the context of this fix and PR? |
9d569f1 to
74c48e1
Compare
@bbarritt Definitely, I think due to the nature of this change an integration test makes more sense here, I will add one in this PR |
|
@ardzoht Alex False negative on the OAI pipeline. Raphael |
Signed-off-by: Alex Rodriguez <[email protected]>
Signed-off-by: Alex Rodriguez <[email protected]>
cda0e7d to
0f3d1ae
Compare
|
I ended up including a post check for every s1ap test run, that will validate that all the entries of |
…s deleted (#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <[email protected]> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <[email protected]>
Thanks Alex! We <3 automated testing regression prevention =D |
…s deleted (#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <[email protected]> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <[email protected]>
…s deleted (magma#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <[email protected]> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <[email protected]>
…s deleted (magma#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <[email protected]> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <[email protected]>
Signed-off-by: Alex Rodriguez [email protected]
Summary
s1ap_imsi_mapentries were not always being deleted when UE context was removed, previously they were only deleted ons1ap_mme_handle_ue_context_rel_comp_timer_expiryfunction handler, this PR updates the removal of the entry when the S1AP UE context is deleted as well.state_clito parses1ap_imsi_mapTest Plan
state_cli.py parse s1ap_imsi_mapentries (master) => 3376state_cli.py parse s1ap_imsi_mapentries (PR) => 300Additional Information