| 775 | } |
| 776 | |
| 777 | int |
| 778 | qat_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 | } |
nothing calls this directly
no test coverage detected