All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
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 09:37:24 +0100	[thread overview]
Message-ID: <20210320083724.rtdpai6cbdc7ilcn@pengutronix.de> (raw)
In-Reply-To: <CAMZ6RqJWBB_YRuTxeM8m_=iOz5ABs1Fq1++tdeEZ7vb=jOG9iQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

On 20.03.2021 17:03:02, Vincent MAILHOL wrote:
> 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?

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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2021-03-20 11:35 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
2021-03-20  8:37     ` Marc Kleine-Budde [this message]

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=20210320083724.rtdpai6cbdc7ilcn@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    /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.