MCPcopy Create free account
hub / github.com/F-Stack/f-stack / qat_comp_dev_destroy

Function qat_comp_dev_destroy

dpdk/drivers/compress/qat/qat_comp_pmd.c:777–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777int
778qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev)
779{
780 struct qat_comp_dev_private *comp_dev;
781
782 if (qat_pci_dev == NULL)
783 return -ENODEV;
784
785 comp_dev = qat_pci_dev->comp_dev;
786 if (comp_dev == NULL)
787 return 0;
788
789 if (rte_eal_process_type() == RTE_PROC_PRIMARY)
790 rte_memzone_free(qat_pci_dev->comp_dev->capa_mz);
791
792 /* clean up any resources used by the device */
793 qat_comp_dev_close(comp_dev->compressdev);
794
795 rte_compressdev_pmd_destroy(comp_dev->compressdev);
796 qat_pci_dev->comp_dev = NULL;
797
798 return 0;
799}

Callers

nothing calls this directly

Calls 4

rte_eal_process_typeFunction · 0.85
rte_memzone_freeFunction · 0.85
qat_comp_dev_closeFunction · 0.85

Tested by

no test coverage detected