[P4-dev] [P4-discuss] Can I get the processing time in switch?
antonin at barefootnetworks.com
Mon Nov 28 13:17:18 EST 2016
Different P4 architectures may expose different pieces of information. Some
architectures may expose a variety of timestamps as metadata fields. As of
today, there isn't really any "standard metadata" fields for what you want
In the case of bmv2 (https://github.com/p4lang/behavioral-model)
simple_switch architecture, we expose a few timestamps, whose description
can be found in this document:
If you need more, you may have to implement your own architecture in bmv2,
based on simple_switch, and add any metadata fields you need. This does
require writing some C++ code, but is pretty straightforward. For example,
these 3 lines of code are used to set "
On Mon, Nov 28, 2016 at 12:40 AM, <jingy at zju.edu.cn> wrote:
> I have written some codes using P4, but I am not familiar with the
> underlying implementation of the P4 switch in mininet, and I just want to
> use the abstraction of P4 to implement some functions.
> Here I have a question, that is can I get the processing time in which
> a packet passes a switch? For example, when a packet arrives at a
> swicth, this switch needs to check the destination field in the header
> and find a correct engress port in a table. It requires a period of time to
> complete this process. Can I get the time easily (not to modify many codes
> about underlying implementation )?
> P4-discuss mailing list
> P4-discuss at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev