bmv2
Designing your own switch target with bmv2
Public Types | Public Member Functions | List of all members
bm::Counter Class Reference

Public Types

using counter_value_t = uint64_t
 A counter value (measuring bytes or packets) is a uint64_t. More...
 

Public Member Functions

void increment_counter (const Packet &pkt)
 Increments both counter values (bytes and packets) More...
 

Detailed Description

Very basic counter implementation. Every Counter instance counts both bytes and packets. The data plane is in charge of incrementing the counters (e.g. through an action primitive), the control plane can query or write a given value to the counters.

Member Typedef Documentation

◆ counter_value_t

using bm::Counter::counter_value_t = uint64_t

A counter value (measuring bytes or packets) is a uint64_t.

Member Function Documentation

◆ increment_counter()

void bm::Counter::increment_counter ( const Packet pkt)
inline

Increments both counter values (bytes and packets)


The documentation for this class was generated from the following file: