Re: [PATCH] can: dev: extend can_put_echo_skb() to handle frame_len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon. 11 Jan 2021 at 18:38, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>
> On 1/11/21 7:13 AM, Vincent Mailhol wrote:
> [...]
>
> > diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c
> > index 568dc28f7a4e..64bd2b60febc 100644
> > --- a/drivers/net/can/dev/skb.c
> > +++ b/drivers/net/can/dev/skb.c
> > @@ -38,7 +38,7 @@ void can_flush_echo_skb(struct net_device *dev)
> >   * priv->echo_skb, if necessary.
> >   */
> >  int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
> > -                  unsigned int idx)
> > +                  unsigned int idx, unsigned int frame_len)
> >  {
> >       struct can_priv *priv = netdev_priv(dev);
> >
> > @@ -62,6 +62,10 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
> >               skb->ip_summed = CHECKSUM_UNNECESSARY;
> >               skb->dev = dev;
> >
> > +             /* save frame_len to reuse it when transmission is completed */
> > +             if (frame_len)
> > +                     can_skb_prv(skb)->frame_len = frame_len;
> > +
>
> I think we can assign it unconditionally?

Ack, I prepare the v2 right away and post it in answer to this
message.

Will also rename the patch subject from
"can: dev: extend can_put_echo_skb() to handle frame_len"
to
"can: dev: can_put_echo_skb(): extend to store can frame length".

This way the name is more aligned with your patch "can: dev:
can_get_echo_skb(): extend to return can frame length".


Yours sincerely,
Vincent



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux