Subject: Re: [PATCH net-next v1 2/2] tools/net/ynl: Add multi message support to ynl

From: Jakub Kicinski <[email-masked]>
Date: Fri, 29 Mar 2024 08:43:46 -0700

On Fri, 29 Mar 2024 13:37:31 +0000 Donald Hunter wrote:
> > We'd only support multiple "do" requests, I wonder if we should somehow
> > call this out. Is --multi-do unnecessary extra typing?  
> 
> I prefer --multi but will update the help text to say "DO-OPERATIION"
> and "... several do operations".

Alright, technically doing multi-dump should also work, but maybe
there's less of a benefit there, so we can keep the multi focused
on do for now.

Looking at the code again, are you sure we'll process all the responses
not just the first one?

Shouldn't this:

+                    del reqs_by_seq[nl_msg.nl_seq]
                     done = True

be something like:

		del reqs_by_seq[nl_msg.nl_seq]
		done = len(reqs_by_seq) == 0

?

Would be good to add an example of multi executing some get operations.

My other concern is the formatting of the response. For mutli we should
probably retain the indexes, e.g. 3 dos should produce an array with a
length of 3, some of the entries may be None if the command only acked.
Would that make sense?