Thread (5 messages) 5 messages, 3 authors, 2009-05-30

Re: changing the qdisc class speed rate

From: Piotrek D <hidden>
Date: 2009-05-30 08:19:36

Thanks, this was exactly what I was looking for :)
After multiplying  all of the values in the rtab->data array I have
been able to change the traffic rate for that queue.

Piotrek D.

/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how
  long it will take to send a packet given its size.
 */
static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
{
       int slot = pktlen + rtab->rate.cell_align + rtab->rate.overhead;
       if (slot < 0)
               slot = 0;
       slot >>= rtab->rate.cell_log;
       if (slot > 255)
               return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]);
       return rtab->data[slot];
}

This function controls rates and these rtab values matter here.

Jarek P.
quoted
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help