lkml.org 
[lkml]   [2004]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ckrm-tech] [PATCH] CKRM: 8/10 CKRM: Resource controller for prioritizing inbound network requests
On Mon, 29 Nov 2004, Gerrit Huizenga wrote:

> +#ifdef CONFIG_ACCEPT_QUEUES
> + tp->class_index = 0;
> + for (i=0; i < NUM_ACCEPT_QUEUES; i++) {
> + tp->acceptq[i].aq_tail = NULL;
> + tp->acceptq[i].aq_head = NULL;
> + tp->acceptq[i].aq_wait_time = 0;
> + tp->acceptq[i].aq_qcount = 0;
> + tp->acceptq[i].aq_count = 0;
> + if (i == 0) {
> + tp->acceptq[i].aq_ratio = 1;
> + }
> + else {
> + tp->acceptq[i].aq_ratio = 0;
> + }
> + }
> +#endif

Do not litter the networking code with #ifdef sections. Use functions
which are defined to nothing via static inline if disabled.


- James
--
James Morris
<jmorris@redhat.com>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.026 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site