Skip to content

Commit 63c7a3b

Browse files
superchildzhangyanzhao
authored andcommittedJun 14, 2023
Revise after implementation
1 parent 950267e commit 63c7a3b

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed
 

‎doc/sag/images/sag-flow.png

-44.3 KB
Loading

‎doc/sag/sag-HLD.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
| :---: | :--------- | :---------: | --------------------------------- |
3131
| 0.1 | 08/13/2021 | Jimi Chen | Initial version |
3232
| 0.2 | 08/30/2021 | Jimi Chen | Update community review comments |
33+
| 0.3 | 10/20/2021 | Jimi Chen | Revise after implementation |
3334

3435
# Scope
3536
This HLD extends SONiC to support static anycast gateway
@@ -146,7 +147,7 @@ The format is in the following
146147

147148
```
148149
admin@edgecore:~$ sudo config static-anycast-gateway mac_address del -h
149-
Usage: config static-anycast-gateway mac_address add [OPTIONS] <mac_address>
150+
Usage: config static-anycast-gateway mac_address del [OPTIONS] <mac_address>
150151
151152
Delete global static-anycast-gateway mac address
152153
@@ -247,11 +248,13 @@ Add new yang model to describe static anycast gateway configuration
247248
```
248249
container sonic-static-anycast-gateway {
249250
container SAG {
250-
description "static anycast gateway configuration";
251+
container GLOBAL {
252+
description "static anycast gateway configuration";
251253
252-
leaf gwmac {
253-
type yang:mac-address;
254-
}
254+
leaf gwmac {
255+
type yang:mac-address;
256+
}
257+
}
255258
}
256259
}
257260
@@ -290,7 +293,7 @@ list VLAN_INTERFACE_LIST {
290293
}
291294
292295
leaf staic-anycast-gateway {
293-
description "Enable/Disable static anycast gateway"
296+
description "Enable/disable static anycast gateway for the vlan interface";
294297
type boolean;
295298
default false;
296299
}

‎doc/sag/sag-flow.wsd

+4-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ box "Orchagent" #LightGrey
44
control IntfMgrD
55
control IntfsOrch
66
control RouteOrch
7-
control VrfOrch
87
end box
98
participant kernel
109
box "DB" #LightBlue
@@ -25,38 +24,22 @@ IntfsOrch <-- APPL_DB
2524
IntfsOrch -> ASIC_DB: create router interface and change to SAG MAC address
2625
IntfMgrD -> APPL_DB: config VLAN interface IP
2726
IntfsOrch <-- APPL_DB
28-
alt VLAN interface in default VRF
29-
IntfsOrch -> RouteOrch: delete system MAC generated IPv6 link-local to me route
30-
RouteOrch -> ASIC_DB: remove route entry
27+
28+
loop all existed VRFs
3129
IntfsOrch -> RouteOrch: add SAG MAC generated IPv6 link-local to me route
3230
RouteOrch -> ASIC_DB: add route entry
33-
else VLAN interface in VRF
34-
IntfsOrch -> VrfOrch: delete system MAC generated IPv6 link-local to me route
35-
VrfOrch -> RouteOrch
36-
RouteOrch -> ASIC_DB: remove route entry
37-
IntfsOrch -> VrfOrch: add SAG MAC generated IPv6 link-local to me router
38-
VrfOrch -> RouteOrch
39-
RouteOrch -> ASIC_DB: add route entry
4031
end
32+
4133
group Disable SAG on the VLAN interface
4234
UI -> CONFIG_DB: disable SAG on the VLAN interface
4335
IntfMgrD <-- CONFIG_DB
4436
IntfMgrD -> kernel: change VLAN interface's MAC address to CPU MAC address
4537
IntfMgrD -> APPL_DB: Modify INTF_TABLE entry from SAG MAC address to CPU MAC address
4638
IntfsOrch <-- APPL_DB
4739
IntfsOrch -> ASIC_DB: change router interface's MAC address to CPU MAC address
48-
alt VLAN interface in default VRF
40+
loop all existed VRFs
4941
IntfsOrch -> RouteOrch: delete SAG MAC generated IPv6 link-local to me route
5042
RouteOrch -> ASIC_DB: remove route entry
51-
IntfsOrch -> RouteOrch: add system MAC generated IPv6 link-local to me route
52-
RouteOrch -> ASIC_DB: add route entry
53-
else VLAN interface in VRF
54-
IntfsOrch -> VrfOrch: delete SAG MAC generated IPv6 link-local to me route
55-
VrfOrh -> RouteOrch
56-
RouteOrch -> ASIC_DB: remove route entry
57-
IntfsOrch -> VrfOrch: add system MAC generated IPv6 link-local to me route
58-
VrfOrch -> RouteOrch
59-
RouteOrch -> ASIC_DB: add route entry
6043
end
6144
end
6245
@enduml

0 commit comments

Comments
 (0)