From: Simon Horman <horms@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] dpaa2-switch: Fix error checking in dpaa2_switch_seed_bp()
Date: Mon, 19 Aug 2024 10:30:16 +0100 [thread overview]
Message-ID: <20240819093016.GB11472@kernel.org> (raw)
In-Reply-To: <eec27f30-b43f-42b6-b8ee-04a6f83423b6@stanley.mountain>
On Sat, Aug 17, 2024 at 09:52:46AM +0300, Dan Carpenter wrote:
> The dpaa2_switch_add_bufs() function returns the number of bufs that it
> was able to add. It returns BUFS_PER_CMD (7) for complete success or a
> smaller number if there are not enough pages available. However, the
> error checking is looking at the total number of bufs instead of the
> number which were added on this iteration. Thus the error checking
> only works correctly for the first iteration through the loop and
> subsequent iterations are always counted as a success.
>
> Fix this by checking only the bufs added in the current iteration.
>
> Fixes: 0b1b71370458 ("staging: dpaa2-switch: handle Rx path on control interface")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> >From reviewing the code. Not tested.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-08-19 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-17 6:52 [PATCH net] dpaa2-switch: Fix error checking in dpaa2_switch_seed_bp() Dan Carpenter
2024-08-19 9:30 ` Simon Horman [this message]
2024-08-20 12:33 ` Ioana Ciornei
2024-08-20 22:30 ` 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=20240819093016.GB11472@kernel.org \
--to=horms@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ioana.ciornei@nxp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.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).