Date: Mon, 18 Jan 2010 12:52:42 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r202569 - user/luigi/ipfw3-head/sys/netinet/ipfw Message-ID: <201001181252.o0ICqg04067064@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Mon Jan 18 12:52:42 2010 New Revision: 202569 URL: http://svn.freebsd.org/changeset/base/202569 Log: small indentation fixes. Also indicate where scheduler-specific info could go in the flowset. Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_private.h Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_private.h ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_private.h Mon Jan 18 12:43:57 2010 (r202568) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_private.h Mon Jan 18 12:52:42 2010 (r202569) @@ -74,7 +74,7 @@ struct dn_parms { /* timekeeping */ struct timeval prev_t; /* last time dummynet_tick ran */ - struct dn_heap evheap; /* scheduled events */ + struct dn_heap evheap; /* scheduled events */ /* counters of objects -- used for reporting space */ int schk_count; @@ -124,6 +124,9 @@ struct delay_line { * When we remove a flowset, mark as DN_DELETE so it can go away * when the hash table will be empty. * XXX refcnt is redundant, the info is already in qht->entries + * If we want to add scheduler-specific parameters, we need to + * put them in external storage because the scheduler may not be + * available when the fsk is created. */ struct new_fsk { /* kernel side of a flowset */ struct new_fs fs; @@ -131,10 +134,13 @@ struct new_fsk { /* kernel side of a flo int kflags; /* kernel-side flags */ int refcnt; /* entries in qht */ - /* hash table of queues, or just our queue if we have no mask */ + /* hash table of queues. XXX if we have no flow_mask we could + * avoid the hash table and just allocate one queue. + */ struct dn_ht *qht; struct new_schk *sched; /* Sched we are linked to */ SLIST_ENTRY(new_fsk) sch_chain; /* list of fsk attached to sched */ + void *sched_info; /* scheduler-specific info */ }; /* @@ -178,7 +184,6 @@ struct new_schk { /* Hash table of all instances (through sched_mask) */ struct dn_ht *siht; - }; @@ -191,25 +196,25 @@ struct new_sch_inst { struct new_inst ni; /* oid, id and stats */ SLIST_ENTRY(new_sch_inst) si_next; /* next item in the bucket */ struct delay_line dline; - struct new_schk *sched; /* the template */ + struct new_schk *sched; /* the template */ int kflags; /* DN_ACTIVE */ - int64_t credit; /* bits I can transmit (more or less). */ - dn_key sched_time ; /* time pipe was scheduled in ready_heap */ - dn_key idle_time; /* start of scheduler instance idle time */ + int64_t credit; /* bits I can transmit (more or less). */ + dn_key sched_time; /* time pipe was scheduled in ready_heap */ + dn_key idle_time; /* start of scheduler instance idle time */ }; /* kernel-side flags */ enum { - DN_DELETE = 0x0004, /* destroy when refcnt=0 */ - DN_ACTIVE = 0x0010, /* object is in evheap */ - DN_F_DLINE = 0x0020, /* object is a delay line */ - DN_F_SCHI = 0x0030, /* object is a sched.instance */ + DN_DELETE = 0x0004, /* destroy when refcnt=0 */ + DN_ACTIVE = 0x0010, /* object is in evheap */ + DN_F_DLINE = 0x0020, /* object is a delay line */ + DN_F_SCHI = 0x0030, /* object is a sched.instance */ }; extern struct dn_parms dn_cfg; -int dummynet_io(struct mbuf **, int , struct ip_fw_args *); +int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); void dn_reschedule(void);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001181252.o0ICqg04067064>