From: Simon Horman <simon.horman@corigine.com>
To: Dave Ertman <david.m.ertman@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, daniel.machon@microchip.com,
netdev@vger.kernel.org
Subject: Re: [PATCH iwl-next v4 02/10] ice: Add driver support for firmware changes for LAG
Date: Wed, 14 Jun 2023 13:17:52 +0200 [thread overview]
Message-ID: <ZImh4NunKEpay3zu@corigine.com> (raw)
In-Reply-To: <20230609211626.621968-3-david.m.ertman@intel.com>
On Fri, Jun 09, 2023 at 02:16:18PM -0700, Dave Ertman wrote:
...
Hi Dave,
some minor feedback from my side.
> @@ -5576,10 +5579,18 @@ static int __init ice_module_init(void)
> return -ENOMEM;
> }
>
> + ice_lag_wq = alloc_ordered_workqueue("ice_lag_wq", 0);
> + if (!ice_lag_wq) {
> + pr_err("Failed to create LAG workqueue\n");
Is the allocation failure already logged by core code?
If so, perhaps this is unnecessary?
> + destroy_workqueue(ice_wq);
> + return -ENOMEM;
> + }
> +
> status = pci_register_driver(&ice_driver);
> if (status) {
> pr_err("failed to register PCI driver, err %d\n", status);
> destroy_workqueue(ice_wq);
> + destroy_workqueue(ice_lag_wq);
> }
>
> return status;
As there are now a few things (more than zero) to unwind I think it would
be best to use the Kernel's idiomatic goto-based approach.
(Completely untested!)
ice_lag_wq = alloc_ordered_workqueue("ice_lag_wq", 0);
if (!ice_lag_wq) {
pr_err("Failed to create LAG workqueue\n");
status = -ENOMEM;
goto err_destroy_ice_wq;
}
status = pci_register_driver(&ice_driver);
if (status) {
pr_err("failed to register PCI driver, err %d\n", status);
goto err_destroy_lag_wq;
}
return status;
err_destroy_lag_wq:
destroy_workqueue(ice_lag_wq);
err_destroy_ice_wq:
destroy_workqueue(ice_wq);
return status
> @@ -5596,6 +5607,7 @@ static void __exit ice_module_exit(void)
> {
> pci_unregister_driver(&ice_driver);
> destroy_workqueue(ice_wq);
> + destroy_workqueue(ice_lag_wq);
> pr_info("module unloaded\n");
> }
> module_exit(ice_module_exit);
...
next prev parent reply other threads:[~2023-06-14 11:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 21:16 [PATCH iwl-next v4 00/10] Implement support for SRIOV + LAG Dave Ertman
2023-06-09 21:16 ` [PATCH iwl-next v4 01/10] ice: Correctly initialize queue context values Dave Ertman
2023-06-14 11:12 ` Simon Horman
2023-06-09 21:16 ` [PATCH iwl-next v4 02/10] ice: Add driver support for firmware changes for LAG Dave Ertman
2023-06-14 11:17 ` Simon Horman [this message]
2023-06-14 16:56 ` Ertman, David M
2023-06-14 19:44 ` Simon Horman
2023-06-14 21:23 ` Brett Creeley
2023-06-14 22:42 ` Ertman, David M
2023-06-09 21:16 ` [PATCH iwl-next v4 03/10] ice: changes to the interface with the HW and FW for SRIOV_VF+LAG Dave Ertman
2023-06-09 21:16 ` [PATCH iwl-next v4 04/10] ice: implement lag netdev event handler Dave Ertman
2023-06-14 21:24 ` Brett Creeley
2023-06-14 22:58 ` Ertman, David M
2023-06-14 23:18 ` Brett Creeley
2023-06-09 21:16 ` [PATCH iwl-next v4 05/10] ice: process events created by " Dave Ertman
2023-06-14 21:24 ` Brett Creeley
2023-06-14 23:19 ` Ertman, David M
2023-06-14 23:24 ` Brett Creeley
2023-06-09 21:16 ` [PATCH iwl-next v4 06/10] ice: Flesh out implementation of support for SRIOV on bonded interface Dave Ertman
2023-06-14 21:24 ` Brett Creeley
2023-06-14 23:34 ` Ertman, David M
2023-06-09 21:16 ` [PATCH iwl-next v4 07/10] ice: support non-standard teardown of bond interface Dave Ertman
2023-06-09 21:16 ` [PATCH iwl-next v4 08/10] ice: enforce interface eligibility and add messaging for SRIOV LAG Dave Ertman
2023-06-09 21:16 ` [PATCH iwl-next v4 09/10] ice: enforce no DCB config changing when in bond Dave Ertman
2023-06-09 21:16 ` [PATCH iwl-next v4 10/10] ice: update reset path for SRIOV LAG support Dave Ertman
2023-06-11 17:41 ` [PATCH iwl-next v4 00/10] Implement support for SRIOV + LAG Daniel Machon
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=ZImh4NunKEpay3zu@corigine.com \
--to=simon.horman@corigine.com \
--cc=daniel.machon@microchip.com \
--cc=david.m.ertman@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/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).