Received: from oss.sgi.com (localhost.localdomain [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g3BCe48d019187 for ; Thu, 11 Apr 2002 05:40:04 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g3BCe4Qw019185 for netdev-outgoing; Thu, 11 Apr 2002 05:40:04 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-netdev@oss.sgi.com using -f Received: from cyberus.ca (mail.cyberus.ca [216.191.240.111]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g3BCdw8d019174 for ; Thu, 11 Apr 2002 05:39:59 -0700 Received: from shell.cyberus.ca (shell [216.191.240.114]) by cyberus.ca (8.9.3/8.9.3/Cyberus Online Inc.) with ESMTP id IAA29238; Thu, 11 Apr 2002 08:40:29 -0400 (EDT) Received: from localhost (hadi@localhost) by shell.cyberus.ca (8.11.6+Sun/8.11.6) with ESMTP id g3BCZMs00900; Thu, 11 Apr 2002 08:35:23 -0400 (EDT) X-Authentication-Warning: shell.cyberus.ca: hadi owned process doing -bs Date: Thu, 11 Apr 2002 08:35:22 -0400 (EDT) From: jamal To: Martin Devera cc: Subject: Re: QoS _put, _get and _delete class ops semantic In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 1181 Lines: 41 Hi Martin, On Tue, 9 Apr 2002, Martin Devera wrote: > Hi Jamal, > > put and get seem to be simply reference counting on > class object. nod > I'd expect thet class creation will call > get once to assure that it is locked in active state and > "tc class del" would call last put to release this last > reference (and class will destroy itself). actually sequence would be get();delete();put() whenever "tc class del" is invoked (theres other activity that may happen here as well instead of delete(), example attaching filters to class etc). I think what you do with the delete+put combo is specific to your needs though. So for example you could return 0 in get() and your put() code will never be invoked. > Unfortunately there is delete class op which seems to do > almost the same as put. > Do you know rationale behind it ? Why we have both put > and delete and what tc framework expect from qdisc ? Alexey can give a better answer. Typically put() is the backup for delete. Should delete fail to destroy because of reference counts being non-zero, put will catch it. CBQ is an easier scheduler to see this. For a fun one look at the ATM scheduler. cheers, jamal