From patchwork Sun Jan 10 12:49:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent MAILHOL X-Patchwork-Id: 360888 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F24E4C433DB for ; Sun, 10 Jan 2021 12:51:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9AB423108 for ; Sun, 10 Jan 2021 12:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726449AbhAJMvG (ORCPT ); Sun, 10 Jan 2021 07:51:06 -0500 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:57721 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbhAJMvF (ORCPT ); Sun, 10 Jan 2021 07:51:05 -0500 Received: from localhost.localdomain ([153.202.107.157]) by mwinf5d13 with ME id F0p42400E3PnFJp030pJLG; Sun, 10 Jan 2021 13:49:21 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Jan 2021 13:49:21 +0100 X-ME-IP: 153.202.107.157 From: Vincent Mailhol To: Marc Kleine-Budde , linux-can@vger.kernel.org, Jeroen Hofstee Cc: Vincent Mailhol , Wolfgang Grandegger , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 0/1] Add software TX timestamps to the CAN devices Date: Sun, 10 Jan 2021 21:49:02 +0900 Message-Id: <20210110124903.109773-1-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org With the ongoing work to add BQL to Socket CAN, I figured out that it would be nice to have an easy way to mesure the latency. And one easy way to do so it to check the round trip time of the packet by doing the difference between the software rx timestamp and the software tx timestamp. rx timestamps are already available. This patch gives the missing piece: add a tx software timestamp feature to the CAN devices. Of course, the tx software timestamp might also be used for other purposes such as performance measurements of the different queuing disciplines (e.g. by checking the difference between the kernel tx software timestamp and the userland tx software timestamp). v2 was a mistake, please ignore it (fogot to do git add, changes were not reflected...) v3 reflects the comments that Jeroen made in https://lkml.org/lkml/2021/1/10/54 Vincent Mailhol (1): can: dev: add software tx timestamps drivers/net/can/dev.c | 1 + 1 file changed, 1 insertion(+)