lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221125123421.36297-2-michal.wilczynski@intel.com>
Date:   Fri, 25 Nov 2022 13:34:17 +0100
From:   Michal Wilczynski <michal.wilczynski@...el.com>
To:     netdev@...r.kernel.org
Cc:     alexandr.lobakin@...el.com, przemyslaw.kitszel@...el.com,
        jiri@...nulli.us, wojciech.drewek@...el.com, dsahern@...il.com,
        stephen@...workplumber.org,
        Michal Wilczynski <michal.wilczynski@...el.com>
Subject: [PATCH iproute2-next 1/5] devlink: Fix setting parent for 'rate add'

Setting a parent during creation of the node doesn't work, despite
documentation [1] clearly saying that it should.

[1] man/man8/devlink-rate.8

Example:
$ devlink port function rate add pci/0000:4b:00.0/node_custom parent node_0
  Unknown option "parent"

Fix this by passing DL_OPT_PORT_FN_RATE_PARENT as an argument to
dl_argv_parse() when it gets called from cmd_port_fn_rate_add().

Fixes: 6c70aca76ef2 ("devlink: Add port func rate support")
Signed-off-by: Michal Wilczynski <michal.wilczynski@...el.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
---
 devlink/devlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 8aefa101b2f8..5cff018a2471 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -5030,7 +5030,8 @@ static int cmd_port_fn_rate_add(struct dl *dl)
 	int err;
 
 	err = dl_argv_parse(dl, DL_OPT_PORT_FN_RATE_NODE_NAME,
-			    DL_OPT_PORT_FN_RATE_TX_SHARE | DL_OPT_PORT_FN_RATE_TX_MAX);
+			    DL_OPT_PORT_FN_RATE_TX_SHARE | DL_OPT_PORT_FN_RATE_TX_MAX |
+			    DL_OPT_PORT_FN_RATE_PARENT);
 	if (err)
 		return err;
 
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ