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

Static Member Selection Modes For ECMP and LAG #2078

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkadia-marvell
Copy link

@dkadia-marvell dkadia-marvell commented Sep 19, 2024

This proposal introduces the below two types of light weight static member selection modes for ECMP/LAG.

  • Random
  • Round Robin

@dkadia-marvell dkadia-marvell force-pushed the dkadia_static_mem_selection_mode branch 2 times, most recently from 7a58a12 to f0614a3 Compare November 14, 2024 12:41
@rck-innovium
Copy link
Contributor

@JaiOCP @tjchadaga

Summary of the discussion on 11/14/2024

  1. [Jai] The option to enable packet spraying is in practice needed at the Switch level and not at a per Next Hop Group level.
  2. [Jai] A possible interpretation of SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_ALGORITHM:SAI_HASH_ALGORITHM_RANDOM is to enable packet spraying at a switch level.
    [Ravi] The only description available in the community is: /** Random-based hash algorithm */. This suggests it is still a hash algorithm i.e., it hashes on some fields of the packet. A possible example of such an algorithm could be: https://patents.google.com/patent/US8503456

Next steps agreed:

[Ravi] and [Jai] to see if there are use-cases for enabling packet-spraying at a per NHG granularity instead of switch level. We should also see what happens to telemetry packets, control packets etc. We will discuss offline over the PR and if needed use a follow up meeting.

@tjchadaga tjchadaga added the reviewed PR is discussed in SAI Meeting label Nov 18, 2024
@tjchadaga
Copy link
Collaborator

@dkadia-marvell, @rck-innovium - any conclusion on this? does this need another discussion?

@dkadia-marvell dkadia-marvell force-pushed the dkadia_static_mem_selection_mode branch from f0614a3 to 030cdc9 Compare February 25, 2025 17:45
inc/saiswitch.h Outdated
@@ -187,6 +187,9 @@ typedef enum _sai_switch_switching_mode_t
*/
typedef enum _sai_hash_algorithm_t
{
/** Hash algorithm not set */
SAI_HASH_ALGORITHM_NONE = 7,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

place this between 6 and 8

@dkadia-marvell dkadia-marvell force-pushed the dkadia_static_mem_selection_mode branch from 030cdc9 to 8308989 Compare February 26, 2025 11:10
@dkadia-marvell dkadia-marvell force-pushed the dkadia_static_mem_selection_mode branch 2 times, most recently from 0100e4d to 16eddf6 Compare February 27, 2025 15:25
Signed-off-by: dkadia-marvell <[email protected]>
@dkadia-marvell dkadia-marvell force-pushed the dkadia_static_mem_selection_mode branch from 16eddf6 to b56e37f Compare February 27, 2025 16:22
@rck-innovium
Copy link
Contributor

Thanks @JaiOCP for the discussion. Please find the summary below:

Summary of the follow-up discussion on 02/27/2025

  • Offline Discussion with SAI Vendors: The consensus was to use SAI_HASH_ALGORITHM_RANDOM for per-packet random spraying. We have expanded the existing comments to ensure this is unambiguous.

  • Hash Algorithm Selection: We agreed on the need to select the SAI hash algorithm at either the LAG level or the Nexthop Group (NHG) level. The use case presented involved a TOR switch connected to multiple appliances, each via a LAG. Some appliances can handle packet reordering, while others cannot. This approach can also be extended to NHG if the appliance is connected via ECMP.

  • Concerns Raised by Jai: Jai raised a concern about exposing the hash algorithm at the NHG/LAG level. In some devices, this could lead to running out of hash generation blocks (e.g., some NHGs use CRC, some use XOR, some use CRC_XOR, etc.). We agreed to address this concern in a separate proposal to discover capacity/CRM.

@JaiOCP @tjchadaga

Summary of the discussion on 11/14/2024

  1. [Jai] The option to enable packet spraying is in practice needed at the Switch level and not at a per Next Hop Group level.
  2. [Jai] A possible interpretation of SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_ALGORITHM:SAI_HASH_ALGORITHM_RANDOM is to enable packet spraying at a switch level.
    [Ravi] The only description available in the community is: /** Random-based hash algorithm */. This suggests it is still a hash algorithm i.e., it hashes on some fields of the packet. A possible example of such an algorithm could be: https://patents.google.com/patent/US8503456

Next steps agreed:

[Ravi] and [Jai] to see if there are use-cases for enabling packet-spraying at a per NHG granularity instead of switch level. We should also see what happens to telemetry packets, control packets etc. We will discuss offline over the PR and if needed use a follow up meeting.

/**
* @brief End of Rule Actions
*/
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_SET_INNER_DST_MAC,
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_SET_ECMP_HASH_ALGORITHM,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should resign with setting this value explicitly, and just leave it as last attribute to not have to change that explicitly every time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewed PR is discussed in SAI Meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants