From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Jacob Keller <jacob.e.keller@intel.com>,
Intel Wired LAN <intel-wired-lan@lists.osuosl.org>,
Anthony Nguyen <anthony.l.nguyen@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi()
Date: Wed, 12 Jul 2023 23:08:31 +0200 [thread overview]
Message-ID: <1f57810d-bf56-0b59-4ad1-22467c6b0000@intel.com> (raw)
In-Reply-To: <20230712204730.326331-1-jacob.e.keller@intel.com>
On 7/12/23 22:47, Jacob Keller wrote:
> The ice_vf_create_vsi() function and its VF ops helper introduced by commit
> a4c785e8162e ("ice: convert vf_ops .vsi_rebuild to .create_vsi") are used
> during an individual VF reset to re-create the VSI. This was done in order
> to ensure that the VSI gets properly reconfigured within the hardware.
>
> This is somewhat heavy handed as we completely release the VSI memory and
> structure, and then create a new VSI. This can also potentially force a
> change of the VSI index as we will re-use the first open slot in the VSI
> array which may not be the same.
>
> As part of implementing devlink reload, commit 6624e780a577 ("ice: split
> ice_vsi_setup into smaller functions") split VSI setup into smaller
> functions, introducing both ice_vsi_cfg() and ice_vsi_decfg() which can be
> used to configure or deconfigure an existing software VSI structure.
>
> Rather than completely removing the VSI and adding a new one using the
> .create_vsi() VF operation, simply use ice_vsi_decfg() to remove the
> current configuration. Save the VSI type and then call ice_vsi_cfg() to
> reconfigure the VSI as the same type that it was before. Since this might
> update the hardware VSI number, we also must update the vf->lan_vsi_num
> field to match.
>
> This new operation does not re-create the VSI, so rename it to
> ice_vf_reconfig_vsi().
>
> The new approach can safely share the exact same flow for both SR-IOV VFs
> as well as the Scalable IOV VFs being worked on. This uses less code and is
> a better abstraction over fully deleting the VSI and adding a new one.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> Changes since v1:
> * resend, since v1 appears to have been discarded
> * dropped Fixes tag, since this is going to target next
>
> drivers/net/ethernet/intel/ice/ice_sriov.c | 19 ------------
> drivers/net/ethernet/intel/ice/ice_vf_lib.c | 34 +++++++++++++++------
> drivers/net/ethernet/intel/ice/ice_vf_lib.h | 1 -
> 3 files changed, 24 insertions(+), 30 deletions(-)
This makes things work better, thanks!
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-07-12 21:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 20:47 [Intel-wired-lan] [PATCH iwl-next v2] ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi() Jacob Keller
2023-07-12 21:08 ` Przemek Kitszel [this message]
2023-07-12 21:57 ` Keller, Jacob E
2023-07-20 17:48 ` Romanowski, Rafal
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=1f57810d-bf56-0b59-4ad1-22467c6b0000@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox