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

Function ngbe_pf_host_uninit

dpdk/drivers/net/ngbe/ngbe_pf.c:106–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void ngbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
107{
108 struct ngbe_vf_info **vfinfo;
109 uint16_t vf_num;
110 int ret;
111
112 PMD_INIT_FUNC_TRACE();
113
114 RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
115 RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = 0;
116 RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = 0;
117
118 vf_num = dev_num_vf(eth_dev);
119 if (vf_num == 0)
120 return;
121
122 vfinfo = NGBE_DEV_VFDATA(eth_dev);
123 if (*vfinfo == NULL)
124 return;
125
126 ret = rte_eth_switch_domain_free((*vfinfo)->switch_domain_id);
127 if (ret)
128 PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
129
130 rte_free(*vfinfo);
131 *vfinfo = NULL;
132}
133
134int ngbe_pf_host_configure(struct rte_eth_dev *eth_dev)
135{

Callers 1

ngbe_dev_closeFunction · 0.85

Calls 3

rte_freeFunction · 0.85
dev_num_vfFunction · 0.70

Tested by

no test coverage detected