| To: | Patrick McHardy <kaber@xxxxxxxxx> |
|---|---|
| Subject: | Re: [NET]: Avoid useless iterating in netlink dump functions |
| From: | jamal <hadi@xxxxxxxxxx> |
| Date: | Fri, 06 May 2005 17:04:33 -0400 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxxxxx>, Maillist netdev <netdev@xxxxxxxxxxx> |
| In-reply-to: | <427B8FC3.4000305@trash.net> |
| Organization: | unknown |
| References: | <427B8FC3.4000305@trash.net> |
| Reply-to: | hadi@xxxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Fri, 2005-06-05 at 17:39 +0200, Patrick McHardy wrote:
> This patch changes a couple of places like this:
>
> for (h = 0; h <= tbl->hash_mask; h++) {
> if (h < s_h)
> continue;
>
> to this:
>
> for (h = s_h; h <= tbl->hash_mask; h++) {
>
> The only difference is that we can now get past the loop with
> h > tbl->hash_mask if hash_mask was decreased between two callbacks
> and h was already past the new value. But it still behaves identical,
> nothing is dumped.
>
Looks good - you may also wanna treat tcf_dump_walker() and
xfrm_dump_sa() the same way then.
cheers,
jamal
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: resend patch: xfrm policybyid, David S. Miller |
|---|---|
| Next by Date: | Re: [NET]: Avoid useless iterating in netlink dump functions, Patrick McHardy |
| Previous by Thread: | [NET]: Avoid useless iterating in netlink dump functions, Patrick McHardy |
| Next by Thread: | Re: [NET]: Avoid useless iterating in netlink dump functions, Patrick McHardy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |