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

Function ice_dcf_dev_stop

dpdk/drivers/net/ice/ice_dcf_ethdev.c:667–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667static int
668ice_dcf_dev_stop(struct rte_eth_dev *dev)
669{
670 struct ice_dcf_adapter *dcf_ad = dev->data->dev_private;
671 struct rte_intr_handle *intr_handle = dev->intr_handle;
672 struct ice_adapter *ad = &dcf_ad->parent;
673
674 if (ad->pf.adapter_stopped == 1) {
675 PMD_DRV_LOG(DEBUG, "Port is already stopped");
676 return 0;
677 }
678
679 /* Stop the VF representors for this device */
680 ice_dcf_vf_repr_stop_all(dcf_ad);
681
682 ice_dcf_stop_queues(dev);
683
684 rte_intr_efd_disable(intr_handle);
685 rte_intr_vec_list_free(intr_handle);
686
687 ice_dcf_add_del_all_mac_addr(&dcf_ad->real_hw,
688 dcf_ad->real_hw.eth_dev->data->mac_addrs,
689 false, VIRTCHNL_ETHER_ADDR_PRIMARY);
690
691 if (dcf_ad->mc_addrs_num)
692 /* flush previous addresses */
693 (void)dcf_add_del_mc_addr_list(&dcf_ad->real_hw,
694 dcf_ad->mc_addrs,
695 dcf_ad->mc_addrs_num, false);
696
697 dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
698 ad->pf.adapter_stopped = 1;
699
700 return 0;
701}
702
703static int
704ice_dcf_dev_configure(struct rte_eth_dev *dev)

Callers 1

ice_dcf_dev_closeFunction · 0.85

Calls 6

ice_dcf_vf_repr_stop_allFunction · 0.85
ice_dcf_stop_queuesFunction · 0.85
rte_intr_vec_list_freeFunction · 0.85
dcf_add_del_mc_addr_listFunction · 0.85
rte_intr_efd_disableFunction · 0.50

Tested by

no test coverage detected