Skip to content

Commit d612b96

Browse files
committed
Minor HLD update
Signed-off-by: Ravi Minnikanti <[email protected]>
1 parent 5f51771 commit d612b96

File tree

2 files changed

+50
-35
lines changed

2 files changed

+50
-35
lines changed

doc/llr/Link_Layer_Retry_Design.md

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ The following initial configurations are handled for LLR
185185
- `llrmgrd` subscribes to LLR_GLOBAL and LLR_PORT tables in CONFIG_DB to receive LLR global and per-port configuration updates and, depending on the global and per-port LLR state, propagates the relevant LLR configuration to APPL_DB.
186186
- If the LLR global configuration mode is set to Static, the configuration is driven by the configuration in CONFIG_DB.
187187
- When set to Dynamic, the configuration is driven by the LLDP exchange (This mode is not supported in Phase I of development).
188-
- It subscribes to CABLE_LENGTH tables in CONFIG_DB for admin_status, cable length information. For operational speed updates, it subscribes to the PORT_TABLE in STATE_DB.
188+
- It subscribes to CABLE_LENGTH table in CONFIG_DB for port cable length information. For operational speed updates, it subscribes to the PORT_TABLE in STATE_DB.
189189
- When LLR is enabled both globally and on a port, `llrmgrd` generates an LLR profile for the port and writes the corresponding profile to CONFIG_DB.
190190
- Additionally, it consumes LLR_PROFILE updates from CONFIG_DB and writes LLR port and profile information to APPL_DB for orchagent consumption.
191191

@@ -207,27 +207,27 @@ Field names in `llr_buffer_lookup.ini` maps to CONFIG_DB `LLR_PROFILE` fields. A
207207

208208
Profile fields to ini header mapping:
209209
```
210-
max_outstanding_frames <-> outstanding_frames (no of frames)
210+
max_outstanding_frames <-> outstanding_frames (number of frames)
211211
max_outstanding_bytes <-> outstanding_bytes (bytes)
212212
max_replay_timer <-> replay_timer (ns)
213213
max_replay_count <-> replay_count (count)
214214
pcs_lost_timeout <-> pcs_lost_timeout (ns)
215-
data_age_timer <-> data_age_timer (ns)
215+
data_age_timeout <-> data_age_timeout (ns)
216216
ctlos_spacing_bytes <-> ctlos_spacing (bytes)
217217
init_action <-> init_action (best_effort | block | discard)
218218
flush_action <-> flush_action (best_effort | block | discard)
219219
```
220220

221221
Sample file snippet:
222222
```
223-
speed cable outstanding_frames outstanding_bytes replay_timer replay_count pcs_lost_timeout data_age_timer ctlos_spacing init_action flush_action
224-
400000 3m 4096 262144 5000 3 50000 20000 2048 best_effort block
225-
400000 10m 4096 262144 5500 3 55000 24000 2048 best_effort block
226-
800000 3m 8192 524288 5000 3 50000 20000 2048 best_effort best_effort
227-
800000 10m 8192 524288 5500 3 55000 24000 2048 best_effort discard
223+
speed cable outstanding_frames outstanding_bytes replay_timer replay_count pcs_lost_timeout data_age_timeout ctlos_spacing init_action flush_action
224+
400000 3m 4096 262144 5000 3 50000 20000 2048 best_effort block
225+
400000 10m 4096 262144 5500 3 55000 24000 2048 best_effort block
226+
800000 3m 8192 524288 5000 3 50000 20000 2048 best_effort best_effort
227+
800000 10m 8192 524288 5500 3 55000 24000 2048 best_effort discard
228228
```
229229

230-
Vendors may omit any unsupported field by removing the column from the header; the manager will skip setting that attribute. This flexible format allows heterogeneous hardware capabilities without requiring code changes.
230+
Vendors may omit any unsupported field other than the `outstanding_frames` and `outstanding_bytes` by removing the column from the header; the manager will skip setting that attribute. This flexible format allows heterogeneous hardware capabilities without requiring code changes.
231231

232232
###### Figure 3: LLR Manager Flow
233233
![llrmgrd Flow](images/llr_llrmgrd_flow.svg "Figure 3: llrmgrd Flow")
@@ -282,7 +282,7 @@ The following table lists the SAI APIs used and their relevant attributes.
282282
| | sai_set_port_llr_profile_attribute_fn | SAI_PORT_LLR_PROFILE_ATTR_REPLAY_TIMER_MAX |
283283
| | sai_get_port_llr_profile_attribute_fn | SAI_PORT_LLR_PROFILE_ATTR_REPLAY_COUNT_MAX |
284284
| | | SAI_PORT_LLR_PROFILE_ATTR_PCS_LOST_TIMEOUT |
285-
| | | SAI_PORT_LLR_PROFILE_ATTR_DATA_AGE_TIMER |
285+
| | | SAI_PORT_LLR_PROFILE_ATTR_DATA_AGE_TIMEOUT |
286286
| | | SAI_PORT_LLR_PROFILE_ATTR_INIT_LLR_FRAME_ACTION |
287287
| | | SAI_PORT_LLR_PROFILE_ATTR_FLUSH_LLR_FRAME_ACTION |
288288
| | | SAI_PORT_LLR_PROFILE_ATTR_RE_INIT_ON_FLUSH (only TRUE) |
@@ -350,9 +350,10 @@ mode = "static" / "dynamic" ; Network configuration mode
350350
key = LLR_PORT | ifname ; Interface name (Ethernet only). Must be unique
351351
352352
; field = value
353-
state = "enabled" / "disabled" ; Per-port LLR state (both TX and RX)
354-
; Implementation maps to setting both SAI_PORT_ATTR_LLR_MODE_LOCAL and
355-
; SAI_PORT_ATTR_LLR_MODE_REMOTE. Default: "disabled" (only applied when mode == "static")
353+
local_state = "enabled" / "disabled" ; Per-port LLR local state
354+
; Implementation maps to setting SAI_PORT_ATTR_LLR_MODE_LOCAL. Default: "disabled" (only applied when mode == "static")
355+
remote_state = "enabled" / "disabled" ; Per-port LLR remote state
356+
; Implementation maps to setting SAI_PORT_ATTR_LLR_MODE_REMOTE. Default: "disabled" (only applied when mode == "static")
356357
profile = 1*64VCHAR ; LLR Profile name bound to the port (auto-generated)
357358
358359
```
@@ -374,7 +375,7 @@ max_replay_timer = 1*10DIGIT ; Maximum replay timer (
374375
; retransmission trigger. Range 0..65535
375376
pcs_lost_timeout = 1*10DIGIT ; Maximum PCS lost status duration (ns).
376377
; Range 0..4290000000
377-
data_age_timer = 1*10DIGIT ; Maximum age a frame may reside in replay buffer (ns). Range 0..4290000000
378+
data_age_timeout = 1*10DIGIT ; Maximum age a frame may reside in replay buffer (ns). Range 0..4290000000
378379
ctlos_spacing_bytes = 1*5DIGIT ; Target spacing between CtlOS msgs (ACK/NACK).
379380
; Range 400..16384. Default: 2048
380381
@@ -420,7 +421,8 @@ POLL_INTERVAL = 1*10DIGIT ; Flex counter polling
420421
{
421422
"LLR_PORT|Ethernet0": {
422423
"value": {
423-
"state": "enabled",
424+
"local_state": "enabled",
425+
"remote_state": "enabled",
424426
"profile": "llr_buffer_800000_40m_profile"
425427
}
426428
}
@@ -437,7 +439,7 @@ POLL_INTERVAL = 1*10DIGIT ; Flex counter polling
437439
"max_replay_count": "3",
438440
"max_replay_timer": "5000",
439441
"pcs_lost_timeout": "50000",
440-
"data_age_timer": "20000",
442+
"data_age_timeout": "20000",
441443
"ctlos_spacing_bytes": "2048",
442444
"init_action": "best_effort",
443445
"flush_action": "best_effort"
@@ -470,15 +472,15 @@ key = SWITCH_CAPABILITY | switch ; must be unique
470472
471473
; field = value
472474
LLR_CAPABLE = "true" / "false" ; specifies whether switch supports LLR feature
473-
LLR_SUPPORTED_PROFILE_ATTRIBUTES = "OUTSTANDING_BYTES_MAX, OUTSTANDING_FRAMES_MAX, REPLAY_TIMER_MAX, REPLAY_COUNT_MAX, PCS_LOST_TIMEOUT, DATA_AGE_TIMER, CTLOS_TARGET_SPACING"
475+
LLR_SUPPORTED_PROFILE_ATTRIBUTES = "OUTSTANDING_BYTES_MAX, OUTSTANDING_FRAMES_MAX, REPLAY_TIMER_MAX, REPLAY_COUNT_MAX, PCS_LOST_TIMEOUT, DATA_AGE_TIMEOUT, CTLOS_TARGET_SPACING"
474476
```
475477

476478
**Sample JSON:**
477479
```json
478480
"SWITCH_CAPABILITY|switch": {
479481
"value": {
480482
"LLR_CAPABLE": "true",
481-
"LLR_SUPPORTED_PROFILE_ATTRIBUTES": "OUTSTANDING_BYTES_MAX, OUTSTANDING_FRAMES_MAX, REPLAY_TIMER_MAX, REPLAY_COUNT_MAX, PCS_LOST_TIMEOUT, DATA_AGE_TIMER, CTLOS_TARGET_SPACING"
483+
"LLR_SUPPORTED_PROFILE_ATTRIBUTES": "OUTSTANDING_BYTES_MAX, OUTSTANDING_FRAMES_MAX, REPLAY_TIMER_MAX, REPLAY_COUNT_MAX, PCS_LOST_TIMEOUT, DATA_AGE_TIMEOUT, CTLOS_TARGET_SPACING"
482484
...
483485
}
484486
}
@@ -586,7 +588,8 @@ LLR per-port statistics are stored in the existing COUNTERS_DB Port Counters tab
586588
```
587589
- config llr {enable|disable}
588590
- config llr mode {static|dynamic} (dynamic Not implemented in Phase I)
589-
- config llr interface <interface-name> state {enabled|disabled} // only applicable when mode == static
591+
- config llr interface local-state <interface-name> {enabled|disabled} // only applicable when mode == static
592+
- config llr interface remote-state <interface-name> {enabled|disabled} // only applicable when mode == static
590593
591594
- show llr
592595
- show llr interface [interface-name]
@@ -619,18 +622,24 @@ The following command configures LLR mode:
619622
## config llr mode <static|dynamic>
620623

621624
config
622-
|--- llr mode <static|dynamic>
625+
|--- llr
626+
|--- mode <static|dynamic>
623627
```
624628
### 2.6.1.2 LLR Port Configuration Commands
625-
The following command allows enabling/disabling LLR (both TX and RX) on a port:
629+
The following commands allow enabling/disabling LLR local and remote states separately on a port. As per the UE SPEC, local_state is set when LLDP negotiation determines that both ends of a link support LLR, and remote_state is set when negotiation receives indication from the remote end of the link that its local_state has been set to ON.
630+
631+
In static mode, handling local_state and remote_state enablement sequence across the link parts is the responsibility of the network administrator.
626632

627633
**Enable/Disable LLR per Port**:
628634
```bash
629-
## config llr interface <interface-name> state {enabled|disabled}
635+
## config llr interface local-state <interface-name> {enabled|disabled}
636+
## config llr interface remote-state <interface-name> {enabled|disabled}
630637

631638
config
632-
|--- llr interface <interface-name> state {enabled|disabled}
633-
```
639+
|--- llr
640+
|--- interface
641+
|--- local-state <interface-name> {enabled|disabled}
642+
|--- remote-state <interface-name> {enabled|disabled}
634643

635644
### 2.6.1.3 LLR Flex Counter Commands
636645
**The following command updates LLR Flex counter configuration:**
@@ -655,11 +664,11 @@ LLR Global Information:
655664
LLR Interface Configuration
656665
----------------------------
657666
658-
PORT LLR State LLR PROFILE
659-
---------- ---------- ------------------------------
660-
Ethernet1 disabled -
661-
Ethernet2 enabled llr_buffer_800000_40m_profile
662-
Ethernet3 enabled llr_buffer_100000_100m_profile
667+
PORT LLR Local State LLR Remote State LLR PROFILE
668+
---------- ----------------- ------------------ ------------------------------
669+
Ethernet1 enabled disabled llr_buffer_800000_40m_profile
670+
Ethernet2 enabled enabled llr_buffer_800000_40m_profile
671+
Ethernet3 enabled enabled llr_buffer_100000_100m_profile
663672
```
664673

665674
```bash
@@ -677,7 +686,7 @@ Ethernet3 enabled llr_buffer_100000_100m_profile
677686
+---------------------------------------+--------------+
678687
| PCS Lost Status Timeout(ns) | 50000 |
679688
+---------------------------------------+--------------+
680-
| Data Age Timer(ns) | 20000 |
689+
| Data Age Timeout(ns) | 20000 |
681690
+---------------------------------------+--------------+
682691
| CTLOS Spacing Bytes | 2048 |
683692
+---------------------------------------+--------------+
@@ -810,10 +819,16 @@ module sonic-llr-port {
810819
}
811820
}
812821
813-
leaf state {
822+
leaf local_state {
823+
type stypes:admin_mode;
824+
default disabled;
825+
description "Enable LLR local state on the port.";
826+
}
827+
828+
leaf remote_state {
814829
type stypes:admin_mode;
815830
default disabled;
816-
description "Enable LLR on the port (enables both transmit and receive directions).";
831+
description "Enable LLR remote state on the port.";
817832
}
818833
819834
leaf llr_profile {
@@ -959,12 +974,12 @@ module sonic-llr-profile {
959974
description "Maximum value for Port PCS lost status timer in nanoseconds. This value represents maximum duration for a port PCS status can be lost, post timer expiry, LLR state transitions into FLUSH state. Support for non-zero values is optional depending on platform implementation.";
960975
}
961976
962-
leaf data_age_timer {
977+
leaf data_age_timeout {
963978
type uint32 {
964979
range "0..4290000000";
965980
}
966981
default 0;
967-
description "Maximum value for data age timer in nanoseconds. This value represents the maximum time that data can reside in the replay buffer. Post timer expiry, LLR declares the replay data is too old and invalid for retransmission";
982+
description "Maximum value for data age timeout in nanoseconds. This value represents the maximum time that data can reside in the replay buffer. Post timer expiry, LLR declares the replay data is too old and invalid for retransmission";
968983
}
969984
970985
leaf ctlos_spacing_bytes {

doc/llr/images/llr_init_flow.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)