Skip to content

Commit

Permalink
[orchagent] Add separate next hop table and orch (#1702)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TACappleman authored Oct 15, 2021
1 parent fd0cafe commit f248e26
Show file tree
Hide file tree
Showing 15 changed files with 3,084 additions and 474 deletions.
29 changes: 28 additions & 1 deletion doc/swss-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,35 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
;Status: Mandatory
key = ROUTE_TABLE:prefix
nexthop = *prefix, ;IP addresses separated “,” (empty indicates no gateway)
intf = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
ifname = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
blackhole = BIT ; Set to 1 if this route is a blackhole (or null0)
weight = weight_list ; List of weights.
nexthop_group = string ; index within the NEXTHOP_GROUP_TABLE, used instead of nexthop and intf fields

---------------------------------------------

###### LABEL_ROUTE_TABLE
; Defines schema for MPLS label route table attributes
key = LABEL_ROUTE_TABLE:mpls_label ; MPLS label
; field = value
nexthop = STRING ; Comma-separated list of nexthops.
ifname = STRING ; Comma-separated list of interfaces.
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
mpls_pop = STRING ; Number of ingress MPLS labels to POP
weight = STRING ; Comma-separated list of weights.
blackhole = BIT ; Set to 1 if this route is a blackhole (or null0)
nexthop_group = string ; index within the NEXTHOP_GROUP_TABLE, used instead of nexthop and intf fields

---------------------------------------------
### NEXTHOP_GROUP_TABLE
;Stores a list of groups of one or more next hops
;Status: Mandatory
key = NEXTHOP_GROUP_TABLE:string ; arbitrary index for the next hop group
nexthop = *prefix, ;IP addresses separated “,” (empty indicates no gateway)
ifname = ifindex? PORT_TABLE.key ; zero or more separated by “,” (zero indicates no interface)
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
weight = weight_list ; List of weights.

---------------------------------------------
### NEIGH_TABLE
Expand Down
1 change: 1 addition & 0 deletions orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ orchagent_SOURCES = \
orchdaemon.cpp \
orch.cpp \
notifications.cpp \
nhgorch.cpp \
routeorch.cpp \
mplsrouteorch.cpp \
neighorch.cpp \
Expand Down
Loading

0 comments on commit f248e26

Please sign in to comment.