Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #939
Add hashing model #939
Changes from all commits
6dc4d60
b91ca2b
103fd41
ac7e1fd
fa31346
7345700
67e6313
02e8937
6aa5e44
0d3abf6
fc1a625
54ef11a
107157e
3d718b7
db80ecb
917fb48
9f14325
31f6db5
ba3ac73
bd95c55
5eca652
67cef07
0865108
454ef21
5c2fbda
8e3df69
cd5e0e4
1dc0d28
ed9d2a8
827694d
7dfb276
75591df
f3f0110
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
How does one test this configuration parameter?
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.
A test would require target specific knowledge to create a test for this particular enum. Use of this enum is expected when the target contains some default or hardcoded selection of fields which are not described by the model.
For example, an asic may select only a portion of the bits in the src and dest ip address fields and port number fields. Which bits are used may not be exposed and may not be configurable by the user, by the NOS or by the ASIC SDK. Yet they are still "target defined" and don't match the other enums presented here.
If a target defined mode isn't available on an implementation, then the implementation should return an UNIMPLEMENTED (12) error.
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.
We can update the description for this enum in #959
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.
Continue the discussion here as desired: https://github.com/openconfig/public/pull/959/files#r1337998777
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 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 would like to see additionaly:
IPv4_in_IPv4 and IPv6-in-IPv4 where each lement is again list of outher and inner fields:
ipv4_ipv4/outherfields/outherfield type hash-field-type-ipv4
ipv4_ipv4/innerfields/innerfield type hash-field-type-ipv4
ipv6_ipv4/outherfields/outherfield/ipv4 hash-field-type-ipv6
ipv6_ipv4/innerfields/innerfield/ipv6 hash-field-type-ipv6
Similiarly fot ip-over-GRE over IPv4/IPv6,
grev4/outherfields/outherfield type hash-field-type-ipv4
grev4/payloads/payload enum(ipv4 ipv6 mpls Eth) // use fields deviend for basic v4,v6,mpls,eth depending on GRE protocol. if not on list
grev6/outherfields/outherfield type hash-field-type-ipv6
grev6/payloads/payload enum(ipv4 ipv6 mpls Eth) // use fields deviend for basic v4,v6,mpls,eth depending on GRE protocol. if not on list
Also for MPLS
mpls/labels - number of labels to use
mpls/base enum bottom XOR top default top
mpls/payloads/payload enum (ipv4 ipv6 PWE3 ipv4_grev4 ipv6_grev6 ipv4_ipv4 ipv6_ipv4 ...)
Also Eth- usefull for PWE3 services or L2 switching devices
eth/fields/fild enum (srcMAC,dstMAC,Vlan-ID, EtherType/payload, ingress_subinterface)
eth/payloads/payload enum ((ipv4 ipv6 PWE3 ipv4_grev4 ipv6_grev6 ipv4_ipv4 ipv6_ipv4 ...)
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 this PR we will only introduce the simple field selection which is targeted for gPINS release and is at least partially supported by the referenced implementations in this PR.
It is possible to add additional encapsulations in the future without breaking changes to the model by adding additional leafs to this hashing-inputs grouping. The additional leafs may be added to the public OC model in the future, or they can be vendor augments.
Since there are many constraints in hardware as to which encapsulations may be supported, especially for more complex use cases, we should leave open the option that vendors are expected to augment the model with the specific scenarios they support. These are often custom or one-off items that are not generally available and may also not be formally documented, which is a good reason to use a vendor provided augment. These 'custom' options may also not be very 'configurable'. For example, hardware may support only using a subset of the bits of some fields (ipv6 comes to mind). Which bits are used may not be configurable or even exposed to the user through the model, config or even the SDK. Using a vendor augment, a vendor can expose the ability to turn on or off these capabilities.
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 would ass 2 boolena leafs:
symmetric - ensured that traffic of bi-dir session produce same hash. (e.g. src/dst fields are ordered before feeding hash function)
persistent - ensures that if fwd-nh (e.g. LAG member) fails, flows that was on other members are not re-hashed. only affected flows are re-distributed among remaining fwd-nh.
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.
References to implementation needed for this?
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 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.
References to implementation needed for this?
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 only see that Arista allows for some hash configuration on per ingress interfaces basis. And it is not clear form referenced documentation on which platform/chipset.
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 intent here is that this is a list of policies. We'll update the description to not reference 'packets coming in the interface'. gPINS will add support for multiple policies and Arista EOS is an existing implementation
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.
Can you link to the documentation that shows this being configurable per ingress /interface/ please? It's not clear to me that this is widely supported.
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.
Per interface is not widely supported. gPINS plans to add support for this to Sonic. Should we include this leaf in the model or only augment /interfaces in a gPINS/SONIC yang? Please follow up with comments at #959