On Fri, 2008-10-03 at 12:20 -0400, Peter Memishian wrote:
> > The semantics are clearer to me this way.  The count represents how many
>  > times DL_PROMISC_MULTI has been enabled on an ipnetif_t (this is
>  > independent of address families)
> 
> But that's just it -- because one or both halves may be up when
> DL_PROMISC_MULTI is done, that's not particularly meaningful to know,
> which makes the code more complex.

I'm not sure I understand this comment.  What code could be simplified?

> 
>  > and the flags represents which ill we've enabled the allmulti group on
>  > underneath (this is only done once per address family, not multiple
>  > times).
> 
> Which seems like an unnecessary optimization given that IP can handle
> multiple joins internally.

It wasn't done as an optimization as much as for code simplicity.  When
an ill is plumbed, I didn't think it was all that great to have to join
"n" times in a loop when doing it once was sufficient.

Also, if there were two separate counts, they'd either have to be 0, or
equal to one another.  This is semantically one count and two flags, and
easier to understand.

-Seb



Reply via email to