]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
devlink: use the correct handle flag for port param show
authorSaeed Mahameed <saeedm@nvidia.com>
Tue, 26 Nov 2024 09:08:28 +0000 (10:08 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 2 Dec 2024 19:19:26 +0000 (11:19 -0800)
Port param show command arg parser used the devlink dev flag
instead of the port, which caused to not identify the port device
argument, causing the following error:

$ devlink port param show eth0 name link_type
Wrong identification string format.
Devlink identification ("bus_name/dev_name") expected

Use the correct the devlink handle flag.

Fixes: 70faecdca8f5 ("devlink: implement dump selector for devlink objects show commands")
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c

index bba1bbf12382d33096177a0a0426eba32f9df9cb..d14f3f45598a8a10df39247f2f3c8cd035654a2b 100644 (file)
@@ -5089,7 +5089,7 @@ 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_HANDLEP | DL_OPT_PARAM_NAME, 0,
                                          DL_OPT_HANDLE | DL_OPT_HANDLEP, 0);
        if (err)
                return err;