public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: netdev@vger•kernel.org,  davem@davemloft•net,
	 edumazet@google•com, pabeni@redhat•com
Subject: Re: [PATCH net-next] tools: pynl: make flags argument optional for do()
Date: Mon, 04 Dec 2023 16:45:46 +0000	[thread overview]
Message-ID: <m2v89d6hmt.fsf@gmail.com> (raw)
In-Reply-To: <20231202211005.341613-1-kuba@kernel.org> (Jakub Kicinski's message of "Sat, 2 Dec 2023 13:10:05 -0800")

Jakub Kicinski <kuba@kernel•org> writes:

> Commit 1768d8a767f8 ("tools/net/ynl: Add support for create flags")
> added support for setting legacy netlink CRUD flags on netlink
> messages (NLM_F_REPLACE, _EXCL, _CREATE etc.).
>
> Most of genetlink won't need these, don't force callers to pass
> in an empty argument to each do() call.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel•org>
> ---
> CC: donald.hunter@gmail•com

Reviewed-by: Donald Hunter <donald.hunter@gmail•com>

> ---
>  tools/net/ynl/lib/ynl.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
> index 92995bca14e1..c56dad9593c6 100644
> --- a/tools/net/ynl/lib/ynl.py
> +++ b/tools/net/ynl/lib/ynl.py
> @@ -705,7 +705,7 @@ genl_family_name_to_id = None
>  
>        return op['do']['request']['attributes'].copy()
>  
> -    def _op(self, method, vals, flags, dump=False):
> +    def _op(self, method, vals, flags=None, dump=False):
>          op = self.ops[method]
>  
>          nl_flags = Netlink.NLM_F_REQUEST | Netlink.NLM_F_ACK
> @@ -769,7 +769,7 @@ genl_family_name_to_id = None
>              return rsp[0]
>          return rsp
>  
> -    def do(self, method, vals, flags):
> +    def do(self, method, vals, flags=None):
>          return self._op(method, vals, flags)
>  
>      def dump(self, method, vals):

  reply	other threads:[~2023-12-04 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 21:10 [PATCH net-next] tools: pynl: make flags argument optional for do() Jakub Kicinski
2023-12-04 16:45 ` Donald Hunter [this message]
2023-12-06  4:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2v89d6hmt.fsf@gmail.com \
    --to=donald.hunter@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox