-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue DAN-169 #11
base: master
Are you sure you want to change the base?
Changes from all commits
8c241f2
6378a74
7b59e1e
e8b8df6
a2723f3
e3b3cca
f83062d
8559220
eb06d0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yang/vyatta-protocols-frr-link-params-v1.yang usr/share/configd/yang/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"/interfaces/@element/link-params/@enter": "link-params", | ||
"/interfaces/@element/link-params/@exit": "exit-link-params", | ||
"/interfaces/@element/link-params/enable": "enable", | ||
"/interfaces/@element/link-params/admin-grp": "admin-grp {/@text}", | ||
"/interfaces/@element/link-params/ava-bw": "ava-bw {/@text}", | ||
"/interfaces/@element/link-params/delay": "delay {/@text}", | ||
"/interfaces/@element/link-params/delay-variation": "delay-variation {/@text}", | ||
"/interfaces/@element/link-params/max-bw": "max-bw {/@text}", | ||
"/interfaces/@element/link-params/max-rsv-bw": "max-rsv-bw {/@text}", | ||
"/interfaces/@element/link-params/metric": "metric {/@text}", | ||
"/interfaces/@element/link-params/packet-loss": "packet-loss {/@text}", | ||
"/interfaces/@element/link-params/res-bw": "res-bw {/@text}", | ||
"/interfaces/@element/link-params/unrsv-bw": "unrsv-bw {/@text}", | ||
"/interfaces/@element/link-params/use-bw": "use-bw {/@text}" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
module vyatta-protocols-frr-link-params-v1 { | ||
namespace "urn:vyatta.com:mgmt:vyatta-protocols-frr-link-params:1"; | ||
prefix vyatta-protocols-frr-link-params-v1; | ||
|
||
import vyatta-types-v1 { | ||
prefix types; | ||
} | ||
import configd-v1 { | ||
prefix configd; | ||
} | ||
import vyatta-interfaces-v1 { | ||
prefix if; | ||
} | ||
import vyatta-interfaces-dataplane-v1 { | ||
prefix interfaces-dataplane; | ||
} | ||
import vyatta-interfaces-loopback-v1 { | ||
prefix interfaces-loopback; | ||
} | ||
import vyatta-interfaces-switch-v1 { | ||
prefix interfaces-switch; | ||
} | ||
|
||
organization "Niral Networks Private Limited"; | ||
contact | ||
"Niral Networks | ||
Postal: Sigma Soft Tech Park, Whitefield Main Road, | ||
Bengaluru, India 560066 | ||
Web: www.niralnetworks.com"; | ||
|
||
description | ||
"Copyright (c) 2019-2021, Niral Networks Intellectual Property. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or | ||
without modification, are permitted provided that the following | ||
conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
|
||
SPDX-License-Identifier: BSD-3-Clause | ||
The YANG module package for vyatta-protocols-frr-link-params-v1"; | ||
|
||
revision 2021-03-02 { | ||
description | ||
"Initial revision"; | ||
} | ||
|
||
grouping link-params { | ||
container link-params { | ||
configd:help "Configure interface link parameters"; | ||
leaf admin-group { | ||
type string { | ||
pattern "0[Xx][a-fA-F0-9]+"; | ||
} | ||
configd:help "Administrative group membership"; | ||
description "Administrative group membership"; | ||
} | ||
leaf available-bandwidth { | ||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Unidirectional Available Bandwidth (Bytes/second)"; | ||
description | ||
"Unidirectional Available Bandwidth. This field carries the available bandwidth on a | ||
link, forwarding adjacency, or bundled link. For a link or forwarding adjacency, available | ||
bandwidth is defined to be residual bandwidth minus the measured bandwidth used for the actual | ||
forwarding of non-RSVP-TE LSP packets. For a bundled link, available bandwidth is defined to be | ||
the sum of the component link available bandwidths minus the measured bandwidth used for the actual | ||
forwarding of non-RSVP-TE Label Switched Paths packets [draft-ietf-isis-te-metrics-extension-03]."; | ||
must "../max-bandwidth" { | ||
error-message "Maximum Bandwidth must be set"; | ||
} | ||
must "../available-bandwidth <= ../max-bandwidth" { | ||
error-message "Available Bandwidth cannot be greater than Maximum Bandwidth"; | ||
} | ||
} | ||
leaf delay { | ||
type uint32 { | ||
range "0..16777215"; | ||
} | ||
units "micro-second"; | ||
configd:help "Unidirectional Average Link Delay (micro-second)"; | ||
description "Unidirectional Average Link Delay"; | ||
} | ||
leaf delay-variation { | ||
type uint32 { | ||
range "0..16777215"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Units? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The units have already been added in the previous commit i.e (micro-second). |
||
} | ||
units "micro-second"; | ||
configd:help "Unidirectional Link Delay Variation (micro-second)"; | ||
description "Unidirectional Link Delay Variation"; | ||
} | ||
leaf max-bandwidth { | ||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Maximum bandwidth that can be used (Bytes/second)"; | ||
description "Maximum bandwidth that can be used"; | ||
} | ||
leaf max-reserved-bandwidth { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this exceed max-bandwidth? If not then perhaps a must statement enforcing this would be wise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do these 2 relate to available-bandwidth, residual, unreserved and utilised? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What determines the max bandwidth that can be used? Is this an inherent property of the link, or, like ADSL, depends on how well the link is working at a given time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure about it. In frr the max-bandwidth is set upon setting link-param however in Danos CLI user can provide max-bandwidth according to the need. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can you code a feature when you don't know what it means??? |
||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Maximum bandwidth that may be reserved (Bytes/second)"; | ||
description | ||
"Maximum bandwidth that may be reserved. It is the bandwidth that can | ||
theoretically be reserved"; | ||
must "../max-bandwidth" { | ||
error-message "Maximum Bandwidth must be set"; | ||
} | ||
must "../max-reserved-bandwidth <= ../max-bandwidth" { | ||
error-message "Maximum Reservable Bandwidth cannot be greater than Maximum Bandwidth"; | ||
} | ||
} | ||
leaf mpls-te-metric { | ||
type uint32 { | ||
range "1..max"; | ||
} | ||
configd:help "Link metric for MPLS-TE purpose"; | ||
description "Link metric for MPLS-TE purpose"; | ||
} | ||
leaf neighbor { | ||
type types:ipv4-address; | ||
configd:help "Configure remote ASBR information (Neighbor IP address and AS number)"; | ||
description "Configure remote ASBR information (Neighbor IP address and AS number)"; | ||
} | ||
leaf packet-loss { | ||
type uint32 { | ||
range 0..100; | ||
} | ||
units "Percentage"; | ||
configd:help "Unidirectional Link Packet Loss (Percentage)"; | ||
description "Unidirectional Link Packet Loss (Percentage)"; | ||
} | ||
leaf residual-bandwidth { | ||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Unidirectional Residual Bandwidth (Bytes/second)"; | ||
description | ||
"Unidirectional Residual Bandwidth. For a link or forwarding adjacency, residual | ||
bandwidth is defined to be Maximum Bandwidth [RFC3630] minus the bandwidth currently allocated | ||
to RSVP-TE LSPs. For a bundled link, residual bandwidth is defined to be the sum of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the bandwidth allocated to RSVP-TE LSPs defined? What if there is a mismatch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have found this description in draft-ietf-isis-te-metrics-extension-03. Do I have to define bandwidth allocated to RSVP-TE LSP too in this DAN-169 fix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You aren't convincing me that you fully understand what all these fields mean, nor how they relate to each other. I am not convinced that this data model is complete / consistent, and until I am persuaded that it is, I cannot approve. |
||
component link residual bandwidths [draft-ietf-isis-te-metrics-extension-03.txt]."; | ||
must "../max-bandwidth" { | ||
error-message "Maximum Bandwidth must be set"; | ||
} | ||
must "../residual-bandwidth <= ../max-bandwidth" { | ||
error-message "Residual Bandwidth cannot be greater than Maximum Bandwidth"; | ||
} | ||
} | ||
container unreserved-bandwidth { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If max-bandwidth is X, it seems you can have X unreserved bandwidth at each of the 8 priority levels, making 8X? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's as maybe. I'd like you to explain to me why this is correct, rather than just saying it's done this way somewhere else. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The [RFC3630] has been followed here wherein section 2.5.8 it stated about Unreserved Bandwidth as follows: The Unreserved Bandwidth sub-TLV specifies the amount of bandwidth not yet reserved at each of the eight priority levels in IEEE floating-point format. The values correspond to the bandwidth that can be reserved with a setup priority of 0 through 7, arranged in increasing order with priority 0 occurring at the start of the sub-TLV, and priority 7 at the end of the sub-TLV. The initial values (before any bandwidth is reserved) are all set to the Maximum Reservable Bandwidth. Each value will be less than or equal to the Maximum Reservable Bandwidth. The units are bytes per second. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not convinced this is config as opposed to state information. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or at least information that should be dynamically derived not set in stone in the config |
||
configd:help "Unreserved bandwidth at each priority level"; | ||
description | ||
"Unreserved bandwidth at each priority level. Unreserved Bandwidth [RFC3630], is | ||
subtracted from the Maximum Reservable Bandwidth (the bandwidth that can theoretically | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad alignment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've aligned the description. |
||
be reserved) [RFC3630] and provides per-QoS-class [draft-ietf-isis-te-metrics-extension-03]"; | ||
list priority { | ||
configd:help "Priority"; | ||
description "8 sets of priority levels"; | ||
key "tagnode"; | ||
leaf tagnode { | ||
type uint32 { | ||
range "0..7"; | ||
} | ||
configd:help "Priority"; | ||
description "8 sets of priority levels"; | ||
} | ||
leaf bandwidth { | ||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Bandwidth (Bytes/second)"; | ||
description "Bandwidth (Bytes/second) for each priority levels"; | ||
must "../../../max-bandwidth" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad alignment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It has been aligned There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still looks to be 2 spaces too far to the left ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes have been reflected in the last commit |
||
error-message "Maximum Bandwidth must be set"; | ||
} | ||
must "../bandwidth <= ../../../max-bandwidth" { | ||
error-message "Unreserved Bandwidth cannot be greater than Maximum Bandwidth"; | ||
} | ||
} | ||
} | ||
} | ||
leaf utilised-bandwidth { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this config or state? Please provide a better description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fuller description has been provided for utilised bandwidth following draft-ietf-isis-te-metrics-extension-03. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still sounds more like state than config - 'as measured in the router' is state not config AFAICT. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This similar command is there in vtysh shell where I can use this to adjust utilized-bandwidth in Bytes/second and was req in Danos CLI and in the draft-ietf-isis-te-metrics-extension-03 the above description is given of the same therefore I've provided that description. |
||
type uint64; | ||
units "Bytes/second"; | ||
configd:help "Unidirectional Utilised Bandwidth (Bytes/second)"; | ||
description | ||
"Unidirectional Utilised Bandwidth. This field carries the bandwidth utilization | ||
on a link, forwarding adjacency, or bundled link. For a link or forwarding adjacency, bandwidth | ||
utilization represent the actual utilization of the link (i.e.: as measured in the router). For a | ||
bundled link, bandwidth utilization is defined to be the sum of the component link bandwidth utilization | ||
[draft-ietf-isis-te-metrics-extension-03.txt]."; | ||
must "../max-bandwidth" { | ||
error-message "Maximum Bandwidth must be set"; | ||
} | ||
must "../utilised-bandwidth <= ../max-bandwidth" { | ||
error-message "Utilised Bandwidth cannot be greater than Maximum Bandwidth"; | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
||
augment /if:interfaces/interfaces-dataplane:dataplane { | ||
uses link-params; | ||
} | ||
augment /if:interfaces/interfaces-dataplane:dataplane/interfaces-dataplane:vif/interfaces-dataplane:ip { | ||
uses link-params; | ||
} | ||
augment /if:interfaces/interfaces-loopback:loopback { | ||
uses link-params; | ||
} | ||
augment /if:interfaces/interfaces-switch:switch/interfaces-switch:vif { | ||
uses link-params; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nanoseconds? Years?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The units have already been added in the previous commit i.e (micro-second).