[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <98f03830-b52b-4dfb-b256-a5c545f48bf2@gaisler.com>
Date: Wed, 28 Jan 2026 09:14:08 +0100
From: Arun Muthusamy <arun.muthusamy@...sler.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
mailhol@...nel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-can@...r.kernel.org
Subject: Re: [PATCH v3 15/15] can: grcan: Update echo skb handling to match
variable length CANFD frame
On 1/23/26 15:17, Marc Kleine-Budde wrote:
> On 22.01.2026 13:10:38, Arun Muthusamy wrote:
> [...]
>
>> @@ -1575,7 +1591,16 @@ static netdev_tx_t grcan_start_xmit(struct sk_buff *skb,
>> * can_put_echo_skb would be an error unless other measures are
>> * taken.
>> */
>> - can_put_echo_skb(skb, dev, slotindex, 0);
>> +
>> + priv->echo_skb_idx = priv->next_echo_idx;
>> +
>> + can_put_echo_skb(skb, dev, priv->next_echo_idx, 0);
>> +
>> + /* Move to the next index in the echo skb buffer */
>> + priv->next_echo_idx = (priv->next_echo_idx + 1) % priv->can.echo_skb_max;
>> +
>> + if (priv->can.echo_skb[priv->echo_skb_idx])
>> + netif_stop_queue(dev);
> You also use "if (unlikely(space == 1)) netif_stop_queue(dev);", that
> looks suspicious. Why have 2 independent ways to check if the TX queue
> is full?
That's correct.
Current implementation introduces two independent checks where space reflects hardware TX descriptor availability and echo slot availability.
I’ll rework this to use a single check, covering both TX ring space and echo slot availability.
--
--
BR,
Arun Muthusamy
Software Engineer
Frontgrade Gaisler
T : +46 (0) 700 558 528
arun.muthusamy@...sler.com
Frontgrade Gaisler AB, Kungsgatan 12, SE-411 19 GÖTEBORG, Sweden.
+46 (0) 31 775 8650, www.gaisler.com
Powered by blists - more mailing lists