| 670 | } |
| 671 | |
| 672 | static int |
| 673 | zip_pci_remove(struct rte_pci_device *pci_dev) |
| 674 | { |
| 675 | struct rte_compressdev *compressdev; |
| 676 | char compressdev_name[RTE_COMPRESSDEV_NAME_MAX_LEN]; |
| 677 | |
| 678 | if (pci_dev == NULL) { |
| 679 | ZIP_PMD_ERR(" Invalid PCI Device"); |
| 680 | return -EINVAL; |
| 681 | } |
| 682 | rte_pci_device_name(&pci_dev->addr, compressdev_name, |
| 683 | sizeof(compressdev_name)); |
| 684 | |
| 685 | compressdev = rte_compressdev_pmd_get_named_dev(compressdev_name); |
| 686 | if (compressdev == NULL) |
| 687 | return -ENODEV; |
| 688 | |
| 689 | if (rte_eal_process_type() == RTE_PROC_PRIMARY) { |
| 690 | if (zipvf_destroy(compressdev) < 0) |
| 691 | return -ENODEV; |
| 692 | } |
| 693 | return rte_compressdev_pmd_destroy(compressdev); |
| 694 | } |
| 695 | |
| 696 | static struct rte_pci_id pci_id_octtx_zipvf_table[] = { |
| 697 | { |
nothing calls this directly
no test coverage detected