src/sdpi_flow_manager.c
//traverse flow member in busy_list.
traverse flow member in busy_list.
traverse flow member in busy_list .
void 
sdpi_traverse_flow_members(
	sdpi_flow_manager_t *flow_manager
	)
{
	sdpi_flow_memory_t	*flow_memory = flow_manager->flow_memory;
	sdpi_flow_member_t	*member = NULL;
	unsigned int		busy_size = 0;
	unsigned int		free_size = 0;
	sdpi_flow_entry_t	*busy_entry = NULL;
	acquire_lock(flow_memory->busy_lock);
	free_size = flow_memory->free_size;
	busy_size = flow_memory->busy_size;
	busy_entry = sdpi_flow_entry_next(&flow_memory->busy_entry);
	release_lock(flow_memory->busy_lock);
	printf("[FREE]: %9d | [BUSY: %9d]\n", free_size, busy_size);
}
void sdpi_traverse_flow_members ( sdpi_flow_manager_t * flow_manager ) { sdpi_flow_memory_t * flow_memory = flow_manager -> flow_memory ; sdpi_flow_member_t * member = NULL ; unsigned int busy_size = 0 ; unsigned int free_size = 0 ; sdpi_flow_entry_t * busy_entry = NULL ; acquire_lock ( flow_memory -> busy_lock ) ; free_size = flow_memory -> free_size ; busy_size = flow_memory -> busy_size ; busy_entry = sdpi_flow_entry_next ( & flow_memory -> busy_entry ) ; release_lock ( flow_memory -> busy_lock ) ; printf ( " \n " , free_size , busy_size ) ; }
traverse flow member in busy_list.
traverse flow member in busy_list .
//NOTE: no need lock the entire traversing handler, due to the new entry would //be inserted after head_entry which can't be visited this time, so just lock when  //fetch the first next_entry after head_entry. /*while(busy_entry != &flow_memory->busy_entry)
	{
		member = container_of(busy_entry, sdpi_flow_member_t, block_entry);
		printf("[hash]: %5d | [idle]: %5d\n", member->hash_idx, member->idle_time);
		busy_entry = sdpi_flow_entry_next(busy_entry);
	}*/