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()
753 struct vhost_block_dev *bdev; in vhost_blk_bdev_construct() local
755 bdev = rte_zmalloc(NULL, sizeof(*bdev), RTE_CACHE_LINE_SIZE); in vhost_blk_bdev_construct()
756 if (!bdev) in vhost_blk_bdev_construct()
759 snprintf(bdev->name, sizeof(bdev->name), "%s", bdev_name); in vhost_blk_bdev_construct()
760 snprintf(bdev->product_name, sizeof(bdev->product_name), "%s", in vhost_blk_bdev_construct()
762 bdev->blocklen = blk_size; in vhost_blk_bdev_construct()
763 bdev->blockcnt = blk_cnt; in vhost_blk_bdev_construct()
764 bdev->write_cache = wce_enable; in vhost_blk_bdev_construct()
766 fprintf(stdout, "Blocklen=%d, blockcnt=%"PRIx64"\n", bdev->blocklen, in vhost_blk_bdev_construct()
767 bdev->blockcnt); in vhost_blk_bdev_construct()
770 bdev->data = rte_zmalloc(NULL, blk_cnt * blk_size, 0); in vhost_blk_bdev_construct()
771 if (!bdev->data) { in vhost_blk_bdev_construct()
773 free(bdev); in vhost_blk_bdev_construct()
777 return bdev; in vhost_blk_bdev_construct()
820 ctrlr->bdev = vhost_blk_bdev_construct("malloc0", "vhost_blk_malloc0", in vhost_blk_ctrlr_construct()
822 if (!ctrlr->bdev) { in vhost_blk_ctrlr_construct()
837 if (ctrlr->bdev != NULL) { in vhost_blk_ctrlr_destroy()
838 if (ctrlr->bdev->data != NULL) in vhost_blk_ctrlr_destroy()
839 rte_free(ctrlr->bdev->data); in vhost_blk_ctrlr_destroy()
841 rte_free(ctrlr->bdev); in vhost_blk_ctrlr_destroy()