[P4-dev] packet rate

Andy Fingerhut andy.fingerhut at gmail.com
Sat Oct 14 12:30:46 EDT 2017

Meters in P4_14, and soon in the P4_16 PSA 'library' of extern objects and
functions, are intended for precisely the purpose of categorizing packets
based on whether they are under an average packet or bit rate per second,
or over.  Just search for meter in the P4_14 spec, or the draft PSA spec.

The most recent version of all P4 specs can be found here:


On Sat, Oct 14, 2017 at 4:38 AM, mostafa ammar <mostafaammar79 at gmail.com>

> Dear All,
> How can we make the switch calculate the rate of packets, for example
> switch start dropping traffic if specific flow of packets rate exceeds 300
> packets per second. I have seen the heavy_hitter example, it calculates the
> number of packets but I did not notice the period of calculation so the
> counter is reset after specific period.
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20171014/a52febe9/attachment-0002.html>

More information about the P4-dev mailing list