Lines Matching defs:dev_ctx

198 	struct accel_mlx5_dev_ctx *dev_ctx;
346 spdk_mempool_put(dev->dev_ctx->psv_pool, task->psv);
385 rc = spdk_memory_domain_translate_data(domain, domain_ctx, dev->dev_ctx->domain,
671 rc = spdk_mlx5_crypto_get_dek_data(mlx5_task->base.crypto_key->priv, dev->dev_ctx->pd, &dek_data);
856 SPDK_DEBUGLOG(accel_mlx5, "no reqs in pool, dev %s\n", dev->dev_ctx->context->device->name);
862 SPDK_DEBUGLOG(accel_mlx5, "dev %s qp %p is full\n", dev->dev_ctx->context->device->name,
1099 spdk_mempool_put(dev->dev_ctx->psv_pool, mlx5_task->psv);
1518 dev->dev_ctx->context->device->name);
1522 task->psv = spdk_mempool_get(dev->dev_ctx->psv_pool);
1524 SPDK_DEBUGLOG(accel_mlx5, "no reqs in psv pool, dev %s\n", dev->dev_ctx->context->device->name);
1535 spdk_mempool_put(dev->dev_ctx->psv_pool, task->psv);
1692 SPDK_DEBUGLOG(accel_mlx5, "dev %s qp %p is full\n", qp->dev->dev_ctx->context->device->name,
1791 rc = spdk_mlx5_crypto_get_dek_data(task->crypto_key->priv, dev->dev_ctx->pd, &dek_data);
2076 dev->dev_ctx->domain, task, &translation.iov, 1, &translation,
2286 rc = spdk_mlx5_qp_create(dev->dev_ctx->pd, dev->cq, &mlx5_qp_attr, &qp->qp);
2341 dev->dev_ctx->context->device->name);
2430 SPDK_ERRLOG("Error %"PRId64" on CQ, dev %s\n", rc, dev->dev_ctx->context->device->name);
2484 rc = spdk_mlx5_qp_create(dev->dev_ctx->pd, dev->cq, &mlx5_qp_attr, &qp->qp);
2555 struct accel_mlx5_dev_ctx *dev_ctx;
2567 dev_ctx = &g_accel_mlx5.dev_ctxs[i];
2569 dev->dev_ctx = dev_ctx;
2571 assert(dev_ctx->mkeys);
2572 dev->mkeys = spdk_mlx5_mkey_pool_get_ref(dev_ctx->pd, 0);
2574 SPDK_ERRLOG("Failed to get mkey pool channel, dev %s\n", dev_ctx->context->device->name);
2581 if (dev_ctx->crypto_mkeys) {
2582 dev->crypto_mkeys = spdk_mlx5_mkey_pool_get_ref(dev_ctx->pd, SPDK_MLX5_MKEY_POOL_FLAG_CRYPTO);
2584 SPDK_ERRLOG("Failed to get crypto mkey pool channel, dev %s\n", dev_ctx->context->device->name);
2591 if (dev_ctx->sig_mkeys) {
2592 dev->sig_mkeys = spdk_mlx5_mkey_pool_get_ref(dev_ctx->pd, SPDK_MLX5_MKEY_POOL_FLAG_SIGNATURE);
2594 SPDK_ERRLOG("Failed to get sig mkey pool channel, dev %s\n", dev_ctx->context->device->name);
2608 rc = spdk_mlx5_cq_create(dev_ctx->pd, &cq_attr, &dev->cq);
2620 dev->mmap = spdk_rdma_utils_create_mem_map(dev_ctx->pd, NULL,
2627 dev->crypto_multi_block = dev_ctx->crypto_multi_block;
2628 dev->crypto_split_blocks = dev_ctx->crypto_multi_block ? g_accel_mlx5.attr.crypto_split_blocks : 0;
2768 accel_mlx5_psvs_release(struct accel_mlx5_dev_ctx *dev_ctx)
2772 if (!dev_ctx->psvs) {
2779 if (dev_ctx->psvs[i]) {
2780 spdk_mlx5_destroy_psv(dev_ctx->psvs[i]);
2781 dev_ctx->psvs[i] = NULL;
2784 free(dev_ctx->psvs);
2786 if (!dev_ctx->psv_pool) {
2789 num_psvs_in_pool = spdk_mempool_count(dev_ctx->psv_pool);
2793 spdk_mempool_free(dev_ctx->psv_pool);
2799 struct accel_mlx5_dev_ctx *dev_ctx;
2803 dev_ctx = &g_accel_mlx5.dev_ctxs[i];
2804 accel_mlx5_psvs_release(dev_ctx);
2805 if (dev_ctx->pd) {
2806 if (dev_ctx->mkeys) {
2807 spdk_mlx5_mkey_pool_destroy(0, dev_ctx->pd);
2809 if (dev_ctx->crypto_mkeys) {
2810 spdk_mlx5_mkey_pool_destroy(SPDK_MLX5_MKEY_POOL_FLAG_CRYPTO, dev_ctx->pd);
2812 if (dev_ctx->sig_mkeys) {
2813 spdk_mlx5_mkey_pool_destroy(SPDK_MLX5_MKEY_POOL_FLAG_SIGNATURE, dev_ctx->pd);
2815 spdk_rdma_utils_put_pd(dev_ctx->pd);
2817 if (dev_ctx->domain) {
2818 spdk_rdma_utils_put_memory_domain(dev_ctx->domain);
2868 struct accel_mlx5_dev_ctx *dev_ctx = args->dev;
2875 assert(dev_ctx->psvs[obj_idx] != NULL);
2877 wrapper->psv_index = dev_ctx->psvs[obj_idx]->index;
2889 accel_mlx5_psvs_create(struct accel_mlx5_dev_ctx *dev_ctx)
2892 .dev = dev_ctx
2900 dev_ctx->psvs = calloc(num_psvs, (sizeof(struct spdk_mlx5_psv *)));
2901 if (!dev_ctx->psvs) {
2906 dev_ctx->psvs[i] = spdk_mlx5_create_psv(dev_ctx->pd);
2907 if (!dev_ctx->psvs[i]) {
2908 SPDK_ERRLOG("Failed to create PSV on dev %s\n", dev_ctx->context->device->name);
2913 rc = snprintf(pool_name, sizeof(pool_name), "accel_psv_%s", dev_ctx->context->device->name);
2919 args.map = spdk_rdma_utils_create_mem_map(dev_ctx->pd, NULL,
2924 dev_ctx->psv_pool = spdk_mempool_create_ctor(pool_name, num_psvs,
2929 if (!dev_ctx->psv_pool) {
2943 accel_mlx5_dev_ctx_init(struct accel_mlx5_dev_ctx *dev_ctx, struct ibv_context *dev,
2954 dev_ctx->context = dev;
2955 dev_ctx->pd = pd;
2956 dev_ctx->domain = spdk_rdma_utils_get_memory_domain(pd);
2957 if (!dev_ctx->domain) {
2966 dev_ctx->mkeys = true;
2969 dev_ctx->crypto_multi_block = caps->crypto.multi_block_be_tweak;
2970 if (!dev_ctx->crypto_multi_block && g_accel_mlx5.attr.crypto_split_blocks) {
2979 dev_ctx->crypto_mkeys = true;
2988 dev_ctx->sig_mkeys = true;
2989 rc = accel_mlx5_psvs_create(dev_ctx);
3339 accel_mlx5_dump_stats_json(ctx->w, dev->dev_ctx->context->device->name, &dev->stats);
3451 if (accel_ch->devs[i].dev_ctx->pd == pd) {