From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, stephen@networkplumber.org,
pabeni@redhat.com, kuba@kernel.org, ernis@linux.microsoft.com,
mohsin.bashr@gmail.com, alexanderduyck@gmail.com,
Claude Assistant <noreply@anthropic.com>
Subject: [PATCH iproute2-next v3 6/6] netshaper: Update man page for new parameters and group command
Date: Mon, 11 May 2026 11:39:15 -0700 [thread overview]
Message-ID: <20260511183915.797792-7-mohsin.bashr@gmail.com> (raw)
In-Reply-To: <20260511183915.797792-1-mohsin.bashr@gmail.com>
From: Mohsin Bashir <hmohsin@meta.com>
Document bw-min, weight, and the group command in the netshaper
man page. Node id is required for set/show/delete but optional
for the group command. Leaves are documented as queue-only.
Reviewed-by: Claude Assistant <noreply@anthropic.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <hmohsin@meta.com>
---
man/man8/netshaper.8 | 140 ++++++++++++++++++++++++++++++++++++-------
1 file changed, 119 insertions(+), 21 deletions(-)
diff --git a/man/man8/netshaper.8 b/man/man8/netshaper.8
index f5fe36cc..ed4f77fc 100644
--- a/man/man8/netshaper.8
+++ b/man/man8/netshaper.8
@@ -25,8 +25,12 @@ netshaper \- show / manipulate network device hardware shaping configuration
.IR HANDLE_SCOPE
.RI "[ " id
.IR HANDLE_ID " ]"
-.B bw-max
-.IR BW_MAX
+.RI "[ " bw-min
+.IR BW_MIN " ]"
+.RI "[ " bw-max
+.IR BW_MAX " ]"
+.RI "[ " weight
+.IR WEIGHT " ]"
.ti -8
.B "netshaper" " { " show " | " delete " }"
@@ -37,6 +41,27 @@ netshaper \- show / manipulate network device hardware shaping configuration
.RI "[ " id
.IR HANDLE_ID " ]"
+.ti -8
+.B "netshaper group"
+.B dev
+.IR DEV
+.B handle scope
+.IR HANDLE_SCOPE
+.RI "[ " id
+.IR HANDLE_ID " ]"
+.B parent scope
+.IR PARENT_SCOPE
+.RI "[ " id
+.IR PARENT_ID " ]"
+.RI "[ " bw-min
+.IR BW_MIN " ]"
+.RI "[ " bw-max
+.IR BW_MAX " ]"
+.RI "[ " weight
+.IR WEIGHT " ]"
+.B leaves
+.BI "{ scope " SCOPE " id " ID " } [ ... ]"
+
.SH DESCRIPTION
.B netshaper
allows configuration and management of hardware rate limiting (shaping) capabilities
@@ -69,7 +94,11 @@ parameter is required and specifies the queue number.
Shapers representing scheduling groups that can be placed at arbitrary
locations in the scheduling tree. The
.I id
-parameter is required.
+parameter is required for
+.BR set ", " show ", and " delete
+commands. For the
+.B group
+command it is optional; if omitted, the kernel auto-assigns one.
.SH COMMANDS
@@ -77,16 +106,18 @@ parameter is required.
.B netshaper set
- Create or update a shaper configuration
-Creates or updates a shaper with the specified parameters. The
+Creates or updates a shaper with the specified parameters. At least one of
+.BR bw-min ", " bw-max ", or " weight
+must be provided. The
.I id
-parameter is optional for netdev scope but required for all other scopes.
+parameter is required for queue and node scopes and optional for netdev scope.
.SS
.B netshaper show
- Display shaper information
Shows the current configuration of the specified shaper, including bandwidth
-limits and device information.
+limits, weight, and parent information.
.SS
.B netshaper delete
@@ -94,6 +125,15 @@ limits and device information.
Removes the specified shaper configuration from the device.
+.SS
+.B netshaper group
+- Create a scheduling hierarchy
+
+Creates a scheduling group by binding one or more leaf shapers to a parent
+node in a single operation. The command specifies the group node's handle,
+its parent, optional bandwidth and weight parameters, and the set of leaf
+shapers to attach.
+
.SH PARAMETERS
.TP
@@ -115,21 +155,51 @@ or
.TP
.BI id " HANDLE_ID"
-Numeric identifier for the shaper. Optional for
-.B netdev
-scope (defaults to 0), required for
+Numeric identifier for the shaper. Required for
.B queue
and
.B node
-scopes.
+scopes. Optional for
+.B netdev
+scope (defaults to 0). For the
+.B group
+command, node
+.I id
+may be omitted to let the kernel auto-assign one.
.RE
.TP
-.BI bw-max " BW_MAX"
-Maximum bandwidth limit for the shaper. Accepts values with suffixes:
+.BI bw-min " BW_MIN"
+Minimum guaranteed bandwidth for the shaper. Accepts values with suffixes:
.BR kbit ", " mbit ", " gbit
for kilobits, megabits, and gigabits per second respectively.
+.TP
+.BI bw-max " BW_MAX"
+Maximum bandwidth limit for the shaper. Accepts the same suffixes as
+.BR bw-min .
+
+.TP
+.BI weight " WEIGHT"
+Scheduling weight for the shaper, used for weighted fair sharing among
+siblings under the same parent node. Value is an unsigned integer.
+
+.TP
+.B parent
+Defines the parent node for the
+.B group
+command. Uses the same
+.BI scope " / " id
+syntax as
+.BR handle .
+
+.TP
+.B leaves
+Specifies one or more leaf shapers to attach to the group. Each leaf
+is given as
+.BI "scope " SCOPE " id " ID\fR.
+Multiple leaves can be specified in sequence.
+
.SH OPTIONS
.TP
@@ -156,17 +226,27 @@ Display usage information and exit.
.SH EXAMPLES
.TP
-.B Example 1: Create a device-level shaper (ID optional)
+.B Example 1: Create a device-level shaper
.nf
# netshaper set dev foo handle scope netdev bw-max 10gbit
.fi
.RS
-Creates a netdev-scoped shaper with default id 0 and sets the maximum
-bandwidth to 10 gigabits per second.
+Creates a netdev-scoped shaper with maximum bandwidth of 10 Gbit/s.
.RE
.TP
-.B Example 2: Show shaper configuration
+.B Example 2: Set bandwidth and weight on a queue shaper
+.nf
+# netshaper set dev foo handle scope queue id 0 \e
+ bw-min 1gbit bw-max 5gbit weight 10
+.fi
+.RS
+Creates a queue-scoped shaper on queue 0 with minimum/maximum bandwidth
+limits and a scheduling weight.
+.RE
+
+.TP
+.B Example 3: Show shaper configuration
.nf
# netshaper show dev foo handle scope netdev
.fi
@@ -175,9 +255,20 @@ Displays the current shaper configuration for the specified device and handle.
.RE
.TP
-.B Example 3: Delete shaper configuration
+.B Example 4: Create a scheduling hierarchy with group
.nf
-# netshaper delete dev eth0 handle scope netdev
+# netshaper group dev foo handle scope node parent scope netdev \e
+ bw-max 10gbit leaves scope queue id 0 scope queue id 1
+.fi
+.RS
+Creates a node shaper under the netdev parent with a 10 Gbit/s cap,
+grouping queues 0 and 1 as leaves.
+.RE
+
+.TP
+.B Example 5: Delete shaper configuration
+.nf
+# netshaper delete dev foo handle scope netdev
.fi
.RS
Removes the specified shaper configuration.
@@ -197,15 +288,20 @@ and
.B node
scopes, the
.I id
-parameter is required.
+parameter is required. For the
+.B group
+command, node
+.I id
+may be omitted to let the kernel auto-assign one.
.IP \(bu
Bandwidth values support standard suffixes:
.BR kbit " (kilobits per second), "
.BR mbit " (megabits per second), "
.BR gbit " (gigabits per second)."
.IP \(bu
-This command currently supports basic shaper operations. Additional
-functionality will be added as requirements are identified.
+The
+.B group
+command creates a node and attaches leaves in a single atomic operation.
.SH SEE ALSO
.BR ip (8),
@@ -214,3 +310,5 @@ functionality will be added as requirements are identified.
.SH AUTHOR
Erni Sri Satya Vennela <ernis@linux.microsoft.com>
+.br
+Mohsin Bashir <hmohsin@meta.com>
--
2.53.0-Meta
prev parent reply other threads:[~2026-05-11 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 18:39 [PATCH iproute2-next v3 0/6] netshaper: Extend netshaper support Mohsin Bashir
2026-05-11 18:39 ` [PATCH iproute2-next v3 1/6] netshaper: Extract parse_scope() and parse_rate() helpers Mohsin Bashir
2026-05-11 18:39 ` [PATCH iproute2-next v3 2/6] netshaper: Add bw-min and weight parameter support Mohsin Bashir
2026-05-11 18:39 ` [PATCH iproute2-next v3 3/6] netshaper: Extend show output with parent, bw-min and weight Mohsin Bashir
2026-05-11 18:39 ` [PATCH iproute2-next v3 4/6] netshaper: Extract struct shaper_args and parse_shaper_arg() helper Mohsin Bashir
2026-05-11 18:39 ` [PATCH iproute2-next v3 5/6] netshaper: Add group command for creating scheduling hierarchies Mohsin Bashir
2026-05-11 18:39 ` Mohsin Bashir [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260511183915.797792-7-mohsin.bashr@gmail.com \
--to=mohsin.bashr@gmail.com \
--cc=alexanderduyck@gmail.com \
--cc=dsahern@kernel.org \
--cc=ernis@linux.microsoft.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noreply@anthropic.com \
--cc=pabeni@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox