Closed
Description
For a 'bytes' or 'packets_and_bytes' counter type, count() having a
second parameter 'increment' that specifies how much to add to the
byte counter is a very good thing. It is best if the P4 program has
the flexibility to choose the length in bytes it wants to use for the
packet, e.g. in case it is increasing or decreasing the received
packet's size before transmitting it.
For counters that have type 'packets', presumably every call to
'count' will add exactly 1, yes? In that case, having a separate
method call that only takes an 'index' parameter would be best, since
the 'increment' parameter value would be ignored, anyway.