Re: [PATCH/RFC 0/2] HFSC & Stab documentation

Previous thread: RE: [PATCH] pcmcia: worklimit reaches -1 by Komuro on Thursday, February 26, 2009 - 2:37 pm. (1 message)

Next thread: [PATCH] net headers: export dcbnl.h by Chris Leech on Thursday, February 26, 2009 - 5:54 pm. (1 message)
From: Michal Soltys
Date: Thursday, February 26, 2009 - 4:01 pm

These patches add documentation for HFSC scheduler
and size tables. See patch covers for detailed info.

Michal Soltys (2):
  HFSC (7) & (8) documentation + assorted changes
  Stab documentation + assorted changes

 Makefile           |    2 +
 man/man7/tc-hfsc.7 |  525 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/tc-hfsc.8 |   61 ++++++
 man/man8/tc-stab.8 |  156 ++++++++++++++++
 man/man8/tc.8      |    3 +
 tc/q_hfsc.c        |    6 +-
 tc/tc_core.c       |    4 +-
 tc/tc_stab.c       |    9 +-
 8 files changed, 759 insertions(+), 7 deletions(-)
 create mode 100644 man/man7/tc-hfsc.7
 create mode 100644 man/man8/tc-hfsc.8
 create mode 100644 man/man8/tc-stab.8

--

From: Michal Soltys
Date: Thursday, February 26, 2009 - 4:01 pm

This adds generic explanation about size tables.

tc-stab(8): Commandline + details
One thing I'm not sure, is whenever any layer2 data is included in case
of shaping directly on ppp interface (see the bottom of the man page).

tc_stab.c: small fixes to commandline help

tc_core.c:
As kernel part of things relies on cell align which is always set to
-1, I also added it to userspace computation stage. This way if someone
specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
end with tsize supporting mtu 4096 suddenly, New default mtu is also set
to 2048 (disregarding weirdness of setting mtu to such values).

Unless I missed something, this is harmless and feels cleaner, but if it's
not allowed, documentation will have to be changed back to 2047 + extra
explanation as well.
---
 man/man8/tc-stab.8 |  156 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tc/tc_core.c       |    4 +-
 tc/tc_stab.c       |    9 ++-
 3 files changed, 163 insertions(+), 6 deletions(-)
 create mode 100644 man/man8/tc-stab.8

diff --git a/man/man8/tc-stab.8 b/man/man8/tc-stab.8
new file mode 100644
index 0000000..9e84f25
--- /dev/null
+++ b/man/man8/tc-stab.8
@@ -0,0 +1,156 @@
+.TH STAB 8 "25 February 2009" iproute2 Linux
+.
+.SH NAME
+tc\-stab \- Generic size table manipulations
+.
+.SH SYNOPSIS
+.nf
+tc qdisc add ... stab \\
+.RS 4
+[ \fBmtu\fR BYTES ] [ \fBtsize\fR SLOTS ] \\
+[ \fBmpu\fR BYTES ] [ \fBoverhead\fR BYTES ] [ \fBlinklayer\fR TYPE ] ...
+.RE
+
+TYPE := adsl | atm | ethernet
+.fi
+
+For the description of BYTES \- please refer to the \fBUNITS\fR
+section of \fBtc\fR(8).
+
+.IP \fBmtu\fR 4
+.br
+maximum packet size we create size table for, assumed 2048 if not specified explicitly
+.IP \fBtsize\fR
+.br
+required table size, assumed 512 if not specified explicitly
+.IP \fBmpu\fR
+.br
+minimum packet size used in computations
+.IP \fBoverhead\fR
+.br
+per\-packet size overhead (can be negative) used in computations
+.IP ...
From: Michal Soltys
Date: Thursday, February 26, 2009 - 4:01 pm

This patch adds detailed documentation for HFSC scheduler. It roughly
follows HFSC paper, but tries to not rely too much on math side of things.
Post-paper/Linux specific subjects (timer resolution, ul service curve, etc.)
are also discussed.

I've read it many times over, but it's a lengthy chunk of text - so try
to be understanding in case I made some mistakes.

tc-hfsc(7): explains algorithm in detail (very long)
tc-hfsc(8): explains command line options briefly
tc(8): adds references to new man pages
Makefile: adds man7 directory to install target
q_hfsc.c: minimal help text changes, consistency with tc-hfsc(8)
---
 Makefile           |    2 +
 man/man7/tc-hfsc.7 |  525 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/tc-hfsc.8 |   61 ++++++
 man/man8/tc.8      |    3 +
 tc/q_hfsc.c        |    6 +-
 5 files changed, 596 insertions(+), 1 deletions(-)
 create mode 100644 man/man7/tc-hfsc.7
 create mode 100644 man/man8/tc-hfsc.8

diff --git a/Makefile b/Makefile
index 6096a99..8ac0fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,8 @@ install: all
 	install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
 	install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
 	install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
+	install -m 0755 -d $(DESTDIR)$(MANDIR)/man7
+	install -m 0644 $(shell find man/man7 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man7
 	ln -sf tc-bfifo.8  $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
 	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/rtstat.8
 	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/ctstat.8
diff --git a/man/man7/tc-hfsc.7 b/man/man7/tc-hfsc.7
new file mode 100644
index 0000000..99073eb
--- /dev/null
+++ b/man/man7/tc-hfsc.7
@@ -0,0 +1,525 @@
+.TH HFSC 7 "25 February 2009" iproute2 Linux
+.ce 1
+\fBHIERARCHICAL FAIR SERVICE CURVE\fR
+.
+.SH "HISTORY & INTRODUCTION"
+.
+HFSC \- \fBHierarchical Fair Service Curve\fR was first presented at
+SIGCOMM'97. Developed as a part of ALTQ ...
From: Denys Fedoryschenko
Date: Friday, February 27, 2009 - 8:16 am

It is really VERY VERY great documentation.
Thanks a lot for your efforts!

--

From: Denys Fedoryschenko
Date: Thursday, April 30, 2009 - 1:04 pm

Is there any chances that this patches will go to mainstream?



--

From: Michal Soltys
Date: Monday, May 11, 2009 - 7:32 am

I'll adjust/expand this a bit, and repost as v2.

Particulary:

- move hfsc's section about timers to a separate man page, so it can be 
referenced by other man pages (tbf, htb, ...) where it's important, in 
future

- expand stab into both stab/rtab; I'll refrain from changing the 
calculation as well, as it's minor and irrelevant

Still, if for some reason that documentation with cli help related 
changes is not acceptable for any formal and/or content-related reasons, 
it would be good to know that beforehand.

--

Previous thread: RE: [PATCH] pcmcia: worklimit reaches -1 by Komuro on Thursday, February 26, 2009 - 2:37 pm. (1 message)

Next thread: [PATCH] net headers: export dcbnl.h by Chris Leech on Thursday, February 26, 2009 - 5:54 pm. (1 message)