Re: [PATCH] HTB O(1) class lookup

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 05, 2007 at 06:14:13PM +0100, Simon Lodal wrote:
...
> Regards
...

It seems decisions makers need more time, so I'd add 
2 cents more:

1c: an indentation could be improved (spaces around
operators), like in these places:

>+#define HTB_MAX_CLS		(TC_H_MIN(-1)+1)
...
>+	htb_cls_array* a;
...
>+	int cnt,done;

etc.

2c: it is a question of taste, but here:

> 		err = -ENOBUFS;
>+		if (q->classes[HTB_CLS_ARRAY(minorid)] == NULL) {
>+			if ((q->classes[HTB_CLS_ARRAY(minorid)] = 
>+			     kzalloc(sizeof(htb_cls_array), GFP_KERNEL))
>+			    == NULL)
>+				goto failure;
>+		}
> 		if ((cl = kzalloc(sizeof(*cl), GFP_KERNEL)) == NULL)
> 			goto failure;

it would be probably more readable and a bit merciful
to the stressed system to free this htb_cls_array after
the last error (I know it's not a leak).

Regards,
Jarek P.

PS: 1c extra - it's easier to read a diff if you use -p option. 
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux