All of lore.kernel.org
 help / color / mirror / Atom feed
* iproute2 / tbf with large burst seems broken again
@ 2009-08-24 23:37 Denys Fedoryschenko
  2009-08-25  6:22 ` Jarek Poplawski
  0 siblings, 1 reply; 24+ messages in thread
From: Denys Fedoryschenko @ 2009-08-24 23:37 UTC (permalink / raw)
  To: netdev

Found issue, it seems tc_core_time2tick will overflow with increased 
resolution on large bucket values. But no idea how to fix it :-(

I add a warning, something like
 unsigned tc_core_time2tick(unsigned time)
 {
+       long long temp = time*tick_in_usec;
+       if (temp > INT_MAX)
+           printf("tc_core_time2tick() overflow!\n");
        return time*tick_in_usec;
 }

Maybe it is good to add in iproute2 mainstream, so user will be warned if 
buffer set too large? (and it will not set incorrect values, that lead to 
unpredictable results.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2009-09-01 22:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-24 23:37 iproute2 / tbf with large burst seems broken again Denys Fedoryschenko
2009-08-25  6:22 ` Jarek Poplawski
2009-08-25  7:34   ` Denys Fedoryschenko
2009-08-25  8:43     ` Jarek Poplawski
2009-08-25  9:00       ` Jarek Poplawski
2009-08-25  9:41         ` Jarek Poplawski
2009-08-25 10:29           ` Denys Fedoryschenko
2009-08-25 11:16           ` Denys Fedoryschenko
2009-08-25 12:13             ` Jarek Poplawski
2009-08-25 12:18               ` Denys Fedoryschenko
2009-08-26 21:59                 ` [PATCH] " Jarek Poplawski
2009-08-31  5:05                   ` David Miller
2009-08-31  5:30                     ` Jarek Poplawski
2009-08-31  5:32                       ` David Miller
2009-08-31  8:03                         ` Denys Fedoryschenko
2009-08-31  8:18                         ` Denys Fedoryschenko
2009-08-31  8:37                           ` David Miller
2009-08-31  8:51                             ` Denys Fedoryschenko
2009-08-31  9:05                               ` Jarek Poplawski
2009-08-31  8:58                             ` Jarek Poplawski
2009-09-01 22:51                               ` David Miller
2009-08-31  8:49                           ` Jarek Poplawski
2009-08-25 20:03             ` Jarek Poplawski
2009-08-26 19:03               ` Jarek Poplawski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.