Date: Fri, 22 Jan 2010 07:22:46 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r202781 - user/luigi/ipfw3-head/sys/netinet/ipfw Message-ID: <201001220722.o0M7MkQP085944@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001220722.o0M7MkQP085944>