Re: [RFC net-next 5/9] genetlink: add a structure for dump state

2020-10-01 Thread Michal Kubecek
On Thu, Oct 01, 2020 at 09:48:31AM +0200, Johannes Berg wrote: > On Wed, 2020-09-30 at 17:05 -0700, Jakub Kicinski wrote: > > Whenever netlink dump uses more than 2 cb->args[] entries > > code gets hard to read. We're about to add more state to > > ctrl_dumppolicy() so create a structure. > > > >

Re: [RFC net-next 5/9] genetlink: add a structure for dump state

2020-10-01 Thread Johannes Berg
On Wed, 2020-09-30 at 17:05 -0700, Jakub Kicinski wrote: > Whenever netlink dump uses more than 2 cb->args[] entries > code gets hard to read. We're about to add more state to > ctrl_dumppolicy() so create a structure. > > Since the structure is typed and clearly named we can remove > the local fa

[RFC net-next 5/9] genetlink: add a structure for dump state

2020-09-30 Thread Jakub Kicinski
Whenever netlink dump uses more than 2 cb->args[] entries code gets hard to read. We're about to add more state to ctrl_dumppolicy() so create a structure. Since the structure is typed and clearly named we can remove the local fam_id variable and use ctx->fam_id directly. Signed-off-by: Jakub Kic