Modules | |
Queueing Classes | |
Classifiers | |
| |
Queueing Disciplines | |
| |
Utilities | |
int | rtnl_tc_calc_txtime (int bufsize, int rate) |
Calculate time required to transmit buffer at a specific rate. | |
int | rtnl_tc_calc_bufsize (int txtime, int rate) |
Calculate buffer size able to transmit in a specific time and rate. | |
int | rtnl_tc_calc_cell_log (int cell_size) |
Calculate the binary logarithm for a specific cell size. | |
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. | |
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). | |
int | rtnl_tc_str2handle (const char *name, uint32_t *res) |
Convert a charactering strint to a traffic control handle. | |
Defines | |
#define | RTNL_TC_RTABLE_SIZE 256 |
Number of entries in a transmission time lookup table. | |
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... |
enum rtnl_tc_stats_id |
int rtnl_tc_calc_txtime | ( | int | bufsize, | |
int | rate | |||
) |
bufsize | Size of buffer to be transmited in bytes. | |
rate | Transmit rate in bytes per second. |
Definition at line 383 of file tc.c.
Referenced by rtnl_qdisc_tbf_set_peakrate(), rtnl_qdisc_tbf_set_rate(), and rtnl_tc_build_rate_table().
int rtnl_tc_calc_bufsize | ( | int | txtime, | |
int | rate | |||
) |
int rtnl_tc_calc_cell_log | ( | int | cell_size | ) |
cell_size | Size of cell, must be a power of two. |
Definition at line 420 of file tc.c.
Referenced by rtnl_tc_build_rate_table().
int rtnl_tc_build_rate_table | ( | uint32_t * | dst, | |
uint8_t | mpu, | |||
uint8_t | overhead, | |||
int | cell, | |||
int | rate | |||
) |
dst | Destination buffer of RTNL_TC_RTABLE_SIZE uint32_t[]. | |
mpu | Minimal size of a packet at all times. | |
overhead | Overhead to be added to each packet. | |
cell | Size of cell, i.e. size of step between entries in bytes. | |
rate | Rate in bytes per second. |
pktsize
could be looked up: txtime = table[pktsize >> log2(cell)];
Definition at line 454 of file tc.c.
References rtnl_tc_calc_cell_log(), rtnl_tc_calc_txtime(), and RTNL_TC_RTABLE_SIZE.
char* rtnl_tc_handle2str | ( | uint32_t | handle, | |
char * | buf, | |||
size_t | len | |||
) |
handle | traffic control handle | |
buf | destination buffer | |
len | buffer length |
MAJ:MIN
and stores it in the specified destination buffer.
int rtnl_tc_str2handle | ( | const char * | name, | |
uint32_t * | res | |||
) |
name | traffic control handle as character string | |
res | destination buffer |
The handle must be provided in one of the following formats: