diff --git a/man/nm-settings-nmcli.xsl b/man/nm-settings-nmcli.xsl
index a31922a570..5a6b8ba181 100644
--- a/man/nm-settings-nmcli.xsl
+++ b/man/nm-settings-nmcli.xsl
@@ -150,12 +150,19 @@
Alias:
-
-
-
- See for flag values.
-
-
+
+
+
+
+
+
+
+
+ See for flag values.
+
+
+
+
Format:
diff --git a/src/libnm-core-impl/nm-setting-tc-config.c b/src/libnm-core-impl/nm-setting-tc-config.c
index f44c89cb09..a23371a10b 100644
--- a/src/libnm-core-impl/nm-setting-tc-config.c
+++ b/src/libnm-core-impl/nm-setting-tc-config.c
@@ -1820,6 +1820,282 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass)
* If the #NMSettingTCConfig setting is not present, NetworkManager
* doesn't touch the qdiscs present on the interface.
**/
+ /* ---nmcli---
+ * property: qdiscs
+ * format: GPtrArray(NMTCQdisc)
+ * description-docbook:
+ *
+ * Array of TC queueing disciplines. qdisc is a basic block in the
+ * Linux traffic control subsystem
+ *
+ *
+ * Each qdisc can be specified by the following attributes:
+ *
+ *
+ *
+ * handle HANDLE
+ *
+ *
+ * specifies the qdisc handle. A qdisc, which potentially can have children, gets
+ * assigned a major number, called a 'handle', leaving the minor number namespace
+ * available for classes. The handle is expressed as '10:'. It is customary to
+ * explicitly assign a handle to qdiscs expected to have children.
+ *
+ *
+ *
+ *
+ * parent HANDLE
+ *
+ *
+ * specifies the handle of the parent qdisc the current qdisc must be
+ * attached to.
+ *
+ *
+ *
+ *
+ * root
+ *
+ *
+ * specifies that the qdisc is attached to the root of device.
+ *
+ *
+ *
+ *
+ * KIND
+ *
+ *
+ * this is the qdisc kind. NetworkManager currently supports the
+ * following kinds: fq_codel, sfq, tbf. Each qdisc kind has a
+ * different set of parameters, described below. There are also some
+ * kinds like pfifo, pfifo_fast, prio supported by NetworkManager
+ * but their parameters are not supported by NetworkManager.
+ *
+ *
+ *
+ *
+ *
+ * Parameters for 'fq_codel':
+ *
+ *
+ *
+ * limit U32
+ *
+ *
+ * the hard limit on the real queue size. When this limit is
+ * reached, incoming packets are dropped. Default is 10240 packets.
+ *
+ *
+ *
+ *
+ * memory_limit U32
+ *
+ *
+ * sets a limit on the total number of bytes that can be queued in
+ * this FQ-CoDel instance. The lower of the packet limit of the
+ * limit parameter and the memory limit will be enforced. Default is
+ * 32 MB.
+ *
+ *
+ *
+ *
+ * flows U32
+ *
+ *
+ * the number of flows into which the incoming packets are
+ * classified. Due to the stochastic nature of hashing, multiple
+ * flows may end up being hashed into the same slot. Newer flows
+ * have priority over older ones. This parameter can be set only at
+ * load time since memory has to be allocated for the hash table.
+ * Default value is 1024.
+ *
+ *
+ *
+ *
+ * target U32
+ *
+ *
+ * the acceptable minimum standing/persistent queue delay. This minimum
+ * delay is identified by tracking the local minimum queue delay that packets
+ * experience. The unit of measurement is microsecond(us). Default value is 5ms.
+ *
+ *
+ *
+ *
+ * interval U32
+ *
+ *
+ * used to ensure that the measured minimum delay does not become too stale.
+ * The minimum delay must be experienced in the last epoch of length .B
+ * interval. It should be set on the order of the worst-case RTT
+ * through the bottleneck to give endpoints sufficient time to
+ * react. Default value is 100ms.
+ *
+ *
+ *
+ *
+ * quantum U32
+ *
+ *
+ * the number of bytes used as 'deficit' in the fair queuing
+ * algorithm. Default is set to 1514 bytes which corresponds to the
+ * Ethernet MTU plus the hardware header length of 14 bytes.
+ *
+ *
+ *
+ *
+ * ecn BOOL
+ *
+ *
+ * can be used to mark packets instead of dropping them. ecn is turned
+ * on by default.
+ *
+ *
+ *
+ *
+ * ce_threshold U32
+ *
+ *
+ * sets a threshold above which all packets are marked with ECN
+ * Congestion Experienced. This is useful for DCTCP-style congestion
+ * control algorithms that require marking at very shallow queueing
+ * thresholds.
+ *
+ *
+ *
+ *
+ *
+ * Parameters for 'sfq':
+ *
+ *
+ *
+ * divisor U32
+ *
+ *
+ * can be used to set a different hash table size, available
+ * from kernel 2.6.39 onwards. The specified divisor must be
+ * a power of two and cannot be larger than 65536. Default
+ * value: 1024.
+ *
+ *
+ *
+ *
+ * limit U32
+ *
+ *
+ * Upper limit of the SFQ. Can be used to reduce the default
+ * length of 127 packets.
+ *
+ *
+ *
+ *
+ * depth U32
+ *
+ *
+ * Limit of packets per flow. Default to
+ * 127 and can be lowered.
+ *
+ *
+ *
+ *
+ * perturb_period U32
+ *
+ *
+ * Interval in seconds for queue algorithm perturbation.
+ * Defaults to 0, which means that no perturbation occurs. Do
+ * not set too low for each perturbation may cause some
+ * packet reordering or losses. Advised value: 60 This value
+ * has no effect when external flow classification is used.
+ * Its better to increase divisor value to lower risk of hash
+ * collisions.
+ *
+ *
+ *
+ *
+ * quantum U32
+ *
+ *
+ * Amount of bytes a flow is allowed to dequeue during a
+ * round of the round robin process. Defaults to the MTU of
+ * the interface which is also the advised value and the
+ * minimum value.
+ *
+ *
+ *
+ *
+ * flows U32
+ *
+ *
+ * Default value is 127.
+ *
+ *
+ *
+ *
+ *
+ * Parameters for 'tbf':
+ *
+ *
+ *
+ * rate U64
+ *
+ *
+ * Bandwidth or rate. These parameters accept a floating
+ * point number, possibly followed by either a unit (both SI
+ * and IEC units supported), or a float followed by a percent
+ * character to specify the rate as a percentage of the
+ * device's speed.
+ *
+ *
+ *
+ *
+ * burst U32
+ *
+ *
+ * Also known as buffer or maxburst. Size of the bucket, in
+ * bytes. This is the maximum amount of bytes that tokens can
+ * be available for instantaneously. In general, larger
+ * shaping rates require a larger buffer. For 10mbit/s on
+ * Intel, you need at least 10kbyte buffer if you want to
+ * reach your configured rate!
+ *
+ *
+ * If your buffer is too small, packets may be dropped
+ * because more tokens arrive per timer tick than fit in your
+ * bucket. The minimum buffer size can be calculated by
+ * dividing the rate by HZ.
+ *
+ *
+ * Token usage calculations are performed using a table which
+ * by default has a resolution of 8 packets. This resolution
+ * can be changed by specifying the cell size with the burst.
+ * For example, to specify a 6000 byte buffer with a 16 byte
+ * cell size, set a burst of 6000/16. You will probably never
+ * have to set this. Must be an integral power of 2.
+ *
+ *
+ *
+ *
+ * limit U32
+ *
+ *
+ * Limit is the number of bytes that can be queued waiting
+ * for tokens to become available.
+ *
+ *
+ *
+ *
+ * latency U32
+ *
+ *
+ * specifies the maximum amount of time a packet can
+ * sit in the TBF. The latency calculation takes into account
+ * the size of the bucket, the rate and possibly the peakrate
+ * (if set). The latency and limit are mutually exclusive.
+ *
+ *
+ *
+ *
+ * ---end---
+ **/
/* ---ifcfg-rh---
* property: qdiscs
* variable: QDISC1(+), QDISC2(+), ..., TC_COMMIT(+)
@@ -1854,6 +2130,109 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass)
* If the #NMSettingTCConfig setting is not present, NetworkManager
* doesn't touch the filters present on the interface.
**/
+ /* ---nmcli---
+ * property: tfilters
+ * format: GPtrArray(NMTCTfilter)
+ * description-docbook:
+ *
+ * Array of TC traffic filters. Traffic control can manage the packet content during
+ * classification by using filters.
+ *
+ *
+ * Each tfilters can be specified by the following attributes:
+ *
+ *
+ *
+ * handle HANDLE
+ *
+ *
+ * specifies the tfilters handle. A filter is used by a classful qdisc to determine in which class
+ * a packet will be enqueued. It is important to notice that filters reside within qdiscs. Therefore,
+ * see qdiscs handle for detailed information.
+ *
+ *
+ *
+ *
+ * parent HANDLE
+ *
+ *
+ * specifies the handle of the parent qdisc the current qdisc must be
+ * attached to.
+ *
+ *
+ *
+ *
+ * root
+ *
+ *
+ * specifies that the qdisc is attached to the root of device.
+ *
+ *
+ *
+ *
+ * KIND
+ *
+ *
+ * this is the tfilters kind. NetworkManager currently supports
+ * following kinds: mirred, simple. Each filter kind has a
+ * different set of actions, described below. There are also some
+ * other kinds like matchall, basic, u32 supported by NetworkManager.
+ *
+ *
+ *
+ *
+ *
+ * Actions for 'mirred':
+ *
+ *
+ *
+ * egress bool
+ *
+ *
+ * Define whether the packet should exit from the interface.
+ *
+ *
+ *
+ *
+ * ingress bool
+ *
+ *
+ * Define whether the packet should come into the interface.
+ *
+ *
+ *
+ *
+ * mirror bool
+ *
+ *
+ * Define whether the packet should be copied to the destination space.
+ *
+ *
+ *
+ *
+ * redirect bool
+ *
+ *
+ * Define whether the packet should be moved to the destination space.
+ *
+ *
+ *
+ *
+ *
+ * Action for 'simple':
+ *
+ *
+ *
+ * sdata char[32]
+ *
+ *
+ * The actual string to print.
+ *
+ *
+ *
+ *
+ * ---end---
+ **/
/* ---ifcfg-rh---
* property: qdiscs
* variable: FILTER1(+), FILTER2(+), ..., TC_COMMIT(+)
diff --git a/tools/generate-docs-nm-property-infos.py b/tools/generate-docs-nm-property-infos.py
index 238469c66c..74e88d6ad1 100755
--- a/tools/generate-docs-nm-property-infos.py
+++ b/tools/generate-docs-nm-property-infos.py
@@ -66,6 +66,7 @@ def process_data(data):
"default",
"example",
"description",
+ "description-docbook",
]
kwd_pat = "|".join(keywords)
keyword = ""
@@ -76,14 +77,20 @@ def process_data(data):
kwd_more_line_found = re.search(r"^\s*\**\s+(.*?)\s*$", line)
if kwd_first_line_found:
keyword = kwd_first_line_found.group(1)
- value = kwd_first_line_found.group(2) + " "
+ if keyword == "description-docbook":
+ value = kwd_first_line_found.group(2) + "\n"
+ else:
+ value = kwd_first_line_found.group(2) + " "
parsed_data[keyword] = value
elif kwd_more_line_found:
if not keyword:
print("Extra mess in a comment: %s" % (line))
exit(1)
else:
- value = kwd_more_line_found.group(1) + " "
+ if keyword == "description-docbook":
+ value = kwd_more_line_found.group(1) + "\n"
+ else:
+ value = kwd_more_line_found.group(1) + " "
parsed_data[keyword] += value
for keyword in keywords:
if keyword == "variable" and keyword not in parsed_data:
@@ -104,6 +111,13 @@ def write_data(setting_node, parsed_data):
property_node.set("default", parsed_data["default"])
property_node.set("example", parsed_data["example"])
property_node.set("description", parsed_data["description"])
+ if parsed_data["description-docbook"]:
+ des = ET.fromstring(
+ ""
+ + parsed_data["description-docbook"]
+ + ""
+ )
+ property_node.append(des)
def pretty_xml(element, newline, level=0):
diff --git a/tools/generate-docs-nm-settings-docs-merge.py b/tools/generate-docs-nm-settings-docs-merge.py
index 33c8eff0df..0f0f181bdb 100755
--- a/tools/generate-docs-nm-settings-docs-merge.py
+++ b/tools/generate-docs-nm-settings-docs-merge.py
@@ -111,6 +111,13 @@ def node_set_attr(dst_node, name, nodes):
dst_node.set(name, x)
+def find_first_not_none(itr):
+ for i in itr:
+ if i is not None:
+ return i
+ return None
+
+
###############################################################################
gl_only_from_first = False
@@ -173,6 +180,11 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
dbg("> > > > property_name: %s" % (property_name))
properties_attrs = list([p.get(property_name) for p in properties])
+ description_docbook = find_first_not_none(
+ p_attr.find("description-docbook")
+ for p_attr in properties_attrs
+ if p_attr is not None
+ )
if gl_only_from_first and properties_attrs[0] is None:
dbg("> > > > skip (only-from-first")
@@ -193,5 +205,8 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
node_set_attr(property_node, "default", properties_attrs)
node_set_attr(property_node, "description", properties_attrs)
node_set_attr(property_node, "alias", properties_attrs)
+ if description_docbook is not None:
+ property_node.insert(0, description_docbook)
+
ET.ElementTree(root_node).write(gl_output_xml_file)