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, we are using different hashing algorithms for ECMP and LAG by default, so we only need to configure the hash seed. For easy configuration and debugging, we should be able to change the hash seed 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. By default, the value of these attributes are 0. These two attributes could be set to the same value so that the user only needs to provide one number.

Requirement

Once the user specifies the seed, it could be picked up and applied when the switch starts or during the run time.

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