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

Function iavf_dev_reset

dpdk/drivers/net/iavf/iavf_ethdev.c:2950–2975  ·  view source on GitHub ↗

* Reset VF device only to re-initialize resources in PMD layer */

Source from the content-addressed store, hash-verified

2948 * Reset VF device only to re-initialize resources in PMD layer
2949 */
2950static int
2951iavf_dev_reset(struct rte_eth_dev *dev)
2952{
2953 int ret;
2954 struct iavf_adapter *adapter =
2955 IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
2956 struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
2957 /*
2958 * Check whether the VF reset has been done and inform application,
2959 * to avoid calling the virtual channel command, which may cause
2960 * the device to be abnormal.
2961 */
2962 ret = iavf_check_vf_reset_done(hw);
2963 if (ret) {
2964 PMD_DRV_LOG(ERR, "Wait too long for reset done!");
2965 return ret;
2966 }
2967 iavf_set_no_poll(adapter, false);
2968
2969 PMD_DRV_LOG(DEBUG, "Start dev_reset ...");
2970 ret = iavf_dev_uninit(dev);
2971 if (ret)
2972 return ret;
2973
2974 return iavf_dev_init(dev);
2975}
2976
2977static inline bool
2978iavf_is_reset(struct iavf_hw *hw)

Callers 2

iavf_queues_req_resetFunction · 0.85
iavf_handle_hw_resetFunction · 0.85

Calls 4

iavf_check_vf_reset_doneFunction · 0.85
iavf_set_no_pollFunction · 0.85
iavf_dev_uninitFunction · 0.85
iavf_dev_initFunction · 0.85

Tested by

no test coverage detected