From: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>
To: Linkui Xiao <xiaolinkui@126.com>,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Linkui Xiao <xiaolinkui@kylinos.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH iwl-net v2 2/2] ice: release the VF MSI-X window when ice_start_vfs() fails
Date: Mon, 28 Sep 2026 15:08:02 +0200 [thread overview]
Message-ID: <143280f0-1c93-405b-b03d-b6404893cdd7@linux.intel.com> (raw)
In-Reply-To: <20260928065306.1514795-2-xiaolinkui@126.com>
On 28.09.2026 08:53, Linkui Xiao wrote:
> diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c
> index 95abc6704820..df84dbe12cba 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sriov.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
> @@ -446,8 +446,10 @@ static int ice_init_vf_vsi_res(struct ice_vf *vf)
> return -ENOMEM;
>
> vsi = ice_vf_vsi_setup(vf);
> - if (!vsi)
> - return -ENOMEM;
> + if (!vsi) {
> + err = -ENOMEM;
> + goto free_irqs;
> + }
>
> err = ice_vf_init_host_cfg(vf, vsi);
> if (err)
> @@ -457,6 +459,9 @@ static int ice_init_vf_vsi_res(struct ice_vf *vf)
>
> release_vsi:
> ice_vf_vsi_release(vf);
> +free_irqs:
> + ice_virt_free_irqs(pf, vf->first_vector_idx, vf->num_msix);
> +
> return err;
> }
>
> @@ -490,6 +495,8 @@ static int ice_start_vfs(struct ice_pf *pf)
> dev_err(ice_pf_to_dev(pf), "Failed to attach VF %d to eswitch, error %d",
> vf->vf_id, retval);
> ice_vf_vsi_release(vf);
> + ice_virt_free_irqs(pf, vf->first_vector_idx,
> + vf->num_msix);
Nit: For consistency with the teardown: loop (which frees IRQs before releasing the VSI), consider swapping the order here too - currently this branch releases the VSI first, then frees IRQs, the opposite order. Not functionally significant, just readability.
> goto teardown;
> }
> }
Reviewed-by: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>
next prev parent reply other threads:[~2026-09-28 13:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 6:53 [PATCH iwl-net v2 1/2] ice: detach the VF representor when ice_start_vfs() fails Linkui Xiao
2026-09-28 6:53 ` [PATCH iwl-net v2 2/2] ice: release the VF MSI-X window " Linkui Xiao
2026-09-28 13:08 ` Tomasz Lichwala [this message]
2026-09-29 0:55 ` Linkui Xiao
2026-09-28 15:16 ` Loktionov, Aleksandr
2026-09-28 6:59 ` [PATCH iwl-net v2 1/2] ice: detach the VF representor " netdev-bot+sinfo
2026-09-28 7:14 ` Linkui Xiao
2026-09-29 18:11 ` Tony Nguyen
2026-10-07 11:11 ` Przemek Kitszel
2026-10-08 13:08 ` Linkui Xiao
2026-09-28 13:08 ` Tomasz Lichwala
2026-09-28 15:16 ` Loktionov, Aleksandr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=143280f0-1c93-405b-b03d-b6404893cdd7@linux.intel.com \
--to=tomasz.lichwala@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=stable@vger.kernel.org \
--cc=xiaolinkui@126.com \
--cc=xiaolinkui@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.