Skip to content
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

Add hashing model #959

Merged
merged 51 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
39141f6
Add hashing model in OC
sallylsy Sep 15, 2023
09ca002
Merge branch 'openconfig:master' into master
sallylsy Sep 20, 2023
1036c8a
Add hashing model in OC.
sallylsy Sep 20, 2023
dc65d69
Add hashing model in OC.
sallylsy Sep 20, 2023
38153b2
Add hashing model in OC.
sallylsy Sep 20, 2023
7cd13ad
Add hashing model in OC.
sallylsy Sep 20, 2023
cf523f9
Add hashing model in OC.
sallylsy Sep 20, 2023
33daae6
Add hashing model in OC.
sallylsy Sep 20, 2023
59ffbec
Add hashing model in OC.
sallylsy Sep 20, 2023
87128a5
Add hashing model in OC.
sallylsy Sep 20, 2023
07700fc
Add hashing model in OC.
sallylsy Sep 20, 2023
222ae1f
Add hashing model in OC.
sallylsy Sep 20, 2023
352f50f
Add hashing model in OC.
sallylsy Sep 20, 2023
50cd4c3
Update release/models/hashing/openconfig-hashing.yang
sallylsy Sep 22, 2023
e5a9ae5
Update release/models/hashing/openconfig-hashing.yang
sallylsy Sep 22, 2023
be52ccb
Update release/models/hashing/openconfig-hashing.yang
sallylsy Sep 22, 2023
b331885
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
fe29393
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
5eb2ec6
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
a644099
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
d45a87d
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
1b35e5c
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
5dfd71a
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
10ad2e1
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
8eb7f09
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
395c23e
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
b571753
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
51af22b
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
49c7130
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
48e5867
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
e357d1f
Update release/models/system/openconfig-hashing.yang
sallylsy Sep 27, 2023
ee1b99b
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
a409e6f
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
a51c712
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
63552fe
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
5996986
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
29ff57a
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
10215ae
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
e288e9f
Merge branch 'master' into master
sallylsy Nov 7, 2023
3b088fd
Update openconfig-hashing.yang
sallylsy Sep 22, 2023
040b2b0
Merge branch 'master' into master
sallylsy Nov 20, 2023
fd17489
Mofify the hashing model.
sallylsy Nov 21, 2023
3f88c74
Merge branch 'master' into master
sallylsy Nov 21, 2023
39620b7
Mofify the hashing model.
sallylsy Nov 21, 2023
879b47b
Mofify the hashing model.
sallylsy Nov 21, 2023
d8bb8ab
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
63054b8
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
cdd4012
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
11855f6
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
78d9a62
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
5c1353e
Update release/models/system/openconfig-hashing.yang
sallylsy Nov 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions release/models/system/.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- yang/system/openconfig-aaa-types.yang
- yang/system/openconfig-alarms.yang
- yang/system/openconfig-alarm-types.yang
- yang/system/openconfig-hashing.yang
- yang/system/openconfig-license.yang
- yang/system/openconfig-procmon.yang
- yang/system/openconfig-system.yang
Expand All @@ -32,3 +33,9 @@
- yang/system/openconfig-messages.yang
build:
- yang/system/openconfig-messages.yang
- name: openconfig-hashing
docs:
- yang/system/openconfig-hashing.yang
build:
- yang/system/openconfig-hashing.yang
run-ci: true
359 changes: 359 additions & 0 deletions release/models/system/openconfig-hashing.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,359 @@
module openconfig-hashing {
yang-version "1";

// namespace
namespace "http://openconfig.net/yang/hashing";

prefix "oc-hashing";

// import some basic types
import openconfig-extensions { prefix oc-ext; }
import openconfig-system {prefix oc-sys;}
import openconfig-interfaces {prefix oc-intf;}

// meta
organization "OpenConfig working group";

contact
"OpenConfig working group
[email protected]";

description
"Model for managing hashing policies that would be referenced by the
interfaces model.";


oc-ext:openconfig-version "0.1.0";

revision "2023-08-08" {
description "Initial hashing model.";
reference "0.1.0";
}

oc-ext:catalog-organization "openconfig";
oc-ext:origin "openconfig";

grouping hashing-inputs {
description
"Top level container for inputs to be used for hashing policies.";

leaf ingress-interface {
type boolean;
description
"Use the ingress subinterface identifired in the
sallylsy marked this conversation as resolved.
Show resolved Hide resolved
calculation of the hash.";
}
leaf ip-protocol-type {
type boolean;
description
"Specification of ipv4 or ipv6.";
sallylsy marked this conversation as resolved.
Show resolved Hide resolved
}
}

grouping ipv4-ipv6-inputs-top {
description
"The top level container for ipv4 and ipv6 header
fields used for the hash computation.";

leaf src-addr {
type boolean;
description
"Use the source address in the calculation of the hash.";
}

leaf dst-addr {
type boolean;
description
"Use the destination address in the calculation of the hash.";
}

leaf src-port {
type boolean;
description
"Use the source port from the transport header in the calculation
of the hash.";
}

leaf dst-port {
type boolean;
description
"Use the destination port from the transport header in the
calculation of the hash.";
}
}

grouping ipv6-inputs-top {
description
"The top level container specifially for ipv6 header
fields used for the hash computation.";

leaf flow-label {
type boolean;
dplore marked this conversation as resolved.
Show resolved Hide resolved
description
"Use the flow label in the IPv6 header
to calculate the hash.";
}
}

grouping hashing-policy-config {
description
"Configuration data for hashing policies.";

leaf name {
type string;
description
"The name of the hashing policy.
When a configured user-controlled policy is created by the
system, it is instantiated with the same name in the
/system/hashing-policies/hashing-policy/name list.";
}

leaf seed {
type uint64;
description
"The seed used to initialize the hash algorithm";
}

leaf algorithm {
type string;
description
"The name of hash algorithm. This algorithm MUST
be a supported algorithm";
}
}

grouping hashing-policy-top {
description
"Top level grouping for hashing configuration and operational state
data.";

container hashing-policies {
description
"Top level container for hashing, including configuration and
state data.";

list hashing-policy {
key "name";

description
"The list of named policies to be used on the device.";

leaf name {
type leafref {
path "../config/name";
}
description
"References the name of the hashing policy.";
}
container config {
description
"Configurable items at the global hash policy level.";

uses hashing-policy-config;
}
container state {
config false;
description
"Operational state data at the global hash policy
level.";

uses hashing-policy-config;
}

container hash-field-modes {
description
"Container for specifying inputs to be used when
calculating the hash.";

container config {
description
"Configurable items at the hashing inputs level.";
uses hashing-inputs;
}
sallylsy marked this conversation as resolved.
Show resolved Hide resolved
container state {
config false;
description
"Operational state data at the hashing
inputs level.";
uses hashing-inputs;
}
dplore marked this conversation as resolved.
Show resolved Hide resolved

container ipv4 {
description
"The IPv4 fields that should be used to
compute the hash.";
container config {
description
"Configurable data at the hashing
inputs level for IPv4.";
uses ipv4-ipv6-inputs-top;
}

container state {
config false;
description
"Operational state data at the hashing
inputs level for IPv4.";
uses ipv4-ipv6-inputs-top;
}
}

container ipv6 {
description
"The IPv6 fields that should be used to
compute the hash.";

container config {
description
"Configurable data at the hashing
inputs level for IPv6.";

uses ipv4-ipv6-inputs-top;
uses ipv6-inputs-top;
}

container state {
config false;
description
"Operational state data at the hashing
inputs level for IPv6.";

uses ipv4-ipv6-inputs-top;
uses ipv6-inputs-top;
}
}

}
}
}
}

grouping supported-algorithms-state {
description
"Top-level container for the supported algorithms.";
leaf name {
type string;
description
"Name of the supported algorithm.";
}
leaf description {
type string;
description
"Description of the supported algorithm.";
}
}
grouping supported-algorithms-top {
description
"Top-level container of the supported algorithms for supported
algorithms. The list of algorithms are expected to be defined by
the target device.";
uses vendor-hashing-algorithms;
sallylsy marked this conversation as resolved.
Show resolved Hide resolved
}

grouping hashing-algo-top {
description
"Top level container of the supported algorithms for supported
algorithms.";
container hashing-algorithms {
config false;
description
"Container of the supported algorithms for supported
algorithms.";
list hashing-algorithm {
key "name";

description
"List of the supported algorithms for supported
algorithms.";

leaf name {
type leafref {
path ../state/name;
}
description
"Reference to the supported algorithm list key.";
}

container state {
description
"Operational data for the supported algorithm.";
config false;

leaf name {
type string;
description
"Name of the supported algorithm.";
}

leaf description {
type string;
description
"Description of the supported algorithm.";
}
}
}
}
}

grouping vendor-hashing-algorithms {
description
"Supported hashing algorithms per vender.";
container vendor {
description
"Specify the vendor. Each vendor should have its own set of
supported algorithms. For each supported algorithm, a name
and a description should be defined. An implementation must
augment this model using the schema described in the
vendor_counter_guide reference.

e.g.
augment /system/vendor {
sallylsy marked this conversation as resolved.
Show resolved Hide resolved
container <vendor name> {
container <platform name> {
uses hashing-algo-top;
}
}
}";
reference
"https://github.com/openconfig/public/tree/master/doc/vendor_counter_guide.md";
}
}

grouping hashing-top {
description
"Top-level container for Hashing algorithms and hashing policies";
uses supported-algorithms-top;
uses hashing-policy-top;
}
sallylsy marked this conversation as resolved.
Show resolved Hide resolved

augment "/oc-sys:system" {
description
"Augment for Hashing algorithms and hashing policies";

uses hashing-top;
}

augment "/oc-intf:interfaces/oc-intf:interface/oc-intf:config" {
description
"Augment for configuration data hashing policy on the interface.";
leaf hashing-policy {
type leafref {
path "/oc-sys:system/hashing-policies/hashing-policy/name";
}
description "The configuration data hashing policy to be used when
hashing packets coming in on the interface.";
}
}

augment "/oc-intf:interfaces/oc-intf:interface/oc-intf:state" {
description
"Augment for operational data hashing policy on the iinterface.";
leaf hashing-policy {
type leafref {
path "/oc-sys:system/hashing-policies/hashing-policy/name";
}
description "The operational data hashing policy to be used when
hashing packets coming in on the interface.";
}
}
}