Skip to content
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

Queue length for priority queueing #37

Closed
axmaxati opened this issue Apr 12, 2022 · 2 comments
Closed

Queue length for priority queueing #37

axmaxati opened this issue Apr 12, 2022 · 2 comments

Comments

@axmaxati
Copy link

Hello,

I am somewhat new to P4 coding and for a personal project of mine, I would be interested to know how exactly one is supposed to set a particular queue length when enabling priority queues. I am aware that the current simple_switch version in the bmv2 git has those enabled by default, and it seems to me that you would want to set the length as anything other than 64 under there : https://github.com/p4lang/behavioral-model/blob/main/targets/simple_switch/simple_switch.cpp#L201
However, you specifically wrote that you could do it individually for each queue id and that you would explain if asked. So, provided you see this and are able to answer, I would like you to give me some advice.
Thank you for your help.

@edgar-costa
Copy link
Contributor

If things have not changed ( I did not check for a long time) the is API methods to change rate and length of all the queues for a given port.

If you want to do it per individual queue you need to modify a bit the API. Some years ago I made a pull request to bmv2 repo that shows how to do it. You could use that as a guideline. Keep in mind that this is an old pull request, not sure if the code has changed a lot, but it should help you to get what you want.

p4lang/behavioral-model#566

@axmaxati
Copy link
Author

Thank you very much. I was able to find the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants