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

Function mvneta_dev_stop

dpdk/drivers/net/mvneta/mvneta_ethdev.c:410–436  ·  view source on GitHub ↗

* DPDK callback to stop the device. * * @param dev * Pointer to Ethernet device structure. */

Source from the content-addressed store, hash-verified

408 * Pointer to Ethernet device structure.
409 */
410static int
411mvneta_dev_stop(struct rte_eth_dev *dev)
412{
413 struct mvneta_priv *priv = dev->data->dev_private;
414 uint16_t i;
415
416 dev->data->dev_started = 0;
417
418 if (!priv->ppio)
419 return 0;
420
421 mvneta_dev_set_link_down(dev);
422 mvneta_flush_queues(dev);
423 neta_ppio_deinit(priv->ppio);
424
425 priv->ppio = NULL;
426
427 /* stop rx queues */
428 for (i = 0; i < dev->data->nb_rx_queues; i++)
429 dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
430
431 /* stop tx queues */
432 for (i = 0; i < dev->data->nb_tx_queues; i++)
433 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
434
435 return 0;
436}
437
438/**
439 * DPDK callback to close the device.

Callers 1

mvneta_dev_closeFunction · 0.85

Calls 2

mvneta_dev_set_link_downFunction · 0.85
mvneta_flush_queuesFunction · 0.85

Tested by

no test coverage detected