Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1617241pxb; Sun, 10 Jan 2021 04:46:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxikkAbQf1OdAQa5UhbxC0KDcbwKT7yLLGV1y1J9sqQl6m79pLxCzJFX6Gu8pYjJE/2rhtj X-Received: by 2002:aa7:ca14:: with SMTP id y20mr11171928eds.340.1610282782268; Sun, 10 Jan 2021 04:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610282782; cv=none; d=google.com; s=arc-20160816; b=s2P2/2LbTgq61Zwe4Y3jI+ZoLDzEC3LATrn/6dpJ3IsxAffqnQM7CV03iTula5HDRZ 9vKJfBegdXl2CXpiIcvkjxcZPEPTQS6zIlLbEXnyd9N/Jo+2vae4SukpFvjTFa63gJc9 z4kO9t2D2GvTl2JYxK4+YZeLzzCs8lDyX7zzX86cYjM9cK8Q73AtkuyniOZYwdqHyFr5 kVoPqMXdg0ufZZvHok2HtsX+a7LzXCA83+LUvyi+QAaysIOpSPqiMfjZu0w0G8JP88Id HPBSO21gsIFvkdKSWulFDxMN8++BEoROJvsqbCEfy9+vhWyixFJ+CS15iJoG5KSqxWW/ wOUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=/pdqrgA6m1h6kMMCKyb9Yf4H0vooPkYnEJSS7SR9+nQ=; b=W+r+xjrr43MZHcQNwEvEWIhln7I1+/+2NaCDEA3StbtoU3Xfn3VVW4Lr5gFw1PWQ5B c7oiOvGaJYVl5wLaW5QLjBmbiLAivfebT7Av6Rn7EAtiOmr3h9PvtgGfjthp1Y1Gh01j s3Vs69NWs41gKRYxQRjwpREDBrbhsICFLCR8LU5TruPDqx0wLpOmKrdNgCcMyh1O2Dk+ MewTj6iB9DknfyEaOjGF+qb9pSUuctIUmsuoM1vy19QKDgLUsD5zZYQeKD93kcIOl9JB XqZY2elBBCbvLRxn75bF0qu2ZvKq5OYdcl2ZD/YyM1DuSXhZS5R7QjEw7LnNz5EYTqT3 r4IA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jo16si5699478ejb.86.2021.01.10.04.45.58; Sun, 10 Jan 2021 04:46:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbhAJMnw (ORCPT + 99 others); Sun, 10 Jan 2021 07:43:52 -0500 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:33165 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbhAJMnv (ORCPT ); Sun, 10 Jan 2021 07:43:51 -0500 Received: from localhost.localdomain ([153.202.107.157]) by mwinf5d13 with ME id F0hm240043PnFJp030i2yL; Sun, 10 Jan 2021 13:42:07 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Jan 2021 13:42:07 +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 v2 0/1] Add software TX timestamps to the CAN devices Date: Sun, 10 Jan 2021 21:41:30 +0900 Message-Id: <20210110124132.109326-1-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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 | 2 ++ 1 file changed, 2 insertions(+) -- 2.26.2