[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3521F37B812442601D9A64FE8F5BA@BL0PR11MB3521.namprd11.prod.outlook.com>
Date: Thu, 15 Jun 2023 15:38:45 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: Simon Horman <simon.horman@...igine.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2] ice: clean up freeing
SR-IOV VFs
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Przemek Kitszel
> Sent: środa, 31 maja 2023 14:37
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Simon Horman <simon.horman@...igine.com>;
> netdev@...r.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v2] ice: clean up freeing SR-IOV
> VFs
>
> The check for existing VFs was redundant since very inception of SR-IOV
> sysfs interface in the kernel, see commit 1789382a72a5 ("PCI: SRIOV control
> and status via sysfs").
>
> v2: sending to proper IWL address
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sriov.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c
> b/drivers/net/ethernet/intel/ice/ice_sriov.c
> index 2ea6d24977a6..1f66914c7a20 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sriov.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
> @@ -905,14 +905,13 @@ static int ice_ena_vfs(struct ice_pf *pf, u16
> num_vfs)
> */
> static int ice_pci_sriov_ena(struct ice_pf *pf, int num_vfs) {
> - int pre_existing_vfs = pci_num_vf(pf->pdev);
> struct device *dev = ice_pf_to_dev(pf);
> int err;
>
> - if (pre_existing_vfs && pre_existing_vfs != num_vfs)
> + if (!num_vfs) {
> ice_free_vfs(pf);
> - else if (pre_existing_vfs && pre_existing_vfs == num_vfs)
> return 0;
> + }
>
> if (num_vfs > pf->vfs.num_supported) {
> dev_err(dev, "Can't enable %d VFs, max VFs supported is
> %d\n",
> --
> 2.38.1
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@...osl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
Powered by blists - more mailing lists