FreeBSD/sys/dev/iser/iser_verbs.c
/**
 * iser_create_fmr_pool - Creates FMR pool and page_vector
 *
 * returns 0 on success, or errno code on failure
 */
Creates FMR pool and page_vector
returns 0 on success, or errno code on failure
Creates FMR pool and page_vector returns 0 on success or errno code on failure
int
iser_create_fastreg_pool(struct ib_conn *ib_conn, unsigned cmds_max)
{
	struct iser_device *device = ib_conn->device;
	struct fast_reg_descriptor *desc;
	int i;
	INIT_LIST_HEAD(&ib_conn->fastreg.pool);
	ib_conn->fastreg.pool_size = 0;
	for (i = 0; i < cmds_max; i++) {
		desc = iser_create_fastreg_desc(device->ib_device, device->pd);
		if (!desc) {
			ISER_ERR("Failed to create fastreg descriptor");
			goto err;
		}
		list_add_tail(&desc->list, &ib_conn->fastreg.pool);
		ib_conn->fastreg.pool_size++;
	}
	return (0);
err:
	iser_free_fastreg_pool(ib_conn);
	return (ENOMEM);
}
int iser_create_fastreg_pool ( struct ib_conn * ib_conn , unsigned cmds_max ) { struct iser_device * device = ib_conn -> device ; struct fast_reg_descriptor * desc ; int i ; INIT_LIST_HEAD ( & ib_conn -> fastreg . pool ) ; ib_conn -> fastreg . pool_size = 0 ; for ( i = 0 ; i < cmds_max ; i ++ ) { desc = iser_create_fastreg_desc ( device -> ib_device , device -> pd ) ; if ( ! desc ) { ISER_ERR ( " " ) ; goto err ; } list_add_tail ( & desc -> list , & ib_conn -> fastreg . pool ) ; ib_conn -> fastreg . pool_size ++ ; } return ( 0 ) ; err : iser_free_fastreg_pool ( ib_conn ) ; return ( ENOMEM ) ; }
iser_create_fmr_pool - Creates FMR pool and page_vector
 returns 0 on success, or errno code on failure
iser_create_fmr_pool - Creates FMR pool and page_vector returns 0 on success or errno code on failure