Skip to content

Commit 7387eed

Browse files
committed
Fix names
1 parent 29ff403 commit 7387eed

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

doc/SAI-Proposal-Global-PTP-Configuration.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -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
6363
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;
6666

6767
sai_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;
7373
status = sai_switch_api->get_switch_attribute(
7474
switch_id,
7575
1,

inc/saiswitch.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -3198,16 +3198,16 @@ typedef enum _sai_switch_attr_t
31983198
SAI_SWITCH_ATTR_SHARED_BUFFER_CELL_SIZE,
31993199

32003200
/**
3201-
* @brief Global PTP configuration
3201+
* @brief Global PTP mode configuration
32023202
*
3203-
* Global PTP configuration for the switch.
3203+
* Global PTP mode configuration for the switch.
32043204
* Applies to all ports unless overridden by port-specific settings.
32053205
*
3206-
* @type sai_switch_ptp_config_t
3206+
* @type sai_switch_ptp_mode_t
32073207
* @flags CREATE_AND_SET
32083208
* @default SAI_SWITCH_PTP_MODE_NONE
32093209
*/
3210-
SAI_SWITCH_ATTR_GLOBAL_PTP_CONFIG,
3210+
SAI_SWITCH_ATTR_PTP_MODE,
32113211

32123212
/**
32133213
* @brief End of attributes
@@ -3244,18 +3244,18 @@ typedef enum _sai_switch_asic_sdk_health_severity_t
32443244
/**
32453245
* @brief Global PTP configuration
32463246
*/
3247-
typedef struct _sai_switch_ptp_config_t
3247+
typedef struct _sai_switch_ptp_mode_t
32483248
{
32493249
/** None - per-port configuration can be used to switch PTP on for a port */
32503250
SAI_SWITCH_PTP_MODE_NONE,
32513251

32523252
/** One-step - all ports use one-step PTP mode */
3253-
SAI_SWITCH_PTP_MODE_ONE_STEP,
3253+
SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP,
32543254

32553255
/** Two-step - all ports use two-step PTP mode */
3256-
SAI_SWITCH_PTP_MODE_TWO_STEP
3256+
SAI_SWITCH_PTP_MODE_TWO_STEP_TIMESTAMP
32573257

3258-
} sai_switch_ptp_config_t;
3258+
} sai_switch_ptp_mode_t;
32593259

32603260
/**
32613261
* @brief Switch health categories

0 commit comments

Comments
 (0)