p4lang / pna

Portable NIC Architecture
Apache License 2.0
55 stars 21 forks source link

Come up with different name to replace "inline extern" #36

Open jfingerh opened 2 years ago

jfingerh commented 2 years ago

The "inline externs" in the top level PNA diagram are in a way kind of misnamed, from a strict P4 language specification perspective.

An extern in P4 is either a function, or an object with methods. Such functions and methods are all intended to be called from a developer's P4 code, and in some cases they return useful values (some have return type void).

The blocks that do encryption and decryption in PNA are more like the packet buffer/traffic manager in PSA -- they receive packets + metadata fields, and then process those packets in a way that can be at least partially controlled by the values of those metadata fields. Later they send out packets (perhaps modified) plus metadata (derived from the input metadata, the packet contents, and perhaps state internal to the traffic manager, etc.).

I think we should have a different name for such things in general in P4 architectures, preferably used consistently across P4 architectures.

Possibilities:

I am open to other names, but preferably without "extern" anywhere in the name, for the reasons mentioned above. I really think the name should not be confused with "extern" as used in the P4_16 language specification, which has a precise technical meaning already.

thomascalvert-xlnx commented 2 years ago

How about "offload engine" ?

jafingerhut commented 1 year ago

@thomascalvert-xlnx We could call them that, but it leads me to wonder: would you be willing to call a switch ASIC's traffic manager an "offload engine"?