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

Function cxgbe_dev_stop

dpdk/drivers/net/cxgbe/cxgbe_ethdev.c:414–440  ·  view source on GitHub ↗

* Stop device: disable rx and tx functions to allow for reconfiguring. */

Source from the content-addressed store, hash-verified

412 * Stop device: disable rx and tx functions to allow for reconfiguring.
413 */
414int cxgbe_dev_stop(struct rte_eth_dev *eth_dev)
415{
416 struct port_info *pi = eth_dev->data->dev_private;
417 struct adapter *adapter = pi->adapter;
418 uint16_t i;
419
420 CXGBE_FUNC_TRACE();
421
422 if (!(adapter->flags & FULL_INIT_DONE))
423 return 0;
424
425 cxgbe_down(pi);
426
427 /*
428 * We clear queues only if both tx and rx path of the port
429 * have been disabled
430 */
431 t4_sge_eth_clear_queues(pi);
432 eth_dev->data->scattered_rx = 0;
433
434 for (i = 0; i < eth_dev->data->nb_rx_queues; i++)
435 eth_dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
436 for (i = 0; i < eth_dev->data->nb_tx_queues; i++)
437 eth_dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
438
439 return 0;
440}
441
442int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
443{

Callers

nothing calls this directly

Calls 2

cxgbe_downFunction · 0.85
t4_sge_eth_clear_queuesFunction · 0.85

Tested by

no test coverage detected