Hi everyone! I’ve been studying P4 PNA architecture and I found that the FlowId_t and SecurityAssocId_t data types are defined in the pna.p4. Howerver, they are not described in the P4 PNA specification. Can you explain what these types are for? Do they have any possible application?
Similar question about InterfaceId_t. This type is mentioned in the specification but the only application of this type I found is for PNA_PORT_CPU.
Regarding the type FlowId_t, there was an early proposal related to add-on-miss tables, where we were trying to propose a capability that not only let you create a new table entry in the data plane (without control plane having to add the entry) when a miss occurred looking up that table, but that one of the action parameters of the new entry’s action would be a ‘flow id’, which was guaranteed to be unique among all entries in that table. This flow id value could then be used in later P4 code, e.g. as a key in other tables, to identify only those packets that matched that new table entry. If you look in the git commit history of the repo GitHub - p4lang/pna: Portable NIC Architecture that mention a proposed extern function called allocate_flow_id() that would return such a guaranteed-unique value. (Note that a particular flow_id value X could later be assigned to a future table entry, but only after the current entry with flow_id X was deleted, e.g. because it aged out from inactivity. It is guaranteed unique only among table entries that exist at the same moment in time, not guaranteed unique across all time.)
1 Like
Thank you for clarification! About the remaining two data types. I assume SecurityAssocId is just a data type which should be used for storing IPsec SAI. But I’m still not sure about InterfaceId purpose.
Yes on the SecurityAssocId. InterfaceId is used as the type of a constant port id named PNA_PORT_CPU, for a port/interface to which packets can be sent in order to direct them to a control CPU.
1 Like