tc_core: add size table
Subsystems (2)
PATCH v3 1/2 tc_core: add size table
Patch adds size table that is similiar to rate table, with difference that size table stores link layer packet size. It's needed for HFSC link layer adaption patch as it converts skb->len to link layer packet size directly, unlike HTB/CFQ/etc that convert packet length to link layer transfer time using rate tables.
Signed-off-by Jussi Kivilinna <[email protected]>
---
include/linux/pkt_sched.h | 10 ++++++ tc/tc_core.c | 70 +++++++++++++++++++++++++++++++++++---------- tc/tc_core.h | 2 + 3 files changed, 67 insertions(+), 15 deletions(-)
include/linux/pkt_sched.h +10 -0
@@ -85,6 +85,16 @@ struct tc_ratespec#define TC_RTAB_SIZE 1024 +struct tc_sizespec { +unsigned char cell_log; +unsigned char size_log; +short overhead; +short cell_align; +unsigned short mpu; +}; + +#define TC_STAB_SIZE 1024 +/* FIFO section */ struct tc_fifo_qopt
tc/tc_core.c +55 -15
94 lines not on this page · raw message
tc/tc_core.h +2 -0
@@ -21,6 +21,8 @@ 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,enum link_layer link_layer); +int tc_calc_stable (struct tc_sizespec *r,__u16 *stab, +int cell_log,unsigned mtu,enum link_layer link_layer);int tc_setup_estimator (unsigned A ,unsigned time_const,struct tc_estimator *est);
PATCH v3 2/2 hfsc: add link layer overhead adaption
Patch adds 'mpu', 'mtu', 'overhead' and 'linklayer' options to hfsc. These options are used to create size table for sch_hfsc. Size table is only used and passed to kernel if these options are used.
Signed-off-by Jussi Kivilinna <[email protected]>
---
include/linux/pkt_sched.h | 2 + tc/q_hfsc.c | 72 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 1 deletions(-)
include/linux/pkt_sched.h +2 -0
@@ -326,6 +326,8 @@ enumTCA_HFSC_RSC ,TCA_HFSC_FSC ,TCA_HFSC_USC , +TCA_HFSC_SZOPTS , +TCA_HFSC_STAB , __TCA_HFSC_MAX, };
tc/q_hfsc.c +71 -1
121 lines not on this page · raw message