From: Leon Romanovsky <leon@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com,
Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
netdev@vger.kernel.org, jiri@nvidia.com,
Gurucharan G <gurucharanx.g@intel.com>
Subject: Re: [PATCH net 1/1] ice: move devlink port creation/deletion
Date: Tue, 24 Jan 2023 08:59:29 +0200 [thread overview]
Message-ID: <Y8+B0UctSryV4VPk@unreal> (raw)
In-Reply-To: <20230124005714.3996270-1-anthony.l.nguyen@intel.com>
On Mon, Jan 23, 2023 at 04:57:14PM -0800, Tony Nguyen wrote:
> From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
>
> Commit a286ba738714 ("ice: reorder PF/representor devlink
> port register/unregister flows") moved the code to create
> and destroy the devlink PF port. This was fine, but created
> a corner case issue in the case of ice_register_netdev()
> failing. In that case, the driver would end up calling
> ice_devlink_destroy_pf_port() twice.
>
> Additionally, it makes no sense to tie creation of the devlink
> PF port to the creation of the netdev so separate out the
> code to create/destroy the devlink PF port from the netdev
> code. This makes it a cleaner interface.
>
> Fixes: a286ba738714 ("ice: reorder PF/representor devlink port register/unregister flows")
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> There will be a merge conflict when rebasing with next-next.
>
> Resolution:
> static void ice_remove(struct pci_dev *
> ice_remove_arfs(pf);
> ice_setup_mc_magic_wake(pf);
> ice_vsi_release_all(pf);
> - mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
> + mutex_destroy(&hw->fdir_fltr_lock);
> + ice_devlink_destroy_pf_port(pf);
> ice_set_wake(pf);
> ice_free_irq_msix_misc(pf);
> ice_for_each_vsi(pf, i) {
>
> drivers/net/ethernet/intel/ice/ice_lib.c | 3 ---
> drivers/net/ethernet/intel/ice/ice_main.c | 25 +++++++++++++++--------
> 2 files changed, 17 insertions(+), 11 deletions(-)
If you seek cleaner interface, you will be better separate
ice_vsi_release_all() to many small building blocks, so unwind will be
symmetrical to probe.
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2023-01-24 7:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 0:57 [PATCH net 1/1] ice: move devlink port creation/deletion Tony Nguyen
2023-01-24 6:59 ` Leon Romanovsky [this message]
2023-01-25 3:00 ` patchwork-bot+netdevbpf
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=Y8+B0UctSryV4VPk@unreal \
--to=leon@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gurucharanx.g@intel.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul.m.stillwell.jr@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;
as well as URLs for NNTP newsgroup(s).