[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260117075926.128979-1-tao03.wang@horizon.auto>
Date: Sat, 17 Jan 2026 15:59:22 +0800
From: Tao Wang <tao03.wang@...izon.auto>
To: <linux@...linux.org.uk>
CC: <alexandre.torgue@...s.st.com>, <andrew+netdev@...n.ch>,
<davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
<kuba@...nel.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <maxime.chevallier@...tlin.com>,
<mcoquelin.stm32@...il.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
<tao03.wang@...izon.auto>
Subject: Re: [PATCH net v3] net: stmmac: fix transmit queue timed out after resume for tso
> Rather than using tx_q->tx_skbuff_dma[].last_segment to determine
> whether the first descriptor entry is the only segment, calculate the
> number of descriptor entries used. If there is only one descriptor,
> then the first is also the last, so mark it as such.
This is a good idea. tx_q->tx_skbuff_dma[].last_segment no longer carries
much meaning and can indeed be removed altogether.
> + is_last_segment = ((tx_q->cur_tx - first_entry) &
> + (priv->dma_conf.dma_tx_size - 1)) == 1;
Since tx_q->cur_tx may wrap around and become smaller than first_entry,
the following statement is more concise:
is_last_segment = (tx_q->cur_tx == first_entry);
Powered by blists - more mailing lists