Skip to content

Commit c15b6d4

Browse files
Update API usage
1 parent a22801e commit c15b6d4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

doc/SAI-Proposal-MACSec-Secure-Policy.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Must Secure is the most stringent secure policy.
3535

3636
- If MKA session remains down, only EAPol(Extensible Authentication Protocol over LAN) packets are exchanged.
3737

38+
- If the peer does not support MACsec, traffic still passes unencrypted (avoiding connectivity loss).
39+
3840
## Should Secure (Fail-Open)
3941

4042
Should Secure is a less stricter policy than Must Secure.
@@ -45,9 +47,11 @@ Should Secure is a less stricter policy than Must Secure.
4547

4648
- The network continues to function, but the traffic on that specific link remains unencrypted.
4749

50+
- If the peer does not support MACsec, traffic still passes unencrypted (avoiding connectivity loss).
51+
4852
# SAI Attribute Enhancement
4953

50-
The MACSec port attribute is newly introduced to allow configuration of the MACSec secure policy.
54+
The below MACSec port attribute is newly introduced to allow configuration of the MACSec secure policy. This attribute controls how the switch’s MACsec security engine enforces link protection. When set, the attribute instructs the hardware to apply the corresponding policy on the specified port.
5155

5256
```c
5357
typedef enum _sai_macsec_port_attr_t
@@ -109,7 +113,12 @@ typedef enum _sai_macsec_port_secure_policy_t
109113

110114
/* Set Secure Policy */
111115
attr.id = SAI_MACSEC_PORT_ATTR_SECURE_POLICY;
112-
attr.value.u32 = SAI_MACSEC_PORT_SECURE_POLICY_MUST_SECURE;
116+
117+
if (must_secure) {
118+
attr.value.u32 = SAI_MACSEC_PORT_SECURE_POLICY_MUST_SECURE;
119+
} else {
120+
attr.value.u32 = SAI_MACSEC_PORT_SECURE_POLICY_SHOULD_SECURE;
121+
}
113122
attr_list.push_back(attr);
114123

115124
sai_create_macsec_port_fn(&macsec_port_id,

0 commit comments

Comments
 (0)