-
Notifications
You must be signed in to change notification settings - Fork 75
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
Session add/lookup using sync map #67
Conversation
Woops, need to update the examples |
Do let me know if this is a good approach. |
Package tests and benchmarks
|
d9a3b32
to
4239c22
Compare
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
4239c22
to
922e986
Compare
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
672da3a
to
d05be9b
Compare
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
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.
Thank you! Could you check my inline comments?
v2/conn.go
Outdated
defer c.mu.Unlock() | ||
var teid uint32 | ||
// TODO: Name max retries | ||
for i := 0; i < 100; i++ { |
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.
100 times of retry seems insufficient in case of millions of subscribers exist. How about using 0xffff instead of 100 considering the unluckiest situation(only one value remaining unassigned)? Also, logging to let user know it's taking time at some point(e.g., when i = 1000, 10000, ...) can be helpful.
v2/conn.go
Outdated
*IMSISessionMap | ||
|
||
*TEIDSessionMap |
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 don't think these fields should not be exported as it's no use for manipulating from outside the package(rather, might be dangerous), and the new Session()
method satisfies the purpose of removed Session
field.
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
89fd0ab
to
a6d9f2a
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.
Thank you for updating. Now everything looks good to me.
This PR addresses #62
The number of places session lookup touches is quite a bit. Things i am fuzzy around -