New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lte][agw] Updating deletion of s1ap imsi map entry when UE context is deleted #6800
Conversation
9d06c20
to
ca0efc8
Compare
@@ -577,6 +555,7 @@ void s1ap_remove_ue(s1ap_state_t* state, ue_description_t* ue_ref) { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the difference between free vs remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question came to me, after investigating:
- for
hashtable_uint64
implementation, there is no difference between thets_free
andts_remove
handlers, both of them callfree_wrapper
on the node to be removed, and update the nodes accordingly - for
hashtable
,ts_free
frees the object on the hashtable, andts_remove
removes the object on the hashtable nodes, but does not free the object itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ulaskozat Removed hashtable_uint64_ts_free
usage and function
ca0efc8
to
f875b47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great fix...
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 <ardzoht@gmail.com>
Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
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 <ardzoht@gmail.com> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
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 <ardzoht@gmail.com> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
…s deleted (magma#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <ardzoht@gmail.com> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
…s deleted (magma#6800) * Removing s1ap imsi map entry on s1ap_remove_ue Signed-off-by: Alex Rodriguez <ardzoht@gmail.com> * Adding s1ap imsi map entries check to s1ap tests cleanup step Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
Signed-off-by: Alex Rodriguez ardzoht@gmail.com
Summary
s1ap_imsi_map
entries were not always being deleted when UE context was removed, previously they were only deleted ons1ap_mme_handle_ue_context_rel_comp_timer_expiry
function handler, this PR updates the removal of the entry when the S1AP UE context is deleted as well.state_cli
to parses1ap_imsi_map
Test Plan
state_cli.py parse s1ap_imsi_map
entries (master) => 3376state_cli.py parse s1ap_imsi_map
entries (PR) => 300Additional Information