From owner-svn-src-head@FreeBSD.ORG Mon Nov 21 07:02:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B951B106566C; Mon, 21 Nov 2011 07:02:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD3C8FC0A; Mon, 21 Nov 2011 07:02:24 +0000 (UTC) Received: by yenl11 with SMTP id l11so6277046yen.13 for ; Sun, 20 Nov 2011 23:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=1LveNBb5N6MA3gsb2FzKFE/zthxXOHHGhEzdcddirR4=; b=fN9cFDS6WItxDs1PdXtbNxD8YzxCPZdBuaoC1cV+sQkg5vPqR9+JcplM+Vazd5DtP3 0+0z7fs8KZTVzvHA8DGUWxQa2HoieUel3+SO3Hu+ofsIBagbUOp6VYWcjVs8DEBgIWQc QNFsy3FlVtYGXxx4aNyx/g7bNWEHCJvvtIcYc= MIME-Version: 1.0 Received: by 10.182.59.49 with SMTP id w17mr2705206obq.37.1321858944508; Sun, 20 Nov 2011 23:02:24 -0800 (PST) Received: by 10.182.7.34 with HTTP; Sun, 20 Nov 2011 23:02:24 -0800 (PST) In-Reply-To: <648D11A8-3636-49E5-BF20-83E4EA87242C@cubinlab.ee.unimelb.edu.au> References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4EC9E408.9000304@freebsd.org> <648D11A8-3636-49E5-BF20-83E4EA87242C@cubinlab.ee.unimelb.edu.au> Date: Sun, 20 Nov 2011 23:02:24 -0800 Message-ID: From: Garrett Cooper To: Julien Ridoux Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Lawrence Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org, Ben Kaduk Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Nov 2011 07:02:25 -0000 On Sun, Nov 20, 2011 at 10:18 PM, Julien Ridoux wrote: > > On 21/11/2011, at 4:39 PM, Lawrence Stewart wrote: > >> On 11/21/11 16:12, Ben Kaduk wrote: >>> On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart =A0wrote: >>>> Author: lstewart >>>> Date: Mon Nov 21 04:17:24 2011 >>>> New Revision: 227778 >>>> URL: http://svn.freebsd.org/changeset/base/227778 >>>> >>>> Log: >>>> =A0- When feed-forward clock support is compiled in, change the BPF he= ader to >>>> =A0 =A0contain both a regular timestamp obtained from the system clock= and the >>>> =A0 =A0current feed-forward ffcounter value. This enables new possibil= ities including >>> >>> Is it really necessary to make the ABI dependent on a kernel >>> configuration option? =A0This causes all sorts of headaches if loadable >>> modules ever want to use that ABI, something that we just ran into >>> with vm_page_t and friends and had a long thread on -current about. >> >> Fair question. Julien, if pcap and other consumers will happily ignore t= he new ffcount_stamp member in the bpf header, is there any reason to condi= tionally add the ffcounter into the header struct? > > It is a valid question indeed. The feedback I have received so far was to= not have the feed-forward clock support be a default kernel configuration = option. What follows is based on this assumption. > > The commit (r227747) introduces sysctl that are conditioned by the same "= FFCLOCK" kernel configuration option. If a loadable module tests for the pr= esence of this sysctl, it will know if the ffcount_stamp member is availabl= e. Is it too much of a hack? > > Alternatively, if the ffcounter is added to the bpf header unconditionall= y, the ffcount_stamp member can be set to 0. Loadable modules will then see= a consistent ABI but will retrieve a meaningless value. > > I am not sure which option makes more sense, any preference? struct inaddr, etc withstood sizing restrictions by adjusting the sin_family / sin_len values appropriate to how large the payload was made.. Could something similar be done for the ffcounter work (obscure behind a void* pointer, use a proper bitwise ORed value for the sin_len and sin_family, etc)? Thanks, -Garrett