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

Function cpfl_dev_close

dpdk/drivers/net/cpfl/cpfl_ethdev.c:1107–1135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107static int
1108cpfl_dev_close(struct rte_eth_dev *dev)
1109{
1110 struct cpfl_vport *cpfl_vport = dev->data->dev_private;
1111 struct idpf_vport *vport = &cpfl_vport->base;
1112 struct cpfl_adapter_ext *adapter = CPFL_ADAPTER_TO_EXT(vport->adapter);
1113
1114 cpfl_dev_stop(dev);
1115 if (cpfl_vport->p2p_mp) {
1116 rte_mempool_free(cpfl_vport->p2p_mp);
1117 cpfl_vport->p2p_mp = NULL;
1118 }
1119
1120 if (!adapter->base.is_rx_singleq && !adapter->base.is_tx_singleq)
1121 cpfl_p2p_queue_grps_del(vport);
1122
1123 cpfl_flow_free(cpfl_vport);
1124 idpf_vport_deinit(vport);
1125 rte_free(cpfl_vport->p2p_q_chunks_info);
1126
1127 adapter->cur_vports &= ~RTE_BIT32(vport->devarg_id);
1128 adapter->cur_vport_nb--;
1129 dev->data->dev_private = NULL;
1130 adapter->vports[vport->sw_idx] = NULL;
1131 idpf_free_dma_mem(NULL, &cpfl_vport->itf.flow_dma);
1132 rte_free(cpfl_vport);
1133
1134 return 0;
1135}
1136
1137static int
1138cpfl_dev_flow_ops_get(struct rte_eth_dev *dev,

Callers

nothing calls this directly

Calls 7

cpfl_dev_stopFunction · 0.85
rte_mempool_freeFunction · 0.85
cpfl_p2p_queue_grps_delFunction · 0.85
cpfl_flow_freeFunction · 0.85
idpf_vport_deinitFunction · 0.85
rte_freeFunction · 0.85
idpf_free_dma_memFunction · 0.85

Tested by

no test coverage detected