tools: add congestion marking parameters to nfdc face create
refs #4465
Change-Id: I5df5d6136f4729ad836a72f55531208d868da5f7
diff --git a/docs/_static/nfd-status.xsd b/docs/_static/nfd-status.xsd
index a34b2f2..2ad1eeb 100644
--- a/docs/_static/nfd-status.xsd
+++ b/docs/_static/nfd-status.xsd
@@ -4,6 +4,12 @@
targetNamespace="ndn:/localhost/nfd/status/1" xmlns:nfd="ndn:/localhost/nfd/status/1"
elementFormDefault="qualified">
+<xs:simpleType name="emptyType">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="0"/>
+ </xs:restriction>
+</xs:simpleType>
+
<xs:complexType name="unidirectionalPacketCountersType">
<xs:sequence>
<xs:element type="xs:nonNegativeInteger" name="nInterests"/>
@@ -53,6 +59,21 @@
</xs:sequence>
</xs:complexType>
+<xs:complexType name="congestionParamsType">
+ <xs:sequence>
+ <xs:element type="xs:duration" name="baseMarkingInterval" minOccurs="0"/>
+ <xs:element type="xs:nonNegativeInteger" name="defaultThreshold" minOccurs="0"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="faceFlagsType">
+ <xs:sequence>
+ <xs:element type="nfd:emptyType" name="localFieldsEnabled" minOccurs="0"/>
+ <xs:element type="nfd:emptyType" name="lpReliabilityEnabled" minOccurs="0"/>
+ <xs:element type="nfd:emptyType" name="congestionMarkingEnabled" minOccurs="0"/>
+ </xs:sequence>
+</xs:complexType>
+
<xs:complexType name="faceType">
<xs:sequence>
<xs:element type="xs:nonNegativeInteger" name="faceId"/>
@@ -62,6 +83,8 @@
<xs:element type="xs:string" name="faceScope"/>
<xs:element type="xs:string" name="facePersistency"/>
<xs:element type="xs:string" name="linkType"/>
+ <xs:element type="nfd:congestionParamsType" name="congestion"/>
+ <xs:element type="nfd:faceFlagsType" name="flags"/>
<xs:element type="nfd:bidirectionalPacketCountersType" name="packetCounters"/>
<xs:element type="nfd:bidirectionalByteCountersType" name="byteCounters"/>
</xs:sequence>
diff --git a/docs/manpages/nfdc-face.rst b/docs/manpages/nfdc-face.rst
index 6fd8779..f31a24f 100644
--- a/docs/manpages/nfdc-face.rst
+++ b/docs/manpages/nfdc-face.rst
@@ -5,7 +5,7 @@
--------
| nfdc face [list [[remote] <FACEURI>] [local <FACEURI>] [scheme <SCHEME>]]
| nfdc face show [id] <FACEID>
-| nfdc face create [remote] <FACEURI> [[persistency] <PERSISTENCY>] [local <FACEURI>] [reliability on|off]
+| nfdc face create [remote] <FACEURI> [[persistency] <PERSISTENCY>] [local <FACEURI>] [reliability on|off] [congestion-marking on|off] [congestion-marking-interval <MARKING-INTERVAL>] [default-congestion-threshold <CONGESTION-THRESHOLD>]
| nfdc face destroy [face] <FACEID|FACEURI>
| nfdc channel [list]
@@ -27,6 +27,12 @@
The NDNLPv2 unicast reliability feature may be explicitly enabled by specifying **reliability on**
or explicitly disabled by specifying **reliability off**.
If enabled, this feature must also be enabled on the other endpoint to function properly.
+Reliability is disabled by default.
+The send queue congestion detection and signaling feature may be explicitly enabled by specifying
+**congestion-marking on** or explicitly disabled by specifying **congestion-marking off**.
+Congestion marking is disabled by default.
+Parameters for this feature can set with the **congestion-marking-interval** option (specified in
+milliseconds) and the **default-congestion-threshold** option (specified in bytes).
The **nfdc face destroy** command destroys an existing face.
@@ -69,6 +75,14 @@
A "persistent" face (the default) is closed when a socket error occurs.
A "permanent" face survives socket errors, and is closed only with a **nfdc destroy** command.
+<MARKING-INTERVAL>
+ The initial marking interval (in milliseconds) during an incident of congestion.
+
+<CONGESTION-THRESHOLD>
+ This value serves two purposes:
+ It is the maximum bound of the congestion threshold for the face, as well as the default
+ threshold used if the face does not support retrieving the capacity of the send queue.
+
EXIT CODES
----------
0: Success
@@ -103,6 +117,10 @@
nfdc face create remote udp://router.example.net reliability on
Create a face with the specified remote FaceUri and enable NDNLP reliability.
+nfdc face create remote udp://router.example.net congestion-marking on congestion-marking-interval 100 default-congestion-threshold 65536
+ Create a face with the specified remote FaceUri and enable congestion marking. Set the base
+ congestion marking interval to 100 ms and the default congestion threshold to 65536 bytes.
+
nfdc face destroy 300
Destroy the face whose FaceId is 300.