From owner-svn-src-user@FreeBSD.ORG Mon Feb 1 11:33:45 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D32D61065692; Mon, 1 Feb 2010 11:33:45 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1FAD8FC13; Mon, 1 Feb 2010 11:33:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11BXj6v032679; Mon, 1 Feb 2010 11:33:45 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11BXjHT032677; Mon, 1 Feb 2010 11:33:45 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002011133.o11BXjHT032677@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 1 Feb 2010 11:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203339 - user/luigi/ipfw3-head/sys/netinet/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 11:33:46 -0000 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() ===============