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

Priority and qid fields meaning #49

Open
MateusBragatto opened this issue Nov 30, 2023 · 3 comments
Open

Priority and qid fields meaning #49

MateusBragatto opened this issue Nov 30, 2023 · 3 comments

Comments

@MateusBragatto
Copy link

Hello there everyone!

I have some questions regarding the usage of multiqueue inside bmv2.

What are the meaning of both fields: qid and priority? Is there a link that I can read more about both?
For example: If i define priority = 1 and qid = 3 I'm giving the fourth qid the priority of 1? How does that work?

Thanks already!

@edgar-costa
Copy link
Contributor

edgar-costa commented Nov 30, 2023

Hi,

Priority is used to set the packet priority at the ingress pipeline. That value is used by the Traffic manager to enqueue the packet.

The qid field is a read only field that gets the value of the queue ID it has been queued into. In this case, it will get the priority value you have used at the ingress. This information can be used at the egress for whatever you might need it.

You can see some info here: https://github.com/p4lang/behavioral-model/blob/main/docs/simple_switch.md

@MateusBragatto
Copy link
Author

MateusBragatto commented Dec 6, 2023

Thank you so much! Now it's very clear

Two more questions question that I have:

  • In BMv2 the qids are distributed by ports, meaning each port can have a defined number of queues?
  • In BMv2 is there a limit for registers readings? I'm creating a logic to read registers based on qid's infos.

@edgar-costa
Copy link
Contributor

Hi @MateusBragatto,

Sorry for the long delay. I hope you found an answer to your questions.

  • yes each port has its own qids
  • there is no technically no register reading limit, however that is not the case on real hardware

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