* makes sure that the same device would have the same port id both
* in the primary and secondary process.
*/
-static struct rte_eth_dev *
-eth_dev_attach_secondary(const char *name)
+struct rte_eth_dev *
+rte_eth_dev_attach_secondary(const char *name)
{
uint8_t i;
struct rte_eth_dev *eth_dev;
if (eth_dev->data->dev_private == NULL)
rte_panic("Cannot allocate memzone for private port data\n");
} else {
- eth_dev = eth_dev_attach_secondary(ethdev_name);
+ eth_dev = rte_eth_dev_attach_secondary(ethdev_name);
if (eth_dev == NULL) {
/*
* if we failed to attach a device, it means the
*/
struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
+/**
+ * @internal
+ * Attach to the ethdev already initialized by the primary
+ * process.
+ *
+ * @param name Ethernet device's name.
+ * @return
+ * - Success: Slot in the rte_dev_devices array for attached
+ * device.
+ * - Error: Null pointer.
+ */
+struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
+
/**
* @internal
* Release the specified ethdev port.