All of lore.kernel.org
 help / color / mirror / Atom feed
* no bug in tcng; tc kbit v. tcng kbps [LARTC] was tcng error
@ 2003-11-27 19:58 Martin A. Brown
  2003-11-28  7:43 ` lartc
  2003-12-01  6:01 ` Martin A. Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Martin A. Brown @ 2003-11-27 19:58 UTC (permalink / raw)
  To: lartc


Hello Charles,

 : after slicing and dicing, i found that i had cut and pasted bad syntax,
 : so i have solved the problem posted in my first message.

Where did you find the original (I'm hoping it's not one of mine).  If so,
let me know, and I'll fix it.

  [ example snipped ]

 : notice that the UPLINK of 512 kbps (arguably 524288 bps) has been
 : incorrectly calculated as 64000 bps

You have not actually found a bug, but rather a historical strangeness
about the Linux traffic control system.  For reasons of which I'm
ignorant, the syntax for the "tc" command uses bps for bytes/second.  So,
64000 bytes/second is actually 512 kilobits/second ("512 kbps" in common
usage), but is 512 kbit to the "tc" tool.  Here's a brief chart:

                      tc syntax       tcng syntax
                  +----------------+----------------+
     bytes/second |      bps       |      Bps       |
      bits/second |      bit       |      bps       |
 kilobytes/second |     kbps       |     kBps       |
  kilobits/second |     kbit       |     kbps       |
                  +----------------+----------------+

Note that the tcng syntax is exactly the same sort of syntax we use in
general when discussing speed of WAN links.  "It's a 512 kbps line" means
it's 512 kilobits per second, but this would be 64000 bytes per second if
we were writing a "tc" command line.

  [ another example snipped ]

I expect that you'll understand exactly what was happening in your second
example now that you are looking at this chart.

 : have i missed something, or indeed there is a problem??

I'm guessing that you just missed this oddity of command line tc behaviour
but that the tcng syntax is doing exactly what you desire.

Best of luck,

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2003-12-01  6:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-27 19:58 no bug in tcng; tc kbit v. tcng kbps [LARTC] was tcng error Martin A. Brown
2003-11-28  7:43 ` lartc
2003-12-01  6:01 ` Martin A. Brown

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.