Skip to content

Commit f248e26

Browse files
authored
[orchagent] Add separate next hop table and orch (#1702)
Added a new next hop group table to APP_DB, and orchagent support to use this as an alternative to including next hop information in the route table. Added a new "nghOrch" that subscribes to next hop group table events to program next hop groups into SAI layer. Improves performance and occupancy usage when using the new table Extended SWSS unit tests to cover new code, and ran existing tests
1 parent fd0cafe commit f248e26

15 files changed

+3084
-474
lines changed

doc/swss-schema.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,35 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
159159
;Status: Mandatory
160160
key = ROUTE_TABLE:prefix
161161
nexthop = *prefix, ;IP addresses separated “,” (empty indicates no gateway)
162-
intf = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
162+
ifname = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
163+
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
163164
blackhole = BIT ; Set to 1 if this route is a blackhole (or null0)
165+
weight = weight_list ; List of weights.
166+
nexthop_group = string ; index within the NEXTHOP_GROUP_TABLE, used instead of nexthop and intf fields
167+
168+
---------------------------------------------
169+
170+
###### LABEL_ROUTE_TABLE
171+
; Defines schema for MPLS label route table attributes
172+
key = LABEL_ROUTE_TABLE:mpls_label ; MPLS label
173+
; field = value
174+
nexthop = STRING ; Comma-separated list of nexthops.
175+
ifname = STRING ; Comma-separated list of interfaces.
176+
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
177+
mpls_pop = STRING ; Number of ingress MPLS labels to POP
178+
weight = STRING ; Comma-separated list of weights.
179+
blackhole = BIT ; Set to 1 if this route is a blackhole (or null0)
180+
nexthop_group = string ; index within the NEXTHOP_GROUP_TABLE, used instead of nexthop and intf fields
181+
182+
---------------------------------------------
183+
### NEXTHOP_GROUP_TABLE
184+
;Stores a list of groups of one or more next hops
185+
;Status: Mandatory
186+
key = NEXTHOP_GROUP_TABLE:string ; arbitrary index for the next hop group
187+
nexthop = *prefix, ;IP addresses separated “,” (empty indicates no gateway)
188+
ifname = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
189+
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
190+
weight = weight_list ; List of weights.
164191

165192
---------------------------------------------
166193
### NEIGH_TABLE

orchagent/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ orchagent_SOURCES = \
3939
orchdaemon.cpp \
4040
orch.cpp \
4141
notifications.cpp \
42+
nhgorch.cpp \
4243
routeorch.cpp \
4344
mplsrouteorch.cpp \
4445
neighorch.cpp \

0 commit comments

Comments
 (0)