-
Notifications
You must be signed in to change notification settings - Fork 689
Add support for SRv6 #1425
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
base: master
Are you sure you want to change the base?
Add support for SRv6 #1425
Conversation
Signed-off-by: Carmine Scarpitta <[email protected]>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| } | ||
|
|
||
| leaf flow-label { | ||
| type uint32 { |
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.
There is already a typedef that covers this in openconfig-inet-types called ipv6-flow-label
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.
Thanks for the hint.
As suggested, I changed the YANG model to reuse the existing typedef ipv6-flow-label.
| } | ||
|
|
||
| leaf traffic-class { | ||
| type uint8; |
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.
Other OC models have leveraged what looks like oc-inet:dscp here but this probably warrants a common typedef for reuse in a common types module
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.
I added a new typedef in ipv6-traffic-class in openconfig-inet-types.yang.
| } | ||
|
|
||
| leaf hop-limit { | ||
| type uint8; |
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.
Same comment as above - suggest looking at other models and possibly introducing a common typedef
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.
I added a new typedef in ipv6-hop-limit in openconfig-inet-types.yang.
|
|
||
| leaf hop-limit { | ||
| type uint8; | ||
| default "64"; |
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.
Why is there a default here? Unless common across every implementation or defined in a spec, suggest removing any defaults
|
|
||
| leaf srv6-behavior-type { | ||
| type enumeration { | ||
| enum RESERVED { |
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.
For all of these it seems better to put into common types and likely define as identities instead of an inline enum
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.
I moved the enumeration to openconfig-inet-types.yang and replaced with identities, as suggested.
- Move hop-limit and traffic-class to openconfig-inet-types.yang - Reuse the existing ipv6-flow-label type for the IPv6 Flow Label Signed-off-by: Carmine Scarpitta <[email protected]>
Signed-off-by: Carmine Scarpitta <[email protected]>
Signed-off-by: Carmine Scarpitta <[email protected]>
Signed-off-by: Carmine Scarpitta <[email protected]>
Change Scope
Tree View
+--ro afts | +--ro ipv4-unicast | | +--ro ipv4-entry* [prefix] | | +--ro prefix -> ../state/prefix | | +--ro state | | +--ro prefix? oc-inet:ipv4-prefix | | +--ro counters | | | x--ro packets-forwarded? oc-yang:counter64 | | | x--ro octets-forwarded? oc-yang:counter64 | | | x--ro packets-forwarded-backup? oc-yang:counter64 | | | x--ro octets-forwarded-backup? oc-yang:counter64 | | +--ro entry-metadata? binary | | +--ro origin-protocol? identityref | | +--ro decapsulate-header? oc-aftt:encapsulation-header-type | | +--ro oc-aftni:next-hop-group? -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id | | +--ro oc-aftni:next-hop-group-network-instance? oc-ni:network-instance-ref | | +--ro oc-aftni:origin-network-instance? oc-ni:network-instance-ref | +--ro ipv6-unicast | | +--ro ipv6-entry* [prefix] | | +--ro prefix -> ../state/prefix | | +--ro state | | +--ro prefix? oc-inet:ipv6-prefix | | +--ro counters | | | x--ro packets-forwarded? oc-yang:counter64 | | | x--ro octets-forwarded? oc-yang:counter64 | | | x--ro packets-forwarded-backup? oc-yang:counter64 | | | x--ro octets-forwarded-backup? oc-yang:counter64 | | +--ro entry-metadata? binary | | +--ro origin-protocol? identityref | | +--ro decapsulate-header? oc-aftt:encapsulation-header-type + | | +--ro srv6-endpoint-behavior? identityref | | +--ro oc-aftni:next-hop-group? -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id | | +--ro oc-aftni:next-hop-group-network-instance? oc-ni:network-instance-ref | | +--ro oc-aftni:origin-network-instance? oc-ni:network-instance-ref | +--ro policy-forwarding | | +--ro policy-forwarding-entry* [index] | | +--ro index -> ../state/index | | +--ro state | | +--ro index? uint64 | | +--ro ip-prefix? oc-inet:ip-prefix | | +--ro mac-address? oc-yang:mac-address | | +--ro mpls-label? oc-mplst:mpls-label | | +--ro mpls-tc? oc-mplst:mpls-tc | | +--ro ip-dscp? oc-inet:dscp | | +--ro ip-protocol? oc-pkt-match-types:ip-protocol-type | | +--ro l4-src-port? oc-inet:port-number | | +--ro l4-dst-port? oc-inet:port-number | | +--ro counters | | | x--ro packets-forwarded? oc-yang:counter64 | | | x--ro octets-forwarded? oc-yang:counter64 | | +--ro entry-metadata? binary | | +--ro oc-aftni:next-hop-group? -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id | | +--ro oc-aftni:next-hop-group-network-instance? oc-ni:network-instance-ref | +--ro mpls | | +--ro label-entry* [label] | | +--ro label -> ../state/label | | +--ro state | | +--ro label? oc-mplst:mpls-label | | +--ro counters | | | x--ro packets-forwarded? oc-yang:counter64 | | | x--ro octets-forwarded? oc-yang:counter64 | | +--ro entry-metadata? binary | | +--ro popped-mpls-label-stack* oc-mplst:mpls-label | | +--ro oc-aftni:next-hop-group? -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id | | +--ro oc-aftni:next-hop-group-network-instance? oc-ni:network-instance-ref | +--ro ethernet | | +--ro mac-entry* [mac-address] | | +--ro mac-address -> ../state/mac-address | | +--ro state | | +--ro mac-address? oc-yang:mac-address | | +--ro counters | | | x--ro packets-forwarded? oc-yang:counter64 | | | x--ro octets-forwarded? oc-yang:counter64 | | +--ro entry-metadata? binary | | +--ro oc-aftni:next-hop-group? -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id | | +--ro oc-aftni:next-hop-group-network-instance? oc-ni:network-instance-ref | +--ro state-synced | | +--ro state | | +--ro ipv4-unicast? boolean | | +--ro ipv6-unicast? boolean | +--ro next-hop-groups | | +--ro next-hop-group* [id] | | +--ro id -> ../state/id | | +--ro state | | | +--ro id? uint64 | | | +--ro next-hop-group-name? string | | | +--ro programmed-id? uint64 | | | +--ro color? uint64 | | | +--ro backup-next-hop-group? -> ../../../next-hop-group/state/id | | | +--ro backup-active? boolean | | +--ro next-hops | | | +--ro next-hop* [index] | | | +--ro index -> ../state/index | | | +--ro state | | | +--ro index? -> ../../../../../../next-hops/next-hop/state/index | | | +--ro weight? uint64 | | +--ro conditional | | +--ro condition* [id] | | +--ro id -> ../state/id | | +--ro state | | | +--ro id? uint64 | | | +--ro dscp* oc-inet:dscp | | | +--ro next-hop-group? -> ../../../../../next-hop-group/state/id | | +--ro input-interfaces | | +--ro input-interface* [id] | | +--ro id -> ../state/id | | +--ro state | | +--ro id? string | | +--ro interface? -> /oc-if:interfaces/interface/name | | +--ro subinterface? -> /oc-if:interfaces/interface[oc-if:name=current()/../interface]/subinterfaces/subinterface/index | +--ro next-hops | | +--ro next-hop* [index] | | +--ro index -> ../state/index | | +--ro state | | | +--ro index? uint64 | | | +--ro programmed-index? uint64 | | | +--ro ip-address? oc-inet:ip-address | | | +--ro mac-address? oc-yang:mac-address | | | +--ro pop-top-label? boolean | | | +--ro pushed-mpls-label-stack* oc-mplst:mpls-label | | | +--ro encapsulate-header? oc-aftt:encapsulation-header-type | | | +--ro decapsulate-header? oc-aftt:encapsulation-header-type | | | +--ro origin-protocol? identityref | | | +--ro lsp-name? string | | | +--ro counters | | | | x--ro packets-forwarded? oc-yang:counter64 | | | | x--ro octets-forwarded? oc-yang:counter64 | | | +--ro vni-label? oc-evpn-types:evi-id | | | +--ro tunnel-src-ip-address? oc-inet:ip-address | | | +--ro oc-aftni:network-instance? oc-ni:network-instance-ref | | +--ro ip-in-ip | | | +--ro state | | | +--ro src-ip? oc-inet:ip-address | | | +--ro dst-ip? oc-inet:ip-address | | +--ro gre | | | +--ro state | | | +--ro src-ip? oc-inet:ip-address | | | +--ro dst-ip? oc-inet:ip-address | | | +--ro ttl? uint8 | | +--ro encap-headers | | | +--ro encap-header* [index] | | | +--ro index -> ../state/index | | | +--ro state | | | | +--ro index? uint8 | | | | +--ro type? oc-aftt:encapsulation-header-type | | | +--ro gre | | | | +--ro state | | | | +--ro src-ip? oc-inet:ip-address | | | | +--ro dst-ip? oc-inet:ip-address | | | | +--ro ttl? uint8 | | | +--ro ipv4 | | | | +--ro state | | | | +--ro src-ip? oc-inet:ip-address | | | | +--ro dst-ip? oc-inet:ip-address | | | +--ro ipv6 | | | | +--ro state | | | | +--ro src-ip? oc-inet:ip-address | | | | +--ro dst-ip? oc-inet:ip-address + | | | | +--ro srv6-sid-list* oc-inet:ipv6-address + | | | | +--ro flow-label? oc-inet:ipv6-flow-label + | | | | +--ro traffic-class? oc-inet:ipv6-traffic-class + | | | | +--ro hop-limit? oc-inet:ipv6-hop-limit | | | +--ro mpls | | | | +--ro state | | | | +--ro traffic-class? oc-mplst:mpls-tc | | | | +--ro mpls-label-stack* oc-mplst:mpls-label | | | +--ro udp-v4 | | | | +--ro state | | | | +--ro src-ip? oc-inet:ipv4-address | | | | +--ro dst-ip? oc-inet:ipv4-address | | | | +--ro dscp? oc-inet:dscp | | | | +--ro src-udp-port? oc-inet:port-number | | | | +--ro dst-udp-port? oc-inet:port-number | | | | +--ro ip-ttl? uint8 | | | +--ro udp-v6 | | | | +--ro state | | | | +--ro src-ip? oc-inet:ipv6-address | | | | +--ro dst-ip? oc-inet:ipv6-address | | | | +--ro dscp? oc-inet:dscp | | | | +--ro src-udp-port? oc-inet:port-number | | | | +--ro dst-udp-port? oc-inet:port-number | | | | +--ro ip-ttl? uint8 | | | +--ro vxlan | | | +--ro state | | | +--ro vni-label? oc-evpn-types:evi-id | | | +--ro tunnel-src-ip-address? oc-inet:ip-address | | +--ro interface-ref | | +--ro state | | +--ro interface? -> /oc-if:interfaces/interface/name | | +--ro subinterface? -> /oc-if:interfaces/interface[oc-if:name=current()/../interface]/subinterfaces/subinterface/index ...