From: Jakub Kicinski <kuba@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
kernel@pengutronix.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: netdev_queue: netdev_txq_completed_mb(): fix wake condition
Date: Fri, 12 Jan 2024 18:44:56 -0800 [thread overview]
Message-ID: <20240112184456.107a3756@kernel.org> (raw)
In-Reply-To: <20240112-netdev_queue-v1-1-102c2d57e20a@pengutronix.de>
On Fri, 12 Jan 2024 17:13:14 +0100 Marc Kleine-Budde wrote:
> netif_txq_try_stop() uses "get_desc >= start_thrs" as the check for
> the call to netif_tx_start_queue().
>
> Use ">=" i netdev_txq_completed_mb(), too.
>
> Fixes: c91c46de6bbc ("net: provide macros for commonly copied lockless queue stop/wake code")
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> I'm currently converting a networking driver with a TX-FIFO depth of
> 1 (CAN device with lots of errata :/) to the netdev_queue.h helpers
> and stumbled over an off-by-one error on __netif_txq_completed_wake().
Makes sense, could be copy'n'paste from one of the drivers this is
based on. A bit unsure if it deserves the Fixes tag and net as we don't
know of any current user that would be suffering. start_thrs == ring size
is a bit of an extreme use case indeed :) Either way:
Acked-by: Jakub Kicinski <kuba@kernel.org>
next prev parent reply other threads:[~2024-01-13 2:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 16:13 [PATCH] net: netdev_queue: netdev_txq_completed_mb(): fix wake condition Marc Kleine-Budde
2024-01-13 2:44 ` Jakub Kicinski [this message]
2024-01-13 18: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=20240112184456.107a3756@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).