-
Notifications
You must be signed in to change notification settings - Fork 638
[AGW][pipelined] Add support for APN AMBR #2304
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
[AGW][pipelined] Add support for APN AMBR #2304
Conversation
| handle {qid} fw flowid 1:{qid}".format(intf, qid=qid_hex) | ||
| parent_qid_hex = hex(parent_qid) if parent_qid else TrafficClass.ROOT_QID | ||
| tc_cmd = "tc class add dev {intf} parent 1:{parent_qid} classid 1:{qid} htb \ | ||
| rate 12Kbit ceil {maxbw}".format(intf=intf, parent_qid=parent_qid_hex, |
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.
let's have the rate parameter also as a function argument. We can use it for GBR where gbr rates can be used for the rate parameter.
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 added these as default args but it failed due to invalid inputs.. I will add cleaner check at the top of the method instead of shorthand if else. It might make it easier to read
274f507 to
3d66724
Compare
f1f379b to
67f3c3c
Compare
| self._redis_conn_retry_secs, | ||
| ) | ||
| self._loop.call_later(self._redis_conn_retry_secs, self.setup) | ||
| self._setupInternal() |
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.
even if it is qos is disabled pipelined need to call _setupInternal() to cleanup state from previous run.
| for qid_tuple in qid_list: | ||
| qid, pqid = qid_tuple | ||
| if qid < self._start_idx or qid > (self._max_idx - 1): | ||
| continue |
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.
we need to relax checks around idx since this could be valid id from previous run.
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.
Are you saying a scenario where we change the min and max idx on a restart ? I would think that would change more on an upgrade.
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.
lets not assume it, user can expand or shrink the range.
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.
We have some inherent assumption of ROOT_QID == max_idx, if user is going to make change here, we can no longer recover properly. I think it is reasonable to say we won't support unclean clean_restart then and ask user to set clean_restart==true.
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.
we should add comment in config file about significance of these values.
|
|
||
| def normalizeIMSI(imsi: str) -> str: | ||
| imsi = imsi.lower() | ||
| if imsi.startswith("imsi"): |
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 know it is not part of this patch, but can we use encode_imsi() here.
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.
@pshelar I will change this in a future PR. Currently lot of tests(test_qos.py) use a random IMSI and it is breaking when i changed to use encode_imsi. I will avoid making this change for now.
karthiksubraveti
left a comment
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.
Thanks Pravin for the review. I will cleanup the code based on the feedback and submit.
| for qid_tuple in qid_list: | ||
| qid, pqid = qid_tuple | ||
| if qid < self._start_idx or qid > (self._max_idx - 1): | ||
| continue |
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.
Are you saying a scenario where we change the min and max idx on a restart ? I would think that would change more on an upgrade.
f5ea484 to
aedfd34
Compare
Signed-off-by: Karthik Subraveti <karthikshyam@gmail.com>
aedfd34 to
110191a
Compare
Signed-off-by: Karthik Subraveti karthikshyam@gmail.com
Summary
Changed enforcement code and pipelined to pass in the apn_ambr all the way to Qos enforcement
Added parent qid as an optional arg for adding Qos. We can use this for supporting APN AMBR. APN AMBR will be created as a parent class and all the subscriber qos profiles will be created as leaf classes under it. The parent class is created with a ceil based on APN AMBR and child classes are created with ceil based on MBR. The rate params are defaulted to 12Kbits. When the child class exceeds the rate, it can borrow tokens from parent up-to its ceil value.
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Also cleaned up existing code to ensure that we create fq_codel and filters only for leaf classes.
Added test case for verifying sanity by creating a simple parent/child class.
Added test case to verify the APN AMBR sanity from QosManager code
Added logic to handle clean_restart=false case, needs more verification here
Test Plan