return cryptodev;
}
-static int
-rte_cryptodev_init(struct rte_pci_driver *pci_drv,
- struct rte_pci_device *pci_dev)
+int
+rte_cryptodev_pci_probe(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev)
{
struct rte_cryptodev_driver *cryptodrv;
struct rte_cryptodev *cryptodev;
return -ENXIO;
}
-static int
-rte_cryptodev_uninit(struct rte_pci_device *pci_dev)
+int
+rte_cryptodev_pci_remove(struct rte_pci_device *pci_dev)
{
const struct rte_cryptodev_driver *cryptodrv;
struct rte_cryptodev *cryptodev;
{
/* Call crypto device initialization directly if device is virtual */
if (type == PMD_VDEV)
- return rte_cryptodev_init((struct rte_pci_driver *)cryptodrv,
+ return rte_cryptodev_pci_probe(
+ (struct rte_pci_driver *)cryptodrv,
NULL);
/*
* Register PCI driver for physical device intialisation during
* PCI probing
*/
- cryptodrv->pci_drv.probe = rte_cryptodev_init;
- cryptodrv->pci_drv.remove = rte_cryptodev_uninit;
+ cryptodrv->pci_drv.probe = rte_cryptodev_pci_probe;
+ cryptodrv->pci_drv.remove = rte_cryptodev_pci_remove;
rte_eal_pci_register(&cryptodrv->pci_drv);
void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
enum rte_cryptodev_event_type event);
+/**
+ * Wrapper for use by pci drivers as a .probe function to attach to a crypto
+ * interface.
+ */
+int rte_cryptodev_pci_probe(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev);
+
+/**
+ * Wrapper for use by pci drivers as a .remove function to detach a crypto
+ * interface.
+ */
+int rte_cryptodev_pci_remove(struct rte_pci_device *pci_dev);
#ifdef __cplusplus
}
rte_cryptodev_parse_vdev_init_params;
} DPDK_16.04;
+
+DPDK_16.11 {
+ global:
+
+ rte_cryptodev_pci_probe;
+ rte_cryptodev_pci_remove;
+
+} DPDK_16.07;
return 0;
}
-static int
-rte_eth_dev_init(struct rte_pci_driver *pci_drv,
- struct rte_pci_device *pci_dev)
+int
+rte_eth_dev_pci_probe(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev)
{
struct eth_driver *eth_drv;
struct rte_eth_dev *eth_dev;
return diag;
}
-static int
-rte_eth_dev_uninit(struct rte_pci_device *pci_dev)
+int
+rte_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
{
const struct eth_driver *eth_drv;
struct rte_eth_dev *eth_dev;
void
rte_eth_driver_register(struct eth_driver *eth_drv)
{
- eth_drv->pci_drv.probe = rte_eth_dev_init;
- eth_drv->pci_drv.remove = rte_eth_dev_uninit;
+ eth_drv->pci_drv.probe = rte_eth_dev_pci_probe;
+ eth_drv->pci_drv.remove = rte_eth_dev_pci_remove;
rte_eal_pci_register(ð_drv->pci_drv);
}
int
rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
+/**
+ * @internal
+ * Wrapper for use by pci drivers as a .probe function to attach to a ethdev
+ * interface.
+ */
+int rte_eth_dev_pci_probe(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev);
+
+/**
+ * @internal
+ * Wrapper for use by pci drivers as a .remove function to detach a ethdev
+ * interface.
+ */
+int rte_eth_dev_pci_remove(struct rte_pci_device *pci_dev);
+
#ifdef __cplusplus
}
#endif
rte_eth_dev_get_name_by_port;
rte_eth_dev_get_port_by_name;
rte_eth_xstats_get_names;
+
} DPDK_16.04;
+
+DPDK_16.11 {
+ global:
+
+ rte_eth_dev_pci_probe;
+ rte_eth_dev_pci_remove;
+
+} DPDK_16.07;