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

Function eth_dev_start

dpdk/drivers/net/vhost/rte_eth_vhost.c:1133–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133static int
1134eth_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 = &eth_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
1162static int
1163eth_dev_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 7

eth_vhost_uninstall_intrFunction · 0.85
eth_vhost_install_intrFunction · 0.85
queue_setupFunction · 0.85
rte_atomic32_readFunction · 0.85
eth_vhost_configure_intrFunction · 0.85
rte_atomic32_setFunction · 0.85
update_queuing_statusFunction · 0.85

Tested by

no test coverage detected