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

Addition of platform information file path name to sai_switch_initiai… #10

Closed
wants to merge 3 commits into from
Closed

Addition of platform information file path name to sai_switch_initiai… #10

wants to merge 3 commits into from

Conversation

Rajasekhar-Pulluru
Copy link
Contributor

Addition of platform information file path name to sai_switch_initiailize

Addition of below RO attributes and define keys to enable its configuration via
KV pair:
SAI_SWITCH_ATTR_LAG_MEMBERS
SAI_SWITCH_ATTR_LAG_NUMBER
SAI_SWITCH_ATTR_ECMP_PATHS
SAI_SWITCH_ATTR_L3_NEIGHBOR_TABLE_SIZE
SAI_SWITCH_ATTR_L3_ROUTE_TABLE_SIZE
SAI_SWITCH_ATTR_NUM_UNICAST_QUEUES
SAI_SWITCH_ATTR_NUM_MULTICAST_QUEUES
SAI_SWITCH_ATTR_NUM_QUEUES
SAI_SWITCH_ATTR_NUM_CPU_QUEUES
SAI_SWITCH_ATTR_NUM_ECMP_GROUPS

Added Macro SAI_SWITCH_ATTR_RESET_DEFAULT to configure above attributes to NPU
default when set with this value

changed uin32_t to sai_uint32_t

Changes to be committed:
modified: inc/saiswitch.h
modified: inc/saitypes.h

…lize

Addition of below RO attributes and define keys to enable its configuration via
KV pair:
SAI_SWITCH_ATTR_LAG_MEMBERS
SAI_SWITCH_ATTR_LAG_NUMBER
SAI_SWITCH_ATTR_ECMP_PATHS
SAI_SWITCH_ATTR_L3_NEIGHBOR_TABLE_SIZE
SAI_SWITCH_ATTR_L3_ROUTE_TABLE_SIZE
SAI_SWITCH_ATTR_NUM_UNICAST_QUEUES
SAI_SWITCH_ATTR_NUM_MULTICAST_QUEUES
SAI_SWITCH_ATTR_NUM_QUEUES
SAI_SWITCH_ATTR_NUM_CPU_QUEUES
SAI_SWITCH_ATTR_NUM_ECMP_GROUPS

Added Macro SAI_SWITCH_ATTR_RESET_DEFAULT to configure above attributes to NPU
default when set with this value

changed uin32_t to sai_uint32_t

 Changes to be committed:
	modified:   inc/saiswitch.h
	modified:   inc/saitypes.h
 Changes to be committed:
	modified:   inc/saiswitch.h
	modified:   inc/saitypes.h
@@ -483,6 +534,7 @@ typedef sai_status_t (*sai_initialize_switch_fn)(
_In_ sai_switch_profile_id_t profile_id,
_In_reads_z_(SAI_MAX_HARDWARE_ID_LEN) char* switch_hardware_id,
_In_reads_opt_z_(SAI_MAX_FIRMWARE_PATH_NAME_LEN) char* firmware_path_name,
_In_reads_opt_z_(SAI_MAX_PLATFORM_INFO_PATH_NAME_LEN) char* platform_info_path_name,
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure what this is used for, can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Platform specific file will contain NPU related information like:
Pre-emphasis setting,
Lane mapping and Polarity,
LED configuration,
Break-out modes etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of add a parameter to the init_switch_fn, can we use a K/V to provide the platform specifi file, e.g., INIT_CONFIG_FILE=platform_info_file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes Guohan, added a key (INIT_CONFIG_FILE) and removed the parameter from switch init function.

… file path

and removed the parameter from sai switch init routine

 Changes to be committed:
	modified:   inc/saiswitch.h
@lguohan
Copy link
Collaborator

lguohan commented Nov 4, 2015

merged, thanks

@lguohan lguohan closed this Nov 4, 2015
IGordynskyi pushed a commit to IGordynskyi/SAI that referenced this pull request Sep 23, 2016
RyoYang pushed a commit to RyoYang/SAI that referenced this pull request May 26, 2022
Add two T0 configurations, metadata and port (without serdes) base on the config_db.json configuration file.
Define the new setup method in T0 broadcom.
Add a config file for the s6000_s1220_r0
Refactor the method for abstract the info from config.ini, make the key from the name to the index, which can map the the port index directly.

Todo:
Add the serdes config, which needs to read the config file and parse the info.

Test done:
Tested on the dut.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants