From: Leon Romanovsky <leon@kernel.org>
To: Shannon Nelson <shannon.nelson@amd.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
drivers@pensando.io
Subject: Re: [PATCH net 3/6] ionic: add check for NULL t/rxqcqs in reconfig
Date: Thu, 2 Feb 2023 10:44:39 +0200 [thread overview]
Message-ID: <Y9t396bngCYyUR3g@unreal> (raw)
In-Reply-To: <20230202013002.34358-4-shannon.nelson@amd.com>
On Wed, Feb 01, 2023 at 05:29:59PM -0800, Shannon Nelson wrote:
> Make sure there are qcqs to clean before trying to swap resources
> or clean their interrupt assignments.
>
> Fixes: 101b40a0171f ("ionic: change queue count with no reset")
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
> ---
> .../net/ethernet/pensando/ionic/ionic_lif.c | 27 ++++++++++++++++---
> 1 file changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index 8499165b1563..c08d0762212c 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -2741,6 +2741,14 @@ int ionic_reconfigure_queues(struct ionic_lif *lif,
> sg_desc_sz = sizeof(struct ionic_txq_sg_desc);
>
> for (i = 0; i < qparam->nxqs; i++) {
> + /* If missing, short placeholder qcq needed for swap */
> + if (!lif->txqcqs[i]) {
> + flags = IONIC_QCQ_F_TX_STATS | IONIC_QCQ_F_SG;
> + err = ionic_qcq_alloc(lif, IONIC_QTYPE_TXQ, i, "tx", flags,
> + 4, desc_sz, comp_sz, sg_desc_sz,
> + lif->kern_pid, &lif->txqcqs[i]);
You are not checking return value, so you don't really need to store
returned value in err variable.
Thanks
next prev parent reply other threads:[~2023-02-02 8:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 1:29 [PATCH net 0/6] ionic: code maintenance Shannon Nelson
2023-02-02 1:29 ` [PATCH net 1/6] ionic: remove unnecessary indirection Shannon Nelson
2023-02-02 8:43 ` Leon Romanovsky
2023-02-02 1:29 ` [PATCH net 2/6] ionic: remove unnecessary void casts Shannon Nelson
2023-02-02 8:43 ` Leon Romanovsky
2023-02-02 1:29 ` [PATCH net 3/6] ionic: add check for NULL t/rxqcqs in reconfig Shannon Nelson
2023-02-02 8:44 ` Leon Romanovsky [this message]
2023-02-02 18:05 ` Jakub Kicinski
2023-02-02 20:06 ` Shannon Nelson
2023-02-02 20:46 ` Jakub Kicinski
2023-02-02 20:55 ` Shannon Nelson
2023-02-02 1:30 ` [PATCH net 4/6] ionic: clean interrupt before enabling queue to avoid credit race Shannon Nelson
2023-02-02 8:46 ` Leon Romanovsky
2023-02-02 1:30 ` [PATCH net 5/6] ionic: clear up notifyq alloc commentary Shannon Nelson
2023-02-02 8:46 ` Leon Romanovsky
2023-02-02 1:30 ` [PATCH net 6/6] ionic: missed doorbell workaround Shannon Nelson
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=Y9t396bngCYyUR3g@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=drivers@pensando.io \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@amd.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).