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

Function i40e_pf_host_uninit

dpdk/drivers/net/i40e/i40e_pf.c:1635–1672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1633}
1634
1635int
1636i40e_pf_host_uninit(struct rte_eth_dev *dev)
1637{
1638 struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
1639 struct i40e_hw *hw = I40E_PF_TO_HW(pf);
1640 uint32_t val;
1641 int i;
1642
1643 PMD_INIT_FUNC_TRACE();
1644
1645 /**
1646 * return if SRIOV not enabled, VF number not configured or
1647 * no queue assigned.
1648 */
1649 if ((!hw->func_caps.sr_iov_1_1) ||
1650 (pf->vf_num == 0) ||
1651 (pf->vf_nb_qps == 0))
1652 return I40E_SUCCESS;
1653
1654 /* free memory for store timestamp of messages */
1655 for (i = 0; i < pf->vf_num; i++)
1656 rte_free(pf->vfs[i].msg_timestamps);
1657
1658 /* free memory to store VF structure */
1659 rte_free(pf->vfs);
1660 pf->vfs = NULL;
1661
1662 /* Disable irq0 for VFR event */
1663 i40e_pf_disable_irq0(hw);
1664
1665 /* Disable VF link status interrupt */
1666 val = I40E_READ_REG(hw, I40E_PFGEN_PORTMDIO_NUM);
1667 val &= ~I40E_PFGEN_PORTMDIO_NUM_VFLINK_STAT_ENA_MASK;
1668 I40E_WRITE_REG(hw, I40E_PFGEN_PORTMDIO_NUM, val);
1669 I40E_WRITE_FLUSH(hw);
1670
1671 return I40E_SUCCESS;
1672}

Callers 1

i40e_dev_closeFunction · 0.85

Calls 2

rte_freeFunction · 0.85
i40e_pf_disable_irq0Function · 0.85

Tested by

no test coverage detected