Does P4Runtime define a way for controller to configure timeout value for tables with idle timeout notification?
If not, should it?
I have a half-memory that I may have created an issue on this topic before. I do recall Antonin saying that P4Runtime as defined today does not (yet) have a way to refer to properties of an entire table, so the answer may be the same here.
This need not hold up the v1.0 of the P4 Runtime API spec. If it doesn't get into there, it seems worth it to me to consider how to add such a feature after that release.
Currently the timeout value is set per entry which gives a lot of freedom to the client (may be tricky to implement exactly but the spec does say that the server should try to approximate the timeout values as well as possible).
There is no way to set a default table-wide timeout value. There is no good way to set table-wide properties currently, but applying an entry property value to ALL entries in a table should be possible (without iterating over all entries) if we were to extend the wildcard mechanism (leave the "key" empty) that we already have for ReadRequest to WriteRequest as well. One could use this to overwrite the timeout value for every entry with a single TableEntry message.
Do you have a use-case in mind for which the current level of support (per-entry timeout) is insufficient or inconvenient?
Being able to activate / de-activate idle timeout on a table with a simple Protobuf message, without overwriting the timeout value for each entry with 0 with a wildcard Write, could be convenient. We could also introduce the ability to provide a default timeout value for the entire table (instead of just an on / off switch) but the semantics may be harder to define (interactions between default value and per-entry value) and we may have to wrap idle_timeout_ns inside a Protobuf message (to distinguish between 0 & unset).
I suggest we think about a generic mechanism to set dynamic table properties after the v1.0 release. Maybe we can simply add a new "entity" for this.
OK, now I know I am having a senior moment, because I am sure you have pointed out exactly these issues to me before :-)
Yes, there is no rush on any changes here for v1.0 release. I had forgotten about the ability for the controller to specify an independent timeout value per table entry.
If you don't mind leaving this open for the possibility of asking about it in a post-v1.0-release working group meeting when things are otherwise quiet, maybe this time I will remember we talked about it.