[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB5089BBF3883243C1F924B4B8D6389@CO1PR11MB5089.namprd11.prod.outlook.com>
Date: Thu, 3 Nov 2022 03:06:19 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"razor@...ckwall.org" <razor@...ckwall.org>,
"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
"gnault@...hat.com" <gnault@...hat.com>,
"fw@...len.de" <fw@...len.de>
Subject: RE: [PATCH net-next v2 01/13] genetlink: refactor the cmd <> policy
mapping dump
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Wednesday, November 2, 2022 6:53 PM
> To: Keller, Jacob E <jacob.e.keller@...el.com>
> Cc: davem@...emloft.net; netdev@...r.kernel.org; edumazet@...gle.com;
> pabeni@...hat.com; jiri@...nulli.us; razor@...ckwall.org;
> nicolas.dichtel@...nd.com; gnault@...hat.com; fw@...len.de
> Subject: Re: [PATCH net-next v2 01/13] genetlink: refactor the cmd <> policy
> mapping dump
>
> On Wed, 2 Nov 2022 16:52:21 -0700 Jacob Keller wrote:
> > Does the change to ctx->opidx have any other side effects we care about?
> > if not it might be more legible to write this as:
> >
> > /* don't modify ctx->opidx */
> > }
> >
> > while (!ctx->single_op && ctx->opidx < genl_get_cmd_cnt(ctx->r)) {
> >
> >
> > That makes the intent a bit more clear and shouldn't need a comment
> > about entering the loop. It also means we don't need to modify
> > ctx->opidx, though I'm not sure if those other side effects matter or
> > not.. we were modifying it before..
> >
> > I don't know what else depends on the opidx.
>
> I was just trying to make the patches slightly easier to read.
> This chunk gets rewritten again in patch 10, and the opidx thing
> is gone completely. I maintain a "keep dumping" boolean called
> dump_map (because this code is dumping a mapping rather than
> the policies which come later)
>
> LMK if I should try harder to improve this patch or what patch 10
> does makes this moot.
If patch 10 makes things moot lets go with this as-is.
Thanks,
Jake
Powered by blists - more mailing lists