netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jordan Crouse <jorcrous@amazon.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] devlink: Fixup port identifiers for 'port param show'
Date: Wed, 20 Mar 2024 13:39:56 +0100	[thread overview]
Message-ID: <ZfrZHAmJEf-frH5R@nanopsycho> (raw)
In-Reply-To: <20240319220953.46573-1-jorcrous@amazon.com>

Regarding subject, please put "iproute2" alongside with "patch" into the
brackets.


Tue, Mar 19, 2024 at 11:09:53PM CET, jorcrous@amazon.com wrote:
>Commit 70faecdca8f5 ("devlink: implement dump selector for devlink objects show commands")
>inadvertently removed DL_OP_HANDLEP from the required flags so that
>port definitions no longer worked:
>
>  $ devlink port param show pci/0000:01:00.0/52 name bc_kbyte_per_sec_rate
>  Devlink identification ("bus_name/dev_name") expected

Yeah, nobody should care as there is no in-tree kernel implementation of
this :)


>
>Return DL_OP_HANDLEP to the mask so the code correctly goes down the
>dl_argv_handle_both() path and handles both types of identifiers.
>


Provide proper fixes tag please.

>Signed-off-by: Jordan Crouse <jorcrous@amazon.com>

>---
> devlink/devlink.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/devlink/devlink.c b/devlink/devlink.c
>index dbeb6e39..355e521c 100644
>--- a/devlink/devlink.c
>+++ b/devlink/devlink.c
>@@ -5050,7 +5050,8 @@ static int cmd_port_param_show(struct dl *dl)
> 
> 	err = dl_argv_parse_with_selector(dl, &flags,
> 					  DEVLINK_CMD_PORT_PARAM_GET,
>-					  DL_OPT_HANDLE | DL_OPT_PARAM_NAME, 0,
>+					  DL_OPT_HANDLE | DL_OPT_HANDLEP |
>+					  DL_OPT_PARAM_NAME, 0,

Should be only: DL_OPT_HANDLEP | DL_OPT_PARAM_NAME, Remove
DL_OPT_HANDLE.


pw-bot: cr

> 					  DL_OPT_HANDLE | DL_OPT_HANDLEP, 0);
> 	if (err)
> 		return err;
>-- 
>2.40.1
>
>

      reply	other threads:[~2024-03-20 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 22:09 [PATCH 1/1] devlink: Fixup port identifiers for 'port param show' Jordan Crouse
2024-03-20 12:39 ` Jiri Pirko [this message]

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=ZfrZHAmJEf-frH5R@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=jorcrous@amazon.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).