From owner-svn-src-user@FreeBSD.ORG Thu Feb 25 16:11:52 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 C5033106566C; Thu, 25 Feb 2010 16:11:52 +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 B4AB08FC16; Thu, 25 Feb 2010 16:11:52 +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 o1PGBq9s061778; Thu, 25 Feb 2010 16:11:52 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1PGBqdS061776; Thu, 25 Feb 2010 16:11:52 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002251611.o1PGBqdS061776@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 25 Feb 2010 16:11:52 +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: r204321 - 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: Thu, 25 Feb 2010 16:11:52 -0000 Author: luigi Date: Thu Feb 25 16:11:51 2010 New Revision: 204321 URL: http://svn.freebsd.org/changeset/base/204321 Log: support for scanning an entire bucket. This is used when draining idle queues and scheduler instances from dummynet. Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/dn_heap.h Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/dn_heap.h ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/dn_heap.h Thu Feb 25 16:00:52 2010 (r204320) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/dn_heap.h Thu Feb 25 16:11:51 2010 (r204321) @@ -133,6 +133,11 @@ int heap_scan(struct dn_heap *, int (*)( * removal of the object from the heap and the end of the * scan, respectively. * + * dn_ht_scan_bucket() is similar to dn_ht_scan(), except that it scans + * only the specific bucket of the table. The bucket is a in-out + * parameter and return a valid bucket number if the original + * is invalid. + * * A combination of flags can be used to modify the operation * of the dn_ht_find(), and of the callbacks: * @@ -163,6 +168,7 @@ void dn_ht_free(struct dn_ht *, int flag void *dn_ht_find(struct dn_ht *, uintptr_t, int, void *); int dn_ht_scan(struct dn_ht *, int (*)(void *, void *), void *); +int dn_ht_scan_bucket(struct dn_ht *, int * , int (*)(void *, void *), void *); int dn_ht_entries(struct dn_ht *); enum { /* flags values.