With floating VEB enabled, i40e_vsi_release() releases the VSIs
attached to the floating VEB of the main VSI but not the floating
VEB itself, leaking the VEB structure and its switch element.

Release it once its VSIs are gone, as is already done for the
regular VEB.

Fixes: 440499cf5376 ("net/i40e: support floating VEB")

Signed-off-by: Anurag Mandal <[email protected]>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c 
b/drivers/net/intel/i40e/i40e_ethdev.c
index e26a849764..9ca01ecd34 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -5329,6 +5329,7 @@ i40e_vsi_release(struct i40e_vsi *vsi)
                        if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
                                return -1;
                }
+               i40e_veb_release(vsi->floating_veb);
        }
 
        /* Remove all macvlan filters of the VSI */
-- 
2.25.1

Reply via email to