Skip to content

Commit b94bad2

Browse files
committed
Fix comment errors and update proposal doc
Signed-off-by: Rich Sugarman <rsugarman@nvidia.com>
1 parent 63fa18c commit b94bad2

2 files changed

Lines changed: 21 additions & 15 deletions

File tree

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,28 @@ In addition, many existing switches have a configuration model which allows glob
1919

2020
## Technical Specification
2121

22-
### New Switch PTP Configuration Type
22+
### Updated description of existing PORT PTP type - the main comment is new
2323
```c
24-
typedef struct _sai_switch_ptp_mode_t
24+
/**
25+
* @brief PTP mode
26+
*
27+
* These modes can be used at the port and switch level.
28+
* All ports use the value set at the switch level unless explicitly configured
29+
* at the port level to a value other than SAI_PORT_PTP_MODE_NONE.
30+
*/
31+
typedef enum _sai_port_ptp_mode_t
2532
{
26-
/** None - per-port configuration is used to switch on PTP for a port */
27-
SAI_SWITCH_PTP_MODE_NONE,
33+
/** No special processing for PTP packets */
34+
SAI_PORT_PTP_MODE_NONE,
2835

29-
/** One-step - all ports use one-step PTP mode */
30-
SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP,
36+
/** Single-step Timestamp mode for the PTP packets */
37+
SAI_PORT_PTP_MODE_SINGLE_STEP_TIMESTAMP,
38+
39+
/** Two-step Timestamp mode for the PTP packets */
40+
SAI_PORT_PTP_MODE_TWO_STEP_TIMESTAMP,
41+
42+
} sai_port_ptp_mode_t;
3143

32-
/** Two-step - all ports use two-step PTP mode */
33-
SAI_SWITCH_PTP_MODE_TWO_STEP_TIMESTAMP
34-
35-
} sai_switch_ptp_mode_t;
36-
```
3744

3845
### New Switch Attribute
3946
```c
@@ -47,9 +54,9 @@ typedef enum _sai_switch_attr_t
4754
* Global PTP mode configuration for the switch.
4855
* Applies to all ports unless overridden by port-specific settings.
4956
*
50-
* @type sai_switch_ptp_mode_t
57+
* @type sai_port_ptp_mode_t
5158
* @flags CREATE_AND_SET
52-
* @default SAI_SWITCH_PTP_MODE_NONE
59+
* @default SAI_PORT_PTP_MODE_NONE
5360
*/
5461
SAI_SWITCH_ATTR_PTP_MODE,
5562

@@ -62,7 +69,7 @@ typedef enum _sai_switch_attr_t
6269
// Set global PTP configuration at switch level
6370
sai_attribute_t attr;
6471
attr.id = SAI_SWITCH_ATTR_PTP_MODE;
65-
attr.value.s32 = SAI_SWITCH_PTP_MODE_SINGLE_STEP_TIMESTAMP;
72+
attr.value.s32 = SAI_PORT_PTP_MODE_SINGLE_STEP_TIMESTAMP;
6673

6774
sai_status_t status = sai_switch_api->set_switch_attribute(
6875
switch_id,

inc/saiport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ typedef enum _sai_port_priority_flow_control_mode_t
395395

396396
/**
397397
* @brief PTP mode
398-
*
399398
* These modes can be used at the port and switch level.
400399
* All ports use the value set at the switch level unless explicitly configured
401400
* at the port level to a value other than SAI_PORT_PTP_MODE_NONE.

0 commit comments

Comments
 (0)