Skip to content

Commit

Permalink
[cbf] Added initial CBF support (#2)
Browse files Browse the repository at this point in the history
* Added CBF NHG support to NhgOrch
* Added NhgMapOrch to handle DSCP_TO_FC and EXP_TO_FC tables
* Added UT for the new NhgOrch function and NhgMapOrch

Signed-off-by: Alexandru Banu <Alexandru.Banu@metaswitch.com>
  • Loading branch information
TACappleman committed Nov 10, 2021
1 parent 8119ec0 commit 1b9843d
Show file tree
Hide file tree
Showing 22 changed files with 3,497 additions and 675 deletions.
2 changes: 2 additions & 0 deletions doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ name as object key and member list as attribute.
"pfc_enable": "3,4",
"pfc_to_queue_map": "AZURE",
"dscp_to_tc_map": "AZURE",
"dscp_to_fc_map": "AZURE",
"exp_to_fc_map": "AZURE",
"scheduler": "scheduler.port"
}
}
Expand Down
57 changes: 57 additions & 0 deletions doc/swss-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,28 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
weight = weight_list ; List of weights.

---------------------------------------------
### CLASS_BASED_NEXT_HOP_GROUP_TABLE
;Stores a list of groups of one or more next hop groups used for class based forwarding
;Status: Mandatory
key = CLASS_BASED_NEXT_HOP_GROUP_TABLE:string ; arbitrary index for the next hop group
members = NEXT_HOP_GROUP_TABLE.key ; one or more separated by ","
selection_map = FC_TO_NHG_INDEX_MAP_TABLE.key ; the NHG map to use for this CBF NHG

---------------------------------------------
### FC_TO_NHG_INDEX_MAP_TABLE
; FC to Next hop group index map
key = "FC_TO_NHG_INDEX_MAP_TABLE:"name
fc_num = 1*DIGIT ;value
nh_index = 1*DIGIT; index of NH inside NH group

Example:
127.0.0.1:6379> hgetall "FC_TO_NHG_INDEX_MAP_TABLE:AZURE"
1) "0" ;fc_num
2) "0" ;nhg_index
3) "1"
4) "0"

---------------------------------------------
### NEIGH_TABLE
; Stores the neighbors or next hop IP address and output port or
Expand Down Expand Up @@ -304,6 +326,41 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
9) "4"
10) "8"

### DSCP_TO_FC_TABLE_NAME
; dscp to FC map
;SAI mapping - qos_map object with SAI_QOS_MAP_ATTR_TYPE == sai_qos_map_type_t::SAI_QOS_MAP_TYPE_DSCP_TO_FORWARDING_CLASS
key = "DSCP_TO_FC_MAP_TABLE:"name
;field value
dscp_value = 1*DIGIT
fc_value = 1*DIGIT

Example:
127.0.0.1:6379> hgetall "DSCP_TO_FC_MAP_TABLE:AZURE"
1) "0" ;dscp
2) "1" ;fc
3) "1"
4) "1"
5) "2"
6) "3"
7)
---------------------------------------------
### EXP_TO_FC_MAP_TABLE
; dscp to FC map
;SAI mapping - qos_map object with SAI_QOS_MAP_ATTR_TYPE == sai_qos_map_type_t::SAI_QOS_MAP_TYPE_MPLS_EXP_TO_FORWARDING_CLASS
key = "EXP_TO_FC_MAP_TABLE:"name
;field value
mpls_exp_value = 1*DIGIT
fc_value = 1*DIGIT

Example:
127.0.0.1:6379> hgetall "EXP_TO_FC_MAP_TABLE:AZURE"
1) "0" ;mpls_exp
2) "1" ;fc
3) "1"
4) "1"
5) "2"
6) "3"

---------------------------------------------
### SCHEDULER_TABLE
; Scheduler table
Expand Down
5 changes: 4 additions & 1 deletion orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ orchagent_SOURCES = \
orchdaemon.cpp \
orch.cpp \
notifications.cpp \
nhgorch.cpp \
nhgbase.cpp \
nhghandler.cpp \
cbfnhghandler.cpp \
nhgmaporch.cpp \
routeorch.cpp \
mplsrouteorch.cpp \
neighorch.cpp \
Expand Down
Loading

0 comments on commit 1b9843d

Please sign in to comment.