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

Function i40e_veb_release

dpdk/drivers/net/i40e/i40e_ethdev.c:5308–5336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5306}
5307
5308static int
5309i40e_veb_release(struct i40e_veb *veb)
5310{
5311 struct i40e_vsi *vsi;
5312 struct i40e_hw *hw;
5313
5314 if (veb == NULL)
5315 return -EINVAL;
5316
5317 if (!TAILQ_EMPTY(&veb->head)) {
5318 PMD_DRV_LOG(ERR, "VEB still has VSI attached, can't remove");
5319 return -EACCES;
5320 }
5321 /* associate_vsi field is NULL for floating VEB */
5322 if (veb->associate_vsi != NULL) {
5323 vsi = veb->associate_vsi;
5324 hw = I40E_VSI_TO_HW(vsi);
5325
5326 vsi->uplink_seid = veb->uplink_seid;
5327 vsi->veb = NULL;
5328 } else {
5329 veb->associate_pf->main_vsi->floating_veb = NULL;
5330 hw = I40E_VSI_TO_HW(veb->associate_pf->main_vsi);
5331 }
5332
5333 i40e_aq_delete_element(hw, veb->seid, NULL);
5334 rte_free(veb);
5335 return I40E_SUCCESS;
5336}
5337
5338/* Setup a veb */
5339static struct i40e_veb *

Callers 1

i40e_vsi_releaseFunction · 0.85

Calls 2

i40e_aq_delete_elementFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected