From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Galois.linutronix.de ([146.0.238.70]:37481 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271AbeCUPLl (ORCPT ); Wed, 21 Mar 2018 11:11:41 -0400 Date: Wed, 21 Mar 2018 16:11:36 +0100 (CET) From: Thomas Gleixner To: Richard Cochran cc: Eric Dumazet , Jesus Sanchez-Palencia , netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, vinicius.gomes@intel.com, anna-maria@linutronix.de, henrik@austad.us, John Stultz , levi.pearson@harman.com, edumazet@google.com, willemb@google.com, mlichvar@redhat.com Subject: Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params In-Reply-To: <20180321145930.4hlmihghljpv2wrq@localhost> Message-ID: References: <20180307011230.24001-1-jesus.sanchez-palencia@intel.com> <20180307011230.24001-9-jesus.sanchez-palencia@intel.com> <1520391209.109662.33.camel@gmail.com> <20180307052410.m2yqmokrivjlwcjz@localhost> <20180321145930.4hlmihghljpv2wrq@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 21 Mar 2018, Richard Cochran wrote: @Intel: I removed intel-wired-lan@ as I have absolutely zero interest in the moderation spam from that list. Can you please either get rid of this moderation nonsense or stop CC'ing that list when posting to lkml/netdev? > On Wed, Mar 21, 2018 at 01:58:51PM +0100, Thomas Gleixner wrote: > > Errm. No. There is no way to support fd based clocks or one of the CPU > > time/process time based clocks for this. > > Why not? > > If the we have HW offloading, then the transmit time had better be > expressed in terms of the MAC's internal clock. Otherwise we would > need to translate between a kernel clock and the MAC clock, but that > is expensive (eg over PCIe) and silly (because in a typical use case > the MAC will already be synchronized to the network time). Sure, but you CANNOT use a clockid for that because there is NONE. The mac clock is exposed via a dynamic posix clock and can only be referenced via a file descriptor. The qdisc setup does fd = open(...) and hands that in as clockid. Later the application does fd = open(...) and uses that as clockid for tagging the messages. What the heck guarantees that both the setup and the application will get the same fd number? Exactly nothing. So any attempt to use the filedescriptor number as clockid is broken by definition. Thanks, tglx