mirror_iproute2/tc/tc_core.h
Jesper Dangaard Brouer d5f46f9cc3 Cleanup: tc_calc_rtable().
Change tc_calc_rtable() to take a tc_ratespec struct as an
argument. (cell_log still needs to be passed on as a parameter,
because -1 indicate that the cell_log needs to be computed by the
function.).

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
2007-12-31 11:08:04 -08:00

26 lines
721 B
C

#ifndef _TC_CORE_H_
#define _TC_CORE_H_ 1
#include <asm/types.h>
#include <linux/pkt_sched.h>
#define TIME_UNITS_PER_SEC 1000000
int tc_core_time2big(unsigned time);
unsigned tc_core_time2tick(unsigned time);
unsigned tc_core_tick2time(unsigned tick);
unsigned tc_core_time2ktime(unsigned time);
unsigned tc_core_ktime2time(unsigned ktime);
unsigned tc_calc_xmittime(unsigned rate, unsigned size);
unsigned tc_calc_xmitsize(unsigned rate, unsigned ticks);
int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab, int cell_log, unsigned mtu);
int tc_setup_estimator(unsigned A, unsigned time_const, struct tc_estimator *est);
int tc_core_init(void);
extern struct rtnl_handle g_rth;
extern int is_batch_mode;
#endif