Added support for priority queues in switch configuration#719
Added support for priority queues in switch configuration#719jafingerhut merged 2 commits intop4lang:masterfrom
Conversation
|
Welcome to the project, @code-a1! It looks like this is your first contribution. We noticed the DCO (Developer Certificate of Origin) check might fail if your commits aren't signed. To fix this, please ensure every commit has a For existing commits, you can fix them with: |
|
Hi @code-a1 , As mentioned here you should "sign" your commits #719 (comment). The PR you proposed only partially improves the tutorial exercises, since we don’t use |
|
Hi @Dscano, I thought this feature would be useful for people interested in expanding existing exercises (which is my case). Allowing more customisation of the topology seems a good idea to me. I understand that the queues aren't a P4 language feature, but since the tutorials use BMv2, I think it would be useful to show how this can be achieved using this target. It would be interesting to add an exercise on priority queuing: perhaps someone could use this PR as a starting point. |
|
I have tested with these changes, and it looks what it does what it says on the label. This seems like a useful addition to me, even if no existing exercises use it right now. May as well make it easier for someone to modify an existing exercise, or add a new one, that can take advantage of this capability of bmv2. |
|
@code-a1 I will approve and merge as this is now, but it would be nice to find some nice Pythonic way to avoid the 2*2=4 combinations of passing optional arguments to methods, because that definitely does not scale if there is ever a 3rd or 4th option. I think Python **kwargs parameter with a dict might help here? I am happy to wait until some future PR to improve that. |
|
@Code-S1 I cannot merge this until you follow the instructions for signing the DCO. See the earlier comment for instructions on how to do this. |
Signed-off-by: code-a1 <68858676+code-a1@users.noreply.github.com>
160f8f5 to
1ac7b6c
Compare
@jafingerhut I completely agree: I was thinking about it while writing the code, but I thought the way I did could be the best way to preserve the style currently used. I can of course implement the feature this other way, which seems cleaner to me. I also signed the commit. |
…meters Signed-off-by: code-a1 <68858676+code-a1@users.noreply.github.com>
Support for simple switch priority queues in the configuration file can be useful to expand the existing exercises or for future exercises on this topic.
The priority queues number can be defined inside the topology file as follows: