[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260123-jolly-orangutan-of-finesse-5a9bb3-mkl@pengutronix.de>
Date: Fri, 23 Jan 2026 15:17:32 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Arun Muthusamy <arun.muthusamy@...sler.com>
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 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?
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists