Re: [PATCH 0/9] genetlink: reduce ops size and complexity (v2)

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

 



On Fri, 2013-11-15 at 20:53 -0500, David Miller wrote:

> > We could instead register an array of pointers to the groups:
> > 
> > static const struct mcast_group *my_groups[] = {
> >       &my_foo_mcast_group,
> >       ...
> > };
> > 
> > and pass this to the family - that'd still be less space (one pointer
> > for each group rather than two in a linked list) and still allow all
> > groups and this array to be const, but it's not quite as big a
> > saving ...
> > 
> > Thoughts?
> 
> This idea sounds fine.  I don't even thing the array indexing is
> odd, especially if we can have named mnenomics for the indices
> or similar.

I posted something yesterday, but forgot to reply here - basically as
you'll see in the patches, I decided that we should pass the
family/group array index instead of passing the global group identifier
- this will also prevent new users of the APIs from abusing them like
quota/dropmonitor unfortunately did.

johannes


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux