DORMANTno replies REVIEWED: 1 (0M)

1 review trailer.

[PATCH iproute2 v2] devlink: Fix setting parent for 'rate add'

From: Michal Wilczynski <hidden>
Date: 2022-12-01 10:21:05
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Reviewed-by: Wojciech Drewek <redacted>
---
v2:
 - Re-send to target iproute2 instead of iproute2-next

 devlink/devlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 150b4e63..11daf0c3 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -5049,7 +5049,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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help