[P4-dev] what's the differences about ingress and egress?
antonin at barefootnetworks.com
Tue May 9 13:22:11 EDT 2017
I am not an expert myself, but unlike the ingress pipeline, the egress
pipeline is always aware of the egress port of the packet. Let's consider
the case where you are doing multicast on a packet. The ingress pipeline
will only see the "original" packet, whereas the egress pipeline will see
all the different copies (in the P4_14 abstract switch model, multicast
replication is done in the "queueing" module), and can process each copy
differently based on the replication id / the physical egress port.
Note that the P4_14 abstract switch model you are describing is one example
of a possible switch architecture. In P4_16, the notion of architecture has
been "extracted" from the language; in other words, P4_16 does not try to
impose a single architecture. There will be a standard architecture (called
PSA, for Portable Switch Architecture), which is under development at the
moment and which will be similar to the P4_14 model, which was deemed to be
a good general representation of a switch forwarding plane. I can perfectly
imagine an architecture with a single pipeline (instead of 2), for example
for P4-programmable NICs. I expect that in the upcoming months, we may see
more architectures emerging.
If you have no use for the egress pipeline, you can leave it empty in your
P4 program. Of course, that may mean you are wasting resources based on
which hardware you are compiling to.
Finally, I suggest you take a look at switch.p4 (
https://github.com/p4lang/switch/tree/master/p4src) to see how they split
tables between ingress and egress.
On Tue, May 9, 2017 at 1:49 AM, <ding.rui at zte.com.cn> wrote:
> Hi, everyone
> I have a question, what's the differences between ingress and
> egress? what kinds of table should be in ingress pipeline?
> what kinds of table should be in egress pipeline? why we need a
> queue/buffer module between ingress and egress?
> Can the queue/buffer module placed egress after egress (just like
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev