[P4-design] jargon: target, architecture, target architecture

Vladimir Gurevich vag at barefootnetworks.com
Fri Oct 21 14:35:28 EDT 2016


Hello Gordon,

I propose we use the following terms:

   - Target -- a specific hardware implementation capable of executing P4
   programs
   - Architecture -- a specific set of P4-programmable and non-P4
   programmable components and interfaces between them (expressed as intrinsic
   metadata)
   - Platform -- A specific architecture implemented on a specific target

P4 programs continue to be* target-independent*. In other words they do not
care which specific hardware/software implements exact or ternary match,
how exactly parser state transitions are implemented, etc., etc. This is
quite similar to how programs written in traditional programming languages
(C, C++, Fortran, etc.) are quite portable between Intel, PowerPC, ARM,
etc.

P4 programs are *architecture-dependent*. They will typically take
advantage of the specific non-P4-programmable components, but using
intrinsic metadata, exploiting available externs, etc. It might be possible
to write P4 programs that are portable across (somewhat similar)
architectures, but that would take an additional effort, porting layers
(implemented, for example, using the preprocessor facilities) and, perhaps,
sticking to the comon features only. This is quite similar to how programs,
written in the traditional languages are OS- and library- dependent.

P4 programs are thus compiled for a *platform*, meaning that the compiler
should be acutely aware of both the target (i.e. the specific hardware) and
the architecture.

What do you think? We already use the terms "target" and "architecture"
("architecture model") in the spec and if that's OK I'll add "platform" and
normalize usage.

Thanks,
Vladimir

On Wed, Oct 19, 2016 at 12:44 PM, Gordon Brebner <Gordon.Brebner at xilinx.com>
wrote:

> I hadn’t really given this much thought before, but it drew me to have a
> quick look at the (146, according to Word) uses of “target” in the draft
> spec.
>
>
>
> My interpretation of “target architecture” had hitherto been “the P4
> architecture that is the target of the compiler”, so “target” in use as an
> adjective in the same way as it’s used in “target audience” in the first
> paragraph of the spec.  This is subtly different from the interpretation
> below, which is “a P4 architecture on the target technology”.
>
>
>
> I’m okay with the suggested simplification below, with a slight preference
> for “P4 architecture” over just “architecture”, which could be a bit
> generic with the possible confusion Nate mentions.
>
>
>
> If I was going further, then I might put “technology” rather than
> “target”, and then ensure that any remaining uses of “target” added
> something helpful in context to indicate that the P4 architecture or the
> technology were the target of the P4 compilation.
>
>
>
> Gordon.
>
>
>
>
>
> *From:* P4-design [mailto:p4-design-bounces at lists.p4.org] *On Behalf Of *Nate
> Foster
> *Sent:* Wednesday, October 19, 2016 12:06 PM
> *To:* p4-design at lists.p4.org
> *Subject:* [P4-design] jargon: target, architecture, target architecture
>
>
>
> The current version of the P4_16 specification uses the term "target
> architecture" in a number of places. In discussions with people at
> Barefoot, we've been finding it's cleaner to simply refer to "target"
> (e.g., a software switch, FPGA, or ASIC) or "architecture" (a description
> of a set of P4-programmable parser and control blocks, externs, etc.) We've
> observed that while "target architecture" makes perfect sense grammatically
> -- "target" is an adjective that modifies "architecture" -- combing both
> terms into a single phrase actually seems to muddy the waters and cause
> confusion for many people, especially those new to the language and this
> particular distinction.
>
>
>
> One potential downside of using "architecture" is that what we call a
> "target" a hardware person might call an "architecture." We've been
> finessing this by saying "P4 architecture" or "architecture model" when
> there is the possibility of confusion.
>
>
>
> Do people have thoughts on this issue? If there are no objections, I would
> propose to revise the specification to eliminate "target architecture" in
> favor of "architecture" or "P4 architecture." (I've already sent Mihai a
> version of the spec with this change, but obviously this should be
> discussed within the group.)
>
>
>
> Cheers,
>
> N
>
>
> This email and any attachments are intended for the sole use of the named
> recipient(s) and contain(s) confidential information that may be
> proprietary, privileged or copyrighted under applicable law. If you are not
> the intended recipient, do not read, copy, or forward this email message or
> any attachments. Delete this email message and any attachments immediately.
>
>
> _______________________________________________
> P4-design mailing list
> P4-design at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-design_lists.p4.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-design_lists.p4.org/attachments/20161021/cccff971/attachment-0002.html>


More information about the P4-design mailing list