@@ -21,18 +21,18 @@ In addition, many existing switches have a configuration model which allows glob
21
21
22
22
### New Switch PTP Configuration Type
23
23
``` c
24
- typedef struct _sai_switch_ptp_config_t
24
+ typedef struct _sai_switch_ptp_mode_t
25
25
{
26
26
/** None - per-port configuration is used to switch on PTP for a port */
27
27
SAI_SWITCH_PTP_MODE_NONE,
28
28
29
29
/** One-step - all ports use one-step PTP mode */
30
- SAI_SWITCH_PTP_MODE_ONE_STEP ,
30
+ SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP ,
31
31
32
32
/** Two-step - all ports use two-step PTP mode */
33
- SAI_SWITCH_PTP_MODE_TWO_STEP
33
+ SAI_SWITCH_PTP_MODE_TWO_STEP_TIMESTAMP
34
34
35
- } sai_switch_ptp_config_t ;
35
+ } sai_switch_ptp_mode_t ;
36
36
```
37
37
38
38
### New Switch Attribute
@@ -42,16 +42,16 @@ typedef enum _sai_switch_attr_t
42
42
// ... existing attributes ...
43
43
44
44
/**
45
- * @brief Global PTP configuration
45
+ * @brief Global PTP mode configuration
46
46
*
47
- * Global PTP configuration for the switch.
47
+ * Global PTP mode configuration for the switch.
48
48
* Applies to all ports unless overridden by port-specific settings.
49
49
*
50
- * @type sai_switch_ptp_config_t
50
+ * @type sai_switch_ptp_mode_t
51
51
* @flags CREATE_AND_SET
52
52
* @default SAI_SWITCH_PTP_MODE_NONE
53
53
*/
54
- SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG ,
54
+ SAI_SWITCH_ATTR_PTP_MODE ,
55
55
56
56
// ... existing attributes ...
57
57
} sai_switch_attr_t ;
@@ -61,15 +61,15 @@ typedef enum _sai_switch_attr_t
61
61
``` c
62
62
// Set global PTP configuration at switch level
63
63
sai_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 ;
66
66
67
67
sai_status_t status = sai_switch_api->set_switch_attribute (
68
68
switch_id,
69
69
&attr);
70
70
71
71
// Get global PTP configuration
72
- attr.id = SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG ;
72
+ attr.id = SAI_SWITCH_ATTR_PTP_MODE ;
73
73
status = sai_switch_api->get_switch_attribute(
74
74
switch_id,
75
75
1,
0 commit comments