All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can <linux-can@vger.kernel.org>, kernel@pengutronix.de
Subject: Re: [PATCH 2/2] can: dev: can_free_echo_skb(): extend to return can frame length
Date: Sat, 20 Mar 2021 17:03:02 +0900	[thread overview]
Message-ID: <CAMZ6RqJWBB_YRuTxeM8m_=iOz5ABs1Fq1++tdeEZ7vb=jOG9iQ@mail.gmail.com> (raw)
In-Reply-To: <20210319142700.305648-3-mkl@pengutronix.de>

On Fri. 19 mars 2021 at 23:27, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> 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>
[...]
> 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?
Or were you working on the wrong branch?
Could you push the last version of can-next/testing? It would be easier for me.


Yours sincerely,
Vincent

  reply	other threads:[~2021-03-20 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 14:26 [PATCH 0/2] let can_free_echo_skb() return can frame length Marc Kleine-Budde
2021-03-19 14:26 ` [PATCH 1/2] can: skb: can_free_echo_skb(): don't crash the kernel if can_priv::echo_skb is accessed out of bounds Marc Kleine-Budde
2021-03-19 14:27 ` [PATCH 2/2] can: dev: can_free_echo_skb(): extend to return can frame length Marc Kleine-Budde
2021-03-20  8:03   ` Vincent MAILHOL [this message]
2021-03-20  8:37     ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMZ6RqJWBB_YRuTxeM8m_=iOz5ABs1Fq1++tdeEZ7vb=jOG9iQ@mail.gmail.com' \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.