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

Function atl_dev_stop

dpdk/drivers/net/atlantic/atl_ethdev.c:602–642  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

600 * Stop device: disable rx and tx functions to allow for reconfiguring.
601 */
602static int
603atl_dev_stop(struct rte_eth_dev *dev)
604{
605 struct rte_eth_link link;
606 struct aq_hw_s *hw =
607 ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
608 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
609 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
610
611 PMD_INIT_FUNC_TRACE();
612 dev->data->dev_started = 0;
613
614 /* disable interrupts */
615 atl_disable_intr(hw);
616
617 /* reset the NIC */
618 atl_reset_hw(hw);
619 hw->adapter_stopped = 1;
620
621 atl_stop_queues(dev);
622
623 /* Clear stored conf */
624 dev->data->scattered_rx = 0;
625 dev->data->lro = 0;
626
627 /* Clear recorded link status */
628 memset(&link, 0, sizeof(link));
629 rte_eth_linkstatus_set(dev, &link);
630
631 if (!rte_intr_allow_others(intr_handle))
632 /* resume to the default handler */
633 rte_intr_callback_register(intr_handle,
634 atl_dev_interrupt_handler,
635 (void *)dev);
636
637 /* Clean datapath event and queue/vec mapping */
638 rte_intr_efd_disable(intr_handle);
639 rte_intr_vec_list_free(intr_handle);
640
641 return 0;
642}
643
644/*
645 * Set device link up: enable tx.

Callers 1

atl_dev_closeFunction · 0.85

Calls 9

atl_disable_intrFunction · 0.85
atl_reset_hwFunction · 0.85
atl_stop_queuesFunction · 0.85
memsetFunction · 0.85
rte_eth_linkstatus_setFunction · 0.85
rte_intr_vec_list_freeFunction · 0.85
rte_intr_allow_othersFunction · 0.50
rte_intr_efd_disableFunction · 0.50

Tested by

no test coverage detected