Remove ccp pmd */
| 175 | |
| 176 | /** Remove ccp pmd */ |
| 177 | static int |
| 178 | cryptodev_ccp_remove(struct rte_pci_device *pci_dev) |
| 179 | { |
| 180 | char name[RTE_CRYPTODEV_NAME_MAX_LEN]; |
| 181 | struct rte_cryptodev *dev; |
| 182 | |
| 183 | if (pci_dev == NULL) |
| 184 | return -EINVAL; |
| 185 | |
| 186 | rte_pci_device_name(&pci_dev->addr, name, sizeof(name)); |
| 187 | |
| 188 | if (name[0] == '\0') |
| 189 | return -EINVAL; |
| 190 | |
| 191 | dev = rte_cryptodev_pmd_get_named_dev(name); |
| 192 | if (dev == NULL) |
| 193 | return -ENODEV; |
| 194 | |
| 195 | ccp_pmd_init_done = 0; |
| 196 | |
| 197 | RTE_LOG(INFO, PMD, "Closing ccp device %s on numa socket %u\n", |
| 198 | name, rte_socket_id()); |
| 199 | |
| 200 | return rte_cryptodev_pmd_destroy(dev); |
| 201 | } |
| 202 | |
| 203 | /** Create crypto device */ |
| 204 | static int |
no test coverage detected