From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesus Sanchez-Palencia Subject: Re: [Intel-wired-lan] [RFC v2 net-next 01/10] net: Add a new socket option for a future transmit time. Date: Mon, 12 Feb 2018 14:39:06 -0800 Message-ID: References: <20180117230621.26074-1-jesus.sanchez-palencia@intel.com> <20180117230621.26074-2-jesus.sanchez-palencia@intel.com> <20180118084227.GL1175@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, john.stultz@linaro.org, Richard Cochran , jiri@resnulli.us, ivan.briano@intel.com, richardcochran@gmail.com, henrik@austad.us, jhs@mojatatu.com, levi.pearson@harman.com, intel-wired-lan@lists.osuosl.org, xiyou.wangcong@gmail.com, tglx@linutronix.de, anna-maria@linutronix.de To: Miroslav Lichvar Return-path: Received: from mga09.intel.com ([134.134.136.24]:58840 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932751AbeBLWlG (ORCPT ); Mon, 12 Feb 2018 17:41:06 -0500 In-Reply-To: <20180118084227.GL1175@localhost> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Hi, On 01/18/2018 12:42 AM, Miroslav Lichvar wrote: > On Wed, Jan 17, 2018 at 03:06:12PM -0800, Jesus Sanchez-Palencia wrote: >> From: Richard Cochran >> >> This patch introduces SO_TXTIME. User space enables this option in >> order to pass a desired future transmit time in a CMSG when calling >> sendmsg(2). >> >> A new field is added to struct sockcm_cookie, and the tstamp from >> skbuffs will be used later on. > > In the discussion about the v1 patchset, there was a question if the > cmsg should include a clockid_t. Without that, how can an application > prevent the packet from being sent using an incorrect clock, e.g. > the system clock when it expects it to be a PHC, or a different PHC > when the socket is not bound to a specific interface? > > At least in some applications it would be preferred to not sent a > packet at all instead of sending it at a wrong time. > > Please keep in mind that the PHCs and the system clock don't have to > be synchronized to each other. If I understand the rest of the series > correctly, there is an assumption that the PHCs are keeping time in > TAI and CLOCK_TAI can be used as a fallback. Just to double-check, imagine that I've configured the qdisc for SW best-effort and with clockid CLOCK_REALTIME. When it receives a packet with the clockid of a /dev/ptpX, the qdisc should just drop that packet, right? Or would this block any use-cases that I couldn't think of ? Thanks, Jesus