@@ -5,7 +5,10 @@ use netem_trace::{Bandwidth, Delay};
55use paste:: paste;
66use rattan_core:: {
77 cells:: bandwidth:: {
8- queue:: { CoDelQueueConfig , DropHeadQueueConfig , DropTailQueueConfig , InfiniteQueueConfig } ,
8+ queue:: {
9+ CoDelQueueConfig , DropHeadQueueConfig , DropTailQueueConfig , InfiniteQueueConfig ,
10+ PieQueueConfig , RedQueueConfig ,
11+ } ,
912 BwCellConfig ,
1013 } ,
1114 config:: {
@@ -92,6 +95,8 @@ enum QueueType {
9295 DropTail ,
9396 DropHead ,
9497 CoDel ,
98+ Red ,
99+ Pie ,
95100}
96101
97102// Deserialize queue args and create BwCellBuildConfig
@@ -170,6 +175,12 @@ impl ChannelArgs {
170175 Some ( QueueType :: CoDel ) => {
171176 bw_q_args_into_config ! ( CoDel , self . uplink_queue_args. clone( ) , bandwidth)
172177 }
178+ Some ( QueueType :: Red ) => {
179+ bw_q_args_into_config ! ( Red , self . uplink_queue_args. clone( ) , bandwidth)
180+ }
181+ Some ( QueueType :: Pie ) => {
182+ bw_q_args_into_config ! ( Pie , self . uplink_queue_args. clone( ) , bandwidth)
183+ }
173184 } ;
174185 uplink_count += 1 ;
175186 cells_config. insert ( format ! ( "up_{uplink_count}" ) , cell_config) ;
@@ -197,6 +208,12 @@ impl ChannelArgs {
197208 Some ( QueueType :: CoDel ) => {
198209 bwreplay_q_args_into_config ! ( CoDel , self . uplink_queue_args. clone( ) , trace_file)
199210 }
211+ Some ( QueueType :: Red ) => {
212+ bwreplay_q_args_into_config ! ( Red , self . uplink_queue_args. clone( ) , trace_file)
213+ }
214+ Some ( QueueType :: Pie ) => {
215+ bwreplay_q_args_into_config ! ( Pie , self . uplink_queue_args. clone( ) , trace_file)
216+ }
200217 } ;
201218 uplink_count += 1 ;
202219 cells_config. insert ( format ! ( "up_{uplink_count}" ) , cell_config) ;
@@ -220,6 +237,12 @@ impl ChannelArgs {
220237 Some ( QueueType :: CoDel ) => {
221238 bw_q_args_into_config ! ( CoDel , self . downlink_queue_args. clone( ) , bandwidth)
222239 }
240+ Some ( QueueType :: Red ) => {
241+ bw_q_args_into_config ! ( Red , self . downlink_queue_args. clone( ) , bandwidth)
242+ }
243+ Some ( QueueType :: Pie ) => {
244+ bw_q_args_into_config ! ( Pie , self . downlink_queue_args. clone( ) , bandwidth)
245+ }
223246 } ;
224247 downlink_count += 1 ;
225248 cells_config. insert ( format ! ( "down_{downlink_count}" ) , cell_config) ;
@@ -251,6 +274,12 @@ impl ChannelArgs {
251274 trace_file
252275 )
253276 }
277+ Some ( QueueType :: Red ) => {
278+ bwreplay_q_args_into_config ! ( Red , self . downlink_queue_args. clone( ) , trace_file)
279+ }
280+ Some ( QueueType :: Pie ) => {
281+ bwreplay_q_args_into_config ! ( Pie , self . downlink_queue_args. clone( ) , trace_file)
282+ }
254283 } ;
255284 downlink_count += 1 ;
256285 cells_config. insert ( format ! ( "down_{downlink_count}" ) , cell_config) ;
0 commit comments