rte_meter.h(3)
π rte_meter.h π
okay so bestie, this is the manual page for rte_meter.h β yes, the library functions manual one, section 3, the whole entire vibe. it's the DPDK traffic metering header and it is literally iconic. come learn your color markers with me π
β¨ SYNOPSIS β¨
#include <stdint.h>
π§ Data Structures
struct rte_meter_srtcm_paramsstruct rte_meter_trtcm_paramsstruct rte_meter_trtcm_rfc4115_paramsstruct rte_meter_trtcmstruct rte_meter_trtcm_rfc4115
π¦ Enumerations
enum rte_color { RTE_COLOR_GREEN = 0, RTE_COLOR_YELLOW, RTE_COLOR_RED, RTE_COLORS }
β Functions
int rte_meter_srtcm_profile_config (struct rte_meter_srtcm_profile *p, struct rte_meter_srtcm_params *params)
int rte_meter_trtcm_profile_config (struct rte_meter_trtcm_profile *p, struct rte_meter_trtcm_params *params)
int rte_meter_trtcm_rfc4115_profile_config (struct rte_meter_trtcm_rfc4115_profile *p, struct rte_meter_trtcm_rfc4115_params *params)
int rte_meter_srtcm_config (struct rte_meter_srtcm *m, struct rte_meter_srtcm_profile *p)
int rte_meter_trtcm_config (struct rte_meter_trtcm *m, struct rte_meter_trtcm_profile *p)
int rte_meter_trtcm_rfc4115_config (struct rte_meter_trtcm_rfc4115 *m, struct rte_meter_trtcm_rfc4115_profile *p)
static enum rte_color rte_meter_srtcm_color_blind_check (struct rte_meter_srtcm *m, struct rte_meter_srtcm_profile *p, uint64_t time, uint32_t pkt_len)
static enum rte_color rte_meter_srtcm_color_aware_check (struct rte_meter_srtcm *m, struct rte_meter_srtcm_profile *p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
static enum rte_color rte_meter_trtcm_color_blind_check (struct rte_meter_trtcm *m, struct rte_meter_trtcm_profile *p, uint64_t time, uint32_t pkt_len)
static enum rte_color rte_meter_trtcm_color_aware_check (struct rte_meter_trtcm *m, struct rte_meter_trtcm_profile *p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
static enum rte_color rte_meter_trtcm_rfc4115_color_blind_check (struct rte_meter_trtcm_rfc4115 *m, struct rte_meter_trtcm_rfc4115_profile *p, uint64_t time, uint32_t pkt_len)
static enum rte_color rte_meter_trtcm_rfc4115_color_aware_check (struct rte_meter_trtcm_rfc4115 *m, struct rte_meter_trtcm_rfc4115_profile *p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
β¨ reminder bestie: those last six arestatic+inline, so you're getting them right from the header, no linking drama. π«Ά
πΈ Detailed Description πΈ
RTE Traffic Metering π
here's the tea β these are the traffic metering algorithms, count 'em:
- Single Rate Three Color Marker (srTCM): defined by IETF RFC 2697
- Two Rate Three Color Marker (trTCM): defined by IETF RFC 2698
- Two Rate Three Color Marker (trTCM): defined by IETF RFC 4115
Definition in file rte_meter.h.
π ENUMERATION TYPE DOCUMENTATION π
enum rte_color
Color π (it's giving traffic light, but make it fancy)
Enumerator
RTE_COLOR_GREENβ Green πRTE_COLOR_YELLOWβ Yellow πRTE_COLOR_REDβ Red β€οΈRTE_COLORSβ Number of colors (yes, it's the count, not a color, don't be fooled β)
Definition at line 31 of file rte_meter.h.
π₯ FUNCTION DOCUMENTATION π₯
int rte_meter_srtcm_profile_config (struct rte_meter_srtcm_profile * p, struct rte_meter_srtcm_params * params)
srTCM profile configuration β¨
Parameters
pβ Pointer to pre-allocated srTCM profile data structureparamsβ srTCM profile parameters
Returns
0 upon success, error code otherwise
int rte_meter_trtcm_profile_config (struct rte_meter_trtcm_profile * p, struct rte_meter_trtcm_params * params)
trTCM profile configuration β¨
Parameters
pβ Pointer to pre-allocated trTCM profile data structureparamsβ trTCM profile parameters
Returns
0 upon success, error code otherwise
int rte_meter_trtcm_rfc4115_profile_config (struct rte_meter_trtcm_rfc4115_profile * p, struct rte_meter_trtcm_rfc4115_params * params)
trTCM RFC 4115 profile configuration β¨
Parameters
pβ Pointer to pre-allocated trTCM profile data structureparamsβ trTCM profile parameters
Returns
0 upon success, error code otherwise
int rte_meter_srtcm_config (struct rte_meter_srtcm * m, struct rte_meter_srtcm_profile * p)
srTCM configuration per metered traffic flow π¦
Parameters
mβ Pointer to pre-allocated srTCM data structurepβ srTCM profile. Needs to be valid.
Returns
0 upon success, error code otherwise
int rte_meter_trtcm_config (struct rte_meter_trtcm * m, struct rte_meter_trtcm_profile * p)
trTCM configuration per metered traffic flow π¦
Parameters
mβ Pointer to pre-allocated trTCM data structurepβ trTCM profile. Needs to be valid.
Returns
0 upon success, error code otherwise
int rte_meter_trtcm_rfc4115_config (struct rte_meter_trtcm_rfc4115 * m, struct rte_meter_trtcm_rfc4115_profile * p)
trTCM RFC 4115 configuration per metered traffic flow π¦
Parameters
mβ Pointer to pre-allocated trTCM data structurepβ trTCM profile. Needs to be valid.
Returns
0 upon success, error code otherwise
enum rte_color rte_meter_srtcm_color_blind_check (struct rte_meter_srtcm * m, struct rte_meter_srtcm_profile * p, uint64_t time, uint32_t pkt_len)
[inline], [static] π«§
srTCM color blind traffic metering ππ
Parameters
mβ Handle to srTCM instancepβ srTCM profile specified at srTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)
Returns
Color assigned to the current IP packet
Definition at line 396 of file rte_meter.h.
enum rte_color rte_meter_srtcm_color_aware_check (struct rte_meter_srtcm * m, struct rte_meter_srtcm_profile * p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
[inline], [static] π«§
srTCM color aware traffic metering ππ (now with input color, she's aware bestie)
Parameters
mβ Handle to srTCM instancepβ srTCM profile specified at srTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)pkt_colorβ Input color of the current IP packet
Returns
Color assigned to the current IP packet
Definition at line 437 of file rte_meter.h.
enum rte_color rte_meter_trtcm_color_blind_check (struct rte_meter_trtcm * m, struct rte_meter_trtcm_profile * p, uint64_t time, uint32_t pkt_len)
[inline], [static] π«§
trTCM color blind traffic metering ππ
Parameters
mβ Handle to trTCM instancepβ trTCM profile specified at trTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)
Returns
Color assigned to the current IP packet
Definition at line 479 of file rte_meter.h.
enum rte_color rte_meter_trtcm_color_aware_check (struct rte_meter_trtcm * m, struct rte_meter_trtcm_profile * p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
[inline], [static] π«§
trTCM color aware traffic metering ππ
Parameters
mβ Handle to trTCM instancepβ trTCM profile specified at trTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)pkt_colorβ Input color of the current IP packet
Returns
Color assigned to the current IP packet
Definition at line 521 of file rte_meter.h.
enum rte_color rte_meter_trtcm_rfc4115_color_blind_check (struct rte_meter_trtcm_rfc4115 * m, struct rte_meter_trtcm_rfc4115_profile * p, uint64_t time, uint32_t pkt_len)
[inline], [static] π«§
trTCM RFC4115 color blind traffic metering ππ
Parameters
mβ Handle to trTCM instancepβ trTCM profile specified at trTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)
Returns
Color assigned to the current IP packet
Definition at line 564 of file rte_meter.h.
enum rte_color rte_meter_trtcm_rfc4115_color_aware_check (struct rte_meter_trtcm_rfc4115 * m, struct rte_meter_trtcm_rfc4115_profile * p, uint64_t time, uint32_t pkt_len, enum rte_color pkt_color)
[inline], [static] π«§
trTCM RFC4115 color aware traffic metering ππ
Parameters
mβ Handle to trTCM instancepβ trTCM profile specified at trTCM object creation timetimeβ Current CPU time stamp (measured in CPU cycles)pkt_lenβ Length of the current IP packet (measured in bytes)pkt_colorβ Input color of the current IP packet
Returns
Color assigned to the current IP packet
Definition at line 607 of file rte_meter.h.
π«Ά AUTHOR π«Ά
Generated automatically by Doxygen for DPDK from the source code. (not me writing it by hand, the robot did it, and honestly? ate. π )
and that's the whole page bestie, no cap, every single detail preserved π
sign-off time: this was DPDK, Version 25.11.3, for rte_meter.h(3) β mwah, go color some packets πβ¨ππ¦πΈπ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms