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

Function ice_dev_stop

dpdk/drivers/net/ice/ice_ethdev.c:2551–2589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2549}
2550
2551static int
2552ice_dev_stop(struct rte_eth_dev *dev)
2553{
2554 struct rte_eth_dev_data *data = dev->data;
2555 struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
2556 struct ice_vsi *main_vsi = pf->main_vsi;
2557 struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
2558 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
2559 uint16_t i;
2560
2561 /* avoid stopping again */
2562 if (pf->adapter_stopped)
2563 return 0;
2564
2565 /* stop and clear all Rx queues */
2566 for (i = 0; i < data->nb_rx_queues; i++)
2567 ice_rx_queue_stop(dev, i);
2568
2569 /* stop and clear all Tx queues */
2570 for (i = 0; i < data->nb_tx_queues; i++)
2571 ice_tx_queue_stop(dev, i);
2572
2573 /* disable all queue interrupts */
2574 ice_vsi_disable_queues_intr(main_vsi);
2575
2576 if (pf->init_link_up)
2577 ice_dev_set_link_up(dev);
2578 else
2579 ice_dev_set_link_down(dev);
2580
2581 /* Clean datapath event and queue/vec mapping */
2582 rte_intr_efd_disable(intr_handle);
2583 rte_intr_vec_list_free(intr_handle);
2584
2585 pf->adapter_stopped = true;
2586 dev->data->dev_started = 0;
2587
2588 return 0;
2589}
2590
2591static int
2592ice_dev_close(struct rte_eth_dev *dev)

Callers 1

ice_dev_closeFunction · 0.85

Calls 7

ice_rx_queue_stopFunction · 0.85
ice_tx_queue_stopFunction · 0.85
ice_dev_set_link_upFunction · 0.85
ice_dev_set_link_downFunction · 0.85
rte_intr_vec_list_freeFunction · 0.85
rte_intr_efd_disableFunction · 0.50

Tested by

no test coverage detected