Lines Matching defs:chan

66 	struct compress_io_channel	*chan;
223 dev_qp->chan = NULL;
433 _compress_operation(struct compress_io_channel *chan, struct spdk_accel_task *task)
448 assert(chan->device_qp->device != NULL);
449 cdev_id = chan->device_qp->device->cdev_id;
467 rc = rte_pktmbuf_alloc_bulk(g_mbuf_mp, chan->src_mbufs, src_mbuf_total);
473 assert(chan->src_mbufs[0]);
475 rc = rte_pktmbuf_alloc_bulk(g_mbuf_mp, chan->dst_mbufs, dst_mbuf_total);
481 assert(chan->dst_mbufs[0]);
483 rc = _setup_compress_mbuf(chan->src_mbufs, &src_mbuf_total, &total_length,
489 if (!chan->device_qp->device->sgl_in && src_mbuf_total > 1) {
491 chan->drv_name);
496 comp_op->m_src = chan->src_mbufs[0];
500 rc = _setup_compress_mbuf(chan->dst_mbufs, &dst_mbuf_total, NULL,
505 if (!chan->device_qp->device->sgl_out && dst_mbuf_total > 1) {
507 chan->drv_name);
512 comp_op->m_dst = chan->dst_mbufs[0];
516 comp_op->private_xform = chan->device_qp->device->comp_xform;
518 comp_op->private_xform = chan->device_qp->device->decomp_xform;
524 rc = rte_compressdev_enqueue_burst(cdev_id, chan->device_qp->qp, &comp_op, 1);
538 rte_pktmbuf_free_bulk(chan->dst_mbufs, dst_iovcnt);
540 rte_pktmbuf_free_bulk(chan->src_mbufs, src_iovcnt);
556 STAILQ_INSERT_TAIL(&chan->queued_tasks, task, link);
564 struct compress_io_channel *chan = args;
571 assert(chan->device_qp->device != NULL);
572 cdev_id = chan->device_qp->device->cdev_id;
574 num_deq = rte_compressdev_dequeue_burst(cdev_id, chan->device_qp->qp, deq_ops,
613 if (!STAILQ_EMPTY(&chan->queued_tasks)) {
614 task_to_resubmit = STAILQ_FIRST(&chan->queued_tasks);
615 rc = _compress_operation(chan, task_to_resubmit);
617 STAILQ_REMOVE_HEAD(&chan->queued_tasks, link);
628 struct compress_io_channel *chan = spdk_io_channel_get_ctx(ch);
631 rc = _compress_operation(chan, task);
643 struct compress_io_channel *chan = spdk_io_channel_get_ctx(ch);
649 if (!STAILQ_EMPTY(&chan->queued_tasks)) {
676 STAILQ_INSERT_TAIL(&chan->queued_tasks, task, link);
683 _set_pmd(struct compress_io_channel *chan)
690 chan->drv_name = QAT_PMD;
692 chan->drv_name = MLX5_PMD;
694 chan->drv_name = UADK_PMD;
697 chan->drv_name = QAT_PMD;
699 chan->drv_name = MLX5_PMD;
701 chan->drv_name = UADK_PMD;
706 SPDK_NOTICELOG("Channel %p PMD being used: %s\n", chan, chan->drv_name);
748 struct compress_io_channel *chan = ctx_buf;
753 if (_set_pmd(chan) == false) {
760 chan->src_mbufs = spdk_zmalloc(length, 0x40, NULL,
762 if (chan->src_mbufs == NULL) {
765 chan->dst_mbufs = spdk_zmalloc(length, 0x40, NULL,
767 if (chan->dst_mbufs == NULL) {
768 spdk_free(chan->src_mbufs);
772 chan->poller = SPDK_POLLER_REGISTER(comp_dev_poller, chan, 0);
773 STAILQ_INIT(&chan->queued_tasks);
777 if (strcmp(device_qp->device->cdev_info.driver_name, chan->drv_name) == 0) {
778 if (device_qp->chan == NULL) {
779 chan->device_qp = device_qp;
780 device_qp->chan = chan;
787 if (chan->device_qp == NULL) {
795 chan->device_qp->device->sgl_in = true;
799 chan->device_qp->device->sgl_out = true;
822 struct compress_io_channel *chan = ctx_buf;
823 struct comp_device_qp *device_qp = chan->device_qp;
825 spdk_free(chan->src_mbufs);
826 spdk_free(chan->dst_mbufs);
828 spdk_poller_unregister(&chan->poller);
831 chan->device_qp = NULL;
832 device_qp->chan = NULL;