From a0e0018c9a7ef5ce7f6d2c3ae16aecbbd16a8f67 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 16:18:53 +0200 Subject: Adding upstream version 6.1.0. Signed-off-by: Daniel Baumann --- tc/tc_core.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tc/tc_core.h (limited to 'tc/tc_core.h') diff --git a/tc/tc_core.h b/tc/tc_core.h new file mode 100644 index 0000000..6dab272 --- /dev/null +++ b/tc/tc_core.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _TC_CORE_H_ +#define _TC_CORE_H_ 1 + +#include +#include + +enum link_layer { + LINKLAYER_UNSPEC, + LINKLAYER_ETHERNET, + LINKLAYER_ATM, +}; + + +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(__u64 rate, unsigned size); +unsigned tc_calc_xmitsize(__u64 rate, unsigned ticks); +int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab, + int cell_log, unsigned mtu, enum link_layer link_layer); +int tc_calc_rtable_64(struct tc_ratespec *r, __u32 *rtab, + int cell_log, unsigned mtu, enum link_layer link_layer, + __u64 rate); +int tc_calc_size_table(struct tc_sizespec *s, __u16 **stab); + +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 -- cgit v1.2.3