FreeBSD/sys/dev/iser/iser_verbs.c
/**
 * iser_free_fmr_pool - releases the FMR pool and page vec
 */
releases the FMR pool and page vec
releases the FMR pool and page vec
void
iser_free_fastreg_pool(struct ib_conn *ib_conn)
{
	struct fast_reg_descriptor *desc, *tmp;
	int i = 0;
	if (list_empty(&ib_conn->fastreg.pool))
		return;
	ISER_DBG("freeing conn %p fr pool", ib_conn);
	list_for_each_entry_safe(desc, tmp, &ib_conn->fastreg.pool, list) {
		list_del(&desc->list);
		iser_free_reg_res(&desc->rsc);
		free(desc, M_ISER_VERBS);
		++i;
	}
	if (i < ib_conn->fastreg.pool_size)
		ISER_WARN("pool still has %d regions registered",
			  ib_conn->fastreg.pool_size - i);
}
void iser_free_fastreg_pool ( struct ib_conn * ib_conn ) { struct fast_reg_descriptor * desc , * tmp ; int i = 0 ; if ( list_empty ( & ib_conn -> fastreg . pool ) ) return ; ISER_DBG ( " " , ib_conn ) ; list_for_each_entry_safe ( desc , tmp , & ib_conn -> fastreg . pool , list ) { list_del ( & desc -> list ) ; iser_free_reg_res ( & desc -> rsc ) ; free ( desc , M_ISER_VERBS ) ; ++ i ; } if ( i < ib_conn -> fastreg . pool_size ) ISER_WARN ( " " , ib_conn -> fastreg . pool_size - i ) ; }
iser_free_fmr_pool - releases the FMR pool and page vec
iser_free_fmr_pool - releases the FMR pool and page vec