From owner-svn-src-head@freebsd.org Mon Sep 4 03:18:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99F5DE0D768; Mon, 4 Sep 2017 03:18:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8EE2B05; Mon, 4 Sep 2017 03:18:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id y128so15530154lfd.4; Sun, 03 Sep 2017 20:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8EVeU4XElRkyHgnn5/UXTSkvSgIPP45WrXg7Ry2TXEU=; b=o1ZVfcgLgUSjNAIKn3R/y+goeUtglt3rToF3VaAuUgGlkPxhCXH/B6ytVT2kNYSedT nuRpOnF0gOVncPIBIe8TvwMmUGrqy6Oeix0jEpf56fF/7NeXxjq4cikHYWK/VnwQ2CJc rZSdKlaAv9+xw9kiuLj3k1n4uwpVIIOh6f+CllaW8FHvDo/9FW/oGZmxN7kwYDeB0w7Y 4+l4J9Z1c0u7qyX0buTDvhm+CnEY9mN3yM1eTkGU/ClfSKVtgmGrS5N9N9AbRr5OwklC 7xXbnY1d+4uB+Bf85yFeOpHkVqrDJcOtqSjujFjXLhMHBQQLiggWBViUIgvJXdRJiE5j JYgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8EVeU4XElRkyHgnn5/UXTSkvSgIPP45WrXg7Ry2TXEU=; b=YHzr9CTDiup78mINa2lwUOTt8jyQeT71zF4lYamed7zlW5hM3107iobbdyXeI66MJu 9Gm6JBOQncFmbPBASATGsSoKUvfw50YI/nFoLXOzLjbtDdZcBuuDhelrtmOcmwcvg2BE vehIyIHsq/forkrwwU42oOrGl7g5NAtXNl3mJMVVxyPoEIi1obRIhI8g9Ce9Q3IEdRYa eqRIjVHopqO93M3/4iTs5JlWZHlgGV9c6A550Xceg4/GedfiB5sCceOWKXyJr3cJJhCD 7ZE2cHBlQrcfb01pXMINTMmElZcCUiSdOZy3MD6/lKvUKrd7eimrOFNwapku35Rs5CbH Au3A== X-Gm-Message-State: AHPjjUiojXM7Sc5f7pN4xm2SM+d1Oz9IzK3fRh2G4sX5r16ntsxlH8/l /idzuwZK4uKRKKckYNEBiKMEElDPdVBl X-Google-Smtp-Source: ADKCNb7jhXsAnGhwRu/RNg3J0mxc/isUymLrYrCmaoTIcwHgDg250oZDtNiHOFTzB+WYH/fU1wptQESJqGk9Vb0JE10= X-Received: by 10.25.87.144 with SMTP id l138mr3027256lfb.193.1504495120614; Sun, 03 Sep 2017 20:18:40 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.26.6 with HTTP; Sun, 3 Sep 2017 20:18:39 -0700 (PDT) In-Reply-To: <201701161746.v0GHkcPX071529@repo.freebsd.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> From: Alan Somers Date: Sun, 3 Sep 2017 21:18:39 -0600 X-Google-Sender-Auth: kRtmg3FMd1TbSTGgYwvFdYj6MsQ Message-ID: Subject: Re: svn commit: r312296 - in head: lib/libc/sys sys/kern sys/netinet sys/netinet6 sys/sys tools/regression/sockets/udp_pingpong tools/regression/sockets/unix_cmsg To: Maxim Sobolev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 03:18:45 -0000 On Mon, Jan 16, 2017 at 10:46 AM, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Jan 16 17:46:38 2017 > New Revision: 312296 > URL: https://svnweb.freebsd.org/changeset/base/312296 > > Log: > Add a new socket option SO_TS_CLOCK to pick from several different clock > sources to return timestamps when SO_TIMESTAMP is enabled. Two additional > clock sources are: > > o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME); > o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC). > > In addition to this, this option provides unified interface to get bintime > (equivalent of using SO_BINTIME), except it also supported with IPv6 where > SO_BINTIME has never been supported. The long term plan is to depreciate > SO_BINTIME and move everything to using SO_TS_CLOCK. > > Idea for this enhancement has been briefly discussed on the Net session > during dev summit in Ottawa last June and the general input was positive. > > This change is believed to benefit network benchmarks/profiling as well > as other scenarios where precise time of arrival measurement is necessary. > > There are two regression test cases as part of this commit: one extends unix > domain test code (unix_cmsg) to test new SCM_XXX types and another one > implementis totally new test case which exchanges UDP packets between two > processes using both conventional methods (i.e. calling clock_gettime(2) > before recv(2) and after send(2)), as well as using setsockopt()+recv() in > receive path. The resulting delays are checked for sanity for all supported > clock types. > > Reviewed by: adrian, gnn > Differential Revision: https://reviews.freebsd.org/D9171 While the new SCM_TIMESTAMP code works fine on both amd64 and i386, it doesn't work on amd64 under 32-bit emulation. That is, programs that use SCM_TIMESTAMP built for i386 will fail when run on an amd64 machine. I don't know whether this commit introduced that bug; on stable-10 SCM_TIMESTAMP doesn't appear to work at all on i386. But sobomax, since you're obviously familiar with this code, would you mind taking a look? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039 -Alan