diff options
| author | Siger Yang <siger.yang@outlook.com> | 2022-09-06 15:10:11 +0800 | 
|---|---|---|
| committer | Siger Yang <siger.yang@outlook.com> | 2022-11-22 22:35:35 +0800 | 
| commit | c317d3f246769e8261df0f9d1eb787bea7b5da06 (patch) | |
| tree | 5fe488123f08250f2c5db8c70bb092ea6c1e3ed5 /zebra/zebra_router.c | |
| parent | daa602b593dc80b011a2355844c4cc7528f7a90d (diff) | |
zebra: traffic control state management
This allows Zebra to manage QDISC, TCLASS, TFILTER in kernel and do cleaning
jobs when it starts up.
Signed-off-by: Siger Yang <siger.yang@outlook.com>
Diffstat (limited to 'zebra/zebra_router.c')
| -rw-r--r-- | zebra/zebra_router.c | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index c66849863e..b8923ef57d 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -30,6 +30,7 @@  #include "zebra_mlag.h"  #include "zebra_nhg.h"  #include "zebra_neigh.h" +#include "zebra/zebra_tc.h"  #include "debug.h"  #include "zebra_script.h" @@ -312,6 +313,20 @@ void zebra_router_init(bool asic_offload, bool notify_on_ack)  		hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,  				 "Zebra Router Nexthop Groups ID index"); +	zrouter.rules_hash = +		hash_create_size(8, zebra_pbr_rules_hash_key, +				 zebra_pbr_rules_hash_equal, "Rules Hash"); + +	zrouter.qdisc_hash = +		hash_create_size(8, zebra_tc_qdisc_hash_key, +				 zebra_tc_qdisc_hash_equal, "TC (qdisc) Hash"); +	zrouter.class_hash = hash_create_size(8, zebra_tc_class_hash_key, +					      zebra_tc_class_hash_equal, +					      "TC (classes) Hash"); +	zrouter.filter_hash = hash_create_size(8, zebra_tc_filter_hash_key, +					       zebra_tc_filter_hash_equal, +					       "TC (filter) Hash"); +  	zrouter.asic_offloaded = asic_offload;  	zrouter.notify_on_ack = notify_on_ack;  | 
