Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933202AbbFVKKg (ORCPT ); Mon, 22 Jun 2015 06:10:36 -0400 Received: from mout.gmx.net ([212.227.15.15]:59393 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925AbbFVKKZ (ORCPT ); Mon, 22 Jun 2015 06:10:25 -0400 Message-ID: <5587DF06.3010509@gmx.at> Date: Mon, 22 Jun 2015 12:10:14 +0200 From: Manfred Schlaegl User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Oliver Hartkopp , netdev@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, mkl@pengutronix.de Subject: Re: [PATCH - regression 4.1-rc8] can: fix loss of CAN frames in raw_rcv References: <1434905444-11438-1-git-send-email-socketcan@hartkopp.net> In-Reply-To: <1434905444-11438-1-git-send-email-socketcan@hartkopp.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:CJ5jiI4udaqD0RHFA2MquJsZ8PWP8LhShnMvxoAkLiEBuv8InkK sm9EgHiVoahWoxgTEZHftgTaP0MbgpkVCkW2xMk7k/t7wQKACLML/kgDTy4DPfYAibjHE7y pJxuz3QsRZEeNvSMRhCo3URW3+2YuDZdtOG/6jQWkgplXksllIkQryqTjqTAo2YpgkFuYRs KwDJdBeLgfSVibTRPmIuw== X-UI-Out-Filterresults: notjunk:1;V01:K0:XOkqQKVeXsY=:kZJlstcDjNJoDmaz0IDk+g Iy2Fx/j7k3iB981ggOMhxLjmXOGUpZTLpXZH97GnUKVuywDTHtE4HQs6yCzZjNbIUWXMPObwV Wbhtx+teSud8F7bsj5NShaPmEvTy7Wi4QVOqjoGwFjpJx9SxDK1L95JaqlB6lanAR4XxLsqMp TFfAjjF643UQwuiqMCLbikQZNydqH/xePAoGjU6BOOJUH/cYAQnP7rsRTK57GKbiIsiVRaOaV kfMcTdymzdx+/J/LNGoq0JyvGVmq1gsUlb5ob1KgCIr1QlhJjZlUK4EP6Kyu93BAayaNsSyk1 Z6pKLOnkPsUTD6Kg/Logefo0Xsok0gFHOdBAEWJMOkEwWvAnioaKBl2XTst2uS7n9P6hL6Cr2 L/RNlfBYKfU1j+fjyQPE79DLVqshwut1GsmNw7gV3QZoEcn5YqvZxkTF1k3LQp/2BWsak971a nYGk2uTQID7icWm5Qha4a3N68m8PougFz1Jlz1c03kQMB3LDTUHMFK/HtEoS0u/zOMbT1qeGP nYI2z9q7xbogtBb1Y4yWhhuf8wugYYyhifx/otycaxoYzYxvvlip+ceqMBP+aX2aSWoiAruA+ unOcRc7XtvowEbBhV7IjMBjl5AXSw/jgjAlhfnC4c28HyKbMRcWLZFhG6eJl0vcOB+uiFOWSB 7JknR+yQrSl/JtJu+V4lGUWGWTgJ4d/8uPFMoTqT81XRRFVPiX9+ZvG6gWqmE2Lu7BX8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1653 Lines: 34 Hello! On 2015-06-21 18:50, Oliver Hartkopp wrote: > As reported by Manfred Schlaegl here > > http://marc.info/?l=linux-netdev&m=143482089824232&w=2 > > 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. > > As net timestamping is influenced by several players (netstamp_needed and > netdev_tstamp_prequeue) Manfred missed a proper timestamp which leads to > CAN frame loss. > > As skb timestamping became now mandatory for CAN related skbs this patch > makes sure that received CAN skbs always have a proper timestamp set. > Maybe there's a better solution in the future but this patch fixes the > CAN frame loss so far. > I'm not sure, but maybe this patch (and also my original one) opens a new potential issue with timestamps. If the timestamp is set at allocation time, this cancels setting the timestamp at delivery (by net_timestamp_check in, for example, netif_receive_skb_internal.) -> So it changes the behavior of timestamping (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/timestamping.txt?id=b953c0d234bc72e8489d3bf51a276c5c4ec85345) generally. Hypothetical example: If timestamping is enabled by the user and there is a significant delay between allocation and delivery of a skb (early allocation in driver or something) the timestamp does not reflect the reception time anymore. What do you thing about this? best regards, Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/