All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org
Cc: manfred.schlaegl@gmx.at, tom_usenet@optusnet.com.au,
	s.grosjean@peak-system.com
Subject: Re: [PATCH RFC] can: replace timestamp as unique skb attribute
Date: Sat, 04 Jul 2015 18:00:28 +0200	[thread overview]
Message-ID: <5598031C.1020505@hartkopp.net> (raw)
In-Reply-To: <55939E4E.8050908@pengutronix.de>

On 01.07.2015 10:01, Marc Kleine-Budde wrote:
> On 06/26/2015 11:58 AM, Oliver Hartkopp wrote:
>> Commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for
>> overlapping CAN filters" requires the skb->tstamp to be set to check for
>> identical CAN skbs.
>>
>> Without timestamping to be required by user space applications this timestamp
>> was not generated which lead to commit 36c01245eb8 "can: fix loss of CAN
>> frames in raw_rcv" - which forces the timestamp to be set in all CAN related
>> skbuffs by introducing several __net_timestamp() calls.
>>
>> This forces e.g. out of tree drivers to add __net_timestamp() after skbuff
>> creation to prevent the frame loss fixed in mainline Linux.
>>
>> This patch removes the timestamp dependency and uses an atomic counter to
>> create an unique identifier together with the skbuff pointer.
>>
>> Btw. the new skbcnt element introduced in struct can_skb_priv has to be
>> initialized with zero in out-of-tree drivers too.
>
> ...but only if they don't use alloc_can{,fd}_skb().	

Right. Is it possible to add this fact to the commit message?

>
> Looks much better than the timestamp approach. I'll apply it to
> can/master if there aren't any objections. What about stable?

Yes. I definitely would like to have it in 4.1.x.

Currently GregKH has commit 514ac99c64b queued up for 4.1.2:

http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git/commit/?id=d722d86cbddfbe6442cbb548a548344d1e3e441a

So my favourite would be to have it in 4.1.2 too to have only 4.1.0 and 4.1.1 
dysfunctional and a proper requirement with can_skb_prv(skb)->skbcnt to be set 
in 4.1.2+

Best regards,
Oliver

  reply	other threads:[~2015-07-05  9:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  9:58 [PATCH RFC] can: replace timestamp as unique skb attribute Oliver Hartkopp
2015-07-01  8:01 ` Marc Kleine-Budde
2015-07-04 16:00   ` Oliver Hartkopp [this message]
2015-07-13  9:26 ` Manfred Schlaegl
2015-07-13  9:38   ` Marc Kleine-Budde
2015-07-13  9:40     ` Manfred Schlaegl
2015-07-13  9:42       ` 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=5598031C.1020505@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=manfred.schlaegl@gmx.at \
    --cc=mkl@pengutronix.de \
    --cc=s.grosjean@peak-system.com \
    --cc=tom_usenet@optusnet.com.au \
    /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.