Lines Matching refs:bdev
354 if (vhost_bdev_process_blk_commands(task->ctrlr->bdev, task)) in process_blk_task()
541 if (ctrlr == NULL || ctrlr->bdev == NULL) { in ctrlr_worker()
767 struct vhost_block_dev *bdev; in vhost_blk_bdev_construct() local
769 bdev = rte_zmalloc(NULL, sizeof(*bdev), RTE_CACHE_LINE_SIZE); in vhost_blk_bdev_construct()
770 if (!bdev) in vhost_blk_bdev_construct()
773 snprintf(bdev->name, sizeof(bdev->name), "%s", bdev_name); in vhost_blk_bdev_construct()
774 snprintf(bdev->product_name, sizeof(bdev->product_name), "%s", in vhost_blk_bdev_construct()
776 bdev->blocklen = blk_size; in vhost_blk_bdev_construct()
777 bdev->blockcnt = blk_cnt; in vhost_blk_bdev_construct()
778 bdev->write_cache = wce_enable; in vhost_blk_bdev_construct()
780 fprintf(stdout, "Blocklen=%d, blockcnt=%"PRIx64"\n", bdev->blocklen, in vhost_blk_bdev_construct()
781 bdev->blockcnt); in vhost_blk_bdev_construct()
784 bdev->data = rte_zmalloc(NULL, blk_cnt * blk_size, 0); in vhost_blk_bdev_construct()
785 if (!bdev->data) { in vhost_blk_bdev_construct()
787 free(bdev); in vhost_blk_bdev_construct()
791 return bdev; in vhost_blk_bdev_construct()
834 ctrlr->bdev = vhost_blk_bdev_construct("malloc0", "vhost_blk_malloc0", in vhost_blk_ctrlr_construct()
836 if (!ctrlr->bdev) { in vhost_blk_ctrlr_construct()
851 if (ctrlr->bdev != NULL) { in vhost_blk_ctrlr_destroy()
852 rte_free(ctrlr->bdev->data); in vhost_blk_ctrlr_destroy()
854 rte_free(ctrlr->bdev); in vhost_blk_ctrlr_destroy()