From owner-svn-src-all@freebsd.org Tue Jan 17 16:40:51 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 A131CCB468C for ; Tue, 17 Jan 2017 16:40:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 73A631AA2 for ; Tue, 17 Jan 2017 16:40:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x22c.google.com with SMTP id j18so118890213ioe.2 for ; Tue, 17 Jan 2017 08:40:51 -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=Q5ky+WNdWyhSR+BjYSVnVgMQgQyy5hlpmYS1BqUh1xk=; b=HEjGCjCRrkvHsbHYdRvqlygAbAFWxZ0+WWPjMZl7uwiKCX0Hi8MJd8ZYWzxS0hPwZF ev3sEDKFD8a77ayo/gFdh4dyBkA/jct1U65WfLZfp0AvtZu/z+Mt63Oaj3T2+bFJVw+w YUdAtPhpLTRAN+dGHDCi22KPAEPz1rd97Tya9UZGcEaFbSM6dAaSRwEtK14W/uhiE1DU 1OIZBe/OKXnIMpW44uWeIyrbGsLYucCP6LcbPeNlaJcfVejVpvp7h/GkB38f1o0KpWhy q38sowcUxznlx4E7SdIaZ5/bKMpfVky1ub9nYTlsb93K179Vg2/p/zmz6vLr6aUCBwls wFCA== 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=Q5ky+WNdWyhSR+BjYSVnVgMQgQyy5hlpmYS1BqUh1xk=; b=UzH+GdH7EOF3Vi+8Zmv+6pJqiYO7nBcU08sHnY1Rvhl/FeLCR1M5pkuFSRMZ0QwciR 3KHL0xRHfa8DcHzZ323l8pSOwmkgaTu8iZ8PnLJBtlDWmy5YSj4BCQQD3MVqrxB88euB GL35BOCxkQl/KqqM9rFyuhAVjccvXPvbY0KkFDF8AbXn5+sMvVZlG6QTaqrZFVY4/pVU tDKfCTxOV8USw1QcksC34nAhh4cpt5HWyh2iU4ZVmwJ3irfSc3S8nMS7BhWXemXfaAXF A71HTGVG3GDXSGyt5hJFQ+ODk+NxzO8rt+l1sVHi2BlRvPsIzs5bEaJqFgRdhCq1xZ3O QL0g== X-Gm-Message-State: AIkVDXJfGvQV6v4LTAQ/R/Qd7dZF8xcifp8Z4I75QQnlrqblojKOyzjLHDv9KQXp5qdvwxxwtsSEsDU/hboVWiCX X-Received: by 10.107.184.6 with SMTP id i6mr38217985iof.153.1484671250649; Tue, 17 Jan 2017 08:40:50 -0800 (PST) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.160.66 with HTTP; Tue, 17 Jan 2017 08:40:50 -0800 (PST) In-Reply-To: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> From: Maxim Sobolev Date: Tue, 17 Jan 2017 08:40:50 -0800 X-Google-Sender-Auth: cVU9_SClQLh6pZfI_AA_47r1Xz0 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 16:40:51 -0000 That being said, is there any other socket option value in there implemented as enum? I don't see anything obvious, so that I am curious if it would stick out as an odd one in there. What do you think? -Max On Tue, Jan 17, 2017 at 6:22 AM, Maxim Sobolev wrote: > 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. >> >> >