-
Notifications
You must be signed in to change notification settings - Fork 652
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
Conversation
…and system models to apply the policies for LAG and L3 ECMP.
Major YANG version changes in commit f3f0110: |
Remove trailing space
Add missing quotes
Compatibility Report for commit f3f0110: |
Can you provide implementation references as is in the PR template and not delete that section https://github.com/openconfig/public/blob/master/.github/pull_request_template.md Especially with respect to configurable algorithms, seeds, policies and the application of these policies to other specific constructs |
@dplore mentioned he had some implementations references that he would help add here. |
Moved implementation references to the first comment (description) of this PR. |
Thx for the references @dplore - looking across the implementation references, this PR is appearing to cater to a single implementation by enforcing user-defined hash policies with a superset (looks like some design patterns are off a bit here too w/ nested config/config and state/config containers). I can't speak for all implementations but it appears various are going to be system wide parameters with only a subset of what is defined in here that is applicable. Would be curious to hear from @rgwilton, @hellt, @jsterne on this one |
@earies has already addressed some of my concerns that this is overly platform specific. Subsets of the parameters may be able to be generically modeled, but in many circumstances it seems likely that they'd be platform or even line-card specific. Given OC's dislike of if-feature, there's not a clean way to model such things generically. A more specific bit of feedback is that the "algorithm" section is likely very implementation specific. "CRC" against what fields of the forwarding keys? What flavor of CRC? Etc. For such a field, it'd be more likely to be able to be genericized if the type was an identity and it was implementation specific with explicit documentation as to what fields are being impacted. For scenarios where a given algorithm was common across implementations, standardizing an identity in the base model would be better than multiple flavors of the same. |
adding @LimeHat |
I agree with most of the comments that have already been made, in particular:
Finally, does hashing really deserve its own top-level directory? Doesn't this belong somewhere in the platform or system hierarchy? |
…into the hashing-policy-config
…configLinter happy
This reverts commit 67cef07.
This reverts commit 67cef07.
This reverts commit 67cef07.
This reverts commit 67cef07.
This reverts commit 67cef07.
Thanks for the changes @atmanmehta . They address all the issues so far. I have added this PR to the OC Community meeting agenda and will present there to promote greater visibility. |
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.
In addition to all comments I make in-line, considering heavy dependency on INTEGRATED-CIRCUIT (ASIC, NPU) I would suggest that policy shouyld be attachable to:
/components/component/linecard/config/hashing-policy (chassis may have mix of ASICs)
/components/component/integrated-circuit/config/hashing-policy (to fight polarization)
Considering above, perhaps instead of /system/config/hashing-policy
we should use /components/component/chassis/config/hashing-policy
?
Then all atachment,but per-ingress-interface, are under /component/components/...
. And per-interface I do not see to be widly supported anyway.
type hash-field-type-transport; | ||
description "The transport layer fields that should be used to | ||
compute the hash."; | ||
} |
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.
description "The hashing policy to be used when hashing packets coming | ||
in on the interface."; | ||
} | ||
|
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
There is one more area not explored. |
type uint64; | ||
description | ||
"The seed used to initialize the hash algorithm"; | ||
} |
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?
description | ||
"The seed used to initialize the hash algorithm"; | ||
} | ||
|
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.
leaf symmetric { | |
type boolean; | |
default false; | |
description | |
"Hash is sematrical - returns same value regardless of traffic direction of same flow/session. Also regardless of ingress interface"; | |
} | |
leaf persistent { | |
type boolean; | |
default false; | |
description | |
"In case of output inteface/forwarding-nh failure/removal, only flows that have used this interface/nexthop are re-hashed"; | |
} |
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?
The reference to Cisco IOS-XR bundle-hash is wrong. This is just utility that alows execute hash against mocked-up packet and see what is result. |
description "The hashing policy to be used when hashing packets coming | ||
in on the interface."; | ||
} | ||
|
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.
destination addresses in the calculation of the | ||
hash."; | ||
} | ||
enum TARGET_DEFINED { |
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
the device for calculating the hash."; | ||
} | ||
} | ||
description "The trasport layer fields that should be used to |
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.
description "The trasport layer fields that should be used to | |
description "The transport layer fields that should be used to |
Please refer to #959 for comments. Closing this PR as it is now stale. |
Change Scope
Introduce a hashing policy which can used to
Add hashing-policy to interfaces to allow configuration of which algorithm to use on a per interface basis
Add hashing-policy to
/system
to allow configuration of an algorithm used by all the ports in an implementationIt is expected that implementations will vary widely in which specific options they support as these are hardware dependent. The goal is to define a what is operationally useful and supported by at least a subset of hardware. Other hardware may offer only partial support or even no support.
This change is backward compatible.
Implementations
Tree view