tech-net archive

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

Re: Restructuring ARP cache



On Tue, Aug 25, 2015 at 7:37 PM, Christos Zoulas <christos%zoulas.com@localhost> wrote:
> On Aug 25,  6:34pm, ozaki-r%netbsd.org@localhost (Ryota Ozaki) wrote:
> -- Subject: Re: Restructuring ARP cache
>
> | >
> | > | > - foo() {
> | > | >         if (....) {
> | > | >                 ....
> | > | >                 ....
> | > | >         }
> | > | >   }
> | > | >   instead:
> | > | >   foo() {
> | > | >         if (!....)
> | > | >                 return;
> | > | >         ....
> | > | >         ....
> | > | >   }
> | > |
> | > | I prefer to the latter too. Which ones in the patch do you get worried?
> | >
> | > htable_unlink_entry more
> | > htable_prefix_free_cb less
>
> You did not fix those...

They are also from FreeBSD so I'll fix it in bulk later...

>
> | Thanks. I fixed many of them while I left some in if_llatbl.c
> | and in.c as is. I'll get them down once FreeBSD's work calms down.
>
> Ok.
>
> | The patch is updated:
> | http://www.netbsd.org/~ozaki-r/lltable-arpcache.diff
> | (https://github.com/ozaki-r/netbsd-src/tree/lltable-arpcache)
>
> - the initialization of laflags seems superfluous.
> - kill bzero and bcopy (use memset and memcpy)

Fixed them.

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index