You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The control plane API for counters includesstart(index) and stop(index) methods, but I can't find a description of what they do. They look like they're meant to suspend/resume attempts by the data plane to count on a particular index, but the pseudocode in Appendix C doesn't implement this behavior.
The text was updated successfully, but these errors were encountered:
I believe those were originally typed in by Calin @cc10512 and I believe I verbally asked at one time and the answer was something about that being useful for some debug situations, perhaps?
It may make sense to de-emphasize and/or delete the control plane APIs in the PSA specification, referring instead to the P4Runtime API spec, which is not at v1.0 release yet, but with a goal of reaching that milestone by June 2018.
I don't think start/stop functionality is included explicitly in the P4Runtime API spec. I also recall a conversation in some PSA working group meeting that because counter update actions must be written explicitly in PSA programs (i.e. there are no automatic counter or meter updates implied that are not explicitly in the P4 source program, not even for DirectCounter or DirectMeter externs), that you can achieve the same effect as start/top by having one action that includes update actions for a DirectCounter, and another action that is identical except with no update action for the DirectCounter, and having the control plane API choose between the counter-updating action and the non-counter-updating action to implement start/stop behavior.
It's probably fine to move most of the API discussion, but if counter implementations do need to be able to be suspended it seems like that should be mentioned here in any case.
Using multiple actions works for direct counters, but currently start/stop are also defined for freestanding counters. Registers could also work.
There are tradeoffs for direct counters too. One issue with the current design is that all counters have to include start/stop bits, even if the user doesn't want that functionality. Multiple actions solves that, but requires the user to manually specialize actions and duplicate code. Another possibility is opting-in to a counter being suspendible via a constructor parameter.
The control plane API for counters includes
start(index)
andstop(index)
methods, but I can't find a description of what they do. They look like they're meant to suspend/resume attempts by the data plane to count on a particular index, but the pseudocode in Appendix C doesn't implement this behavior.The text was updated successfully, but these errors were encountered: