Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make s1ap pass state around instead of global
Summary: As part of our goal to make MME stateless (can crash/update and come back up without losing enb/ue context), we are making the S1AP task stateless as a POC. To make a C program "stateless", we are going off the idea that only the database state needs to be good at all times -- therefore we let the message/state processing happen as normal except that the state is moved from separate globals into one global state that is committed to the db at the end of processing each message. In this diff, we change from using global state for s1ap task to passing around the state for each message through function arguments. This approach better reflects the intent of stateless which is that only those that need state should have access to it. This also guarantees that other tasks are not interfering with the s1ap state (unless a ue/enb ref is passed in a message) because the must first call s1ap_state_get before being able to access it. Reviewed By: ssanadhya Differential Revision: D14685281 fbshipit-source-id: a4e01516af15a6d41e31e5840040c768355ea044
- Loading branch information
1 parent
ae0dd7b
commit ac3992f
Showing
10 changed files
with
343 additions
and
309 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
Oops, something went wrong.