@@ -21,18 +21,18 @@ In addition, many existing switches have a configuration model which allows glob
2121
2222### New Switch PTP Configuration Type
2323``` c
24- typedef struct _sai_switch_ptp_config_t
24+ typedef struct _sai_switch_ptp_mode_t
2525{
2626 /** None - per-port configuration is used to switch on PTP for a port */
2727 SAI_SWITCH_PTP_MODE_NONE,
2828
2929 /** One-step - all ports use one-step PTP mode */
30- SAI_SWITCH_PTP_MODE_ONE_STEP ,
30+ SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP ,
3131
3232 /** Two-step - all ports use two-step PTP mode */
33- SAI_SWITCH_PTP_MODE_TWO_STEP
33+ SAI_SWITCH_PTP_MODE_TWO_STEP_TIMESTAMP
3434
35- } sai_switch_ptp_config_t ;
35+ } sai_switch_ptp_mode_t ;
3636```
3737
3838### New Switch Attribute
@@ -42,16 +42,16 @@ typedef enum _sai_switch_attr_t
4242 // ... existing attributes ...
4343
4444 /**
45- * @brief Global PTP configuration
45+ * @brief Global PTP mode configuration
4646 *
47- * Global PTP configuration for the switch.
47+ * Global PTP mode configuration for the switch.
4848 * Applies to all ports unless overridden by port-specific settings.
4949 *
50- * @type sai_switch_ptp_config_t
50+ * @type sai_switch_ptp_mode_t
5151 * @flags CREATE_AND_SET
5252 * @default SAI_SWITCH_PTP_MODE_NONE
5353 */
54- SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG ,
54+ SAI_SWITCH_ATTR_PTP_MODE ,
5555
5656 // ... existing attributes ...
5757} sai_switch_attr_t ;
@@ -61,15 +61,15 @@ typedef enum _sai_switch_attr_t
6161``` c
6262// Set global PTP configuration at switch level
6363sai_attribute_t attr;
64- attr.id = SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG ;
65- attr.value.s32 = SAI_SWITCH_PTP_MODE_ONE_STEP ;
64+ attr.id = SAI_SWITCH_ATTR_PTP_MODE ;
65+ attr.value.s32 = SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP ;
6666
6767sai_status_t status = sai_switch_api->set_switch_attribute (
6868 switch_id,
6969 &attr);
7070
7171// Get global PTP configuration
72- attr.id = SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG ;
72+ attr.id = SAI_SWITCH_ATTR_PTP_MODE ;
7373status = sai_switch_api->get_switch_attribute(
7474 switch_id,
7575 1,
0 commit comments