Internet-Draft | SCHC Sid Allocation | March 2023 |
Minaburo & Toutain | Expires 1 October 2023 | [Page] |
blabla¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 1 October 2023.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
RFC9363 defines a YANG Data Model for SCHC rules. [I-D.ietf-core-sid] specifies the process for SID allocation and management. This document discuss of the SID allocation for RFC9363.¶
The version @2023-01-18 of the SCHC YANG Data Model published in the RFC 9363 contains 136 SIDs (92 for identities, 2 for features and 42 for data). [I-D.ietf-core-sid] indicates that the SID range for the YANG Data Model specified in RFC is between 1000 and 59 000 and that the maximum request pool SHOULD NOT exceed 1000. The draft also gives some pre allocated values.¶
Since SIDs will be used either to represent unique identity contained in the data model and also leaves (data) forming this data model, it could be wise to distinguish between identifiers and data.¶
Data structures are delta encoded and included as a CBOR element, the size depends on the value. Deltas between -24 and +23 are encoded on a single byte. Deltas between -256 and +255 use 2 bytes and larger values corresponding to the RFC SID range will be encoded into 3 bytes. To optimize the CORECONF representation delta should be smaller as possible for the more frequent leaves.¶
On the other hand identities are included in the CORECONF representation and for the RFC SID range the size is constant and equal to 3 bytes.¶
The example in Figure 1 gives a CORECONF structure transposed the CBOR diagnostic notation and its equivalent in RESTCONF with JSON. For readability and compactness, this example is edited and do not encode a full rule as defined in RFC9363.¶
The default SID numbering produced by pyang is used, starting from 5000 for SCHC Data Model defined in RFC9363 and 2000000 for an experimental module for OAM.¶
We can see the delta encoding. The first SID 5095 represents "ietf-schc:schc". "/ietf-schc:schc/rule" which is coded with a +1 since SID 5096 has been assigned. "/ietf-schc:schc/rule/entry" is coded with a delta of 4. Then a list of Field Description follows. +1 represents the leaf "ietf-schc:schc/rule/entry/comp-decomp-action" and the value assigned to that key contains the SID of "ietf-schc:cda-not-sent" identity.¶
Note that the second element contains a "field-id" belonging to the "ietf-schc-oam" module and the associate SID is 2000003.¶
The SCHC YANG Data Model defined in RFC 9363 will probably be augmented, to include for instance access control data. To keep a compact representation, delta values must be kept as small as possible. The LPWAN working group should not use the automatic SID numbering and provide a more optimal allocation scheme for augmentation of the SCHC YANG Data Model.¶
A first recommendation is to avoid merging data and identity in order to limit the delta encoding. The distance between these two sections can be 255 SID to allow deltas on 2 bytes.¶
The second recommendation is to leave some unused SID around SCHC rules to allow augmentation.¶
To study the impact of SIDs size and delta size, we will take three scenarii, which cover the original Data Model defined in [RFC9363] and some augmentations, rules regarding these scenarii are listed in the annex:¶
For this three group of Set of Rule, we applied four different allocation methods for the SIDs:¶
The following table shows the results:¶
The most important result, is the factor 10 between CBOR and JSON (without indentation) size which proves the efficiency of encoding. 2 kilo-byte of information to represent 8 rules (3 compression and 5 fragmentation rules).¶
The IETF-grouped has a impact on the rule size, even when no augmentation is perform. This is the case for rfc9363 compatible rules and OAM addition. Figure Figure 3 shows the alphabetical order allocation with pyang.¶
"Rule-id-value", "rule-id-length", "rule-nature" present in all rules have a delta higher than 23. On the other hand, other elements such are matching-operator-value or comp-decomp-action-value which are not present in all rules have a smaller delta. Figure {#Allocation} gives the manual SID allocation used in this document. This lead to a reduction of about 20 bytes (a mean of 5 bytes for the 8 rules in the example) when no augmentation is perform. In case of augmentation with the last example including access control, this leads to 50 bytes.¶
Manual allocation allows also to use some other space, the last scenario takes 10 values (1%) from the IESG space for the most frequent identity.¶
The allocation process proposed in [I-D.ietf-core-sid] is slightly enhanced:¶
The result is a better allocation of the space, [I-D.ietf-core-sid] proposes a minimum of 50 SIDs per module, but looking at the existing models, the effective number is smaller. Using a common pool, allows a better utilization.¶