Skip to content

ECMP and LAG Hash Seed

Shuotian Cheng edited this page Aug 16, 2017 · 11 revisions

Overview

In tree-sized data center network topology, different hashing is needed in different tiers to avoid traffic polarization. In SONiC, ECMP and LAG hashing algorithms are different by default, so we only need to configure the hash seed. Per configurable and debuggable convenience, this parameter shall be changed during the run time.

In SAI, two attributes are available - SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_SEED and SAI_SWITCH_ATTR_LAG_DEFAULT_HASH_SEED. These two attributes could be set to the same value so that the user only needs to provide one number.

Requirement

By default, no need to change the default hash seed value. Once the user specifies the seed, it could be picked up and applied.

Implementation

With the design of CONFIG_DB, the change could be notified to SwSS once the value is updated. Orchagent will be able to pick up the change and execute the corresponding SAI function calls.

In order to fit the current design, a SwitchOrch class is needed to deal with the switch related tasks.

The schema of the configuration is under discussion and will be decided later.

Clone this wiki locally