-
Notifications
You must be signed in to change notification settings - Fork 897
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
How to set the idle_timeout? #630
Comments
There is an example P4 program using the v1model architecture and the idle_timeout feature, and a Python program that does automated testing of it, that you can find here: https://github.com/jafingerhut/p4-guide/tree/master/ptf-tests/idletimeout I have not read your last comment and understood it in detail, but I would guess you have already figured out a significant fraction of what you were hoping to find out, already, but maybe take a look at my test program above and see if it answers any more of your questions. |
Oh, and idle_timeout only NOTIFIES the control plane when table entries have not been matched for a long time. It does not automatically delete them. It is up to the control plane software to do that, if it wishes to. The PNA architecture defines a way to have a table that behaves this way, but also defines a way to define a table where the data plane automatically deletes the entries that are not matched for this timeout duration. I am not aware of any open source implementation in a software switch of this behavior, but there are commercially sold programmable NICs that do implement this. |
Thanks for your help! I want to implement the deletion of idle timeout table entries in the P4 tutorial project. In the P4 tutorial, how does the controller receive idle timeout notification messages generated by the switch? Thank you. |
All P4Runtime API clients receive idle timeout notifications from the switch via specific kinds of gRPC messages, over the same TCP connection that the controller uses to send table insert, modification, and delete operations. I am not certain, but I believe there might not currently be any exercises that demonstrate this. Because these idle timeout notifications are unsolicited messages from the switch, where by "unsolicited" I simply mean the switch can generate them at any time, without the controller having first made a request, it requires some extra code in the controller to check for these unsolicited messages. If such code has been developed in Python in the tutorials repository, I am unaware of it. If you are interested in looking for such Python code in the tutoraisl repository and taking advantage of it to create a new exercise that demonstrates this feature, and/or developing new Python code in the tutorials repo to demonstrate this feature, please consider doing so. |
Closing this issue, since the original submitter seems to have had their questions answered, but linking to this issue from a new one requesting that someone create a new exercise that demonstrates these features: #656 |
I want to write a P4 program to set the idle_timeout for a table entry (e.g. 10 seconds).
The BMv2 v1model implementation supports the table property
support_timeout
. How to set a specific idle_timeout (e.g. 10 seconds) after assigning this table property to true when defining a table?Can I specify an idle_timeout when installing a table entry? But
buildTableEntry
inhelper.py
doesn't seem to provide such a feature.Thanks a lot!
The text was updated successfully, but these errors were encountered: