[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240112184456.107a3756@kernel.org>
Date: Fri, 12 Jan 2024 18:44:56 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Herbert Xu
<herbert@...dor.apana.org.au>, kernel@...gutronix.de,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: netdev_queue: netdev_txq_completed_mb(): fix wake
condition
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@...gutronix.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@...nel.org>
Powered by blists - more mailing lists