[P4-dev] Questions for 'egress port TX Link utilization' (INT metadata) in BMv2
antonin at barefootnetworks.com
Wed Apr 5 19:11:21 EDT 2017
It is unlikely that a specific architecture / target would expose "egress
port tx utilization" as metadata. I imagine that it would be the
responsibility of the P4 program to compute this value using a P4 byte
counter (per-port) and some port speed information provided by the control
plane (e.g. as table data).
So if you want to populate that INT field, you need to compute it in your
P4 program. There is no division in P4 so it may be a little tricky to
I am sure you can find some existing methods for approximating it), which
is why I imagine it is not in switch.p4 today.
Of course you can always modify simple_switch.cpp if you want, but IMO this
is not representative of what P4-programmable hardware would do. You would
need to maintain some per-port state in simple_switch (port speed, which
you would need to obtain somehow, and counter), compute the utilization
value, write it to a specific intrinsic metadata field defined by you and
copy it to the packet in the egress pipeline (this last step would be done
On Tue, Apr 4, 2017 at 5:20 AM, Dongeun Suh <dongeunsuh at gmail.com> wrote:
> Hello everyone,
> I'm trying to write an INT application that monitors 'egress port tx
> utilization' (defined as baseline metadata in INT spec) based on switch.p4
> + bmv2 (simple_switch.cpp).
> However, I found that bmv2 does not support 'egress port tx utilization'
> as metadata.
> Is there any way to obtain this information from the bmv2 without
> modifying 'simple_switch.cpp'?
> If it is required to modify 'simple_siwtch.cpp', any advises to do this
> would be very helpful.
> Thanks in advance.
> Dongeun Suh.
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev