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

Function bnx2x_dev_start

dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:209–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static int
210bnx2x_dev_start(struct rte_eth_dev *dev)
211{
212 struct bnx2x_softc *sc = dev->data->dev_private;
213 int ret = 0;
214 uint16_t i;
215
216 PMD_INIT_FUNC_TRACE(sc);
217
218 /* start the periodic callout */
219 if (IS_PF(sc)) {
220 if (atomic_load_acq_long(&sc->periodic_flags) ==
221 PERIODIC_STOP) {
222 bnx2x_periodic_start(dev);
223 PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
224 }
225 }
226
227 ret = bnx2x_init(sc);
228 if (ret) {
229 PMD_DRV_LOG(DEBUG, sc, "bnx2x_init failed (%d)", ret);
230 return -1;
231 }
232
233 if (IS_PF(sc)) {
234 rte_intr_callback_register(sc->pci_dev->intr_handle,
235 bnx2x_interrupt_handler, (void *)dev);
236
237 if (rte_intr_enable(sc->pci_dev->intr_handle))
238 PMD_DRV_LOG(ERR, sc, "rte_intr_enable failed");
239 }
240
241 /* Configure the previously stored Multicast address list */
242 if (IS_VF(sc))
243 bnx2x_vfpf_set_mcast(sc, sc->mc_addrs, sc->mc_addrs_num);
244 bnx2x_dev_rxtx_init(dev);
245
246 bnx2x_print_device_info(sc);
247
248 for (i = 0; i < dev->data->nb_tx_queues; i++)
249 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
250 for (i = 0; i < dev->data->nb_rx_queues; i++)
251 dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
252
253 return ret;
254}
255
256static int
257bnx2x_dev_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 8

atomic_load_acq_longFunction · 0.85
bnx2x_periodic_startFunction · 0.85
bnx2x_initFunction · 0.85
bnx2x_vfpf_set_mcastFunction · 0.85
bnx2x_dev_rxtx_initFunction · 0.85
bnx2x_print_device_infoFunction · 0.85
rte_intr_enableFunction · 0.50

Tested by

no test coverage detected