From owner-freebsd-hackers@freebsd.org Sun Oct 13 00:55:53 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22ACA156F02 for ; Sun, 13 Oct 2019 00:55:53 +0000 (UTC) (envelope-from therontarigo@gmail.com) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46rNXm19Csz3Ptc for ; Sun, 13 Oct 2019 00:55:51 +0000 (UTC) (envelope-from therontarigo@gmail.com) Received: by mail-qt1-f194.google.com with SMTP id m15so19771918qtq.2 for ; Sat, 12 Oct 2019 17:55:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=IjYNT2a5x3YyHRXZLlLAwK+/C0by6WDfE4drrjiKFK4=; b=L+8CMoFDjMsHMQS6dvEEF+OVpBIlKsrStXUuWur6uJmoQWv5e2SSNFJQNCV0zPbao0 Ao9Re98rX7CC2mk6q4Ge8JFoF35L17cWjmko483XNxV+0y4gOtmwpeYotPQxe+mW6tAB jyMvd27RZctUzn2mOkSbacimvGBCv+lOaVmDQw954jc0SkBS1yvO0vpD72JzqJ2AOXd5 LHU5o0xE7SzCQ1y1EItfGLn5yIb6OzjGNltAD5PauyYXBJYo+Ds48L+1ZzWthU6er1wU QlrSRjCJJOsaO2ZG+iO3pPdtniP919fiBtX9+9+JyXOWw+G27b7AHvnhCdNhw/DugYct cWxA== X-Gm-Message-State: APjAAAX6yVqV5q9XzOnRLmu6G6MBdEThBpf3hQCPj/En6iDOmQH7qKlj 5Z59RWN0Bbv5XUqZfyEwbapWFYCx X-Google-Smtp-Source: APXvYqxOJj9Ps8rkjr7lulKKbDh9oxyaceR4HKKvyWtJMtwwK89YYTiNHPsBV/Q0vp/bRHOcJM3gKQ== X-Received: by 2002:aed:2371:: with SMTP id i46mr25616529qtc.72.1570928150066; Sat, 12 Oct 2019 17:55:50 -0700 (PDT) Received: from [155.41.109.229] (dhcp-wifi-8021x-155-41-109-229.bu.edu. [155.41.109.229]) by smtp.gmail.com with ESMTPSA id q5sm8342290qte.38.2019.10.12.17.55.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Oct 2019 17:55:49 -0700 (PDT) Subject: Re: Adding white_dune to FreeBSD ports collection ? To: "J. Scheurich" , freebsd-hackers@freebsd.org References: <4b5b62b2-0376-568d-9d70-56077fae78e4@web.de> From: Theron Tarigo Message-ID: <60ce4b62-4364-3d6e-130b-f79e745fc720@freebsd.org> Date: Sat, 12 Oct 2019 20:55:46 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <4b5b62b2-0376-568d-9d70-56077fae78e4@web.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46rNXm19Csz3Ptc X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of therontarigo@gmail.com designates 209.85.160.194 as permitted sender) smtp.mailfrom=therontarigo@gmail.com X-Spamd-Result: default: False [-3.32 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RWL_MAILSPIKE_GOOD(0.00)[194.160.85.209.rep.mailspike.net : 127.0.0.18]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[theron@freebsd.org,therontarigo@gmail.com]; FREEMAIL_TO(0.00)[web.de]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[theron@freebsd.org,therontarigo@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[194.160.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.32)[ip: (-6.20), ipnet: 209.85.128.0/17(-3.25), asn: 15169(-2.12), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2019 00:55:53 -0000 On 2019-10-04 09:13, J. Scheurich wrote: > Hi, > > I want to ask, if it is possible to add white_dune (wdune) to the > FreeBSD ports collection. Anything that can be made to work on FreeBSD is possible to add to the ports collection, as long as someone is willing to write the port and a ports committer is able to review it. > white_dune 0.28 (0.30?) was part of the ports collection, but the > current version is 1.456. Why was it removed?  No maintainer? > There is already a binary distribution for FreeBSD 12.0 on the website > > https://wdune.ourproject.org/ Building from source inside the port is preferable (better chance of binary compatibility, possibility of multiple architectures, easier to debug, etc.). > but it has been built with > > wdune-*/packager/freebsd/mkpkg.sh / "pkg create" In order to be a part of the ports tree the package itself needs to be assembled in the standard way from the port, not directly created by the port's own build system, which is not a normal practice. Are you the developer of this application?  It is unclear to me from the website. freebsd-ports@ is the usual list for this sort of discussion. Theron From owner-freebsd-hackers@freebsd.org Mon Oct 14 08:18:30 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB242F3672 for ; Mon, 14 Oct 2019 08:18:30 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from MailHost (unknown [80.211.33.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46sBK22Nrcz44lc for ; Mon, 14 Oct 2019 08:18:30 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from root (uid 0) (envelope-from salvadore@FreeBSD.org) id 21dd by MailHost (DragonFly Mail Agent v0.11+); Mon, 14 Oct 2019 10:18:30 +0200 To: freebsd-hackers@FreeBSD.org Subject: [2 WEEKS LEFT REMINDER] Call for 2019Q3 quarterly status reports Date: Mon, 14 Oct 2019 10:18:30 +0200 Message-Id: <5da42f56.21dd.1ec52e51@MailHost> From: X-Rspamd-Queue-Id: 46sBK22Nrcz44lc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.971,0]; ASN(0.00)[asn:31034, ipnet:80.211.0.0/17, country:IT]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2019 08:18:30 -0000 Dear FreeBSD Community, The deadline for the next FreeBSD Quarterly Status update is October 31, 2019, for work done since the last round of Quarterly Reports: July, 2019 - September, 2019. Status report submissions do not need to be very long. They may be about anything happening in the FreeBSD project and community, and provide a great way to inform FreeBSD users and developers about work that is underway or has been completed. Report submissions are not limited to committers; anyone doing anything interesting and FreeBSD related can -- and should -- write one! The preferred method is to follow the guidelines at the Quarterly GitHub repository: https://github.com/freebsd/freebsd-quarterly Alternatively you can fetch the Markdown template, fill it in, and email it to quarterly@FreeBSD.org. The template can be found at: https://raw.githubusercontent.com/freebsd/freebsd-quarterly/master/report-sample.md The old XML generator and templates are no longer used. We look forward to seeing your 2019Q3 reports! Thanks, Lorenzo Salvadore (on behalf of quarterly@) From owner-freebsd-hackers@freebsd.org Tue Oct 15 16:26:06 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CD0714D101 for ; Tue, 15 Oct 2019 16:26:06 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t1590x22z4T8f for ; Tue, 15 Oct 2019 16:26:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x842.google.com with SMTP id m15so31469689qtq.2 for ; Tue, 15 Oct 2019 09:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=NuSXAlk5q5et9JmqFV1hyhmLU8ug7esgBV+iYJPpBZY=; b=F5WGMUc28tA1mU8hSBEu5Y7110tVbvhBNhALGix1+OicPfPxFZ3yblqUiyQvYTDdoZ lQGEiGWvfxW0akQFGBFhdLToyyVT2Syn4Su/1Gh3/d26ZTrrvSHKc2iDPooE6fZtOAXP Uxvz8tebCKBtHK0XyQ96Lly25SRTExnh8FjgtpH51ptMdXoq00Ezq+iJ8+zvq1Qiwi14 C6vE+mSkIQyLouAcSS7B4m3aYLmqlIYG1Ipku375YMLztx7StqKLbt5Y1o7YWjlbXTRm ihzaPMnVNswk7Sitv539AHlCiOOQeMEnxziK609eZFOkfxfYndC9Wtg1BQ4sWKww/8xy YjNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=NuSXAlk5q5et9JmqFV1hyhmLU8ug7esgBV+iYJPpBZY=; b=UWkFdDsRCaL9E8rzajvmjTmiJu/dV2mZIr4K89Dbqt9yu6vXBexeOrZjlmRcs7SUrk VTza2eL7mLYShKTqd/vOlMlJIy2YNqsgSzRhsdL9KrERUYXEHRi4KjQSz78SZwKNMa2y 04fZKI8ymt/2mC0cCm4SjQqX8JZ8TkBHtl/L6alRkUYdAXEqCjEo6atOo10LwPEk2gNG qhsd/5lAyVh3XGYk/znWFgkvoPhkHfShAGkRRB42n7AeT1fYvAIUhHJQEXe8LYQRmsLE emyObPRX4a8aSdMrhtPSRMeNuy4qJc7ElopaOW/qvcnU1YxK8FQG5CnIzkIZnwmPv4JI Lnng== X-Gm-Message-State: APjAAAVvJTfWtIgusmGartKSU/l7msfZlDynDGhrAwPb5673Av6f5wJ8 cOuuxLm5QGlz+ykqKfUlj0w= X-Google-Smtp-Source: APXvYqxR7o3FIXf7yhJ5Zk7DtDtxB7eXyMRLi5/2V3CqShFy0RkKznBYQQYExcBomQgbsPc2VJlJpg== X-Received: by 2002:ac8:5556:: with SMTP id o22mr18463993qtr.217.1571156763266; Tue, 15 Oct 2019 09:26:03 -0700 (PDT) Received: from raichu (toroon0560w-lp130-05-69-158-183-252.dsl.bell.ca. [69.158.183.252]) by smtp.gmail.com with ESMTPSA id 29sm10735955qkp.86.2019.10.15.09.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 09:26:02 -0700 (PDT) Sender: Mark Johnston Date: Tue, 15 Oct 2019 12:26:00 -0400 From: Mark Johnston To: Gordon Bergling Cc: freebsd-hackers@freebsd.org Subject: Re: uname -a default options Message-ID: <20191015162600.GE26396@raichu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 46t1590x22z4T8f X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=F5WGMUc2; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::842 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.19 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.49)[ip: (2.18), ipnet: 2607:f8b0::/32(-2.48), asn: 15169(-2.10), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 16:26:06 -0000 On Tue, Aug 13, 2019 at 05:41:26PM +0200, Gordon Bergling wrote: > Hello List, > > "uname -a" is currently mapping the -a option to „-mnrsv“, which results in something similar like > > $ uname -a > FreeBSD lion.0xfce3.net 12.0-STABLE FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > What would you think about reducing the option mapping for „-a“ to „-vmn“ , which would result in a less repetitive version string like the one below. > > $ uname -vmn > lion.0xfce3.net FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > Adapting this would be trivial, but before I hack something together, I would like to get some feedback if such a change would be welcomed? I'm not sure about the history which led to the current behaviour of -a, but the unfortunately reality is that changes like the one you propose will likely break programs that process uname -a output. Of course, such programs should likely be using more specialized uname options instead, but the current behaviour of -a has been in place for something like 25 years, so it's quite likely that something depends on it. In these situations I prefer to maintain backwards compatibility. From owner-freebsd-hackers@freebsd.org Tue Oct 15 16:34:43 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E9E114D511 for ; Tue, 15 Oct 2019 16:34:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t1H62wspz4TtW; Tue, 15 Oct 2019 16:34:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KPmPikLOMSrVcKPmQiMrNs; Tue, 15 Oct 2019 10:34:39 -0600 X-Authority-Analysis: v=2.3 cv=L5ZjvNb8 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=XobE76Q3jBoA:10 a=6I5d2MoRAAAA:8 a=qZiiwu5GAAAA:8 a=YxBL1-UpAAAA:8 a=nrf4F5kNwO4uy7XaNJMA:9 a=QEXdDO2ut3YA:10 a=DsGALwYetr8Q109dnywA:9 a=wdibVORxAnclZobi:21 a=_W_S_7VecoQA:10 a=IjZwj45LgO3ly-622nXo:22 a=G_K2Pq-bjH8zjkZxI4NH:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from [192.168.1.103] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id 87B446B05; Tue, 15 Oct 2019 09:34:36 -0700 (PDT) Date: Tue, 15 Oct 2019 09:34:34 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20191015162600.GE26396@raichu> References: <20191015162600.GE26396@raichu> MIME-Version: 1.0 Subject: Re: uname -a default options To: freebsd-hackers@freebsd.org, Mark Johnston , Gordon Bergling From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfGHYGpMXUWAJPDJImUJ/+YQLbgWzfw7lnqBZmtIgSRSQOR9atGQzmVv5N37m+1f2ctM7nVtrQhdkHOh+kw6qriA+BTQJ3leoP26vrpZz+7N5dVW2w5no Nlq41lXtH98BuG6bjcs/KskQufN0v2sdJNDhH3M5lwq7kB8HXvhkOcPTYc/dUOMVNmTtG24kkZJo/gLzek9idzwMk2TVJXKAmU+3Xo+SjIjck8jBhJ/ZE7ZW X-Rspamd-Queue-Id: 46t1H62wspz4TtW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.38 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[137.136.59.64.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-2.28)[ip: (-5.86), ipnet: 64.59.128.0/20(-3.06), asn: 6327(-2.38), country: CA(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 16:34:43 -0000 On October 15, 2019 9:26:00 AM PDT, Mark Johnston wro= te: >On Tue, Aug 13, 2019 at 05:41:26PM +0200, Gordon Bergling wrote: >> Hello List, >>=20 >> "uname -a" is currently mapping the -a option to =E2=80=9E-mnrsv=E2=80= =9C, which >results in something similar like >>=20 >> $ uname -a >> FreeBSD lion=2E0xfce3=2Enet 12=2E0-STABLE FreeBSD 12=2E0-STABLE r350835 >GENERIC amd64 >>=20 >> What would you think about reducing the option mapping for =E2=80=9E-a= =E2=80=9C to >=E2=80=9E-vmn=E2=80=9C , which would result in a less repetitive version = string like >the one below=2E >>=20 >> $ uname -vmn >> lion=2E0xfce3=2Enet FreeBSD 12=2E0-STABLE r350835 GENERIC amd64 >>=20 >> Adapting this would be trivial, but before I hack something together, >I would like to get some feedback if such a change would be welcomed? > >I'm not sure about the history which led to the current behaviour of >-a, >but the unfortunately reality is that changes like the one you propose >will likely break programs that process uname -a output=2E Of course, >such programs should likely be using more specialized uname options >instead, but the current behaviour of -a has been in place for >something >like 25 years, so it's quite likely that something depends on it=2E In >these situations I prefer to maintain backwards compatibility=2E >_______________________________________________ >freebsd-hackers@freebsd=2Eorg mailing list >https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to >"freebsd-hackers-unsubscribe@freebsd=2Eorg" How about a $UNAME_A environment variable? The downside: people will submi= t PRs taking time from legitimate development=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E=20 Cy Schubert FreeBSD UNIX: Web: https://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From owner-freebsd-hackers@freebsd.org Tue Oct 15 16:48:09 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF66214DBD2 for ; Tue, 15 Oct 2019 16:48:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t1Zc4Vf6z4VsB for ; Tue, 15 Oct 2019 16:48:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x742.google.com with SMTP id u22so19779209qkk.11 for ; Tue, 15 Oct 2019 09:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4bC0HELRv7L2ufEtOWOItZjtkiJoG4ZYJ15fyLmNNTM=; b=fbIsK/TJDdHokrY5mSkPK1o3ps+MS7V/ShTYwiqRZEeP00xcNoPgXkYMAQNbHAdTVG XMEYqgMonmdNRtd5oSOLC9Jf5JO0aFsvL6Rla/LyJOAzKzhEMioAZGuKtT2ltjoBwrwb 9ak1bOWIkK/cWluN50MSE+ysXZFDzhzGoWHPxjbG7BXpxelTOx0sxcb4UwBGIHra3hbA amw2tLFjYQE6FU0f4OgSymz1e8C2kWdIz50iYe7vQiHNkQsb3ewpLJkVGJn6qc84bJAZ zu2y4B2DG0QMjBfXFIuQrCtkNHR10GzeadIx9sUJ4Ir0COeUDmCvyxHPiJiX5oUYikAV AZtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=4bC0HELRv7L2ufEtOWOItZjtkiJoG4ZYJ15fyLmNNTM=; b=lH+i0um7ZbIQOgu2AN1Hm0zeDqKPPzkfya/rKqYGqeJNR718Cs9wtm0D/HfDzZqWz6 bi3Dd8+OwPqDz1WU9oEImffvGJO+eX7vJRGtCQDv9Us6P8SEsoN91Y2JeoXu+Jd3bagT EOPd9TkK9bjcZTdxliqsza/lRbozCTKK+WkL3NcAUEuQxbSqYMl+5WdGxqrAcCyhjyOL dyi22Lr7+Eu6bl6zgJufnvsDmN98kViyN1QzXbg0LL1Okl1FjsuYeivIPsArt1s/CzAK vH99soZtwC/0/t1ej6librWjdr4FylhaY7Dbr1vlIVr4MgkqZvRC+u+QTk/oE69EITEG 6yTw== X-Gm-Message-State: APjAAAUHQDuQzI2T3jASfJ7wwXvkAuJ1OV4U6G33B1vgfM0tcpLqm9Gi V6UD25D5KlX57A3zK4AxB31oKphy X-Google-Smtp-Source: APXvYqzf4LtrHwa5yh4OnMM2ojhNOOZesl14jgzhaL+lw+YRIoSs0dda1uobdn14I2RNdngIIHplBw== X-Received: by 2002:a05:620a:2f3:: with SMTP id a19mr36760923qko.501.1571158087368; Tue, 15 Oct 2019 09:48:07 -0700 (PDT) Received: from raichu (toroon0560w-lp130-05-69-158-183-252.dsl.bell.ca. [69.158.183.252]) by smtp.gmail.com with ESMTPSA id w73sm10498871qkb.111.2019.10.15.09.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 09:48:06 -0700 (PDT) Sender: Mark Johnston Date: Tue, 15 Oct 2019 12:48:04 -0400 From: Mark Johnston To: Gordon Bergling Cc: freebsd-hackers@freebsd.org Subject: Re: uname -a default options Message-ID: <20191015164804.GG26396@raichu> References: <20191015162600.GE26396@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191015162600.GE26396@raichu> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 46t1Zc4Vf6z4VsB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=fbIsK/TJ; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::742 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.31)[ip: (3.08), ipnet: 2607:f8b0::/32(-2.48), asn: 15169(-2.10), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 16:48:09 -0000 On Tue, Oct 15, 2019 at 12:26:00PM -0400, Mark Johnston wrote: > On Tue, Aug 13, 2019 at 05:41:26PM +0200, Gordon Bergling wrote: > > Hello List, > > > > "uname -a" is currently mapping the -a option to „-mnrsv“, which results in something similar like > > > > $ uname -a > > FreeBSD lion.0xfce3.net 12.0-STABLE FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > > > What would you think about reducing the option mapping for „-a“ to „-vmn“ , which would result in a less repetitive version string like the one below. > > > > $ uname -vmn > > lion.0xfce3.net FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > > > Adapting this would be trivial, but before I hack something together, I would like to get some feedback if such a change would be welcomed? > > I'm not sure about the history which led to the current behaviour of -a, > but the unfortunately reality is that changes like the one you propose > will likely break programs that process uname -a output. Of course, > such programs should likely be using more specialized uname options > instead, but the current behaviour of -a has been in place for something > like 25 years, so it's quite likely that something depends on it. In > these situations I prefer to maintain backwards compatibility. It seems that the mail I replied to is a duplicate of [1], but it reappeared in my inbox for some reason. The conclusion there was basically the same as what I wrote. [1] https://lists.freebsd.org/pipermail/freebsd-hackers/2019-August/054963.html From owner-freebsd-hackers@freebsd.org Tue Oct 15 17:16:34 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C01214EBD2 for ; Tue, 15 Oct 2019 17:16:34 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46t2CP5pmLz4Y5W; Tue, 15 Oct 2019 17:16:33 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x9FHGOFa010623; Tue, 15 Oct 2019 10:16:24 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x9FHGOFB010622; Tue, 15 Oct 2019 10:16:24 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201910151716.x9FHGOFB010622@gndrsh.dnsmgr.net> Subject: Re: uname -a default options In-Reply-To: <20191015164804.GG26396@raichu> To: Mark Johnston Date: Tue, 15 Oct 2019 10:16:24 -0700 (PDT) CC: Gordon Bergling , freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 46t2CP5pmLz4Y5W X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 17:16:34 -0000 > On Tue, Oct 15, 2019 at 12:26:00PM -0400, Mark Johnston wrote: > > On Tue, Aug 13, 2019 at 05:41:26PM +0200, Gordon Bergling wrote: > > > Hello List, > > > > > > "uname -a" is currently mapping the -a option to ?-mnrsv?, which results in something similar like > > > > > > $ uname -a > > > FreeBSD lion.0xfce3.net 12.0-STABLE FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > > > > > What would you think about reducing the option mapping for ?-a? to ?-vmn? , which would result in a less repetitive version string like the one below. > > > > > > $ uname -vmn > > > lion.0xfce3.net FreeBSD 12.0-STABLE r350835 GENERIC amd64 > > > > > > Adapting this would be trivial, but before I hack something together, I would like to get some feedback if such a change would be welcomed? > > > > I'm not sure about the history which led to the current behaviour of -a, > > but the unfortunately reality is that changes like the one you propose > > will likely break programs that process uname -a output. Of course, > > such programs should likely be using more specialized uname options > > instead, but the current behaviour of -a has been in place for something > > like 25 years, so it's quite likely that something depends on it. In > > these situations I prefer to maintain backwards compatibility. > > It seems that the mail I replied to is a duplicate of [1], but it > reappeared in my inbox for some reason. The conclusion there was > basically the same as what I wrote. > > [1] https://lists.freebsd.org/pipermail/freebsd-hackers/2019-August/054963.html In the last 7 days or so there has been 2 instances of old email dumped back onto FreeBSD lists. This occureed several months ago as well. -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-hackers@freebsd.org Sat Oct 19 11:45:29 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69FFB161AC0 for ; Sat, 19 Oct 2019 11:45:29 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46wLgX2fXHz48F9 for ; Sat, 19 Oct 2019 11:45:27 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Sat, 19 Oct 2019 13:45:24 +0200 id 00F407D4.5DAAF754.0000D580 Date: Sat, 19 Oct 2019 13:45:24 +0200 From: Milan Obuch To: freebsd-hackers@freebsd.org Subject: sysctl questions Message-ID: <20191019134524.3cc3d274@zeta.dino.sk> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd11.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46wLgX2fXHz48F9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-hackers@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-hackers@dino.sk X-Spamd-Result: default: False [-5.29 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dino.sk]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[72.65.245.84.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.99)[ip: (-8.36), ipnet: 84.245.64.0/18(-4.18), asn: 16160(-2.47), country: SK(0.08)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16160, ipnet:84.245.64.0/18, country:SK]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 11:45:29 -0000 Hi, I am working on AXI XADC driver on Zynq based Zybo Z7 board. I created simple PL design to be able to use this core IP. Looking in some other ADC driver I desided to use sysctl API to report measurements. So I did create mib entry in attach function like this snprintf(pinbuf, sizeof(inum), "%d", i); inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, inum, CTLFLAG_RD, NULL, "ADC input"); inpN_tree = SYSCTL_CHILDREN(inpN_node); SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "read", CTLFLAG_RD | CTLTYPE_UINT, &axi_xadc_inputs[i], 0, axi_xadc_read_proc, "IU", "Read ADC input"); where inum is string, i is integer - input number. Top node for my mib entries is dev.adc.0.ain. When the above snippet is run for i from 0 up to Ninputs - 1, sysctl shows them in opposite order, i. e. # sysctl dev.adc.0.ain dev.adc.0.ain.3.read: dev.adc.0.ain.2.read: dev.adc.0.ain.1.read: dev.adc.0.ain.0.read: Why it is so? It looks for me a bit counter intuitive, I like the nodes be ordered the way I decide, not the other way so... so I am just calling the initialisation snippet for i starting with Ninput - 1 down to 0 and it works the way I want. Other thing I do not understand is my axi_xadc_read_proc is called *twice* per node. My procedure is short: static int axi_xadc_read_proc(SYSCTL_HANDLER_ARGS) { int error; int32_t status, value; long cvalue; struct axi_xadc_softc *sc; struct axi_xadc_input *input; input = (struct axi_xadc_input *)arg1; sc = input->sc; XADC_LOCK(sc); status = RD4(sc, AXI_XADC_SR); value = RD4(sc, input->reg); cvalue = some_conversion(value); device_printf(sc->dev, "status %.4X raw %.4X conv %ld\n", status, value, cvalue); XADC_UNLOCK(sc); error = sysctl_handle_int(oidp, &value, sizeof(value), req); if (error != 0 || req->newptr == NULL) return (error); return (0); } Doing 'sysctl dev.adc.0.ain.0.read' prints one line in my login session, but two lines on console, example is adc0: status 00F7 raw A1B6 in 45 adc0: status 00F7 raw A1D6 in 45 Naturally, these are just debug outputs, but still it makes me a bit surprised. Also, do we have somewhere documented sysctl api usage? I did not find much, just three or so man pages, all somewhat short... Regards, Milan From owner-freebsd-hackers@freebsd.org Sat Oct 19 16:35:38 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EDF3015129B for ; Sat, 19 Oct 2019 16:35:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46wT6L40Jvz4Q0J for ; Sat, 19 Oct 2019 16:35:38 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1571502937; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Xz7MfoaapQVgTxYUUf1uMDEEzAwynKq6X24TuyF3GEPwdm3x6Si6IjK8v5+wmIjE0Y/gDumRXVUu8 i6knbG0qmcrYLyYdaR835Y28mfvnC756gyyacXT/oDS81VAEbSoUqWxhS6u+xoZovMUlrnJOjusFKa snSFjxfbmZqqsIUQuiQ3VbRTKgpldOlmTsSFeQYUkkW0IM1rHbdYbv3N36+YLovP0LN66u5lDII4Dl 3MdHijlntdBW0ggaRS2ubPFtY57fwmZpWmxVASxgTqoZZSZMTmtGJjAbvB09CtW3/0MxF8GpaeB51P PtGgEzCN9I52ivGZnoyyEovqMNtwv/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=KPtj4+lFXV19wOmkes+b0Z0s0L9h/idVv+Wha67l3qk=; b=dabn62Wrm26I9y0KpoRiUOhQeVDpZWtC5nVHJ5OPhDaKTHk1HkKBzK3iOgLivCBKOg8nvC468nU+e 89xYO4q0NMof2z4k881D+9bB6g6aRIip7lbtuBEVjJnGiGuoa84k10GIvv5z09Dkp9W110pHJeecuP y85kTHOxvt2T9DG2YP4viknKfcwSwECru0PmSJ6Xz9aCoFX5yXOzHndvS2wFcYHwrjsW5n3y3oqZXz QF59LZkMQ1h2TH9yCx/fpnz+/WzqYQg2zbz3DpsTc4mawPQUYCqXwOvS2oczxgV4JLxIUu8qkWrIT/ nDv/x4SquZmsAUA6lkXGw9MrDqUtJVw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=KPtj4+lFXV19wOmkes+b0Z0s0L9h/idVv+Wha67l3qk=; b=pZga06o5yd4rhDHfE/cfn+l502JBQuFTWl++d8qTP5EzJTwBVayM4c63BSLM0JD/TUKLtzb7qIlif 5HR/4XR/JwRjY7q1QaGkB3s2xiEG/9PwsyXleXb3V7Ygg4Q9hB5Z4m41Mr3lf0RMCozuuy2diF2pND MT1Cl9Y3zx88ZQYJrzHBxPmbs0VbfSDZLLBso6GLqNiGLaki57XFq+Um7ZbmQT1dG3JZ2QDxrGafrh Lok8t06zoqGvwJE9b/FK/wF9ga+niSG1M9bCx+BEmy8biIqRVRGcAkfSFmI9EGUkAj9pevDQsUHoTB pxz07eU5NBTmNUyYPylSNrMWYjxjTeQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 77e2e801-f28e-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 77e2e801-f28e-11e9-85ed-13b9aae3a1d2; Sat, 19 Oct 2019 16:35:35 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x9JGZVwd025839; Sat, 19 Oct 2019 10:35:32 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <89cc36381cd82b81b8664f701c63a96724d3f881.camel@freebsd.org> Subject: Re: sysctl questions From: Ian Lepore To: Milan Obuch , freebsd-hackers@freebsd.org Date: Sat, 19 Oct 2019 10:35:31 -0600 In-Reply-To: <20191019134524.3cc3d274@zeta.dino.sk> References: <20191019134524.3cc3d274@zeta.dino.sk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46wT6L40Jvz4Q0J X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.87 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.869,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 16:35:39 -0000 On Sat, 2019-10-19 at 13:45 +0200, Milan Obuch wrote: > Hi, > > I am working on AXI XADC driver on Zynq based Zybo Z7 board. I created > simple PL design to be able to use this core IP. Looking in some other > ADC driver I desided to use sysctl API to report measurements. So I did > create mib entry in attach function like this > > snprintf(pinbuf, sizeof(inum), "%d", i); > > inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, inum, > CTLFLAG_RD, NULL, "ADC input"); > inpN_tree = SYSCTL_CHILDREN(inpN_node); > > SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "read", > CTLFLAG_RD | CTLTYPE_UINT, &axi_xadc_inputs[i], 0, > axi_xadc_read_proc, "IU", "Read ADC input"); > > where inum is string, i is integer - input number. Top node for my > mib entries is dev.adc.0.ain. When the above snippet is run for i from > 0 up to Ninputs - 1, sysctl shows them in opposite order, i. e. > > # sysctl dev.adc.0.ain > dev.adc.0.ain.3.read: > dev.adc.0.ain.2.read: > dev.adc.0.ain.1.read: > dev.adc.0.ain.0.read: > > Why it is so? It looks for me a bit counter intuitive, I like the nodes > be ordered the way I decide, not the other way so... so I am just > calling the initialisation snippet for i starting with Ninput - 1 down > to 0 and it works the way I want. > The sysctl oid entries are stored in an SLIST and each new entry is added to the head of the list, so when sysctl(8) walks the list of children of a given oid, they get displayed in reverse order of how they were added. > Other thing I do not understand is my axi_xadc_read_proc is called > *twice* per node. My procedure is short: > This happens because sysctl(8) makes two calls per value retrieved. The first call has req->oldptr set to NULL which makes the sysctl machinery return the length of the return value without returning the value itself. Sysctl(8) then allocates a buffer of the right length and makes another call with req->oldptr pointing to the allocated buffer to actually retrieve the value. When there is some cost to returning the value (such as an expensive or time-consuming hardware operation), you can check whether oldptr is NULL or not before doing the expensive work. For an example, see the ads111x_sysctl_voltage() function in sys/dev/iicbus/ads111x.c -- Ian From owner-freebsd-hackers@freebsd.org Sat Oct 19 17:45:03 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C6D8152C58 for ; Sat, 19 Oct 2019 17:45:03 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46wVfQ6W9qz4SmG; Sat, 19 Oct 2019 17:45:02 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Sat, 19 Oct 2019 19:44:59 +0200 id 00F407D2.5DAB4B9B.0001067F Date: Sat, 19 Oct 2019 19:44:59 +0200 From: Milan Obuch To: Ian Lepore Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl questions Message-ID: <20191019194459.53a7244b@zeta.dino.sk> In-Reply-To: <89cc36381cd82b81b8664f701c63a96724d3f881.camel@freebsd.org> References: <20191019134524.3cc3d274@zeta.dino.sk> <89cc36381cd82b81b8664f701c63a96724d3f881.camel@freebsd.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd11.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46wVfQ6W9qz4SmG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 17:45:03 -0000 On Sat, 19 Oct 2019 10:35:31 -0600 Ian Lepore wrote: > On Sat, 2019-10-19 at 13:45 +0200, Milan Obuch wrote: > > Hi, > > > > I am working on AXI XADC driver on Zynq based Zybo Z7 board. I > > created simple PL design to be able to use this core IP. Looking in > > some other ADC driver I desided to use sysctl API to report > > measurements. So I did create mib entry in attach function like this > > > > snprintf(pinbuf, sizeof(inum), "%d", i); > > > > inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, inum, > > CTLFLAG_RD, NULL, "ADC input"); > > inpN_tree = SYSCTL_CHILDREN(inpN_node); > > > > SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "read", > > CTLFLAG_RD | CTLTYPE_UINT, &axi_xadc_inputs[i], 0, > > axi_xadc_read_proc, "IU", "Read ADC input"); > > > > where inum is string, i is integer - input number. Top node for my > > mib entries is dev.adc.0.ain. When the above snippet is run for i > > from 0 up to Ninputs - 1, sysctl shows them in opposite order, i. e. > > > > # sysctl dev.adc.0.ain > > dev.adc.0.ain.3.read: > > dev.adc.0.ain.2.read: > > dev.adc.0.ain.1.read: > > dev.adc.0.ain.0.read: > > > > Why it is so? It looks for me a bit counter intuitive, I like the > > nodes be ordered the way I decide, not the other way so... so I am > > just calling the initialisation snippet for i starting with Ninput > > - 1 down to 0 and it works the way I want. > > > > The sysctl oid entries are stored in an SLIST and each new entry is > added to the head of the list, so when sysctl(8) walks the list of > children of a given oid, they get displayed in reverse order of how > they were added. > Thanks for explanation. This basically confirms my understanding, so nodes should be added in reverse order to be displayed right. That's easy. > > Other thing I do not understand is my axi_xadc_read_proc is called > > *twice* per node. My procedure is short: > > > > This happens because sysctl(8) makes two calls per value retrieved. > The first call has req->oldptr set to NULL which makes the sysctl > machinery return the length of the return value without returning the > value itself. Sysctl(8) then allocates a buffer of the right length > and makes another call with req->oldptr pointing to the allocated > buffer to actually retrieve the value. > > When there is some cost to returning the value (such as an expensive > or time-consuming hardware operation), you can check whether oldptr is > NULL or not before doing the expensive work. For an example, see the > ads111x_sysctl_voltage() function in sys/dev/iicbus/ads111x.c > Thanks for example. In my case it probably doesn't matter, but it is good to know it is intentional, so if necessary, there is a way to cope with this. Regards, Milan