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

Function cryptodev_ccp_remove

dpdk/drivers/crypto/ccp/rte_ccp_pmd.c:177–201  ·  view source on GitHub ↗

Remove ccp pmd */

Source from the content-addressed store, hash-verified

175
176/** Remove ccp pmd */
177static int
178cryptodev_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 */
204static int

Callers 1

cryptodev_ccp_createFunction · 0.85

Calls 4

rte_pci_device_nameFunction · 0.85
rte_socket_idFunction · 0.85

Tested by

no test coverage detected