devlink: Fixup port identifiers for 'port param show'
Subsystems (2)
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") expectedReturn DL_OP_HANDLEP to the mask so the code correctly goes down the dl_argv_handle_both() path and handles both types of identifiers.
--- devlink/devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
devlink/devlink.c +2 -1
@@ -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;
Signature · 1 line
2.40.1
Regarding subject, please put "iproute2" alongside with "patch" into the brackets.
Quoted 6 lines · Tue, Mar 19, 2024 at 11:09:53PM CET, [email protected] wrote:
Commit
70faecdca8f5("devlink: implement dump selector for devlink objects show commands") inadvertently removedDL_OP_HANDLEPfrom 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 :)
Quoted 4 lines
Return
DL_OP_HANDLEPto the mask so the code correctly goes down thedl_argv_handle_both()path and handles both types of identifiers.
Provide proper fixes tag please.
Quoted 11 lines
Signed-off-by Jordan Crouse <[email protected]>---
devlink/devlink.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)devlink/devlink.c +0
-0
devlink/devlink.c static int cmd_port_param_show(struct dl *dl) · line 5054
Quoted 6 lines
devlink/devlink.c +2
-1@@ -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
Quoted 7 lines
devlink/devlink.c +0
-0DL_OPT_HANDLE | DL_OPT_HANDLEP, 0);if (err)return err;Signature · 1 line
2.40.1