@@ -432,15 +432,13 @@ upf_acl_classify_return (vlib_main_t *vm, u32 teid, flow_entry_t *flow,
432
432
// if impossible to detect
433
433
always_inline flow_direction_t
434
434
upf_classify_detect_flow_direction (vlib_buffer_t * b , struct rules * r ,
435
- flow_direction_t direction , bool * found )
435
+ flow_direction_t direction )
436
436
{
437
437
// Here we rely on the fact that interface of type ACCESS is one which
438
438
// directed to UE
439
439
// TODO: it should be possible to calculate and save this value per PDR
440
440
// during session creation/modification
441
441
442
- * found = false;
443
-
444
442
u32 pdr_idx = upf_buffer_opaque (b )-> gtpu .pdr_idx ;
445
443
if (pdr_idx == ~0 )
446
444
{
@@ -460,7 +458,6 @@ upf_classify_detect_flow_direction (vlib_buffer_t *b, struct rules *r,
460
458
upf_debug ("detected uplink direction from pdr: %d matched on %v" ,
461
459
FTD_OP_SAME ^ direction ,
462
460
pool_elt_at_index (upf_main .nwis , pdr -> pdi .nwi_index )-> name );
463
- * found = true;
464
461
return FTD_OP_SAME ^ direction ;
465
462
}
466
463
@@ -483,7 +480,6 @@ upf_classify_detect_flow_direction (vlib_buffer_t *b, struct rules *r,
483
480
"detected uplink direction from far: %d forwarded to %v" ,
484
481
FTD_OP_FLIP ^ direction ,
485
482
pool_elt_at_index (upf_main .nwis , far -> forward .nwi_index )-> name );
486
- * found = true;
487
483
return FTD_OP_FLIP ^ direction ;
488
484
}
489
485
@@ -619,11 +615,9 @@ upf_classify_fn (vlib_main_t *vm, vlib_node_runtime_t *node,
619
615
620
616
if (flow -> uplink_direction == FLOW_ENTRY_UPLINK_DIRECTION_UNDEFINED )
621
617
{
622
- bool found ;
623
618
flow_direction_t uplink_direction =
624
- upf_classify_detect_flow_direction (b , active , direction ,
625
- & found );
626
- if (found )
619
+ upf_classify_detect_flow_direction (b , active , direction );
620
+ if (uplink_direction != FLOW_ENTRY_UPLINK_DIRECTION_UNDEFINED )
627
621
flow -> uplink_direction = uplink_direction ;
628
622
}
629
623
0 commit comments