Re: [PATCH 2/2] can: dev: can_free_echo_skb(): extend to return can frame length
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-03-20 11:35:09
On 20.03.2021 17:03:02, Vincent MAILHOL wrote:
On Fri. 19 mars 2021 at 23:27, Marc Kleine-Budde [off-list ref] wrote:quoted
In order to implement byte queue limits (bql) in CAN drivers, the length of the CAN frame needs to be passed into the networking stack even if the transmission failed for some reason. To avoid to calculate this length twice, extend can_free_echo_skb() to return that value. Convert all users of this function, too. This patch is the natural extension of commit: | 9420e1d495e2 ("can: dev: can_get_echo_skb(): extend to return can | frame length") Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>[...]quoted
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c index 95d0a02e408b..724ba72237dc 100644 --- a/drivers/net/can/usb/etas_es58x/es58x_core.c +++ b/drivers/net/can/usb/etas_es58x/es58x_core.c@@ -314,7 +314,7 @@ static void es58x_can_free_echo_skb_tail(struct net_device *netdev) struct sk_buff *skb = priv->can.echo_skb[priv->tx_tail & fifo_mask]; netdev_completed_queue(netdev, 1, can_skb_prv(skb)->frame_len); - can_free_echo_skb(netdev, priv->tx_tail & fifo_mask); + can_free_echo_skb(netdev, priv->tx_tail & fifo_mask, NULL);Do you already have the etas_es58x driver in can-next/testing?
Locally :) I did the can_free_echo_skb() changes on top of that, this is why these patches change the es58x_core.c, too.
Or were you working on the wrong branch?
Don't think so.
Could you push the last version of can-next/testing? It would be easier for me.
I push the testing branch including the can_free_echo_skb() patches. I added the etas_es58x patches on top and pushed that into a branch called etas_es58x. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachments
- signature.asc [application/pgp-signature] 488 bytes