| 5306 | } |
| 5307 | |
| 5308 | static int |
| 5309 | i40e_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 */ |
| 5339 | static struct i40e_veb * |
no test coverage detected