[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB89857CBBB9B57DF4CB1B23878F4EA@IA3PR11MB8985.namprd11.prod.outlook.com>
Date: Tue, 8 Jul 2025 14:58:00 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: "Keller, Jacob E" <jacob.e.keller@...el.com>, Intel Wired LAN
<intel-wired-lan@...ts.osuosl.org>
CC: "Keller, Jacob E" <jacob.e.keller@...el.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Chittim, Madhu" <madhu.chittim@...el.com>, "Cao,
Yahui" <yahui.cao@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next 7/8] ice: avoid rebuilding if
MSI-X vector count is unchanged
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Jacob Keller
> Sent: Thursday, June 19, 2025 12:25 AM
> To: Intel Wired LAN <intel-wired-lan@...ts.osuosl.org>
> Cc: Keller, Jacob E <jacob.e.keller@...el.com>; netdev@...r.kernel.org;
> Chittim, Madhu <madhu.chittim@...el.com>; Cao, Yahui
> <yahui.cao@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>;
> Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next 7/8] ice: avoid rebuilding if MSI-X
> vector count is unchanged
>
> Commit 05c16687e0cc ("ice: set MSI-X vector count on VF") added support
> to change the vector count for VFs as part of ice_sriov_set_msix_vec_count().
> This function modifies and rebuilds the target VF with the requested number
> of MSI-X vectors.
>
> Future support for live migration will add a call to
> ice_sriov_set_msix_vec_count() to ensure that a migrated VF has the proper
> MSI-X vector count. In most cases, this request will be to set the MSI-X vector
> count to its current value. In that case, no work is necessary.
> Rather than requiring the caller to check this, update the function to check and
> exit early if the vector count is already at the requested value.
> This avoids an unnecessary VF rebuild.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sriov.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c
> b/drivers/net/ethernet/intel/ice/ice_sriov.c
> index
> 4c0955be2ad20c3902cf891a66f857585fcab98b..964c474322196fa887576
> 7ac2667be5d550a6765 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sriov.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
> @@ -966,6 +966,12 @@ int ice_sriov_set_msix_vec_count(struct pci_dev
> *vf_dev, int msix_vec_count)
> return -ENOENT;
> }
>
> + /* No need to rebuild if we're setting to the same value */
> + if (msix_vec_count == vf->num_msix) {
> + ice_put_vf(vf);
> + return 0;
> + }
> +
> prev_msix = vf->num_msix;
> prev_queues = vf->num_vf_qs;
>
>
> --
> 2.48.1.397.gec9d649cc640
Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
Powered by blists - more mailing lists