Re: [ckrm-tech] [PATCH] CKRM: 8/10 CKRM: Resource controller forprioritizing inbound network requests

From: James Morris
Date: Tue Nov 30 2004 - 11:45:56 EST


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@xxxxxxxxxx>


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