From owner-svn-src-user@FreeBSD.ORG Fri Jan 22 07:22:46 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 988321065670; Fri, 22 Jan 2010 07:22:46 +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 6DED58FC13; Fri, 22 Jan 2010 07:22:46 +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 o0M7MkHf085946; Fri, 22 Jan 2010 07:22:46 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M7MkQP085944; Fri, 22 Jan 2010 07:22:46 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001220722.o0M7MkQP085944@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 22 Jan 2010 07:22:46 +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: r202781 - 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: Fri, 22 Jan 2010 07:22:46 -0000 Author: luigi Date: Fri Jan 22 07:22:46 2010 New Revision: 202781 URL: http://svn.freebsd.org/changeset/base/202781 Log: indentation and documentation fixes Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Fri Jan 22 05:19:51 2010 (r202780) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Fri Jan 22 07:22:46 2010 (r202781) @@ -114,11 +114,11 @@ bound_var(int *v, int dflt, int lo, int if (*v < lo) { *v = dflt; if (msg) - printf("default %s to %d\n", msg, *v); + printf("default %s to %d\n", msg, *v); } else if (*v > hi) { *v = hi; if (msg) - printf("clamp %s to %d\n", msg, *v); + printf("clamp %s to %d\n", msg, *v); } return *v; } @@ -345,8 +345,8 @@ qht_delete(struct new_fsk *fs, int flags } /* - * Find and possibly create the right queue for a MULTIQUEUE scheduler. - * We never call it for !MULTIQUEUE (when the queue is in the sch_inst). + * Find and possibly create the queue for a MULTIQUEUE scheduler. + * We never call it for !MULTIQUEUE (the queue is in the sch_inst). */ struct new_queue * ipdn_q_find(struct new_fsk *fs, struct new_sch_inst *si, @@ -610,7 +610,6 @@ fsk_detach_list(struct new_fsk_head *h, /* * called on 'queue X delete' -- removes the flowset from fshash, * deletes all queues for the flowset, and removes the flowset. - * XXX note that fsk_detach_list also destroys a flowset. */ static int delete_fs(int i, int locked) @@ -807,7 +806,8 @@ copy_flowset(struct copy_args *a, struct ND("flowset %d", fs->fs.fs_nr); if (copy_obj(a->start, a->end, &fs->fs, "flowset", fs->fs.fs_nr)) return DNHT_SCAN_END; - ufs->oid.id = 0; /* XXX number of queues ? */ + ufs->oid.id = (fs->fs.flags & DN_HAVE_MASK) ? + dn_ht_entries(fs->_qht) : (fs->_qht ? 1 : 0); if (flags) { /* copy queues */ copy_q(a, fs, 0); } @@ -850,6 +850,7 @@ copy_fsk_list(struct copy_args *a, struc if (fs->fs.fs_nr < DN_MAX_ID) n++;; } + /* XXX beware the alignment */ space += 2*n; D("sched %d has %d flowsets", s->sch.sched_nr, n); if (a->end - *(a->start) < space) @@ -1078,6 +1079,7 @@ config_fs(struct new_fs *nfs, struct dn_ /* detach from old scheduler if needed, preserving * queues if we need to reattach. Then update the * configuration, and possibly attach to the new sched. + * XXX should print more on why the config has changed. */ D("fs %d changed sched %d@%p to %d@%p", fs->fs.fs_nr, @@ -1426,8 +1428,12 @@ compute_space(struct dn_id *cmd, int *to break; } *to_copy = x; - if (x & DN_C_SCH) + if (x & DN_C_SCH) { need += dn_cfg.schk_count * sizeof(struct new_sch); + /* also, each fs might be attached to a sched */ + need += dn_cfg.fsk_count * + (sizeof(struct dn_id) + 4); + } if (x & DN_C_FS) need += dn_cfg.fsk_count * sizeof(struct new_fs); if (x & DN_C_LINK)