| 125 | } |
| 126 | |
| 127 | struct rte_eth_dev * |
| 128 | rte_eth_dev_allocated(const char *name) |
| 129 | { |
| 130 | struct rte_eth_dev *ethdev; |
| 131 | |
| 132 | rte_spinlock_lock(rte_mcfg_ethdev_get_lock()); |
| 133 | |
| 134 | if (eth_dev_shared_data_prepare() != NULL) |
| 135 | ethdev = eth_dev_allocated(name); |
| 136 | else |
| 137 | ethdev = NULL; |
| 138 | |
| 139 | rte_spinlock_unlock(rte_mcfg_ethdev_get_lock()); |
| 140 | |
| 141 | return ethdev; |
| 142 | } |
| 143 | |
| 144 | /* |
| 145 | * Attach to a port already registered by the primary process, which |
no test coverage detected