SatCat5
satcat5::eth::VlanRate Struct Reference

Detailed Description

Data structure for configuring VLAN rate-limiter parameters.

See "mac_vlan_rate.vhd" for details on the token-bucket algorithm.

Definition at line 107 of file switch_cfg.h.

#include <switch_cfg.h>

Public Member Functions

constexpr VlanRate ()
 Constructof for the default unlimited policy.
 
constexpr VlanRate (u32 policy, u64 rate_bps, u32 burst_msec=1)
 Constructor for any other policy.
 

Static Public Member Functions

static constexpr u32 bps2rate (u64 rate_bps)
 Convert bits-per-second to internal configuration word.
 

Public Attributes

u32 tok_policy
 Policy and scaling.
 
u32 tok_rate
 Tokens per millisecond.
 
u32 tok_max
 Maximum accumulated tokens.
 

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