enhance: add configuration items to adjust the scheduling parameters of the main loop
This commit is contained in:
@@ -817,8 +817,9 @@ void ip_reassembly_free(struct ip_reassembly *assy)
|
||||
}
|
||||
}
|
||||
|
||||
void ip_reassembly_expire(struct ip_reassembly *assy, uint64_t now)
|
||||
void ip_reassembly_expire(struct ip_reassembly *assy, uint64_t max_free, uint64_t now)
|
||||
{
|
||||
uint64_t count = 0;
|
||||
struct ip_flow *flow = NULL;
|
||||
uint64_t timeout = assy->timeout;
|
||||
TAILQ_FOREACH(flow, &assy->lru, lru)
|
||||
@@ -829,6 +830,12 @@ void ip_reassembly_expire(struct ip_reassembly *assy, uint64_t now)
|
||||
ip_reassembly_del_flow(assy, flow);
|
||||
ip_reassembly_stat_inc(assy, timeout, &flow->key);
|
||||
ip_flow_free(flow);
|
||||
count++;
|
||||
|
||||
if (count >= max_free)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user