| 1131 | } |
| 1132 | |
| 1133 | static int |
| 1134 | eth_dev_start(struct rte_eth_dev *eth_dev) |
| 1135 | { |
| 1136 | struct pmd_internal *internal = eth_dev->data->dev_private; |
| 1137 | struct rte_eth_conf *dev_conf = ð_dev->data->dev_conf; |
| 1138 | uint16_t i; |
| 1139 | |
| 1140 | eth_vhost_uninstall_intr(eth_dev); |
| 1141 | if (dev_conf->intr_conf.rxq && eth_vhost_install_intr(eth_dev) < 0) { |
| 1142 | VHOST_LOG(ERR, "Failed to install interrupt handler.\n"); |
| 1143 | return -1; |
| 1144 | } |
| 1145 | |
| 1146 | queue_setup(eth_dev, internal); |
| 1147 | if (rte_atomic32_read(&internal->dev_attached) == 1 && |
| 1148 | dev_conf->intr_conf.rxq) |
| 1149 | eth_vhost_configure_intr(eth_dev); |
| 1150 | |
| 1151 | rte_atomic32_set(&internal->started, 1); |
| 1152 | update_queuing_status(eth_dev, false); |
| 1153 | |
| 1154 | for (i = 0; i < eth_dev->data->nb_rx_queues; i++) |
| 1155 | eth_dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; |
| 1156 | for (i = 0; i < eth_dev->data->nb_tx_queues; i++) |
| 1157 | eth_dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; |
| 1158 | |
| 1159 | return 0; |
| 1160 | } |
| 1161 | |
| 1162 | static int |
| 1163 | eth_dev_stop(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected