[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting rate for tbf
I want to change the rate of the tbf after the queuing discipline
I was looking the code and think that
static int tbf_change(struct Qdisc* sch, struct rtattr *opt) this
function should come in handy. I want to call this function from
tbf_enqueue not for all the packets but few special ones.
The problem :
tbf_change needs a rtattr structure pointer.
1. I cannot build this structure as tc does it as I do not have
2. So during tbf_init call I store a pointer to the rtattr sturcture as I
have added struct rtattr in the tbf_sched_data.
Now I can pass this structure to tbf_change but how should I set
the rate to the desired rate I want.In tbf_change.....
Does setting the rate in the qopt->rate.rate to the new rate
suffice? This is before the call to rtab = qdisc_get_rtab(&qopt->rate,
I shall highly appreciate any inputs or other ways of tackling the