Skip to content

Commit d816864

Browse files
committed
[cbf] Added initial CBF support (#2)
* 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 <[email protected]>
1 parent e14a071 commit d816864

22 files changed

+3499
-677
lines changed

doc/Configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,8 @@ name as object key and member list as attribute.
11291129
"pfc_enable": "3,4",
11301130
"pfc_to_queue_map": "AZURE",
11311131
"dscp_to_tc_map": "AZURE",
1132+
"dscp_to_fc_map": "AZURE",
1133+
"exp_to_fc_map": "AZURE",
11321134
"scheduler": "scheduler.port"
11331135
}
11341136
}

doc/swss-schema.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,28 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
192192
mpls_nh = STRING ; Comma-separated list of MPLS NH info.
193193
weight = weight_list ; List of weights.
194194

195+
---------------------------------------------
196+
### CLASS_BASED_NEXT_HOP_GROUP_TABLE
197+
;Stores a list of groups of one or more next hop groups used for class based forwarding
198+
;Status: Mandatory
199+
key = CLASS_BASED_NEXT_HOP_GROUP_TABLE:string ; arbitrary index for the next hop group
200+
members = NEXT_HOP_GROUP_TABLE.key ; one or more separated by ","
201+
selection_map = FC_TO_NHG_INDEX_MAP_TABLE.key ; the NHG map to use for this CBF NHG
202+
203+
---------------------------------------------
204+
### FC_TO_NHG_INDEX_MAP_TABLE
205+
; FC to Next hop group index map
206+
key = "FC_TO_NHG_INDEX_MAP_TABLE:"name
207+
fc_num = 1*DIGIT ;value
208+
nh_index = 1*DIGIT; index of NH inside NH group
209+
210+
Example:
211+
127.0.0.1:6379> hgetall "FC_TO_NHG_INDEX_MAP_TABLE:AZURE"
212+
1) "0" ;fc_num
213+
2) "0" ;nhg_index
214+
3) "1"
215+
4) "0"
216+
195217
---------------------------------------------
196218
### NEIGH_TABLE
197219
; Stores the neighbors or next hop IP address and output port or
@@ -304,6 +326,41 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
304326
9) "4"
305327
10) "8"
306328

329+
### DSCP_TO_FC_TABLE_NAME
330+
; dscp to FC map
331+
;SAI mapping - qos_map object with SAI_QOS_MAP_ATTR_TYPE == sai_qos_map_type_t::SAI_QOS_MAP_TYPE_DSCP_TO_FORWARDING_CLASS
332+
key = "DSCP_TO_FC_MAP_TABLE:"name
333+
;field value
334+
dscp_value = 1*DIGIT
335+
fc_value = 1*DIGIT
336+
337+
Example:
338+
127.0.0.1:6379> hgetall "DSCP_TO_FC_MAP_TABLE:AZURE"
339+
1) "0" ;dscp
340+
2) "1" ;fc
341+
3) "1"
342+
4) "1"
343+
5) "2"
344+
6) "3"
345+
7)
346+
---------------------------------------------
347+
### EXP_TO_FC_MAP_TABLE
348+
; dscp to FC map
349+
;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
350+
key = "EXP_TO_FC_MAP_TABLE:"name
351+
;field value
352+
mpls_exp_value = 1*DIGIT
353+
fc_value = 1*DIGIT
354+
355+
Example:
356+
127.0.0.1:6379> hgetall "EXP_TO_FC_MAP_TABLE:AZURE"
357+
1) "0" ;mpls_exp
358+
2) "1" ;fc
359+
3) "1"
360+
4) "1"
361+
5) "2"
362+
6) "3"
363+
307364
---------------------------------------------
308365
### SCHEDULER_TABLE
309366
; Scheduler table

orchagent/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ orchagent_SOURCES = \
4040
orchdaemon.cpp \
4141
orch.cpp \
4242
notifications.cpp \
43-
nhgorch.cpp \
43+
nhgbase.cpp \
44+
nhghandler.cpp \
45+
cbfnhghandler.cpp \
4446
routeorch.cpp \
4547
mplsrouteorch.cpp \
4648
neighorch.cpp \
@@ -81,7 +83,8 @@ orchagent_SOURCES = \
8183
isolationgrouporch.cpp \
8284
muxorch.cpp \
8385
macsecorch.cpp \
84-
lagid.cpp
86+
lagid.cpp \
87+
nhgmaporch.cpp
8588

8689
orchagent_SOURCES += flex_counter/flex_counter_manager.cpp flex_counter/flex_counter_stat_manager.cpp
8790
orchagent_SOURCES += debug_counter/debug_counter.cpp debug_counter/drop_counter.cpp

0 commit comments

Comments
 (0)