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

- From: David Miller \<davem@davemloft.net\>
- Date: 2013-11-16 01:53:13 
- List: netdev
- Page: https://ratatoskr.run/netdev/2013/11/10938542
- Thread: https://ratatoskr.run/netdev/2013/11/10938322/t.md

```text
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 15 Nov 2013 14:18:35 +0100

> 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.
```
