Modules | |
Queueing Classes | |
Classifiers | |
Queueing Disciplines | |
Macros | |
#define | RTNL_TC_RTABLE_SIZE 256 |
Number of entries in a transmission time lookup table. More... | |
Enumerations | |
enum | rtnl_tc_stats_id { RTNL_TC_PACKETS, RTNL_TC_BYTES, RTNL_TC_RATE_BPS, RTNL_TC_RATE_PPS, RTNL_TC_QLEN, RTNL_TC_BACKLOG, RTNL_TC_DROPS, RTNL_TC_REQUEUES, RTNL_TC_OVERLIMITS, __RTNL_TC_STATS_MAX } |
TC statistics identifiers. More... | |
Utilities | |
int | rtnl_tc_calc_txtime (int bufsize, int rate) |
Calculate time required to transmit buffer at a specific rate. More... | |
int | rtnl_tc_calc_bufsize (int txtime, int rate) |
Calculate buffer size able to transmit in a specific time and rate. More... | |
int | rtnl_tc_calc_cell_log (int cell_size) |
Calculate the binary logarithm for a specific cell size. More... | |
Rate Tables | |
int | rtnl_tc_build_rate_table (uint32_t *dst, uint8_t mpu, uint8_t overhead, int cell, int rate) |
Compute a transmission time lookup table. More... | |
Traffic Control Handle Translations | |
char * | rtnl_tc_handle2str (uint32_t handle, char *buf, size_t len) |
Convert a traffic control handle to a character string (Reentrant). More... | |
int | rtnl_tc_str2handle (const char *name, uint32_t *res) |
Convert a charactering strint to a traffic control handle. More... | |
#define RTNL_TC_RTABLE_SIZE 256 |
Number of entries in a transmission time lookup table.
Referenced by rtnl_tc_build_rate_table().
enum rtnl_tc_stats_id |
TC statistics identifiers.
int rtnl_tc_build_rate_table | ( | uint32_t * | dst, |
uint8_t | mpu, | ||
uint8_t | overhead, | ||
int | cell, | ||
int | rate | ||
) |
Compute a transmission time lookup table.
Computes a table of RTNL_TC_RTABLE_SIZE entries specyfing the transmission times for various packet sizes, e.g. the transmission time for a packet of size pktsize
could be looked up:
References rtnl_tc_calc_cell_log(), rtnl_tc_calc_txtime(), RTNL_TC_RTABLE_SIZE, and size.
int rtnl_tc_calc_bufsize | ( | int | txtime, |
int | rate | ||
) |
Calculate buffer size able to transmit in a specific time and rate.
Calculates the size of the buffer that can be transmitted in a specific time period at a specific transmit rate.
int rtnl_tc_calc_cell_log | ( | int | cell_size | ) |
Calculate the binary logarithm for a specific cell size.
References NLE_INVAL.
Referenced by rtnl_tc_build_rate_table().
int rtnl_tc_calc_txtime | ( | int | bufsize, |
int | rate | ||
) |
Calculate time required to transmit buffer at a specific rate.
Calculates the number of micro seconds required to transmit a specific buffer at a specific transmit rate.
Referenced by rtnl_qdisc_tbf_set_peakrate(), rtnl_qdisc_tbf_set_rate(), and rtnl_tc_build_rate_table().
char* rtnl_tc_handle2str | ( | uint32_t | handle, |
char * | buf, | ||
size_t | len | ||
) |
Convert a traffic control handle to a character string (Reentrant).
Converts a tarffic control handle to a character string in the form of MAJ:MIN
and stores it in the specified destination buffer.
References buf, TC_H_MAJ, TC_H_MIN, TC_H_ROOT, and TC_H_UNSPEC.
int rtnl_tc_str2handle | ( | const char * | name, |
uint32_t * | res | ||
) |
Convert a charactering strint to a traffic control handle.
Converts the provided character string specifying a traffic control handle to the corresponding numeric value.
The handle must be provided in one of the following formats:
References NLE_INVAL, NLE_RANGE, TC_H_MAJ, TC_H_ROOT, and TC_H_UNSPEC.
Referenced by main(), nl_cli_qdisc_parse_handle(), nl_cli_qdisc_parse_parent(), parse_handle(), and parse_parent().