Comments (7)
Proposal for consideration:
It seems fairly straightforward to define what it means to define a table with both add_on_miss=true, and a direct counter. That is, when a new entry is added, the initial value of the packet/byte counters associated with the new table entry are 0. Note that this would avoid counting the packet/byte count of the packet that caused the entry to be added, but perhaps that is acceptable. I suppose if someone really wanted to get fancy, the add_entry call could somehow specify the initial value of the packet/byte counters of the direct counter associated with the new entry.
For a table that combines add_on_miss=true and a direct meter, the biggest question in my mind is how that new entry gets its meter peak/committed rate and bucket size configured. One answer would be that there is a defined control plane API that gives the same default configuration for every table entry added by the data plane. Another would be that the add_entry() call should have additional parameters that specify this meter configuration for the new entry.
Of course, as usual, implementations would be able to document "I don't implement these combinations of features on the same table", but it does seem reasonable to define what their behavior should be for implementations that want to implement the combination.
from pna.
Any table, including the add-on-miss table, should support a direct counter. The data plane could use the counter. Regarding meter, only if the add-on-miss table is used by metering, the question arises if the table should support a direct meter and the table should.
from pna.
Just wanted to say that this question is a good one. We should nail it down.
from pna.
I am trying to understand the scenario or Use Case that requires "add_on_miss" with "pna_direct_counter" or "pna_direct_meter".
Assumed, the table is enabled with "add-on-miss" property + “pna_direct_counter”
For direct counter, it is true that we do not required initial configuration, new entries can start with
counter value 0.
The question here is, not how do we implement! rather How or When to use this feature ?
-
Can this counter information collected by control plane ?
I doubt! since the control plane does not know the table entry information as it is added by data plane. -
Is this counter values can be used in the data plane itself ? Then,
What is the Use Case ?
(or)
When the data plane is needed to use the counter value of the table entry ? Why ?
If control plane or data plane is not going to use this counters then why do we need to enable ?
The same question applies for the "pna_direct_meter", when and why it is required with add_on_miss ?
from pna.
The control plane might not know the entries added by the data plane as they are added, but as long as the control plane supports a "read all entries and their counters" API, which I believe at least P4Runtime API and TDI do, and seems like a reasonable thing to expect most control plane APIs to support, the control plane could retrieve the current key, action, and counter values for what happens to be in that table right now.
I grant you that if the table has add_on_miss=true and ALSO does data plane deletions on idle timeout, then there is NO guarantee that the control plane will ever see an entry that was added, if it does not read the entries often enough. There is also NO guarantee that the control plane will know about the "final" counter values of an entry just before the data plane deletes it, unless the data plane supports an option to send the key/action + counter values of data-plane-deleted entries as it deletes them, which is likely to be a lossy communication channel if data-plane-delete-of-entries is faster than the control plane can keep up with.
One could also imagine an add_on_miss=true table that only allows the control plane to delete entries. I don't know if anyone has good use cases for such a thing, given that if you don't want the overhead of adding new table entries for new flows in the control plane, you probably also don't want the control plane load for deleting old entries, either.
I'm not claiming that I think we should REQUIRE implementations to support these combinations. I am trying to propose what behavior would make sense, if a target implemented this combination. Whether it is useful or not, for the reasons stated above, it really depends upon why you want the direct counters associated with such a table.
If it is for "I guarantee I export a count of every packet on every table entry, with no losses", then that requires no losses in exporting all this data for deleted entries from the data plane to the control plane, which sounds like a fairly special situation to me that someone would want to implement that.
If it is for a case where the control plane gets a best-effort view of some of the packet/byte counts, but knows that it will typically be missing out on many of those, then it sounds fairly straightforward to implement.
from pna.
@kamalakannanr89 Are you interested in creating a PR for the PNA specification document that would start by saying that the combination of add_on_miss=true and direct resources on a table are not specified by PNA, and need not be supported?
We can always define what supporting those combinations means later, if there is a desire by the working group to do so.
from pna.
Yes, I will create the PR with changes.
from pna.
Related Issues (20)
- Any desire to define behavior of add_on_miss=true table WITHOUT data plane deletions of expired entries? HOT 2
- Create functionally correct example demonstrating IPsec encryption and decryption
- Full payload checksum
- Should PNA support resubmit operation? Also: document details of recirculate operation behavior
- What do crypto offsets apply to? Packet as parsed, or packet after deparsing?
- The types of the generics in crypto_accelerator extern maybe should be a static type instead of a generics
- Add text to PNA specification on encrypt/decrypt operations HOT 4
- Add XOR hash function(s)
- Address the issue of pipelines that can have packets "pass each other up" in the middle of the pipeline HOT 1
- Add text explaining how to delete entries from the dataplane, and describe `ExpireTimeProfileId_t`.
- Minor bug in IPsec example program
- Remove last remaining occurrences of HOST_TO_NET and NET_TO_HOST from spec
- Add glossary, and consider using "inline accelerator" consistently when referring to encrypt/decrypt block
- Devise an explicit convention to document which parts of pna.p4 are intended to be vendor-customizable vs. not
- Proposal for setting packets and bytes counter widths separately HOT 5
- Lack of documentation on the optional bytes counter increment parameter HOT 7
- Should it be possible to recirculate mirrored copies of a packet ? HOT 1
- How to pass an extern object instance of type X as a parameter to a method call that is a method of type X HOT 1
- PNA spec declares headers on deparser are RO HOT 2
- PNA/PSA extern restrictions HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pna.