23e270d021477793f2768de48c88a992ae4a5a3b
[packetcable.git] / packetcable-model / src / main / yang / packetcable-traffic-profile.yang
1 module packetcable-traffic-profile
2 {
3     namespace "urn:opendaylight:flow:traffic-profile";
4     prefix traffic;
5
6     organization "OpenDaylight Project";
7     contact "TBD";
8
9     description
10          "This module contains a collection of groupings and
11          data definition statements related to the configuration
12          of Traffic Profiles.";
13
14     revision "2014-08-08" {
15         description "Initial revision of packetcable traffic profile";
16     }        
17     
18
19
20     typedef tp-reference {
21     type instance-identifier;
22     }
23
24
25     typedef float {
26        type binary {
27          length "0..4";
28        }
29     description
30     "32-bit IEEE floating point number" ;
31     }
32
33     typedef traffic-profile-type {
34         description
35             "
36         There are four different ways to express a traffic profile. The traffic profile can be expressed via a FlowSpec, a DOCSIS Service Class Name, DOCSIS-specific parameters or Upstream Drop. The four methods are distinguished via a different S-Type value in the Traffic Profile (S-Num = 7) object. S-Type of 1 indicates the object contains a traffic profile specified in RSVP FlowSpec format. S-Type of 2 indicates the object contains a traffic profile specified in DOCSIS Service Class Name format. S-Type of 3 - 8 indicates the object contains a traffic profile that is specified via DOCSIS-specific parameters. S-Type of 9 indicates the object contains a traffic profile specified in an Upstream Drop format.
37
38         All Traffic Profiles utilize 'replace' semantics, meaning that the envelopes present in this Traffic Profile replace all existing envelopes associated with the Gate and corresponding Service Flow. Thus, all traffic parameters associated with a given Gate MUST be included in every message that includes a Traffic Profile. The traffic profile format (RSVP FlowSpec, DOCSIS Service Class Name, DOCSIS-specific parameters, Upstream Drop) for a specific envelope MUST remain constant and unchanged throughout the life of the gate.
39
40         All Traffic Profiles share a common field known as the Envelope Field. This field is a bit field that signals the envelope types (i.e., Authorized, Reserved, and Committed) that are present in the object. A value of 1 in a given bit field indicates that the envelope type is present in the Traffic Profile.
41
42     • Bit 0: Authorized Envelope
43
44     • Bit 1: Reserved Envelope
45
46     • Bit 2: Committed Envelope
47
48         Thus a bit pattern of 001 (or 0x01) indicates the presence of only the Authorized Envelope, while a value of 111 (or 0x7) indicates the presence of all three envelopes. Only the following values are legal: 001, 011 and 111; the Envelope Field MUST be set to one of these three legal values. Further limitations on the value of the Envelope Field may be a function of the current state of the Gate. Refer to Section 6.2 for more information.
49
50         For the Traffic Profile formats that allow multiple sets of envelope parameters, the mapping of envelope parameter sets follows one of the following methods:
51
52         • If all of the envelope types that are indicated in the envelope field share a common set of envelope parameters, then the PDP SHOULD ensure that exactly one set of envelope parameters are present in the traffic profile. This allows for the most efficient transmission and processing of the Traffic Profile throughout the system.
53
54         • Otherwise, the PDP MUST ensure that exactly one set of envelope parameters is included for each of the envelope types that are indicated in the envelope field. The proper order of the envelope parameter sets is shown in the appropriate message diagram in Sections 6.4.2.1 and 6.4.2.3 thru 6.4.2.7.8.
55
56         While all Traffic Profiles end up providing QoS on the access network, it is important to note several subtle differences between the signaling mechanisms. As noted previously, the conversion of a FlowSpec (S-Type 1) to DOCSIS parameters by the CMTS is generally less efficient than specifying the DOCSIS parameters themselves. That said, specifying DOCSIS parameters explicitly (S-Types 3-7) is not a panacea either, the QoS MIB only logs QoS information about named Service Flows in its ServiceFlowLogTable. Thus, only flows created via S-Type 2 will have logged QoS information in this table. For some this may not be a major issue, but for debugging and just general operational tracking this subtlety should be taken into account by operators and Application Manager vendors evaluating the Traffic Profile signaling alternatives provided by this specification.
57     ";
58
59     type enumeration {
60         enum flowspec { value 0; }
61         enum docsis-service-class-name { value 1; }
62         enum docsis-specific-parameterization { value 2; }
63         enum upstream-drop { value 3; }
64
65         enum best-effort { value 4; }
66         enum unsolicited-grant-service { value 5; }
67         enum unsolicited-grant-service-with-activity-detection { value 6; }
68         enum non-real-time-polling-service { value 7; }
69         enum real-time-polling-service { value 8; }
70         enum downstream-service { value 9; }
71     }
72
73     }
74
75     grouping flowspec-envelope {
76     description "
77 The values r, b, p, m, M, R, and s are defined and described 
78
79 TSpec Parameters:
80 • Bucket Depth (b), bytes
81 • Bucket Rate (r), bytes/second
82 • Maximum Datagram Size (M), bytes
83 • Minimum Policed Unit (m), bytes
84 • Peak Rate (p), bytes/second RSpec Parameters:
85 • Reserved Rate (R), bytes/second
86 • Slack Term (S), microseconds
87 The parameter mapping, roughly approximated, involves the following associations for DOCSIS upstream BE (Best-Effort) and downstream Controlled Load Service Flows. The actual mapping procedure would involve normalizing these parameters to account for Layer 2 and Layer 3 header considerations.
88 • TSpec Bucket Depth (b) ~= DOCSIS Maximum Traffic Burst
89 • TSpec Maximum Datagram Size (M) ~= <not required by DOCSIS >
90 • TSpec Minimum Policed Unit (m) ~= DOCSIS Assumed Minimum Reserved Rate Packet Size
91 • TSpec Bucket Rate (r) ~= DOCSIS Minimum Reserved Rate
92 • TSpec Peak Rate (p) ~= DOCSIS Maximum Sustained Rate and, for DOCSIS 3.0 only, DOCSIS Downstream Peak Traffic Rate
93 For downstream Guaranteed service flows, the RSpec parameters are added to provide latency and reservation guarantees.
94 • TSpec Bucket Depth (b) ~= DOCSIS Maximum Traffic Burst
95 • TSpec Maximum Datagram Size (M) ~= <not required by DOCSIS >
96 • TSpec Minimum Policed Unit (m) ~= DOCSIS Assumed Minimum Reserved Rate Packet Size
97 • TSpec Bucket Rate (r) ~= DOCSIS Minimum Reserved Rate and DOCSIS Maximum Sustained Rate
98 • TSpec Peak Rate (p) ~= For DOCSIS 3.0 only, DOCSIS Downstream Peak Traffic Rate
99 • RSpec Reserved Rate (R) ~= <not required by DOCSIS>
100 • RSpec Slack Term ~= DOCSIS Downstream Latency
101 The parameter mapping, roughly approximated, involves the following associations for DOCSIS UGS Service Flows.
102 • TSpec Bucket Depth (b) = TSpec Maximum Datagram Size (M) = TSpec Minimum Policed Unit (m) ~= DOCSIS Unsolicited Grant Size
103 • TSpec Bucket Rate (r) = TSpec Peak Rate (p) = RSpec Reserved Rate (R) ~= used to calculate Nominal Grant Interval
104 • RSpec Slack Term ~= DOCSIS Tolerated Grant Jitter
105 Similarly, the following associations apply for DOCSIS Real-Time Polling Service Flows.
106 • TSpec Bucket Depth (b) ~= DOCSIS Maximum Traffic Burst
107 • TSpec Maximum Datagram Size (M) ~= <not required by DOCSIS >
108 • TSpec Bucket Rate (r) ~= DOCSIS Maximum Sustained Rate and DOCSIS Minimum Reserved Traffic Rate
109 • RSpec Reserved Rate (R) ~= used to calculate the Polling Interval
110 • RSpec Slack Term ~= Tolerated Polling Jitter
111
112 Token Bucket Rate [r] (encoded as IEEE floating point) 
113 0x461C4000 (10,000 Bps) 
114 Token Bucket Size [b] (encoded as IEEE floating point) 
115 0x43480000 (200 bytes) 
116 Peak Data Rate [p] (encoded as IEEE floating point) 
117 0x461C4000 (10,000 Bps) 
118 Minimum Policed Unit [m] 
119 0x000000C8 (200 bytes) 
120 Maximum Packet Size [M] 
121 0x000000C8 (200 bytes) 
122 Rate [R] (encoded as IEEE floating point) 
123 0x461C4000 (10,000 Bps) 
124 Slack Term [S] 
125 0x00000320 (800 μs) 
126     ";
127
128
129     leaf token-bucket-rate {
130         type float;
131         description "[r] (IEEE floating point number 
132         
133         default 10000.0;
134         ";
135     }
136     leaf token-bucket-size {
137         type float;
138         description "[p] IEEE floating point number";
139         default 200;
140     }
141     leaf peak-data-rate {
142         type float;
143         description "[m] IEEE floating point number
144
145         default 10000.0;
146
147         ";
148     }
149     leaf minimum-policed-unit {
150         type uint32;
151         description "[m] (integer)";
152         default 200;
153     }
154
155     leaf maximum-packet-size {
156         type uint32;
157         description "[M] (integer)";
158         default 200;
159     }
160     leaf rate {
161         type uint32;
162         description "[R] (IEEE floating point number)";
163         default 10000;
164     }
165     leaf slack-term {
166         type uint32;
167         description "[S] (integer)";
168         default 800;
169     }
170     }
171
172     grouping default-envelope {
173     leaf traffic-priority {
174         type uint8;
175         description 
176             "   
177             Traffic Priority is a 1-byte unsigned integer field specifying the relative priority assigned to the Service Flow in comparison with other flows. This field is fully defined in section C.2.2.5.1 of [1]. A default Traffic Priority of 0 SHOULD be used if a specific Traffic Priority value is not required.
178         ";
179         default 0;
180     }
181     leaf reserved0 {
182         type uint8;
183         default 0;
184     }
185     leaf reserved1 {
186         type uint16;
187         default 0;
188     }
189     leaf request-transmission-policy {
190         type uint32;
191         description "
192             Request/Transmission Policy is a 4-byte bit field as defined in section C.2.2.6.3 of [1]. A default Request/Transmission policy of 0 SHOULD be used if a specific Request/Transmission Policy value is not required.
193         ";
194         default 0;
195     }
196     leaf maximum-sustained-traffic-rate {
197         type uint32;
198         description "
199             Maximum Sustained Traffic Rate is a 4-byte unsigned integer field specifying the rate parameter, in bits/sec, for [1]. A value of 0 indicates that no explicitly-enforced Maximum Sustained Rate is requested. A default Maximum Sustained Traffic Rate of 0 SHOULD be used if a specific Maximum Sustained Traffic Rate is not required.
200
201         ";
202         default 0;
203     }
204     leaf maximum-traffic-burst {
205         type uint32;
206         description "
207             Maximum Traffic Burst is a 4-byte unsigned integer field specifying the token bucket size, in bytes, for a token- bucket-based rate limit for this Service Flow. This field is fully defined in section C.2.2.5.3 of [1]. A default Maximum Traffic Burst of 3044 bytes SHOULD be used if a specific Maximum Traffic Burst is not required. The value of this parameter has no effect unless a non-zero value has been provided for the Maximum Sustained Traffic Rate parameter.
208         ";
209         default 3044;
210     }
211     leaf minimum-reserved-traffic-rate {
212         type uint16;
213         description 
214             "
215             Minimum Reserved Traffic Rate is a 4-byte unsigned integer field specifying the minimum rate, in bits/sec, reserved for this Service Flow. This field is fully defined in section C.2.2.5.4 of [1]. A default Minimum Reserved Traffic Rate of 0 SHOULD be used if a specific Minimum Reserved Traffic Rate is not required.        
216
217 ";
218         default 0;
219     }
220     leaf assumed-minimum-reserved-traffic-rate-packet-size {
221         type uint16;
222         description 
223         "
224             Assumed Minimum Reserved Traffic Rate Packet Size is a 2-byte unsigned integer field specifying an assumed minimum packet size, in bytes, for which the Minimum Reserved Traffic Rate will be provided for this flow. This field is fully defined in section C.2.2.5.5 of [1]. A default Assumed Minimum Reserved Traffic Rate Packet Size of 0 SHOULD be used if a specific Assumed Minimum Reserved Traffic Rate Packet size is not required. Upon receipt of a value of 0 the CMTS MUST utilize its implementation-specific default size for this parameter, not 0 bytes.        
225     
226 ";
227         default 0;
228     }
229     leaf maximum-concatenated-burst {
230         type uint16;
231         description 
232         "
233             Maximum Concatenated Burst is a 2-byte unsigned integer specifying the maximum concatenated burst (in bytes) which a Service Flow is allowed. This field is fully defined in section C.2.2.6.1 of [1]. A value of 0 means there is no limit. A default Maximum Concatenated Burst of 1522 bytes SHOULD be used if a specific Maximum Concatenated Burst is not required.
234 ";
235         default 1522;
236     }
237
238     leaf upstream-peak-traffic-rate {
239         type uint32;
240         description 
241         "
242 Upstream Peak Traffic Rate is a 4-byte unsigned integer specifying the Peak traffic rate (in bits per second) which a 
243 Service Flow is allowed. This field is fully defined in section C.2.2.5.10.1 of [1]. 
244         ";
245         default 0;
246     }
247
248     leaf required-attribute-mask {
249         type uint32;
250         description 
251         "
252             Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
253
254 ";
255         default 0;
256     }
257     leaf forbidden-attribute-mask {
258         type uint32;
259         description 
260         "
261             Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
262 ";
263         default 0;
264     }
265     leaf attribute-aggregation-rule-mask {
266         type uint32;
267         description 
268         "
269             Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
270 ";
271         default 0;
272     }
273     leaf minimum-buffer {
274         type uint32;
275         description 
276         "
277 Minimum Buffer is a 4-byte unsigned integer parameter that defines a lower limit for the size of the buffer that is to be provided for a service flow. This field is fully defined in section C.2.2.5.11.3 of [1]. If this parameter is omitted, the Minimum Buffer defaults to a value of 0, which indicates that there is no lower limit.
278         ";
279         default 0;
280     }
281     leaf target-buffer {
282         type uint32;
283         description 
284         "
285 Target Buffer is a 4-byte unsigned integer parameter that defines a desired value for the size of the buffer that is to be provided for a service flow. This field is fully defined in section C.2.2.5.11.4 of [1]. If this parameter is omitted or set to a value of 0, the device selects any buffer size within the range of the Minimum and Maximum Buffers, via a vendor-specific algorithm.
286
287         ";
288         default 0;
289     }
290     leaf maximum-buffer {
291         type uint32;
292         description 
293         "
294 Maximum Buffer is a 4-byte unsigned integer parameter that defines an upper limit for the size of the buffer that is to be provided for a service flow. This field is fully defined in section C.2.2.5.11.5 of [1]. If this parameter is omitted, the Maximum Buffer defaults to a value of no limit.
295         ";
296         default 0;
297     }
298     }
299
300
301     grouping ugs-envelope {
302     leaf request-transmission-policy {
303         type uint32;
304         description "
305         Request/Transmission Policy is a 4-byte bit field as defined in section C.2.2.6.3 of [1]. Note: for this Service Flow Scheduling Type there is no default value for Request/Transmission Policy and all values (including 0) have meaning in DOCSIS. Bit 9 in the Request/Transmission Policy enables/disables the use of segment headers. A segment header is 8 bytes in length. It MUST be accounted for in the Unsolicited Grant Size parameter when segment header usage is enabled. The CMTS MUST ignore Bit 9 in the Request/Transmission Policy if the cable modem associated with the service flow is operating in DOCSIS 1.1 or 2.0 mode. For more information on segment headers and their use please see section 6.3 of [1].
306         ";
307         default 0;
308     }
309     leaf unsolicited-grant-size {
310         type uint16;
311         description "
312         Unsolicited Grant Size is a 2-byte unsigned integer field specifying the grant size (in bytes) as defined in section C.2.2.6.6 of [1]. There is no default value of Unsolicited Grant Size.
313         ";
314         default 0;
315     }
316     leaf grants-interval {
317         type uint8;
318         description "
319     Grants per Interval is a 1-byte unsigned integer field specifying the number of grants per Nominal Grant Interval as defined in section C.2.2.6.9 of [1]. There is no default value of Grants per Interval, but a value of 1 is recommended.    
320         ";
321         default 1;
322     }
323     leaf reserved {
324         type uint8;
325         description "
326         ";
327         default 0;
328     }
329     leaf nominal-grant-interval {
330         type uint32;
331         description "
332             Nominal Grant Interval is a 4-byte unsigned integer field specifying the nominal time between successive data grant opportunities for this Service Flow (in units of microseconds) as defined in section C.2.2.6.7 of [1].
333         
334         ";
335         default 0;
336     }
337     leaf tolerated-grant-jitter {
338         type uint32;
339         description "
340 Tolerated Grant Jitter is a 4-byte unsigned integer field specifying the maximum amount of time that transmission opportunities may be delayed from the nominal periodic schedule (in units of microseconds) as defined in section C.2.2.6.8 of [1]. The minimum allowed value is 800. If the CMTS receives a Gate-Set message with Tolerated Grant Jitter less than 800, the CMTS MUST reply with a Gate-Set-Err message with a PacketCable Error-Code of 'Invalid Field Value in Object'. There is no default value of Nominal Grant Interval. There is no default value for Tolerated Grant Jitter.
341         ";
342         default 0;
343     }
344     leaf required-attribute-mask {
345         type uint32;
346         description "
347 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section, a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
348         ";
349         default 0;
350     }
351     leaf forbidden-attribute-mask {
352         type uint32;
353         description "
354 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section, a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
355         ";
356         default 0;
357     }
358     leaf attribute-aggregation-rule-mask {
359         type uint32;
360         description "
361 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section, a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
362         ";
363         default 0;
364     }
365     
366     }
367
368
369     grouping us-envelope {
370     leaf us-traffic-priority {
371         type uint8;
372         description "
373 Traffic Priority is a 1-byte unsigned integer field specifying the relative priority assigned to the Service Flow in comparison with other flows. This field is fully defined in section C.2.2.5.1 of [1]. A default Traffic Priority of 0 SHOULD be used if a specific Traffic Priority value is not required.
374
375         ";
376         default 0;
377     }
378     leaf downstream-resequencing {
379         type uint32;
380         description "
381 DOCSIS 3.0 service flows. This field is fully defined in section C.2.2.7.3 of [1]. The CMTS MUST honor the requested Downstream Resequencing operation for all Gate requests. It is possible that the CMTS may receive conflicting downstream resequencing direction by the AM for Multicast Gate requests (e.g., multiple Multicast Gate requests for the same Multicast destination but with different downstream resequencing operation). In such a case the CMTS MUST either honor the Multicast Gate request or reject it with error code 35 (Multicast Gate Downstream Resequencing mismatch). For a Multicast Gate, the CMTS MUST ignore the Downstream Resequencing object if the cable modem associated with the service flow is operating in MDF disabled mode. The CMTS MUST ignore the Downstream Resequencing object if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. DOCSIS 3.0 introduced the concept of downstream channel bonding where the CMTS can simultaneously transmit on multiple channels. Downstream channels may not all have the same amount of latency such that two packets scheduled simultaneously by the CMTS may not arrive simultaneously at the cable modem. The CMTS can insert sequence numbers in each DOCSIS packet header to allow the cable modem to re- order out of sequence packets. The cable modem will hold higher numbered packets while waiting for lower numbered packets to arrive. The maximum wait time is 18ms. Applications that can tolerate lost packets or applications that cannot tolerate packet latency of up to 18ms can disable the use of sequence numbers by setting the Downstream Resequencing value to 1.
382         ";
383         default 0;
384     }
385     leaf reserved0{
386         type uint32;
387         description "
388
389         ";
390         default 0;
391     }
392     leaf maximum-sustained-traffic-rate {
393         type uint32;
394         description "
395 Maximum Sustained Traffic Rate is a 4-byte unsigned integer field specifying the rate parameter, in bits/sec, for a token-bucket-based rate limit for this Service Flow. This field is fully defined in section C.2.2.5.2 of [1]. A value of 0 indicates that no explicitly-enforced Maximum Sustained Rate is requested. A default Maximum Sustained Traffic Rate of 0 SHOULD be used if a specific Maximum Sustained Traffic Rate is not required.
396
397         ";
398         default 0;
399     }
400     leaf maximum-traffic-burst {
401         type uint32;
402         description "
403 Maximum Traffic Burst is a 4-byte unsigned integer field specifying the token bucket size, in bytes, for a token- bucket-based rate limit for this Service Flow. This field is fully defined in section C.2.2.5.3 of [1]. A default Maximum Traffic Burst of 3044 bytes SHOULD be used if a specific Maximum Traffic Burst is not required. The value of this parameter has no effect unless a non-zero value has been provided for the Maximum Sustained Traffic Rate parameter.
404
405         ";
406         default 3044;
407     }
408     leaf minimum-reserved-traffic-rate {
409         type uint32;
410         description "
411 Minimum Reserved Traffic Rate is a 4-byte unsigned integer field specifying the minimum rate, in bits/sec, reserved for this Service Flow. This field is fully defined in section C.2.2.5.4 of [1]. A default Minimum Reserved Traffic Rate of 0 SHOULD be used if a specific Minimum Reserved Traffic Rate is not required.
412
413         ";
414         default 0;
415     }
416     leaf assumed-minimum-reserved-traffic-rate-packet-size {
417         type uint32;
418         description "
419 Assumed Minimum Reserved Traffic Rate Packet Size is a 2-byte unsigned integer field specifying an assumed minimum packet size, in bytes, for which the Minimum Reserved Traffic Rate will be provided for this flow. This field is fully defined in section C.2.2.5.5 of [1]. A default Assumed Minimum Reserved Traffic Rate Packet Size of 0 SHOULD be used if a specific Assumed Minimum Reserved Traffic Rate Packet size is not required. Upon receipt of a value of 0 the CMTS MUST utilize its implementation-specific default size for this parameter, not 0 bytes.
420
421
422         ";
423         default 0;
424     }
425     leaf reserved1{
426         type uint32;
427         description "
428
429         ";
430         default 0;
431     }
432     leaf maximum-downstream-latency {
433         type uint32;
434         description "
435 Maximum Downstream Latency is a 4-byte unsigned integer field specifying the maximum latency between reception of a packet on the CMTS's NSI and the forwarding of the packet on its RF interface as defined in section C.2.2.7.1 of [1]. A default Maximum Downstream Latency of 0 SHOULD be used if a specific Maximum Downstream Latency is not required. Upon receipt of a value of 0, the CMTS MUST NOT include this parameter in its DOCSIS signaling for this Service Flow.
436
437
438         ";
439         default 0;
440     }
441     leaf downstream-peak-traffic-rate {
442         type uint32;
443         description "
444 Downstream Peak Traffic Rate is a 4-byte unsigned integer field, specifying the rate parameter P of a token-bucket- based peak rate limiter for packets of a downstream service flow. Configuring this peak rate parameter permits an operator to define a Maximum Burst value for the Downstream Maximum Sustained Rate much larger than a maximum packet size, but still limit the burst of packets consecutively transmitted for a service flow. The Downstream Peak Traffic Rate parameter is fully defined in section C.2.2.7.2 of [1]. The CMTS MUST NOT include this parameter in its DOCSIS signaling for this service flow if a value of 0 is supplied, if the cable modem for which the Gate applies is not provisioned in DOCSIS 3.0 mode, or if the CMTS does not support the enforcement of this value.
445
446         ";
447         default 0;
448     }
449     leaf required-attribute-mask {
450         type uint32;
451         description "
452 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
453
454         ";
455         default 0;
456     }
457     leaf forbidden-attribute-mask {
458         type uint32;
459         description "
460 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
461
462         ";
463         default 0;
464     }
465     leaf attribute-aggregation-rule-mask {
466         type uint32;
467         description "
468 Attribute Masks define a specific set of attributes associated with a DOCSIS 3.0 service flow. The CMTS MUST ignore the bonded bit in the Required and Forbidden Attribute Mask objects if the cable modem associated with the service flow is operating in pre-3.0 DOCSIS mode. The Required Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by requiring certain attributes. This field is fully defined in section C.2.2.3.6 of [1]. The Forbidden Attribute Mask limits the set of channels and bonding groups to which the CMTS assigns the service flow by forbidding certain attributes. This field is fully defined in section C.2.2.3.7 of [1]. The CMTS is free to assign the service flow to any channel that satisfies the traffic profile if no channel is available that satisfies the Required Attribute Mask and Forbidden Attribute Mask for the service flow. The Attribute Aggregation Rule Mask provides guidance to the CMTS as to how it might use the attribute masks of individual channels to construct a dynamic bonding group for this service flow. This field is fully described in section 'Service Flow Attribute Aggregation Rule Mask' of [1]. As described in that section a default Attribute Aggregation Rule Mask of 0 SHOULD be used if specific Attribute Aggregation Rules are not required.
469
470         ";
471         default 0;
472     }
473     }
474
475
476     grouping traffic-profile-flowspec {
477     container f-authorized-envelope {
478         uses flowspec-envelope;
479                 description "mandatory";
480     }
481     container f-reserved-envelope {
482         uses flowspec-envelope;
483                 description "optional";
484     }
485     container f-committed-envelope {
486         uses flowspec-envelope;
487                 description "optional";
488     }
489     }
490
491
492     grouping traffic-profile-docsis-service-class-name {
493     leaf service-class-name {
494         type string;
495                 description 
496         "
497         xxx - length 2 to 128?
498
499         The Service Class Name is MUST be 2-16 bytes of null-terminated ASCII string. 
500         (Refer to section C.2.2.3.4 of [1]).  This name MUST be padded with null bytes 
501         to align on a 4-byte boundary.
502         ";
503     }
504     }
505
506
507     grouping traffic-profile-best-effort {
508     container be-authorized-envelope {
509         uses default-envelope;
510                 description "mandatory";
511     }
512     container bereserved-envelope {
513         uses default-envelope;
514                 description "optional";
515     }
516     container be-committed-envelope {
517         uses default-envelope;
518                 description "optional";
519     }
520     }
521
522     grouping traffic-profile-non-real-time-polling-service {
523     container nrtp-authorized-envelope {
524         uses default-envelope;
525                 description "mandatory";
526     }
527     container nrtp-reserved-envelope {
528         uses default-envelope;
529                 description "optional";
530     }
531     container nrtp-committed-envelope {
532         uses default-envelope;
533                 description "optional";
534     }
535     }
536
537
538     grouping traffic-profile-real-time-polling-service {
539     container rtp-authorized-envelope {
540         uses default-envelope;
541                 description "mandatory";
542     }
543     container rtp-reserved-envelope {
544         uses default-envelope;
545                 description "optional";
546     }
547     container rtp-committed-envelope {
548         uses default-envelope;
549                 description "optional";
550     }
551     }
552
553     grouping traffic-profile-unsolicited-grant-service {
554     container ugs-authorized-envelope {
555         uses ugs-envelope;
556                 description "mandatory";
557     }
558     container ugs-reserved-envelope {
559         uses ugs-envelope;
560                 description "optional";
561     }
562     container ugs-committed-envelope {
563         uses ugs-envelope;
564                 description "optional";
565     }
566     }
567
568     grouping traffic-profile-unsolicited-grant-service-with-activity-detection {
569     container usga-authorized-envelope {
570         uses ugs-envelope;
571                 description "mandatory";
572     }
573     container usga-reserved-envelope {
574         uses ugs-envelope;
575                 description "optional";
576     }
577     container usga-committed-envelope {
578         uses ugs-envelope;
579                 description "optional";
580     }
581     }
582
583
584     grouping traffic-profile-downstream-service {
585     container ds-authorized-envelope {
586         uses us-envelope;
587                 description "mandatory";
588     }
589     container ds-reserved-envelope {
590         uses us-envelope;
591                 description "optional";
592     }
593     container ds-committed-envelope {
594         uses us-envelope;
595                 description "optional";
596     }
597     }
598
599
600     grouping traffic-profile-upstream-drop {
601     }
602
603     grouping traffic-profile-docsis-specific-parameterization {
604     }
605
606
607     
608     grouping traffic-profile-grouping {
609         leaf tp-type {
610                 type traffic-profile-type;
611                 default  best-effort;
612                 description "This attribute contains the type of upstream flow scheduling type.";
613         }
614     choice tp-type-choice {
615            case "flowspec" { uses traffic-profile-flowspec; }
616            case "docsis-service-class-name" { uses traffic-profile-docsis-service-class-name; }
617            case "docsis-specific-parameterization" { uses traffic-profile-docsis-specific-parameterization; }
618            case "upstream-drop" { uses traffic-profile-upstream-drop; }
619            case "best-effort" { uses traffic-profile-best-effort; }
620            case "unsolicited-grant-service" { uses traffic-profile-unsolicited-grant-service; }
621            case "unsolicited-grant-service-with-activity-detection" { uses traffic-profile-unsolicited-grant-service-with-activity-detection; }
622            case "non-real-time-polling-service" { uses traffic-profile-non-real-time-polling-service; }
623            case "real-time-polling-service" { uses traffic-profile-real-time-polling-service; }
624            case "downstream-service" { uses traffic-profile-downstream-service; }
625         }   
626     }
627
628
629 //    grouping taffic-profile-default-singleton-grouping {
630 //        grouping flowspec { uses traffic-profile-flowspec; }
631 //        grouping docsis-service-class-name { uses traffic-profile-docsis-service-class-name; }
632 //        grouping docsis-specific-parameterization { uses traffic-profile-docsis-specific-parameterization; }
633 //        grouping upstream-drop { uses traffic-profile-upstream-drop; }
634 //        grouping best-effort { uses traffic-profile-best-effort; }
635 //        grouping unsolicited-grant-service { uses traffic-profile-unsolicited-grant-service; }
636 //        grouping unsolicited-grant-service-with-activity-detection { uses traffic-profile-unsolicited-grant-service-with-activity-detection; }
637 //        grouping non-real-time-polling-service { uses traffic-profile-non-real-time-polling-service; }
638 //        grouping real-time-polling-service { uses traffic-profile-real-time-polling-service; }
639 //        grouping downstream-service { uses traffic-profile-downstream-service; }
640 //    }
641 }