[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240319220953.46573-1-jorcrous@amazon.com>
Date: Tue, 19 Mar 2024 22:09:53 +0000
From: Jordan Crouse <jorcrous@...zon.com>
To: <netdev@...r.kernel.org>
Subject: [PATCH 1/1] devlink: Fixup port identifiers for 'port param show'
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
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.
Signed-off-by: Jordan Crouse <jorcrous@...zon.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,
DL_OPT_HANDLE | DL_OPT_HANDLEP, 0);
if (err)
return err;
--
2.40.1
Powered by blists - more mailing lists