Thread (12 messages) 12 messages, 3 authors, 2024-03-29

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

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-03-29 15:43:47

On Fri, 29 Mar 2024 13:37:31 +0000 Donald Hunter wrote:
quoted
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help