From owner-svn-src-all@freebsd.org Tue Jan 17 14:22:55 2017 Return-Path: Delivered-To: svn-src-all@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 35017CB49F3 for ; Tue, 17 Jan 2017 14:22:55 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 096171ADA for ; Tue, 17 Jan 2017 14:22:54 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x22d.google.com with SMTP id j13so115358848iod.3 for ; Tue, 17 Jan 2017 06:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=F5bqUhKfYcseFeT8jPIunj8slYvC1pm5IzmK01Y3HhA=; b=rcOBDvWfHIlOAAUN6Nb1sO+b1WQL3isVEus7fye6zgcWJeadigAEgQ0eEioLNjQZzh W3+7Ds+m7K4bisMruzU6RfA/JnRx29xW5kinE/ZWWYxoj6b7+6TCgVIJrPpsdbV2mkar aUzp+ikuabtrS5lXW619bO7Advfs6Rst/hy2E/RePe9fFkLcqFn56W5i7qOsyd8ZKcnB Lb39cjW9yyCCuSc0atLdA/F1X/ZME0wql6s8BOMGw/SXs0QlDEejPWw+MIcDksKrot4v eVP/O5vF06v/gie6sNwLKwlsF2C5MXmcLIowZmYZBMa645oEzOMm12EnV6O1/PSSsdS0 d6Hg== 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=F5bqUhKfYcseFeT8jPIunj8slYvC1pm5IzmK01Y3HhA=; b=oIO/JgmD8UKQ/1U2CECQiNUuEuUaJXLHFQvWx1U/gFSVgumDhlzyvjGuMNjpCXSOnq 5g9PQ/sRosaf43jl7v/DyYCarrYaz00XSPVp/P/pLSl6+mDE4Es9qmeRcbZjBEKcO3e/ B2wP3Ej7Sob+EP0vhNGsO01ANR0Y1syiv0pAZQaK3CpeTtsLO3IKjZracMUZ0H32K0v9 5sHKoYzokdMRrDJbX1nr/D6OoVmodUvH9JEG5FxWupYe9WeMQaQlwj0K/A+CkOvN9hU1 UHbI18PUQf+X72mIZDCT82A8/Wa7REqaI46EPfnoKetbQV1kf0vo+QYHyjSq3wRgO+fr JBxA== X-Gm-Message-State: AIkVDXJW0FS3wiBkOux4Ns8o3qiRqxm9lTAoFXbHjTvLffFHrHxNup9OtPsZM54CMHZbFe21KQlMV0BrmDDQX90Y X-Received: by 10.107.184.6 with SMTP id i6mr37508287iof.153.1484662974272; Tue, 17 Jan 2017 06:22:54 -0800 (PST) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.160.66 with HTTP; Tue, 17 Jan 2017 06:22:53 -0800 (PST) In-Reply-To: <20170117065231.GW2611@FreeBSD.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> From: Maxim Sobolev Date: Tue, 17 Jan 2017 06:22:53 -0800 X-Google-Sender-Auth: eG0Psl0ChHwBdhiGI_3tmY5fjmA 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: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 14:22:55 -0000 Of course it's possible. Do you guys want me to amend that patch? -Max On Mon, Jan 16, 2017 at 10:52 PM, Gleb Smirnoff wrote: > Hi! > > On Mon, Jan 16, 2017 at 05:46:38PM +0000, Maxim Sobolev wrote: > M> Author: sobomax > M> Date: Mon Jan 16 17:46:38 2017 > M> New Revision: 312296 > M> URL: https://svnweb.freebsd.org/changeset/base/312296 > M> > M> Log: > M> Add a new socket option SO_TS_CLOCK to pick from several different > clock > M> sources to return timestamps when SO_TIMESTAMP is enabled. Two > additional > M> clock sources are: > M> > M> o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME); > M> o nanosecond resolution monotonic clock (equivalent of > CLOCK_MONOTONIC). > M> > M> In addition to this, this option provides unified interface to get > bintime > M> (equivalent of using SO_BINTIME), except it also supported with IPv6 > where > M> SO_BINTIME has never been supported. The long term plan is to > depreciate > M> SO_BINTIME and move everything to using SO_TS_CLOCK. > M> > M> Idea for this enhancement has been briefly discussed on the Net > session > M> during dev summit in Ottawa last June and the general input was > positive. > M> > M> This change is believed to benefit network benchmarks/profiling as > well > M> as other scenarios where precise time of arrival measurement is > necessary. > M> > M> There are two regression test cases as part of this commit: one > extends unix > M> domain test code (unix_cmsg) to test new SCM_XXX types and another one > M> implementis totally new test case which exchanges UDP packets between > two > M> processes using both conventional methods (i.e. calling > clock_gettime(2) > M> before recv(2) and after send(2)), as well as using > setsockopt()+recv() in > M> receive path. The resulting delays are checked for sanity for all > supported > M> clock types. > M> > M> Reviewed by: adrian, gnn > M> Differential Revision: https://reviews.freebsd.org/D9171 > > Is it possible to declare possible values as a enum and make so_ts_clock > fields of that enum type? > > -- > Totus tuus, Glebius. > >