svn commit: r203339 - user/luigi/ipfw3-head/sys/netinet/ipfw
Luigi Rizzo
luigi at FreeBSD.org
Mon Feb 1 11:33:46 UTC 2010
Author: luigi
Date: Mon Feb 1 11:33:45 2010
New Revision: 203339
URL: http://svn.freebsd.org/changeset/base/203339
Log:
more documentation
Modified:
user/luigi/ipfw3-head/sys/netinet/ipfw/dummynet.txt
Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/dummynet.txt
==============================================================================
--- user/luigi/ipfw3-head/sys/netinet/ipfw/dummynet.txt Mon Feb 1 11:05:19 2010 (r203338)
+++ user/luigi/ipfw3-head/sys/netinet/ipfw/dummynet.txt Mon Feb 1 11:33:45 2010 (r203339)
@@ -278,46 +278,46 @@ DN_CMD_FLUSH.
DN_CMD_CONFIG is followed by objects to add/reconfigure. In general,
if an object already exists it is reconfigured, otherwise it is
-created in a way that keeps the structure consistent. In detail,
-and starting with the simplest objects
+created in a way that keeps the structure consistent.
+We have the following objects in the system, normally numbered with
+an identifier N between 1 and 65535. For certain objects we have
+"shadow" copies numbered I+NMAX and I+ 2*NMAX which are used to
+implement certain backward compatibility features.
+
+In general we have the following linking
+
+ TRADITIONAL DUMMYNET QUEUES "queue N config ... pipe M ..."
+ corresponds to a dn_fs object numbered N
+
+ TRADITIONAL DUMMYNET PIPES "pipe N config ..."
+ dn_fs N+2*NMAX --> dn_sch N+NMAX type FIFO --> dn_link N+NMAX
+
+ GENERIC SCHEDULER "sched N config ... "
+ [dn_fs N+NMAX] --> dn_sch N --> dn_link N
+ The flowset N+NMAX is created only if the scheduler is not
+ of type MULTIQUEUE.
+
+ DELAY PROFILE "pipe N config profile ..."
+ it is always attached to an existing dn_link N
+
+Because traditional dummynet pipes actually configure both a
+'standalone' instance and one that can be used by queues,
+we do the following:
+
+ "pipe N config ..." configures:
+ dn_sched N type WF2Q+
+ dn_sched N+NMAX type FIFO
+ dn_fs N+2NMAX attached to dn_sched N+NMAX
+ dn_pipe N
+ dn_pipe N+NMAX
+
+ "queue N config" configures
+ dn_fs N
+
+ "sched N config" configures
+ dn_sched N type as desired
+ dn_fs N+NMAX attached to dn_sched N
-DN_PROFILE <--> config_profile()
- attach a delay profile to a DN_LINK with the same number.
- To delete, simply provide a profile with 0 points.
- XXX is it preserved on link reconfigurations ?
-
-DN_LINK <--> config_link()
-
-==== XXX to be completed ====
-
-DN_FS
-
-DN_SCH
-
-
-
-
-The reconfigure routine is called by the system when the flowset ptr_sched_val
-number differs from the generation number. This means that a new object is
-inserted in the system or a object was deleted and no new packet belonging to
-this flowset are yet arrived.
-
-The reconfigure routine first check if the scheduler pointed by the flowset is
-the same that the scheduler located by the number. If so, and if the type are
-the same, it means that the scheduler wasn't changed. Now is check if the pipe
-exist, and eventually the pointer in the scheduler is updated. If scheduler
-and pipe exists, the packet can be enqueued.
-
-If the scheduler type differs from flowset type, it means that the scheduler
-has changed type so the flowset must be deleted and recreated. The pointer
-are update and the packet can be enqueued.
-
-If the scheduler no longer exists, the flowset is remove from flowset list
-and inserted in the unlinked flowset list, so that new packet are discarded
-early.
-
-If scheduler or pipe don't exist,packet shoubl be dropped and the function
-return 1 so that dummynet_io() can drop the packet.
dummynet_task()
===============
More information about the svn-src-user
mailing list