All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2
@ 2022-12-01 10:26 Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 1/4] devlink: Add uapi changes for tx_priority and tx_weight Michal Wilczynski
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Michal Wilczynski @ 2022-12-01 10:26 UTC (permalink / raw)
  To: netdev
  Cc: alexandr.lobakin, przemyslaw.kitszel, jiri, wojciech.drewek,
	dsahern, stephen, Michal Wilczynski

Patch implementing new netlink attributes for devlink-rate got merged to
net-next.
https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/

Now there is a need to support these new attributes in the userspace
tool. Implement tx_priority and tx_weight in devlink userspace tool. Update
documentation.

v2:
 - Re-send series without bug-fix

Michal Wilczynski (4):
  devlink: Add uapi changes for tx_priority and tx_weight
  devlink: Introduce new attribute 'tx_priority' to devlink-rate
  devlink: Introduce new attribute 'tx_weight' to devlink-rate
  devlink: Add documentation for tx_prority and tx_weight

 devlink/devlink.c            | 55 ++++++++++++++++++++++++++++++++++--
 include/uapi/linux/devlink.h |  3 ++
 man/man8/devlink-rate.8      | 22 +++++++++++++++
 3 files changed, 77 insertions(+), 3 deletions(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH iproute2-next v2 1/4] devlink: Add uapi changes for tx_priority and tx_weight
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
@ 2022-12-01 10:26 ` Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 2/4] devlink: Introduce new attribute 'tx_priority' to devlink-rate Michal Wilczynski
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Michal Wilczynski @ 2022-12-01 10:26 UTC (permalink / raw)
  To: netdev
  Cc: alexandr.lobakin, przemyslaw.kitszel, jiri, wojciech.drewek,
	dsahern, stephen, Michal Wilczynski

Per discussion [1] I'm putting the uapi changes in separate commit.
Those changes are already merged to net-next [2].

[1] https://lore.kernel.org/netdev/48df4e83-a9b8-11db-aeaf-2015666af5a5@gmail.com/
[2] https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
---
 include/uapi/linux/devlink.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 0224b8bd49b2..b6b058e4bdb2 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -607,6 +607,9 @@ enum devlink_attr {
 
 	DEVLINK_ATTR_SELFTESTS,			/* nested */
 
+	DEVLINK_ATTR_RATE_TX_PRIORITY,		/* u32 */
+	DEVLINK_ATTR_RATE_TX_WEIGHT,		/* u32 */
+
 	/* add new attributes above here, update the policy in devlink.c */
 
 	__DEVLINK_ATTR_MAX,
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2-next v2 2/4] devlink: Introduce new attribute 'tx_priority' to devlink-rate
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 1/4] devlink: Add uapi changes for tx_priority and tx_weight Michal Wilczynski
@ 2022-12-01 10:26 ` Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 3/4] devlink: Introduce new attribute 'tx_weight' " Michal Wilczynski
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Michal Wilczynski @ 2022-12-01 10:26 UTC (permalink / raw)
  To: netdev
  Cc: alexandr.lobakin, przemyslaw.kitszel, jiri, wojciech.drewek,
	dsahern, stephen, Michal Wilczynski

To fully utilize hierarchical QoS algorithm new attribute 'tx_priority'
needs to be introduced. Priority attribute allows for usage of strict
priority arbiter among siblings. This arbitration scheme attempts to
schedule nodes based on their priority as long as the nodes remain within
their bandwidth limit.

Introduce ability to configure tx_priority from devlink userspace
utility. Make the new attribute optional.

Example commands:
$ devlink port function rate add pci/0000:4b:00.0/node_custom \
  tx_priority 5 parent node_0
$ devlink port function rate set pci/0000:4b:00.0/2 tx_priority 5

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
 devlink/devlink.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 8aefa101b2f8..479d153e2a5e 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -295,6 +295,7 @@ static void ifname_map_free(struct ifname_map *ifname_map)
 #define DL_OPT_LINECARD		BIT(52)
 #define DL_OPT_LINECARD_TYPE	BIT(53)
 #define DL_OPT_SELFTESTS	BIT(54)
+#define DL_OPT_PORT_FN_RATE_TX_PRIORITY	BIT(55)
 
 struct dl_opts {
 	uint64_t present; /* flags of present items */
@@ -353,6 +354,7 @@ struct dl_opts {
 	uint16_t rate_type;
 	uint64_t rate_tx_share;
 	uint64_t rate_tx_max;
+	uint32_t rate_tx_priority;
 	char *rate_node_name;
 	const char *rate_parent_node;
 	uint32_t linecard_index;
@@ -2048,6 +2050,13 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
 			if (err)
 				return err;
 			o_found |= DL_OPT_PORT_FN_RATE_TX_MAX;
+		} else if (dl_argv_match(dl, "tx_priority") &&
+			   (o_all & DL_OPT_PORT_FN_RATE_TX_PRIORITY)) {
+			dl_arg_inc(dl);
+			err = dl_argv_uint32_t(dl, &opts->rate_tx_priority);
+			if (err)
+				return err;
+			o_found |= DL_OPT_PORT_FN_RATE_TX_PRIORITY;
 		} else if (dl_argv_match(dl, "parent") &&
 			   (o_all & DL_OPT_PORT_FN_RATE_PARENT)) {
 			dl_arg_inc(dl);
@@ -2316,6 +2325,9 @@ static void dl_opts_put(struct nlmsghdr *nlh, struct dl *dl)
 	if (opts->present & DL_OPT_PORT_FN_RATE_TX_SHARE)
 		mnl_attr_put_u64(nlh, DEVLINK_ATTR_RATE_TX_SHARE,
 				 opts->rate_tx_share);
+	if (opts->present & DL_OPT_PORT_FN_RATE_TX_PRIORITY)
+		mnl_attr_put_u32(nlh, DEVLINK_ATTR_RATE_TX_PRIORITY,
+				 opts->rate_tx_priority);
 	if (opts->present & DL_OPT_PORT_FN_RATE_TX_MAX)
 		mnl_attr_put_u64(nlh, DEVLINK_ATTR_RATE_TX_MAX,
 				 opts->rate_tx_max);
@@ -4936,6 +4948,13 @@ static void pr_out_port_fn_rate(struct dl *dl, struct nlattr **tb)
 			print_rate(dl->use_iec, PRINT_ANY, "tx_max",
 				   " tx_max %s", rate);
 	}
+	if (tb[DEVLINK_ATTR_RATE_TX_PRIORITY]) {
+		uint32_t priority =
+			mnl_attr_get_u32(tb[DEVLINK_ATTR_RATE_TX_PRIORITY]);
+		if (priority)
+			print_uint(PRINT_ANY, "tx_priority",
+				   " tx_priority %u", priority);
+	}
 	if (tb[DEVLINK_ATTR_RATE_PARENT_NODE_NAME]) {
 		const char *parent =
 			mnl_attr_get_str(tb[DEVLINK_ATTR_RATE_PARENT_NODE_NAME]);
@@ -4967,11 +4986,12 @@ static void cmd_port_fn_rate_help(void)
 	pr_err("Usage: devlink port function rate help\n");
 	pr_err("       devlink port function rate show [ DEV/{ PORT_INDEX | NODE_NAME } ]\n");
 	pr_err("       devlink port function rate add DEV/NODE_NAME\n");
-	pr_err("               [ tx_share VAL ][ tx_max VAL ][ { parent NODE_NAME | noparent } ]\n");
+	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ { parent NODE_NAME | noparent } ]\n");
 	pr_err("       devlink port function rate del DEV/NODE_NAME\n");
 	pr_err("       devlink port function rate set DEV/{ PORT_INDEX | NODE_NAME }\n");
-	pr_err("               [ tx_share VAL ][ tx_max VAL ][ { parent NODE_NAME | noparent } ]\n\n");
+	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ { parent NODE_NAME | noparent } ]\n\n");
 	pr_err("       VAL - float or integer value in units of bits or bytes per second (bit|bps)\n");
+	pr_err("       N - integer representing priority of the node among siblings\n");
 	pr_err("       and SI (k-, m-, g-, t-) or IEC (ki-, mi-, gi-, ti-) case-insensitive prefix.\n");
 	pr_err("       Bare number, means bits per second, is possible.\n\n");
 	pr_err("       For details refer to devlink-rate(8) man page.\n");
@@ -5030,7 +5050,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_TX_PRIORITY);
 	if (err)
 		return err;
 
@@ -5084,6 +5105,9 @@ static int port_fn_get_rates_cb(const struct nlmsghdr *nlh, void *data)
 	if (tb[DEVLINK_ATTR_RATE_TX_MAX])
 		opts->rate_tx_max =
 			mnl_attr_get_u64(tb[DEVLINK_ATTR_RATE_TX_MAX]);
+	if (tb[DEVLINK_ATTR_RATE_TX_PRIORITY])
+		opts->rate_tx_priority =
+			mnl_attr_get_u32(tb[DEVLINK_ATTR_RATE_TX_PRIORITY]);
 	return MNL_CB_OK;
 }
 
@@ -5097,6 +5121,7 @@ static int cmd_port_fn_rate_set(struct dl *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_PRIORITY |
 				DL_OPT_PORT_FN_RATE_PARENT);
 	if (err)
 		return err;
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2-next v2 3/4] devlink: Introduce new attribute 'tx_weight' to devlink-rate
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 1/4] devlink: Add uapi changes for tx_priority and tx_weight Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 2/4] devlink: Introduce new attribute 'tx_priority' to devlink-rate Michal Wilczynski
@ 2022-12-01 10:26 ` Michal Wilczynski
  2022-12-01 10:26 ` [PATCH iproute2-next v2 4/4] devlink: Add documentation for tx_prority and tx_weight Michal Wilczynski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Michal Wilczynski @ 2022-12-01 10:26 UTC (permalink / raw)
  To: netdev
  Cc: alexandr.lobakin, przemyslaw.kitszel, jiri, wojciech.drewek,
	dsahern, stephen, Michal Wilczynski

To fully utilize hierarchical QoS algorithm new attribute 'tx_weight'
needs to be introduced. Weight attribute allows for usage of Weighted
Fair Queuing arbitration scheme among siblings. This arbitration
scheme can be used simultaneously with the strict priority.

Introduce ability to configure tx_weight from devlink userspace
utility. Make the new attribute optional.

Example commands:
$ devlink port function rate add pci/0000:4b:00.0/node_custom \
  tx_weight 50 parent node_0

$ devlink port function rate set pci/0000:4b:00.0/2 tx_weight 20

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
 devlink/devlink.c | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 479d153e2a5e..536db5c9a009 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -296,6 +296,7 @@ static void ifname_map_free(struct ifname_map *ifname_map)
 #define DL_OPT_LINECARD_TYPE	BIT(53)
 #define DL_OPT_SELFTESTS	BIT(54)
 #define DL_OPT_PORT_FN_RATE_TX_PRIORITY	BIT(55)
+#define DL_OPT_PORT_FN_RATE_TX_WEIGHT	BIT(56)
 
 struct dl_opts {
 	uint64_t present; /* flags of present items */
@@ -355,6 +356,7 @@ struct dl_opts {
 	uint64_t rate_tx_share;
 	uint64_t rate_tx_max;
 	uint32_t rate_tx_priority;
+	uint32_t rate_tx_weight;
 	char *rate_node_name;
 	const char *rate_parent_node;
 	uint32_t linecard_index;
@@ -2057,6 +2059,13 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
 			if (err)
 				return err;
 			o_found |= DL_OPT_PORT_FN_RATE_TX_PRIORITY;
+		} else if (dl_argv_match(dl, "tx_weight") &&
+			   (o_all & DL_OPT_PORT_FN_RATE_TX_WEIGHT)) {
+			dl_arg_inc(dl);
+			err = dl_argv_uint32_t(dl, &opts->rate_tx_weight);
+			if (err)
+				return err;
+			o_found |= DL_OPT_PORT_FN_RATE_TX_WEIGHT;
 		} else if (dl_argv_match(dl, "parent") &&
 			   (o_all & DL_OPT_PORT_FN_RATE_PARENT)) {
 			dl_arg_inc(dl);
@@ -2328,6 +2337,9 @@ static void dl_opts_put(struct nlmsghdr *nlh, struct dl *dl)
 	if (opts->present & DL_OPT_PORT_FN_RATE_TX_PRIORITY)
 		mnl_attr_put_u32(nlh, DEVLINK_ATTR_RATE_TX_PRIORITY,
 				 opts->rate_tx_priority);
+	if (opts->present & DL_OPT_PORT_FN_RATE_TX_WEIGHT)
+		mnl_attr_put_u32(nlh, DEVLINK_ATTR_RATE_TX_WEIGHT,
+				 opts->rate_tx_weight);
 	if (opts->present & DL_OPT_PORT_FN_RATE_TX_MAX)
 		mnl_attr_put_u64(nlh, DEVLINK_ATTR_RATE_TX_MAX,
 				 opts->rate_tx_max);
@@ -4955,6 +4967,13 @@ static void pr_out_port_fn_rate(struct dl *dl, struct nlattr **tb)
 			print_uint(PRINT_ANY, "tx_priority",
 				   " tx_priority %u", priority);
 	}
+	if (tb[DEVLINK_ATTR_RATE_TX_WEIGHT]) {
+		uint32_t weight =
+			mnl_attr_get_u32(tb[DEVLINK_ATTR_RATE_TX_WEIGHT]);
+		if (weight)
+			print_uint(PRINT_ANY, "tx_weight",
+				   " tx_weight %u", weight);
+	}
 	if (tb[DEVLINK_ATTR_RATE_PARENT_NODE_NAME]) {
 		const char *parent =
 			mnl_attr_get_str(tb[DEVLINK_ATTR_RATE_PARENT_NODE_NAME]);
@@ -4986,12 +5005,12 @@ static void cmd_port_fn_rate_help(void)
 	pr_err("Usage: devlink port function rate help\n");
 	pr_err("       devlink port function rate show [ DEV/{ PORT_INDEX | NODE_NAME } ]\n");
 	pr_err("       devlink port function rate add DEV/NODE_NAME\n");
-	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ { parent NODE_NAME | noparent } ]\n");
+	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ tx_weight N ][ { parent NODE_NAME | noparent } ]\n");
 	pr_err("       devlink port function rate del DEV/NODE_NAME\n");
 	pr_err("       devlink port function rate set DEV/{ PORT_INDEX | NODE_NAME }\n");
-	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ { parent NODE_NAME | noparent } ]\n\n");
+	pr_err("               [ tx_share VAL ][ tx_max VAL ][ tx_priority N ][ tx_weight N ][ { parent NODE_NAME | noparent } ]\n\n");
 	pr_err("       VAL - float or integer value in units of bits or bytes per second (bit|bps)\n");
-	pr_err("       N - integer representing priority of the node among siblings\n");
+	pr_err("       N - integer representing priority/weight of the node among siblings\n");
 	pr_err("       and SI (k-, m-, g-, t-) or IEC (ki-, mi-, gi-, ti-) case-insensitive prefix.\n");
 	pr_err("       Bare number, means bits per second, is possible.\n\n");
 	pr_err("       For details refer to devlink-rate(8) man page.\n");
@@ -5051,7 +5070,8 @@ static int cmd_port_fn_rate_add(struct dl *dl)
 
 	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_PRIORITY);
+			    DL_OPT_PORT_FN_RATE_TX_PRIORITY |
+			    DL_OPT_PORT_FN_RATE_TX_WEIGHT);
 	if (err)
 		return err;
 
@@ -5108,6 +5128,9 @@ static int port_fn_get_rates_cb(const struct nlmsghdr *nlh, void *data)
 	if (tb[DEVLINK_ATTR_RATE_TX_PRIORITY])
 		opts->rate_tx_priority =
 			mnl_attr_get_u32(tb[DEVLINK_ATTR_RATE_TX_PRIORITY]);
+	if (tb[DEVLINK_ATTR_RATE_TX_WEIGHT])
+		opts->rate_tx_weight =
+			mnl_attr_get_u32(tb[DEVLINK_ATTR_RATE_TX_WEIGHT]);
 	return MNL_CB_OK;
 }
 
@@ -5122,6 +5145,7 @@ static int cmd_port_fn_rate_set(struct dl *dl)
 				DL_OPT_PORT_FN_RATE_TX_SHARE |
 				DL_OPT_PORT_FN_RATE_TX_MAX |
 				DL_OPT_PORT_FN_RATE_TX_PRIORITY |
+				DL_OPT_PORT_FN_RATE_TX_WEIGHT |
 				DL_OPT_PORT_FN_RATE_PARENT);
 	if (err)
 		return err;
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2-next v2 4/4] devlink: Add documentation for tx_prority and tx_weight
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
                   ` (2 preceding siblings ...)
  2022-12-01 10:26 ` [PATCH iproute2-next v2 3/4] devlink: Introduce new attribute 'tx_weight' " Michal Wilczynski
@ 2022-12-01 10:26 ` Michal Wilczynski
  2022-12-01 16:53 ` [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Jakub Kicinski
  2022-12-03 17:50 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 9+ messages in thread
From: Michal Wilczynski @ 2022-12-01 10:26 UTC (permalink / raw)
  To: netdev
  Cc: alexandr.lobakin, przemyslaw.kitszel, jiri, wojciech.drewek,
	dsahern, stephen, Michal Wilczynski

New netlink attributes tx_priority and tx_weight were added.
Update the man page for devlink-rate to account for new attributes.

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
 man/man8/devlink-rate.8 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/man/man8/devlink-rate.8 b/man/man8/devlink-rate.8
index cc2f50c38619..bcec3c31673a 100644
--- a/man/man8/devlink-rate.8
+++ b/man/man8/devlink-rate.8
@@ -26,12 +26,16 @@ devlink-rate \- devlink rate management
 .RI "{ " DEV/PORT_INDEX " | " DEV/NODE_NAME " } "
 .RB [ " tx_share \fIVALUE " ]
 .RB [ " tx_max \fIVALUE " ]
+.RB [ " tx_priority \fIN " ]
+.RB [ " tx_weight \fIN " ]
 .RB "[ {" " parent \fINODE_NAME " | " noparent " "} ]"
 
 .ti -8
 .BI "devlink port function rate add " DEV/NODE_NAME
 .RB [ " tx_share \fIVALUE " ]
 .RB [ " tx_max \fIVALUE " ]
+.RB [ " tx_priority \fIN " ]
+.RB [ " tx_weight \fIN " ]
 .RB "[ {" " parent \fINODE_NAME " | " noparent " "} ]"
 
 .ti -8
@@ -83,6 +87,20 @@ rate group.
 .PP
 .BI tx_max " VALUE"
 - specifies maximum tx rate value.
+.PP
+.BI tx_priority " N"
+- allows for usage of strict priority arbiter among siblings. This arbitration
+scheme attempts to schedule nodes based on their priority as long as the nodes
+remain within their bandwidth limit. The higher the priority the higher the
+probability that the node will get selected for scheduling.
+.PP
+.BI tx_weight " N"
+- allows for usage of Weighted Fair Queuing arbitration scheme among siblings.
+This arbitration scheme can be used simultaneously with the strict priority.
+As a node is configured with a higher rate it gets more BW relative to it's
+siblings. Values are relative like a percentage points, they basically tell
+how much BW should node take relative to it's siblings.
+.PP
 .TP 8
 .I VALUE
 These parameter accept a floating point number, possibly followed by either a
@@ -123,6 +141,10 @@ To specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with IEC prefix
 (ki-, mi-, gi- and ti-) respectively. Input is case-insensitive.
 .RE
 .PP
+.TP 8
+.I N
+These parameter accept integer meaning weight or priority of a node.
+.PP
 .BI parent " NODE_NAME \fR| " noparent
 - set rate object parent to existing node with name \fINODE_NAME\fR or unset
 parent. Rate limits of the parent node applied to all it's children. Actual
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
                   ` (3 preceding siblings ...)
  2022-12-01 10:26 ` [PATCH iproute2-next v2 4/4] devlink: Add documentation for tx_prority and tx_weight Michal Wilczynski
@ 2022-12-01 16:53 ` Jakub Kicinski
  2022-12-05  8:41   ` Wilczynski, Michal
  2022-12-03 17:50 ` patchwork-bot+netdevbpf
  5 siblings, 1 reply; 9+ messages in thread
From: Jakub Kicinski @ 2022-12-01 16:53 UTC (permalink / raw)
  To: Michal Wilczynski
  Cc: netdev, alexandr.lobakin, przemyslaw.kitszel, jiri,
	wojciech.drewek, dsahern, stephen

On Thu,  1 Dec 2022 11:26:22 +0100 Michal Wilczynski wrote:
> Patch implementing new netlink attributes for devlink-rate got merged to
> net-next.
> https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/
> 
> Now there is a need to support these new attributes in the userspace
> tool. Implement tx_priority and tx_weight in devlink userspace tool. Update
> documentation.

I forgot to ask you - is there anything worth adding to the netdevsim
rate selftests to make sure devlink refactoring doesn't break your use
case? Probably the ability for the driver to create and destroy the
hierarchy?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2
  2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
                   ` (4 preceding siblings ...)
  2022-12-01 16:53 ` [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Jakub Kicinski
@ 2022-12-03 17:50 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-03 17:50 UTC (permalink / raw)
  To: Michal Wilczynski
  Cc: netdev, alexandr.lobakin, przemyslaw.kitszel, jiri,
	wojciech.drewek, dsahern, stephen

Hello:

This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Thu,  1 Dec 2022 11:26:22 +0100 you wrote:
> Patch implementing new netlink attributes for devlink-rate got merged to
> net-next.
> https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/
> 
> Now there is a need to support these new attributes in the userspace
> tool. Implement tx_priority and tx_weight in devlink userspace tool. Update
> documentation.
> 
> [...]

Here is the summary with links:
  - [iproute2-next,v2,1/4] devlink: Add uapi changes for tx_priority and tx_weight
    (no matching commit)
  - [iproute2-next,v2,2/4] devlink: Introduce new attribute 'tx_priority' to devlink-rate
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=a6b9cd50e69a
  - [iproute2-next,v2,3/4] devlink: Introduce new attribute 'tx_weight' to devlink-rate
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=0f71480932f1
  - [iproute2-next,v2,4/4] devlink: Add documentation for tx_prority and tx_weight
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=2e2b53467172

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2
  2022-12-01 16:53 ` [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Jakub Kicinski
@ 2022-12-05  8:41   ` Wilczynski, Michal
  2022-12-06  0:24     ` Jakub Kicinski
  0 siblings, 1 reply; 9+ messages in thread
From: Wilczynski, Michal @ 2022-12-05  8:41 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, alexandr.lobakin, przemyslaw.kitszel, jiri,
	wojciech.drewek, dsahern, stephen



On 12/1/2022 5:53 PM, Jakub Kicinski wrote:
> On Thu,  1 Dec 2022 11:26:22 +0100 Michal Wilczynski wrote:
>> Patch implementing new netlink attributes for devlink-rate got merged to
>> net-next.
>> https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/
>>
>> Now there is a need to support these new attributes in the userspace
>> tool. Implement tx_priority and tx_weight in devlink userspace tool. Update
>> documentation.
> I forgot to ask you - is there anything worth adding to the netdevsim
> rate selftests to make sure devlink refactoring doesn't break your use
> case? Probably the ability for the driver to create and destroy the
> hierarchy?

Hi,
I think it's a great idea, possibility to export the hierarchy from the driver
is key for our use case. Would you like me to add this to netdevism ?

Thanks,
Michał



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2
  2022-12-05  8:41   ` Wilczynski, Michal
@ 2022-12-06  0:24     ` Jakub Kicinski
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2022-12-06  0:24 UTC (permalink / raw)
  To: Wilczynski, Michal
  Cc: netdev, alexandr.lobakin, przemyslaw.kitszel, jiri,
	wojciech.drewek, dsahern, stephen

On Mon, 5 Dec 2022 09:41:26 +0100 Wilczynski, Michal wrote:
> On 12/1/2022 5:53 PM, Jakub Kicinski wrote:
> > On Thu,  1 Dec 2022 11:26:22 +0100 Michal Wilczynski wrote:  
> >> Patch implementing new netlink attributes for devlink-rate got merged to
> >> net-next.
> >> https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/
> >>
> >> Now there is a need to support these new attributes in the userspace
> >> tool. Implement tx_priority and tx_weight in devlink userspace tool. Update
> >> documentation.  
> > I forgot to ask you - is there anything worth adding to the netdevsim
> > rate selftests to make sure devlink refactoring doesn't break your use
> > case? Probably the ability for the driver to create and destroy the
> > hierarchy?  
> 
> I think it's a great idea, possibility to export the hierarchy from the driver
> is key for our use case. Would you like me to add this to netdevism ?

Great! Yes, netdevsim and a script that exercises it. There are some
rate tests already in

 tools/testing/selftests/drivers/net/netdevsim/devlink.sh

Either just extend that or factor it out to its own script, if the rate
testing gets big. You don't have to be too "unit-testy" it's mostly
about exercising the functionality so that we can catch refactoring
errors.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-06  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 10:26 [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Michal Wilczynski
2022-12-01 10:26 ` [PATCH iproute2-next v2 1/4] devlink: Add uapi changes for tx_priority and tx_weight Michal Wilczynski
2022-12-01 10:26 ` [PATCH iproute2-next v2 2/4] devlink: Introduce new attribute 'tx_priority' to devlink-rate Michal Wilczynski
2022-12-01 10:26 ` [PATCH iproute2-next v2 3/4] devlink: Introduce new attribute 'tx_weight' " Michal Wilczynski
2022-12-01 10:26 ` [PATCH iproute2-next v2 4/4] devlink: Add documentation for tx_prority and tx_weight Michal Wilczynski
2022-12-01 16:53 ` [PATCH iproute2-next v2 0/4] Implement new netlink attributes for devlink-rate in iproute2 Jakub Kicinski
2022-12-05  8:41   ` Wilczynski, Michal
2022-12-06  0:24     ` Jakub Kicinski
2022-12-03 17:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.