From owner-svn-src-head@freebsd.org Sun Jan 15 00:50:11 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 B8F92CA4558; Sun, 15 Jan 2017 00:50:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 901FD131A; Sun, 15 Jan 2017 00:50:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F0oAmB055430; Sun, 15 Jan 2017 00:50:10 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F0oAU8055428; Sun, 15 Jan 2017 00:50:10 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701150050.v0F0oAU8055428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 15 Jan 2017 00:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312205 - in head/sys: kern net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 00:50:11 -0000 Author: sbruno Date: Sun Jan 15 00:50:10 2017 New Revision: 312205 URL: https://svnweb.freebsd.org/changeset/base/312205 Log: Fix hangs in a uniprocessor configuration (qemu, virtualbox, real hw). sys/net/iflib.c: Add ctx to filter_info and don't skpi interrupt early on unless we're on an SMP system sys/kern/subr_gtaskqueue.c: Skip smp check if we're running UP Submitted by: Matt Macy Reported by: emaste bde Modified: head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Sat Jan 14 23:24:50 2017 (r312204) +++ head/sys/kern/subr_gtaskqueue.c Sun Jan 15 00:50:10 2017 (r312205) @@ -647,7 +647,7 @@ taskqgroup_attach(struct taskqgroup *qgr qgroup->tqg_queue[qid].tgc_cnt++; LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; - if (irq != -1 && smp_started) { + if (irq != -1 && (smp_started || mp_ncpus == 1)) { gtask->gt_cpu = qgroup->tqg_queue[qid].tgc_cpu; CPU_ZERO(&mask); CPU_SET(qgroup->tqg_queue[qid].tgc_cpu, &mask); @@ -697,7 +697,7 @@ taskqgroup_attach_cpu(struct taskqgroup gtask->gt_irq = irq; gtask->gt_cpu = cpu; mtx_lock(&qgroup->tqg_lock); - if (smp_started) { + if (smp_started || mp_ncpus == 1) { for (i = 0; i < qgroup->tqg_cnt; i++) if (qgroup->tqg_queue[i].tgc_cpu == cpu) { qid = i; @@ -717,7 +717,7 @@ taskqgroup_attach_cpu(struct taskqgroup CPU_ZERO(&mask); CPU_SET(cpu, &mask); - if (irq != -1 && smp_started) + if (irq != -1 && (smp_started || mp_ncpus == 1)) intr_setaffinity(irq, &mask); return (0); } @@ -731,7 +731,7 @@ taskqgroup_attach_cpu_deferred(struct ta qid = -1; irq = gtask->gt_irq; cpu = gtask->gt_cpu; - MPASS(smp_started); + MPASS(smp_started || mp_ncpus == 1); mtx_lock(&qgroup->tqg_lock); for (i = 0; i < qgroup->tqg_cnt; i++) if (qgroup->tqg_queue[i].tgc_cpu == cpu) { @@ -824,7 +824,7 @@ _taskqgroup_adjust(struct taskqgroup *qg mtx_assert(&qgroup->tqg_lock, MA_OWNED); - if (cnt < 1 || cnt * stride > mp_ncpus || !smp_started) { + if (cnt < 1 || cnt * stride > mp_ncpus || (!smp_started && (mp_ncpus != 1))) { printf("taskqgroup_adjust failed cnt: %d stride: %d mp_ncpus: %d smp_started: %d\n", cnt, stride, mp_ncpus, smp_started); return (EINVAL); Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Jan 14 23:24:50 2017 (r312204) +++ head/sys/net/iflib.c Sun Jan 15 00:50:10 2017 (r312205) @@ -133,10 +133,13 @@ typedef struct iflib_rxq *iflib_rxq_t; struct iflib_fl; typedef struct iflib_fl *iflib_fl_t; +struct iflib_ctx; + typedef struct iflib_filter_info { driver_filter_t *ifi_filter; void *ifi_filter_arg; struct grouptask *ifi_task; + struct iflib_ctx *ifi_ctx; } *iflib_filter_info_t; struct iflib_ctx { @@ -300,6 +303,8 @@ typedef struct iflib_sw_tx_desc_array { #define IFC_MULTISEG 0x04 #define IFC_DMAR 0x08 #define IFC_SC_ALLOCATED 0x10 +#define IFC_INIT_DONE 0x20 + #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ @@ -1194,7 +1199,7 @@ iflib_fast_intr(void *arg) iflib_filter_info_t info = arg; struct grouptask *gtask = info->ifi_task; - if (!smp_started) + if (!smp_started && mp_ncpus > 1) return (FILTER_HANDLED); DBG_COUNTER_INC(fast_intrs); @@ -3753,6 +3758,7 @@ iflib_device_register(device_t dev, void if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); iflib_add_device_sysctl_post(ctx); + ctx->ifc_flags |= IFC_INIT_DONE; return (0); fail_detach: ether_ifdetach(ctx->ifc_ifp); @@ -4471,6 +4477,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; + info->ifi_ctx = ctx; err = _iflib_irq_alloc(ctx, irq, rid, iflib_fast_intr, NULL, info, name); if (err != 0) { @@ -4567,6 +4574,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_ info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; + info->ifi_ctx = ctx; /* We allocate a single interrupt resource */ if ((err = _iflib_irq_alloc(ctx, irq, tqrid, iflib_fast_intr, NULL, info, name)) != 0) From owner-svn-src-head@freebsd.org Sun Jan 15 03:50:09 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 6662BCB0BEA; Sun, 15 Jan 2017 03:50:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE0D1007; Sun, 15 Jan 2017 03:50:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F3o80b030076; Sun, 15 Jan 2017 03:50:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F3o8oK030074; Sun, 15 Jan 2017 03:50:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701150350.v0F3o8oK030074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 15 Jan 2017 03:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312208 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 03:50:09 -0000 Author: markj Date: Sun Jan 15 03:50:08 2017 New Revision: 312208 URL: https://svnweb.freebsd.org/changeset/base/312208 Log: Avoid unnecessary page lookups in vm_object_madvise(). vm_object_madvise() is frequently used to apply advice to a contiguous set of pages in an object with no backing object. Optimize this case by skipping non-resident subranges in constant time, and by iterating over resident pages using the object memq, thus avoiding radix tree lookups on each page index in the specified range. While here, move MADV_WILLNEED handling to vm_page_advise(), and rename the "advise" parameter to vm_object_madvise() to "advice." Reviewed by: alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9098 Modified: head/sys/vm/vm_object.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sun Jan 15 01:36:45 2017 (r312207) +++ head/sys/vm/vm_object.c Sun Jan 15 03:50:08 2017 (r312208) @@ -1097,7 +1097,7 @@ vm_object_sync(vm_object_t object, vm_oo */ void vm_object_madvise(vm_object_t object, vm_pindex_t pindex, vm_pindex_t end, - int advise) + int advice) { vm_pindex_t tpindex; vm_object_t backing_object, tobject; @@ -1105,11 +1105,9 @@ vm_object_madvise(vm_object_t object, vm if (object == NULL) return; + VM_OBJECT_WLOCK(object); - /* - * Locate and adjust resident pages - */ - for (; pindex < end; pindex += 1) { + for (m = NULL; pindex < end; pindex++) { relookup: tobject = object; tpindex = pindex; @@ -1118,7 +1116,7 @@ shadowlookup: * MADV_FREE only operates on OBJT_DEFAULT or OBJT_SWAP pages * and those pages must be OBJ_ONEMAPPING. */ - if (advise == MADV_FREE) { + if (advice == MADV_FREE) { if ((tobject->type != OBJT_DEFAULT && tobject->type != OBJT_SWAP) || (tobject->flags & OBJ_ONEMAPPING) == 0) { @@ -1126,15 +1124,29 @@ shadowlookup: } } else if ((tobject->flags & OBJ_UNMANAGED) != 0) goto unlock_tobject; - m = vm_page_lookup(tobject, tpindex); - if (m == NULL) { - /* - * There may be swap even if there is no backing page - */ - if (advise == MADV_FREE && tobject->type == OBJT_SWAP) + + /* + * In the common case where the object has no backing object, we + * can avoid performing lookups at each pindex. In either case, + * when applying MADV_FREE we take care to release any swap + * space used to store non-resident pages. + */ + if (object->backing_object == NULL) { + m = (m != NULL) ? TAILQ_NEXT(m, listq) : + vm_page_find_least(object, pindex); + tpindex = (m != NULL && m->pindex < end) ? + m->pindex : end; + if (advice == MADV_FREE && object->type == OBJT_SWAP && + tpindex > pindex) + swap_pager_freespace(object, pindex, + tpindex - pindex); + if ((pindex = tpindex) == end) + break; + } else if ((m = vm_page_lookup(tobject, tpindex)) == NULL) { + if (advice == MADV_FREE && tobject->type == OBJT_SWAP) swap_pager_freespace(tobject, tpindex, 1); /* - * next object + * Prepare to search the next object in the chain. */ backing_object = tobject->backing_object; if (backing_object == NULL) @@ -1145,11 +1157,13 @@ shadowlookup: VM_OBJECT_WUNLOCK(tobject); tobject = backing_object; goto shadowlookup; - } else if (m->valid != VM_PAGE_BITS_ALL) - goto unlock_tobject; + } + /* * If the page is not in a normal state, skip it. */ + if (m->valid != VM_PAGE_BITS_ALL) + goto unlock_tobject; vm_page_lock(m); if (m->hold_count != 0 || m->wire_count != 0) { vm_page_unlock(m); @@ -1160,7 +1174,7 @@ shadowlookup: KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("vm_object_madvise: page %p is not managed", m)); if (vm_page_busied(m)) { - if (advise == MADV_WILLNEED) { + if (advice == MADV_WILLNEED) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -1172,21 +1186,18 @@ shadowlookup: VM_OBJECT_WUNLOCK(object); VM_OBJECT_WUNLOCK(tobject); vm_page_busy_sleep(m, "madvpo", false); + m = NULL; VM_OBJECT_WLOCK(object); goto relookup; } - if (advise == MADV_WILLNEED) { - vm_page_activate(m); - } else { - vm_page_advise(m, advise); - } + vm_page_advise(m, advice); vm_page_unlock(m); - if (advise == MADV_FREE && tobject->type == OBJT_SWAP) + if (advice == MADV_FREE && tobject->type == OBJT_SWAP) swap_pager_freespace(tobject, tpindex, 1); unlock_tobject: if (tobject != object) VM_OBJECT_WUNLOCK(tobject); - } + } VM_OBJECT_WUNLOCK(object); } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Jan 15 01:36:45 2017 (r312207) +++ head/sys/vm/vm_page.c Sun Jan 15 03:50:08 2017 (r312208) @@ -3002,7 +3002,7 @@ vm_page_try_to_free(vm_page_t m) /* * vm_page_advise * - * Deactivate or do nothing, as appropriate. + * Apply the specified advice to the given page. * * The object and page must be locked. */ @@ -3020,8 +3020,11 @@ vm_page_advise(vm_page_t m, int advice) * would result in a page fault on a later access. */ vm_page_undirty(m); - else if (advice != MADV_DONTNEED) + else if (advice != MADV_DONTNEED) { + if (advice == MADV_WILLNEED) + vm_page_activate(m); return; + } /* * Clear any references to the page. Otherwise, the page daemon will From owner-svn-src-head@freebsd.org Sun Jan 15 03:53:21 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 8C6F2CB0E52; Sun, 15 Jan 2017 03:53:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5614014BD; Sun, 15 Jan 2017 03:53:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F3rK8K034021; Sun, 15 Jan 2017 03:53:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F3rKpw034020; Sun, 15 Jan 2017 03:53:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701150353.v0F3rKpw034020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 15 Jan 2017 03:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312209 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 03:53:21 -0000 Author: markj Date: Sun Jan 15 03:53:20 2017 New Revision: 312209 URL: https://svnweb.freebsd.org/changeset/base/312209 Log: Suppress a warning about m_assertbuf being unused. MFC after: 1 week Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sun Jan 15 03:50:08 2017 (r312208) +++ head/sys/kern/uipc_mbuf.c Sun Jan 15 03:53:20 2017 (r312209) @@ -169,7 +169,7 @@ CTASSERT(sizeof(struct m_ext) == 28); * plain pointer does. */ #ifdef INVARIANTS -static struct mbuf m_assertbuf; +static struct mbuf __used m_assertbuf; CTASSERT(sizeof(m_assertbuf.m_slist) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_stailq) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_slistpkt) == sizeof(m_assertbuf.m_nextpkt)); From owner-svn-src-head@freebsd.org Sun Jan 15 05:08:20 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 98533CB0807; Sun, 15 Jan 2017 05:08:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB001C13; Sun, 15 Jan 2017 05:08:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from Julian-MBP3.local (ppp121-45-252-76.lns20.per4.internode.on.net [121.45.252.76]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v0F583ac018905 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 14 Jan 2017 21:08:06 -0800 (PST) (envelope-from julian@elischer.org) Subject: Re: svn commit: r311952 - head/sys/ddb To: Mark Johnston , Bruce Evans References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, rang@acm.org From: Julian Elischer Message-ID: <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> Date: Sun, 15 Jan 2017 13:07:58 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170114220629.GB18065@raichu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Sun, 15 Jan 2017 05:08:20 -0000 On 15/01/2017 6:06 AM, Mark Johnston wrote: > On Fri, Jan 13, 2017 at 02:51:04PM +1100, Bruce Evans wrote: >> On Thu, 12 Jan 2017, Mark Johnston wrote: >> >>> Log: >>> Enable the use of ^C and ^S/^Q in DDB. >>> >>> This lets one interrupt DDB's output, which is useful if paging is >>> disabled and the output device is slow. >> This is quite broken. It removes the code that was necessary for avoiding >> loss of input. > Hi Bruce, > > I've reverted this for now. I haven't thought much about how > db_check_interrupt() might losslessly poll the console driver for > ctrl-C, but I do think it's a valuable feature to have - just this > morning I absent-mindedly dumped a 128K-entry KTR ring from a DDB prompt > after having set $lines = 0, and had to wait for quite a while to get > my prompt back. > >>> Modified: head/sys/ddb/db_input.c >>> ============================================================================== >>> --- head/sys/ddb/db_input.c Thu Jan 12 00:09:31 2017 (r311951) >>> +++ head/sys/ddb/db_input.c Thu Jan 12 00:22:36 2017 (r311952) >>> @@ -63,7 +63,6 @@ static int db_lhist_nlines; >>> #define BLANK ' ' >>> #define BACKUP '\b' >>> >>> -static int cnmaygetc(void); >>> static void db_delete(int n, int bwd); >>> static int db_inputchar(int c); >>> static void db_putnchars(int c, int count); >>> @@ -291,12 +290,6 @@ db_inputchar(c) >>> return (0); >>> } >>> >>> -static int >>> -cnmaygetc() >>> -{ >>> - return (-1); >>> -} >>> - >> BSD never had a usable console API (function) for checking for input. >> cncheckc() is the correct name for such a function. The actual >> cncheckc() returns any input that it finds. This is not the main >> problem here. The input will have to be read here anyway to determine >> what it is. The problems are that there is no console API at all for >> ungetting characters in the input stream, and this function doesn't >> even use a stub cnungetc(), but drops the input on the floor. It does >> document this behaviour in a comment, but doesn't say that it is wrong. >> >>> int >>> db_readline(lstart, lsize) >>> char * lstart; >>> @@ -350,7 +343,7 @@ db_check_interrupt(void) >>> { >>> int c; >>> >>> - c = cnmaygetc(); >>> + c = cncheckc(); >>> switch (c) { >>> case -1: /* no character */ >>> return; >> The stub function always returns -1, so db_check_interrupt() is turned into >> a no-op. >> >> db_check_interrupt() now eats the first byte of any input on every call. >> >>> @@ -361,7 +354,7 @@ db_check_interrupt(void) >>> >>> case CTRL('s'): >>> do { >>> - c = cnmaygetc(); >>> + c = cncheckc(); >>> if (c == CTRL('c')) >>> db_error((char *)0); >>> } while (c != CTRL('q')); >> This is now a bad implementation of xon/xoff. It doesn't support ixany, >> but busy-waits for ^Q or ^C using cncheckc(). It should at least >> busy-wait using cngetc(), since that might be do a smarter busy wait. >> cngetc() is actually only slightly smarter -- it uses busy-waiting too, >> but with cpu_spinwait() in the loop. This cpu_spinwait() makes little >> difference since cncheckc() tends to be a heavyweight function. Only >> cpu_spinwait()s in the innermost loops of cncheckc(), if any, are likely >> to have much effect. >> >> Multiple consoles complicate this a bit. >> >> db_check_interrupt() is called after every db_putc() of a newline. So >> the breakage is mainly for type-ahead while writing many lines. > I'll note that type-ahead interacts rather poorly with DDB's behaviour > of repeating the previous command upon reading an empty input line: > entering a carriage return at any point while "show ktr" is working will > cause it to be started again once it's finished. the old DEC machines had (from memory) ^O which dropped all pending output. Not so useful when there is 2MB of network buffers queued up to you, but very useful on and asr-33 teletype. > >> Control processing belongs in the lowest level of console drivers, and >> at least the xon/xoff part is very easy to do. This makes it work for >> contexts like boot messages -- this can only be controlled now by booting >> with -p, which gives something like an automatic ^S after every line, >> but the control characters for this mode are unusual and there is no >> way to get back to -p mode after turning it off or not starting with it. >> >> [...] From owner-svn-src-head@freebsd.org Sun Jan 15 05:54:59 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 2CFF3CB08E3; Sun, 15 Jan 2017 05:54:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id B7E8110DC; Sun, 15 Jan 2017 05:54:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 6D60BD63CD1; Sun, 15 Jan 2017 16:54:56 +1100 (AEDT) Date: Sun, 15 Jan 2017 16:54:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Johnston cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312199 - head/sys/kern In-Reply-To: <201701142216.v0EMG3rN093070@repo.freebsd.org> Message-ID: <20170115161524.A55089@besplex.bde.org> References: <201701142216.v0EMG3rN093070@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=RAJ7xaerS_eBAxpZtjMA:9 a=CjuIK1q_8ugA:10 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: Sun, 15 Jan 2017 05:54:59 -0000 On Sat, 14 Jan 2017, Mark Johnston wrote: > Log: > Stop the scheduler upon panic even in non-SMP kernels. > > This is needed for kernel dumps to work, as the panicking thread will call > into code that makes use of kernel locks. > > Reported and tested by: Eugene Grosbein > MFC after: 1 week > > Modified: > head/sys/kern/kern_shutdown.c > > Modified: head/sys/kern/kern_shutdown.c > ============================================================================== > --- head/sys/kern/kern_shutdown.c Sat Jan 14 22:16:01 2017 (r312198) > +++ head/sys/kern/kern_shutdown.c Sat Jan 14 22:16:03 2017 (r312199) > @@ -733,13 +733,13 @@ vpanic(const char *fmt, va_list ap) > CPU_CLR(PCPU_GET(cpuid), &other_cpus); > stop_cpus_hard(other_cpus); > } > +#endif > > /* > * Ensure that the scheduler is stopped while panicking, even if panic > * has been entered from kdb. > */ > td->td_stopsched = 1; > -#endif > > bootopt = RB_AUTOBOOT; > newpanic = 0; This variable causes various problems. In my patches for early use of the message buffer, I have to provide a fake td to point to it since curthread is not initialized early and message buffer code does bogus locking. This variable used to be a global, but was changed to per-thread because it was claimed to cause cache contention. I don't see how a the global can cause significant contention (or more than other globals) provided it is not in the same cache line as an often-written-to global. This variable is not even checked by inline mutex code, so this code is broken and without INVARIANTS the variable is mainly accessed in the contended case, but the contended case is already slow and accesses many other globals. The accesses are well obfuscated by ifdefs. __mtx_lock_sleep() seems to have only the following at the beginning in the non-INVARIANTS case: - SCHEDULER_STOPPED() accesses this variable - then if ADAPTIVE_MUTEXES is configured, the much larger global mtx_delay is accessed. Even standard compiler optimizations are likely to copy from static global data to initialize constants a bit like this. These seem to be the only globals in the main, not counting per-CPU ones like curthread. This and other mutex functions recently gained the dubious optimization of initializing lda early in the main path. This is correct if the main path is usually to do almost everything (because the usual case is contended). Scheduler code also checks 'cold' quite often and kdb_active sometimes. It is not called as often as mutex code. No care is taken to keep 'cold' away from other globals. On i386, it is just 'int cold = 1;' in machdep.c, so it is placed wherever the linker decides to pack it. WHen this variable was changed from global to thread-local, it was set for more threads. Now it is set for only 1 thread. This depends on all other CPUs being stopped so that they can't be running other threads. If another thread somehow runs, then the thread variable is much more broken than the global since it doesn't stop scheduling on all threads. Perhaps the change to stop other threads made the global less pessimal than before (I can't see why -- efficiency doesn't matter while the scheduler is stopped -- we just need to make the access efficient in normal operation when the variable is 0). Bruce From owner-svn-src-head@freebsd.org Sun Jan 15 06:35:01 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 C30B8CB13EF; Sun, 15 Jan 2017 06:35:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 926C0122E; Sun, 15 Jan 2017 06:35:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F6Z04x001636; Sun, 15 Jan 2017 06:35:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F6Z0tF001634; Sun, 15 Jan 2017 06:35:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701150635.v0F6Z0tF001634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Jan 2017 06:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312211 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 06:35:01 -0000 Author: adrian Date: Sun Jan 15 06:35:00 2017 New Revision: 312211 URL: https://svnweb.freebsd.org/changeset/base/312211 Log: [ar71xx] add EARLY_PRINTF support for the rest of the non-AR933x SoCs. Tested: * AR934x SoC Modified: head/sys/mips/atheros/ar71xxreg.h head/sys/mips/atheros/uart_bus_ar71xx.c Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Sun Jan 15 04:23:20 2017 (r312210) +++ head/sys/mips/atheros/ar71xxreg.h Sun Jan 15 06:35:00 2017 (r312211) @@ -111,6 +111,10 @@ #define PCI_WINDOW7_CONF_ADDR 0x07000000 #define AR71XX_UART_ADDR 0x18020000 +#define AR71XX_UART_THR 0x0 +#define AR71XX_UART_LSR 0x14 +#define AR71XX_UART_LSR_THRE (1 << 5) +#define AR71XX_UART_LSR_TEMT (1 << 6) #define AR71XX_USB_CTRL_FLADJ 0x18030000 #define USB_CTRL_FLADJ_HOST_SHIFT 12 Modified: head/sys/mips/atheros/uart_bus_ar71xx.c ============================================================================== --- head/sys/mips/atheros/uart_bus_ar71xx.c Sun Jan 15 04:23:20 2017 (r312210) +++ head/sys/mips/atheros/uart_bus_ar71xx.c Sun Jan 15 06:35:00 2017 (r312211) @@ -86,4 +86,21 @@ uart_ar71xx_probe(device_t dev) return (uart_bus_probe(dev, 2, freq, 0, 0)); } +#ifdef EARLY_PRINTF +static void +ar71xx_early_putc(int c) +{ + int i; + + for (i = 0; i < 1000; i++) { + if (ATH_READ_REG(AR71XX_UART_ADDR + AR71XX_UART_LSR) + & AR71XX_UART_LSR_THRE) + break; + } + + ATH_WRITE_REG(AR71XX_UART_ADDR + AR71XX_UART_THR, (c & 0xff)); +} +early_putc_t *early_putc = ar71xx_early_putc; +#endif + DRIVER_MODULE(uart, apb, uart_ar71xx_driver, uart_devclass, 0, 0); From owner-svn-src-head@freebsd.org Sun Jan 15 06:49:35 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 66B10CB1698; Sun, 15 Jan 2017 06:49:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 26F271849; Sun, 15 Jan 2017 06:49:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 762D3D64D15; Sun, 15 Jan 2017 17:49:33 +1100 (AEDT) Date: Sun, 15 Jan 2017 17:49:33 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312119 - head/sys/kern In-Reply-To: <201701140506.v0E56EHT068275@repo.freebsd.org> Message-ID: <20170115172228.U55241@besplex.bde.org> References: <201701140506.v0E56EHT068275@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=sPGq-izdjwqvmuXUbnIA:9 a=CjuIK1q_8ugA:10 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: Sun, 15 Jan 2017 06:49:35 -0000 On Sat, 14 Jan 2017, Ngie Cooper wrote: > Log: > encode_long, encode_timeval: mechanically replace `exp` with `exponent` > > This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test, > which include math.h, which in turn defines exp(3) But kern_acct.c doesn't include math.h. This messes up the kernel sources to simplify abusing them in tests. The bug was only in the sed script in the makefile that translates kern_acct.c to convert.c. It converts 'log(' to 'syslog(', but is missing conversion of the exp identifier to sysexp. > ============================================================================== > --- head/sys/kern/kern_acct.c Sat Jan 14 05:02:53 2017 (r312118) > +++ head/sys/kern/kern_acct.c Sat Jan 14 05:06:14 2017 (r312119) > @@ -469,8 +469,8 @@ static uint32_t > encode_timeval(struct timeval tv) > { > int log2_s; > - int val, exp; /* Unnormalized value and exponent */ > - int norm_exp; /* Normalized exponent */ > + int val, exponent; /* Unnormalized value and exponent */ > + int norm_exponent; /* Normalized exponent */ > int shift; > > /* Now the bug is also bad style in the kernel sources. The regexp was too simple and munged norm_exp too, but not the exp's in comments. The comments are more banal than before now that they don't even expand 'exp' but just echo 'exponent'. > ... > - return (((FLT_MAX_EXP - 1 + exp + norm_exp) << (FLT_MANT_DIG - 1)) | > + return (((FLT_MAX_EXP - 1 + exponent + norm_exponent) << (FLT_MANT_DIG - 1)) | > ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); Here the expansion also broke the formatting. The details of the abuse in the test program are that acct_test.c includes math.h and then includes then convert.c which is nearly a copy of the kernel source file. This takes clean include files and not enabling warnings about redundant declarations to have a chance of working. I use a similar hack to test libm, and didn't have to mess up the sources too much to make the translation not too hard. Files have to be copied just to make the include paths manageable, and to compile them all with the same CFLAGS since this is a performance test. The most complicated parts are to avoid library functions because they might not match the sources or were compiled with different CFLAGS. The sources are not well organized well enough for my preferred method of "cc ${CLAGS} *.c" to work. Bruce From owner-svn-src-head@freebsd.org Sun Jan 15 07:40:19 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 C37EFCB1EF5; Sun, 15 Jan 2017 07:40:19 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4BD1A09; Sun, 15 Jan 2017 07:40:18 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xGoVi2Rd9Z0E7HAEgjIsQt7JGc5btkVu2rCnv72YL+M=; b=CxFUfBErT/mbGeE9EoJg9+kYor GUDG3fkBvF0lqjbCRh574df2Andi65vBinpQ+n+PcmufNkagzIZ6N1pCVP7DR5UVFrqjmpBG1c9Ux uJ0K7iBkKyL/sj9fCQYsbExvJXyrLYY85ygkrtA2VXtEuAdZPhh9vSJQ/KQCOk8uJrKk=; Received: from [46.185.1.216] (helo=nonamehost) by frv158.fwdcdn.com with esmtpsa ID 1cSfQ9-000FwZ-JA ; Sun, 15 Jan 2017 09:40:09 +0200 Date: Sun, 15 Jan 2017 09:40:07 +0200 From: Ivan Klymenko To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312205 - in head/sys: kern net Message-ID: <20170115094007.1bfe58c8@nonamehost> In-Reply-To: <201701150050.v0F0oAU8055428@repo.freebsd.org> References: <201701150050.v0F0oAU8055428@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWpqak/Pz/i4uIfHx8GBwZwcHAQEBA6o92AAAACHElEQVQ4jWWUTY7bMAyF6QzUPSEoa8PFHEBgqwuM4bVVg7MvZOj+R+ijpMTpjIwgkT7z75EKrdfattpXERG6zqvUOtAr2LCRYfEKcB4l/Q+2cc6XjQH7hv+2YZYreIk5nevZEPvuzUzptizHLzgDMnC5Wpbl7ewJlOEqlQF+DlCjgVLki0WV6FMDMsBxjlJiQulIznwZ+DxHiQyDyIg0wN3Oo6o6ZQ5s5AIfar+W2Wlmz+kCcb8tg6j3voMEwNrBQk69dDBDqw/urpqJH+m+Q6u/4QnoAeYpnUXC/s1iup9rhCd6xMgAqdDyAyFegbKkVAHeLCcOulPLawaoUIDos4M88iLNrVkU7uu5ccTDO6naJzWLum51C6Yb7y4HKKbdArLWir0PBiS8glJRBZHeyHl7J9lENpAC6qT9NlNG4u5hsVYDyJP6mlJJtY3oVju4WSUzHal1sDU17NASoBWSk40J2eBLBJhYrVmzC5gVALGpNIAiQgN6eGstOp9Oa6zFbbLTISYi28BGZDRUJKWeroECkCEkzXjUtbmmaKMfAx2RfbT69/cO+tgHcmx6AfyZOmj3NDIah0F0GB66d4CrdIoplNFFGHSpSheRxbo0W4S8azNItEoMWbw3uXAeJgCrmX5joz7CGXqSg6PcryEhnFr/C1C2ntPxBOYbdwY+8dO3+wZJyFlbMX9s8zNnvp/tLwAv03NB4j3HVpn8Awwm+GrlP6MVAAAAAElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=46.185.1.216; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net 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: Sun, 15 Jan 2017 07:40:19 -0000 On Sun, 15 Jan 2017 00:50:10 +0000 (UTC) Sean Bruno wrote: > Log: > Fix hangs in a uniprocessor configuration (qemu, virtualbox, real > hw). Hello. MFC to STABLE? From owner-svn-src-head@freebsd.org Sun Jan 15 08:05:02 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 16213CB0AA0; Sun, 15 Jan 2017 08:05:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC94B191A; Sun, 15 Jan 2017 08:05:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F8510p037294; Sun, 15 Jan 2017 08:05:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F851ZA037293; Sun, 15 Jan 2017 08:05:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701150805.v0F851ZA037293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 15 Jan 2017 08:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312212 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 08:05:02 -0000 Author: cem Date: Sun Jan 15 08:05:00 2017 New Revision: 312212 URL: https://svnweb.freebsd.org/changeset/base/312212 Log: Fix a minor typo (Seiral) PR: 216095 Reported by: Modified: head/sys/sys/ata.h Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Sun Jan 15 06:35:00 2017 (r312211) +++ head/sys/sys/ata.h Sun Jan 15 08:05:00 2017 (r312212) @@ -682,7 +682,7 @@ struct atapi_sense { #define ATA_IDL_ATA_STRINGS 0x05 /* ATA Strings */ #define ATA_IDL_SECURITY 0x06 /* Security */ #define ATA_IDL_PARALLEL_ATA 0x07 /* Parallel ATA */ -#define ATA_IDL_SERIAL_ATA 0x08 /* Seiral ATA */ +#define ATA_IDL_SERIAL_ATA 0x08 /* Serial ATA */ #define ATA_IDL_ZDI 0x09 /* Zoned Device Information */ struct ata_gp_log_dir { From owner-svn-src-head@freebsd.org Sun Jan 15 09:05:28 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 405C1CB1C7F; Sun, 15 Jan 2017 09:05:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD831593; Sun, 15 Jan 2017 09:05:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F95RY6061488; Sun, 15 Jan 2017 09:05:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F95R5W061486; Sun, 15 Jan 2017 09:05:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701150905.v0F95R5W061486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 15 Jan 2017 09:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312213 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 09:05:28 -0000 Author: ngie Date: Sun Jan 15 09:05:26 2017 New Revision: 312213 URL: https://svnweb.freebsd.org/changeset/base/312213 Log: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. MFC after: 1 week PR: 208703 Reported by: emaste Sponsored by: Dell EMC Isilon Modified: head/lib/msun/tests/Makefile head/lib/msun/tests/fmaxmin_test.c Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Sun Jan 15 08:05:00 2017 (r312212) +++ head/lib/msun/tests/Makefile Sun Jan 15 09:05:26 2017 (r312213) @@ -55,10 +55,7 @@ TAP_TESTS_C+= ctrig_test TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test -# clang 3.8.0 fails always fails this test. See: bug 208703 -.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30800) TAP_TESTS_C+= fmaxmin_test -.endif TAP_TESTS_C+= ilogb2_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test Modified: head/lib/msun/tests/fmaxmin_test.c ============================================================================== --- head/lib/msun/tests/fmaxmin_test.c Sun Jan 15 08:05:00 2017 (r312212) +++ head/lib/msun/tests/fmaxmin_test.c Sun Jan 15 09:05:26 2017 (r312213) @@ -86,6 +86,8 @@ testall_r(long double big, long double s return (ok); } +const char *comment = NULL; + /* * Test all the functions: fmaxf, fmax, fmaxl, fminf, fmin, and fminl, * in all rounding modes and with the arguments in different orders. @@ -107,10 +109,17 @@ testall(int testnum, long double big, lo break; } } - printf("%sok %d - big = %.20Lg, small = %.20Lg\n", - (i == 4) ? "" : "not ", testnum, big, small); + printf("%sok %d - big = %.20Lg, small = %.20Lg%s\n", + (i == 4) ? "" : "not ", testnum, big, small, + comment == NULL ? "" : comment); } +/* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ +#if defined(__clang__) && \ + (__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0) +#define affected_by_bug_208703 +#endif + int main(int argc, char *argv[]) { @@ -122,15 +131,23 @@ main(int argc, char *argv[]) testall(3, nextafterf(42.0, INFINITY), 42.0); testall(4, -5.0, -5.0); testall(5, -3.0, -4.0); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 6-7 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(6, 1.0, NAN); testall(7, INFINITY, NAN); + comment = NULL; testall(8, INFINITY, 1.0); testall(9, -3.0, -INFINITY); testall(10, 3.0, -INFINITY); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 11-12 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(11, NAN, NAN); /* This test isn't strictly required to work by C99. */ testall(12, 0.0, -0.0); + comment = NULL; return (0); } From owner-svn-src-head@freebsd.org Sun Jan 15 09:06:46 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 D5E3FCB1CF5; Sun, 15 Jan 2017 09:06:46 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8331718; Sun, 15 Jan 2017 09:06:46 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F96j2Q061587; Sun, 15 Jan 2017 09:06:45 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F96jN4061586; Sun, 15 Jan 2017 09:06:45 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201701150906.v0F96jN4061586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 15 Jan 2017 09:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312214 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 09:06:46 -0000 Author: cperciva Date: Sun Jan 15 09:06:45 2017 New Revision: 312214 URL: https://svnweb.freebsd.org/changeset/base/312214 Log: Enable IPv6 networking on Amazon EC2. MFC after: 1 week Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Sun Jan 15 09:05:26 2017 (r312213) +++ head/release/tools/ec2.conf Sun Jan 15 09:06:45 2017 (r312214) @@ -6,7 +6,7 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs" +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs" @@ -39,8 +39,9 @@ vm_extra_pre_umount() { # time; expand our filesystem to fill the disk. echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - # EC2 instances use DHCP to get their network configuration. - echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + # EC2 instances use DHCP to get their network configuration. IPv6 + # requires accept_rtadv. + echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf # Unless the system has been configured via EC2 user-data, the user # will need to SSH in to do anything. @@ -51,6 +52,10 @@ vm_extra_pre_umount() { # via EC2 user-data. echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf + # Enable IPv6 on all interfaces, and use DHCP on both IPv4 and IPv6. + echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'dhclient_program="/usr/local/sbin/dual-dhclient"' >> ${DESTDIR}/etc/rc.conf + # The EC2 console is output-only, so while printing a backtrace can # be useful, there's no point dropping into a debugger or waiting # for a keypress. From owner-svn-src-head@freebsd.org Sun Jan 15 09:13:43 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 48F9ECB1E5E; Sun, 15 Jan 2017 09:13:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECD0F1BA4; Sun, 15 Jan 2017 09:13:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F9Dg5H065584; Sun, 15 Jan 2017 09:13:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F9Dga2065583; Sun, 15 Jan 2017 09:13:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701150913.v0F9Dga2065583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 15 Jan 2017 09:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312215 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 09:13:43 -0000 Author: ngie Date: Sun Jan 15 09:13:41 2017 New Revision: 312215 URL: https://svnweb.freebsd.org/changeset/base/312215 Log: Mark testcases which use cap_enter as expected failures until the PR is resolved so those of us that run the tests don't have the bogus failures counted against our overall results PR: 215690 Modified: head/tests/sys/vfs/lookup_cap_dotdot.c Modified: head/tests/sys/vfs/lookup_cap_dotdot.c ============================================================================== --- head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 15 09:06:45 2017 (r312214) +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 15 09:13:41 2017 (r312215) @@ -124,6 +124,8 @@ ATF_TC_BODY(lookup_cap_dotdot__basic, tc cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); + atf_tc_expect_signal(SIGABRT, "needs change done upstream in atf/kyua according to cem: bug 215690"); + ATF_REQUIRE(cap_enter() >= 0); ATF_REQUIRE_MSG(openat(dirfd, "d1/..", O_RDONLY) >= 0, "%s", @@ -144,6 +146,8 @@ ATF_TC_BODY(lookup_cap_dotdot__advanced, check_capsicum(); prepare_dotdot_tests(); + atf_tc_expect_signal(SIGABRT, "needs change done upstream in atf/kyua according to cem: bug 215690"); + cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); @@ -187,6 +191,8 @@ ATF_TC_BODY(capmode__negative, tc) check_capsicum(); prepare_dotdot_tests(); + atf_tc_expect_signal(SIGABRT, "needs change done upstream in atf/kyua according to cem: bug 215690"); + ATF_REQUIRE(cap_enter() == 0); /* open() not permitted in capability mode */ @@ -225,6 +231,8 @@ ATF_TC_BODY(lookup_cap_dotdot__negative, cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); + atf_tc_expect_signal(SIGABRT, "needs change done upstream in atf/kyua according to cem: bug 215690"); + ATF_REQUIRE(cap_enter() >= 0); ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); From owner-svn-src-head@freebsd.org Sun Jan 15 09:25:35 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 08092CA4154; Sun, 15 Jan 2017 09:25:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8B411058; Sun, 15 Jan 2017 09:25:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F9PXT6069574; Sun, 15 Jan 2017 09:25:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F9PXW8069572; Sun, 15 Jan 2017 09:25:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701150925.v0F9PXW8069572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 15 Jan 2017 09:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312216 - in head: sys/kern tests/sys/kern/acct X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 09:25:35 -0000 Author: ngie Date: Sun Jan 15 09:25:33 2017 New Revision: 312216 URL: https://svnweb.freebsd.org/changeset/base/312216 Log: Revert r312119 and reword the intent to fix -Wshadow issues between exp(3) and `exp` var. The approach taken previously was not ideal for multiple functional and stylistic reasons. Add to existing sed call in Makefile to replace `exp` with `exponent` instead. MFC after: 13 days Requested by: bde Modified: head/sys/kern/kern_acct.c head/tests/sys/kern/acct/Makefile Directory Properties: head/ (props changed) Modified: head/sys/kern/kern_acct.c ============================================================================== --- head/sys/kern/kern_acct.c Sun Jan 15 09:13:41 2017 (r312215) +++ head/sys/kern/kern_acct.c Sun Jan 15 09:25:33 2017 (r312216) @@ -469,8 +469,8 @@ static uint32_t encode_timeval(struct timeval tv) { int log2_s; - int val, exponent; /* Unnormalized value and exponent */ - int norm_exponent; /* Normalized exponent */ + int val, exp; /* Unnormalized value and exponent */ + int norm_exp; /* Normalized exponent */ int shift; /* @@ -481,7 +481,7 @@ encode_timeval(struct timeval tv) if (tv.tv_sec == 0) { if (tv.tv_usec == 0) return (0); - exponent = 0; + exp = 0; val = tv.tv_usec; } else { /* @@ -490,24 +490,24 @@ encode_timeval(struct timeval tv) */ log2_s = fls(tv.tv_sec) - 1; if (log2_s + LOG2_1M < CALC_BITS) { - exponent = 0; + exp = 0; val = 1000000 * tv.tv_sec + tv.tv_usec; } else { - exponent = log2_s + LOG2_1M - CALC_BITS; + exp = log2_s + LOG2_1M - CALC_BITS; val = (unsigned int)(((uint64_t)1000000 * tv.tv_sec + - tv.tv_usec) >> exponent); + tv.tv_usec) >> exp); } } /* Now normalize and pack the value into an IEEE-754 float. */ - norm_exponent = fls(val) - 1; - shift = FLT_MANT_DIG - norm_exponent - 1; + norm_exp = fls(val) - 1; + shift = FLT_MANT_DIG - norm_exp - 1; #ifdef ACCT_DEBUG printf("val=%d exp=%d shift=%d log2(val)=%d\n", - val, exponent, shift, norm_exponent); - printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exponent + norm_exponent, + val, exp, shift, norm_exp); + printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exp, ((shift > 0 ? (val << shift) : (val >> -shift)) & MANT_MASK)); #endif - return (((FLT_MAX_EXP - 1 + exponent + norm_exponent) << (FLT_MANT_DIG - 1)) | + return (((FLT_MAX_EXP - 1 + exp + norm_exp) << (FLT_MANT_DIG - 1)) | ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); } @@ -518,7 +518,7 @@ encode_timeval(struct timeval tv) static uint32_t encode_long(long val) { - int norm_exponent; /* Normalized exponent */ + int norm_exp; /* Normalized exponent */ int shift; if (val == 0) @@ -529,15 +529,15 @@ encode_long(long val) val); val = LONG_MAX; } - norm_exponent = fls(val) - 1; - shift = FLT_MANT_DIG - norm_exponent - 1; + norm_exp = fls(val) - 1; + shift = FLT_MANT_DIG - norm_exp - 1; #ifdef ACCT_DEBUG printf("val=%d shift=%d log2(val)=%d\n", - val, shift, norm_exponent); - printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exponent, + val, shift, norm_exp); + printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exp, ((shift > 0 ? (val << shift) : (val >> -shift)) & MANT_MASK)); #endif - return (((FLT_MAX_EXP - 1 + norm_exponent) << (FLT_MANT_DIG - 1)) | + return (((FLT_MAX_EXP - 1 + norm_exp) << (FLT_MANT_DIG - 1)) | ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); } Modified: head/tests/sys/kern/acct/Makefile ============================================================================== --- head/tests/sys/kern/acct/Makefile Sun Jan 15 09:13:41 2017 (r312215) +++ head/tests/sys/kern/acct/Makefile Sun Jan 15 09:25:33 2017 (r312216) @@ -13,6 +13,7 @@ acct_test.o: convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ + -e 's/exp/expected/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-head@freebsd.org Sun Jan 15 09:26:47 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 6DB2ACA41CB; Sun, 15 Jan 2017 09:26:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (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 3DCD011D6; Sun, 15 Jan 2017 09:26:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id e4so1951703pfg.0; Sun, 15 Jan 2017 01:26:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=wEWQI1T9e4E0AKmj/WQAKnYiI/P5JEqmn5BOGef8yLk=; b=edDJq9b6P3bb+7wgk01+vEqjtyU6aadSZFTGUdPNKyNnXAXmr8epXWSjAltY693UEU DwPVWTbKE014b3YPJ0Jw9EyITR54Q3xizcxDlIH/AzzqMDlbyKmfBAI0TqiPOpAFNl1o GxxPCNg+CA/UMctDL7A4wnogL8WFQJVl41zeaMLpZMzEc8sFOpgOYDRzqFnLSMLj1n5Y r+5hxt1Wc55EfgrqZsJn64hifd5qxFRzY0lSyqB+JUzlA6a7SSxOUsJKL/beiamJ10hy UmyQ25I7TX6bNPPq3Fu63IiyKCEsYqK7o4F4FF5uUTZ2r6c10XpMTdubNSsvcwRRKS3c urjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=wEWQI1T9e4E0AKmj/WQAKnYiI/P5JEqmn5BOGef8yLk=; b=NTAmpQEuiNNdB4WA24WHNBcNprF0T1yHm6pJqQuoQGNsF4iFLRf0CBdr2mLqpJ/OfQ o3wbh6c4w3SoBmMCS2Ex7fxFJ9BoeJzAcPnpmVvimQ/3OTeCBhOX9K3pLellhUC88zY7 BeQhPOuUIOTBz4pbryLiVQ70DMX2/QriatEI/MHwaR62Vn3OmBP7UEU+F0Ogz33aUm5A V/luPsMDKF0HDxpsLVPsMtovhnm6T1OArFDIvkpkanXLB+Q5FzIGa1SjZuaDaAxjJNRO YumOLGJjbPL+F9anSLeItnYA/FknLpLL7NZ+H9oyX8vke3UJrUp9eiXhG20sxnf4Hf1I kGZA== X-Gm-Message-State: AIkVDXJFMSHaNaqq2lOAFeNsZNIpmcDibGy2yVUn/tCoIQsPeAm75y7LryQMRWJ2f1xLVA== X-Received: by 10.98.102.21 with SMTP id a21mr26223007pfc.29.1484472406724; Sun, 15 Jan 2017 01:26:46 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id l12sm32092758pfj.37.2017.01.15.01.26.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Jan 2017 01:26:45 -0800 (PST) Subject: Re: svn commit: r312119 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EC0928AB-B910-47A4-B5CE-0E75932072CE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170115172228.U55241@besplex.bde.org> Date: Sun, 15 Jan 2017 01:26:44 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <53422412-6581-4C63-AD2F-8C3F5B4D4642@gmail.com> References: <201701140506.v0E56EHT068275@repo.freebsd.org> <20170115172228.U55241@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3124) 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: Sun, 15 Jan 2017 09:26:47 -0000 --Apple-Mail=_EC0928AB-B910-47A4-B5CE-0E75932072CE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 14, 2017, at 22:49, Bruce Evans wrote: >=20 > On Sat, 14 Jan 2017, Ngie Cooper wrote: >=20 >> Log: >> encode_long, encode_timeval: mechanically replace `exp` with = `exponent` >>=20 >> This helps fix a -Wshadow issue with exp(3) with = tests/sys/acct/acct_test, >> which include math.h, which in turn defines exp(3) >=20 > But kern_acct.c doesn't include math.h. >=20 > This messes up the kernel sources to simplify abusing them in tests. >=20 > The bug was only in the sed script in the makefile that translates > kern_acct.c to convert.c. It converts 'log(' to 'syslog(', but is = missing > conversion of the exp identifier to sysexp. >=20 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/kern/kern_acct.c Sat Jan 14 05:02:53 2017 = (r312118) >> +++ head/sys/kern/kern_acct.c Sat Jan 14 05:06:14 2017 = (r312119) >> @@ -469,8 +469,8 @@ static uint32_t >> encode_timeval(struct timeval tv) >> { >> int log2_s; >> - int val, exp; /* Unnormalized value and exponent */ >> - int norm_exp; /* Normalized exponent */ >> + int val, exponent; /* Unnormalized value and exponent */ >> + int norm_exponent; /* Normalized exponent */ >> int shift; >>=20 >> /* >=20 > Now the bug is also bad style in the kernel sources. The regexp was = too > simple and munged norm_exp too, but not the exp's in comments. The > comments are more banal than before now that they don't even expand = 'exp' > but just echo 'exponent'. >=20 >> ... >> - return (((FLT_MAX_EXP - 1 + exp + norm_exp) << (FLT_MANT_DIG - = 1)) | >> + return (((FLT_MAX_EXP - 1 + exponent + norm_exponent) << = (FLT_MANT_DIG - 1)) | >> ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); >=20 > Here the expansion also broke the formatting. >=20 > The details of the abuse in the test program are that acct_test.c = includes > math.h and then includes then convert.c which is nearly a copy of the = kernel > source file. This takes clean include files and not enabling warnings > about redundant declarations to have a chance of working. >=20 > I use a similar hack to test libm, and didn't have to mess up the = sources > too much to make the translation not too hard. Files have to be = copied > just to make the include paths manageable, and to compile them all = with > the same CFLAGS since this is a performance test. The most = complicated > parts are to avoid library functions because they might not match the > sources or were compiled with different CFLAGS. The sources are not = well > organized well enough for my preferred method of "cc ${CLAGS} *.c" to = work. Thank you for the concerns. I=E2=80=99ve modified the approach based on = your recommendations above and submitted it as r312216. -Ngie --Apple-Mail=_EC0928AB-B910-47A4-B5CE-0E75932072CE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYe0BVAAoJEPWDqSZpMIYVx4EQAMY2HVJRY8sJdUntdKbCqxkB Fp2y6FlEGyQqaSIYFqlzW5cAG1JtxjcBalKpT8mcN13JoN36IBYslxUmLyvo2GF6 tfOfavAYgIqJGJcnwmTfoRj99O7FIk72L43FbRSh1BOO7CHbpIMY1miOPZJX2hmK 2DUFFbXxBNT3K/43VXdLCXqbiMz9JRbOw8zu94anTDOyf6KNZ7OeKWgmXErD2dR5 TEcdJHxfUD6CxsM8Sy2hJ4dYp+gMYMTHtQWHmh0MyQiVyKN8t53nW80ziyInkXII wV65aagnuDzCa1S3CnwtAvMePfw6487fMj2OyKU1G2MsspnrZHEfgfvVaHXkgFRD u757fbaGGgov4EELv1IMAd6BePJ9h4AkkwS0EethWOehZb1Q84S91tANimwDmMS8 tURdqlcYxH/6iqMPyZCv1Fee47VC40CY6dcj6wZPZQrBVAl4UI4cfbCgVfgTtQTF wTBm4ROjui5Pbf47r2I062vUMnjRG48SX1kH5JaTdOMOZnRbN5VVYJLUcyXG53wO oxyF4kFv/sqz0mUED4LJArK34Cz/V1XNnoc+jLZ/LGuIh/xGPOwIQu1Tv3885PH3 L4hgm8yDlDKI0Fg1AFwIPvpIm3hVmC2N0AZbec3seQrRyjbaWlXc4LfEI7D3bzwR iP54g1hLCzw+P0cL6NAt =DKD0 -----END PGP SIGNATURE----- --Apple-Mail=_EC0928AB-B910-47A4-B5CE-0E75932072CE-- From owner-svn-src-head@freebsd.org Sun Jan 15 09:27:19 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 3D3F7CA4231; Sun, 15 Jan 2017 09:27:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (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 0AD2A1352; Sun, 15 Jan 2017 09:27:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id 75so2685135pgf.3; Sun, 15 Jan 2017 01:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Zc2GZr3Rs2G0Qn1KGS3hK3rAcC6oC6MqxnZsRVtoBMc=; b=Xs8uxwjo0ZbceIxl/SM13JaY2hNvFwqYB9mTHrKI/HeVotCDTrCxPdclTv63oYdJdw L6bb3ZUAHidT+08ysKDtYOpRqa6fSWwY7jSEwyJ6bhEOX4XG/IUbJfN53IkKFW02JQdC UxWFrTlH3Cm8GoNB0B+RpoCZl/r0kRtJ1JKMAQpsGVry5VkZpyeWayA7ABx597W2KjzA 1qXuRGX4uiQIrN3ZS0c6dHmY4wRm8DQ7zaIbSWFeFCOeE/Y1F9Qm729UBHXvHbieuUko r3NSK+uXtUtEKEXD6xZa6z/11xS4R92ptK2MQ8InXVqkMVsF+YU4K3l+ZiomU2F+yL/R lX3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Zc2GZr3Rs2G0Qn1KGS3hK3rAcC6oC6MqxnZsRVtoBMc=; b=KvTJvqXwIuDxX11pYUZFFY5A+yNpk9zPlIVwIypPT91OpAwq7dcVFbEM9mK0b09rXp h7JXbP+POpf9/lMsyAi/1yVl3Cj3/6q7JWFuHcTSU8cZ9LhPRXnsy1uZdtJtI89gV8lp HulL3be/YVNeLhsxfzxhYtktOYY/9h6//uDjXImhP8E+Fwad8fieLFYzLoYAQlKs8mAh +nf+otJeqCysTDP95en8wYU//3QJlu8dZ2WxJLmA7DmSl19mWLVOhPR5vkvBO0zg0DKS vJiFUu7ziBUD78kedwFU4oCO9OE+cmKNA3Po/JveQcgLoC58NMUDpgtGsO4hqnBFqpRS dvNA== X-Gm-Message-State: AIkVDXKzcEpSqByBBeC03h9RcStJMGwqaVzjtTs1Q4ATrsfRp2rc+5qo2Hp5jCW8UrIbaw== X-Received: by 10.84.175.234 with SMTP id t97mr41816187plb.145.1484472438571; Sun, 15 Jan 2017 01:27:18 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id l12sm32092758pfj.37.2017.01.15.01.27.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Jan 2017 01:27:17 -0800 (PST) Subject: Re: svn commit: r312216 - in head: sys/kern tests/sys/kern/acct Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8F75F5C7-AB4E-4939-B79E-FA4F86D95E53"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701150925.v0F9PXW8069572@repo.freebsd.org> Date: Sun, 15 Jan 2017 01:27:17 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <19F1D533-CF60-4541-B7C4-20D8C7D65583@gmail.com> References: <201701150925.v0F9PXW8069572@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) 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: Sun, 15 Jan 2017 09:27:19 -0000 --Apple-Mail=_8F75F5C7-AB4E-4939-B79E-FA4F86D95E53 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 15, 2017, at 01:25, Ngie Cooper wrote: > > Author: ngie > Date: Sun Jan 15 09:25:33 2017 > New Revision: 312216 > URL: https://svnweb.freebsd.org/changeset/base/312216 > > Log: > Revert r312119 and reword the intent to fix -Wshadow issues *rework. Bah... --Apple-Mail=_8F75F5C7-AB4E-4939-B79E-FA4F86D95E53 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYe0B1AAoJEPWDqSZpMIYVLH0P/3TE7N7gGBpZQJlVp+fwJTZF wlF2Af+fNCMtanxqG5eyyZKRxQ+CG7ZpOiUASp8t2GCQUKtswCBwriGO9WluJzp2 39N8Z0Jvu6RnRIeH++qrLEkaZYxnPMsEAWDdtkq9pSQrehc2HFeixDSUFy6RFklR FRGMMzNpMonjL9RUWi085oc+CR+Us/lvH9kVploOxyMUFrYM5R7l4GG1HGbryGQs YPR4ZCAUykoCub9TclP0smlDweED30X+LWpupgW2D1M3GBPvSQzDjolU5HWwrvlJ +PXPCM+oBpV1/DgXiAPgZjwsxLKYkf2d2mpNIWOaEbj2Inth4J5U3FGmb3DdDo/a Hmv1gialnbasGT3rupWEnxYALacJGsaL5q5Hfzp5a20tlAuKcxWKhhTPEqSr2wP4 BDBHt3Fqqjm/c7QZKKFKnuL5IlP9ynty15fDn7JLhvWHJ/A+/kuia/qJz48bF7IC n2/inRVVjDJEAnPBJvAQmtnar/SFq2THB+nIZvFFl8gGiiG/Kq9HmrGM7ShWwPEf oxCApPIFwVL/YVVV7qeqnbuKFDGymxbW8ZeCYGtn/Z8dn881q7mL7Wgtj8cWbu0F Q7eMI6PRVfrE2YntB49mvVA6rI7uESBzfdf3FyPZXq/p4T8cd7AyiqsUZZ5CJbyd VoYdT/DRadfDOScZlDtk =pgwb -----END PGP SIGNATURE----- --Apple-Mail=_8F75F5C7-AB4E-4939-B79E-FA4F86D95E53-- From owner-svn-src-head@freebsd.org Sun Jan 15 09:31:15 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 D5358CA42B8; Sun, 15 Jan 2017 09:31:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84AF515D3; Sun, 15 Jan 2017 09:31:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F9VEmm069813; Sun, 15 Jan 2017 09:31:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0F9VEML069812; Sun, 15 Jan 2017 09:31:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701150931.v0F9VEML069812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 15 Jan 2017 09:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312217 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 09:31:15 -0000 Author: ngie Date: Sun Jan 15 09:31:14 2017 New Revision: 312217 URL: https://svnweb.freebsd.org/changeset/base/312217 Log: Delete svn mergeinfo for r312193 so I can once again sync ^/projects/netbsd-tests-upstream-01-2017 with ^/head Modified: Directory Properties: head/ (props changed) From owner-svn-src-head@freebsd.org Sun Jan 15 09:45:26 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 CB0FBCA47E4; Sun, 15 Jan 2017 09:45:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8ACF710C8; Sun, 15 Jan 2017 09:45:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 9F09542642B; Sun, 15 Jan 2017 20:45:16 +1100 (AEDT) Date: Sun, 15 Jan 2017 20:45:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312216 - in head: sys/kern tests/sys/kern/acct In-Reply-To: <201701150925.v0F9PXW8069572@repo.freebsd.org> Message-ID: <20170115202828.R10440@besplex.bde.org> References: <201701150925.v0F9PXW8069572@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=t9cvuGNOZBUpZTa2tFkA:9 a=CjuIK1q_8ugA:10 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: Sun, 15 Jan 2017 09:45:26 -0000 On Sun, 15 Jan 2017, Ngie Cooper wrote: > Log: > Revert r312119 and reword the intent to fix -Wshadow issues > between exp(3) and `exp` var. > > The approach taken previously was not ideal for multiple > functional and stylistic reasons. > > Add to existing sed call in Makefile to replace `exp` with > `exponent` instead. Thanks. > Modified: head/tests/sys/kern/acct/Makefile > ============================================================================== > --- head/tests/sys/kern/acct/Makefile Sun Jan 15 09:13:41 2017 (r312215) > +++ head/tests/sys/kern/acct/Makefile Sun Jan 15 09:25:33 2017 (r312216) > @@ -13,6 +13,7 @@ acct_test.o: convert.c > > convert.c: ${SRCTOP}/sys/kern/kern_acct.c > sed -n -e 's/log(/syslog(/g' \ > + -e 's/exp/expected/g' \ > -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp > mv ${.TARGET}.tmp ${.TARGET} Er, 'expected' is an unexpected spelling of 'exponent'.'. 'syslog' is a little dangerous too. log(9) is declared in systm.h and this renames it to syslog(9). syslog(3) is declared in syslog.h. The functions have the same API, but that is not enough for safety. Currently the result is a redeclaration that -Wredundant-decls should complain about. But any magic like the API being implemented as a macro would cause problems. Bruce From owner-svn-src-head@freebsd.org Sun Jan 15 10:21:26 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 C912ECA5936; Sun, 15 Jan 2017 10:21:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCA31831; Sun, 15 Jan 2017 10:21:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FALPld093623; Sun, 15 Jan 2017 10:21:25 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FALPMQ093618; Sun, 15 Jan 2017 10:21:25 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201701151021.v0FALPMQ093618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 15 Jan 2017 10:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312224 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 10:21:26 -0000 Author: kp Date: Sun Jan 15 10:21:25 2017 New Revision: 312224 URL: https://svnweb.freebsd.org/changeset/base/312224 Log: arswitch: Ensure the lock is always held when calling arswitch_modifyreg() arswitch_setled() and a number of _global_setup functions did not acquire the lock before calling arswitch_modifyreg(). With WITNESS enabled this would instantly panic. Discovered on a TPLink-3600: ("panic: mutex arswitch not owned at sys/dev/etherswitch/arswitch/arswitch_reg.c:236") Reviewed by: adrian, kan Differential Revision: https://reviews.freebsd.org/D9187 Modified: head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitch_7240.c head/sys/dev/etherswitch/arswitch/arswitch_8316.c head/sys/dev/etherswitch/arswitch/arswitch_8327.c head/sys/dev/etherswitch/arswitch/arswitch_9340.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch.c Sun Jan 15 10:17:15 2017 (r312223) +++ head/sys/dev/etherswitch/arswitch/arswitch.c Sun Jan 15 10:21:25 2017 (r312224) @@ -845,6 +845,7 @@ static int arswitch_setled(struct arswitch_softc *sc, int phy, int led, int style) { int shift; + int err; if (phy < 0 || phy > sc->numphys) return EINVAL; @@ -852,10 +853,15 @@ arswitch_setled(struct arswitch_softc *s if (style < 0 || style > ETHERSWITCH_PORT_LED_MAX) return (EINVAL); + ARSWITCH_LOCK(sc); + shift = ar8327_led_mapping[phy][led].shift; - return (arswitch_modifyreg(sc->sc_dev, + err = (arswitch_modifyreg(sc->sc_dev, ar8327_led_mapping[phy][led].reg, 0x03 << shift, led_pattern_table[style] << shift)); + ARSWITCH_UNLOCK(sc); + + return (err); } static void Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sun Jan 15 10:17:15 2017 (r312223) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sun Jan 15 10:21:25 2017 (r312224) @@ -81,6 +81,8 @@ static int ar7240_hw_global_setup(struct arswitch_softc *sc) { + ARSWITCH_LOCK(sc); + /* Enable CPU port; disable mirror port */ arswitch_writereg(sc->sc_dev, AR8X16_REG_CPU_PORT, AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS); @@ -103,6 +105,8 @@ ar7240_hw_global_setup(struct arswitch_s arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG, AR8X16_SERVICE_TAG_MASK, 0); + ARSWITCH_UNLOCK(sc); + return (0); } Modified: head/sys/dev/etherswitch/arswitch/arswitch_8316.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8316.c Sun Jan 15 10:17:15 2017 (r312223) +++ head/sys/dev/etherswitch/arswitch/arswitch_8316.c Sun Jan 15 10:21:25 2017 (r312224) @@ -127,6 +127,8 @@ static int ar8316_hw_global_setup(struct arswitch_softc *sc) { + ARSWITCH_LOCK(sc); + arswitch_writereg(sc->sc_dev, 0x38, AR8X16_MAGIC); /* Enable CPU port and disable mirror port. */ @@ -156,6 +158,7 @@ ar8316_hw_global_setup(struct arswitch_s arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG, AR8X16_SERVICE_TAG_MASK, 0); + ARSWITCH_UNLOCK(sc); return (0); } Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Jan 15 10:17:15 2017 (r312223) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Jan 15 10:21:25 2017 (r312224) @@ -708,6 +708,8 @@ ar8327_hw_global_setup(struct arswitch_s { uint32_t t; + ARSWITCH_LOCK(sc); + /* enable CPU port and disable mirror port */ t = AR8327_FWD_CTRL0_CPU_PORT_EN | AR8327_FWD_CTRL0_MIRROR_PORT; @@ -741,6 +743,7 @@ ar8327_hw_global_setup(struct arswitch_s /* GMAC0 (CPU), GMAC1..5 (PHYs), GMAC6 (CPU) */ sc->info.es_nports = 7; + ARSWITCH_UNLOCK(sc); return (0); } Modified: head/sys/dev/etherswitch/arswitch/arswitch_9340.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_9340.c Sun Jan 15 10:17:15 2017 (r312223) +++ head/sys/dev/etherswitch/arswitch/arswitch_9340.c Sun Jan 15 10:21:25 2017 (r312224) @@ -81,6 +81,8 @@ static int ar9340_hw_global_setup(struct arswitch_softc *sc) { + ARSWITCH_LOCK(sc); + /* Enable CPU port; disable mirror port */ arswitch_writereg(sc->sc_dev, AR8X16_REG_CPU_PORT, AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS); @@ -142,6 +144,7 @@ ar9340_hw_global_setup(struct arswitch_s } else { device_printf(sc->sc_dev, "%s: need is_gmii or is_mii set\n", __func__); + ARSWITCH_UNLOCK(sc); return (ENXIO); } @@ -163,6 +166,7 @@ ar9340_hw_global_setup(struct arswitch_s /* Settle time */ DELAY(1000); + ARSWITCH_UNLOCK(sc); return (0); } From owner-svn-src-head@freebsd.org Sun Jan 15 10:29:54 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 E5F4FCA5BA1; Sun, 15 Jan 2017 10:29:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A815C1D21; Sun, 15 Jan 2017 10:29:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FATrx8094877; Sun, 15 Jan 2017 10:29:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FATrQM094876; Sun, 15 Jan 2017 10:29:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701151029.v0FATrQM094876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 15 Jan 2017 10:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312226 - head/tests/sys/kern/acct X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 10:29:55 -0000 Author: ngie Date: Sun Jan 15 10:29:53 2017 New Revision: 312226 URL: https://svnweb.freebsd.org/changeset/base/312226 Log: Fix typo in r312216 I meant to replace "exp" with "exponent", not "expected" MFC after: 13 days Pointyhat to: ngie Submitted by: bde Modified: head/tests/sys/kern/acct/Makefile Modified: head/tests/sys/kern/acct/Makefile ============================================================================== --- head/tests/sys/kern/acct/Makefile Sun Jan 15 10:24:45 2017 (r312225) +++ head/tests/sys/kern/acct/Makefile Sun Jan 15 10:29:53 2017 (r312226) @@ -13,7 +13,7 @@ acct_test.o: convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ - -e 's/exp/expected/g' \ + -e 's/exp/exponent/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-head@freebsd.org Sun Jan 15 12:24:24 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 B07FACAE114; Sun, 15 Jan 2017 12:24:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68D8F1B07; Sun, 15 Jan 2017 12:24:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FCONaL044455; Sun, 15 Jan 2017 12:24:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FCONoQ044454; Sun, 15 Jan 2017 12:24:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701151224.v0FCONoQ044454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Jan 2017 12:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312228 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 12:24:24 -0000 Author: mav Date: Sun Jan 15 12:24:23 2017 New Revision: 312228 URL: https://svnweb.freebsd.org/changeset/base/312228 Log: Make `camcontrol cmd ... -i ...` return only valid bytes. Previously code ignored resid field and returned extra zeroes in case of data underflow. Now it returns only real bytes received from target. MFC after: 2 weeks Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Jan 15 10:33:52 2017 (r312227) +++ head/sbin/camcontrol/camcontrol.c Sun Jan 15 12:24:23 2017 (r312228) @@ -4150,7 +4150,7 @@ scsicmd(struct cam_device *device, int a u_int8_t cdb[20]; u_int8_t atacmd[12]; struct get_hook hook; - int c, data_bytes = 0; + int c, data_bytes = 0, valid_bytes; int cdb_len = 0; int atacmd_len = 0; int dmacmd = 0; @@ -4454,16 +4454,20 @@ scsicmd(struct cam_device *device, int a } } + if (cdb_len) + valid_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + else + valid_bytes = ccb->ataio.dxfer_len - ccb->ataio.resid; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) && (arglist & CAM_ARG_CMD_IN) - && (data_bytes > 0)) { + && (valid_bytes > 0)) { if (fd_data == 0) { - buff_decode_visit(data_ptr, data_bytes, datastr, + buff_decode_visit(data_ptr, valid_bytes, datastr, arg_put, NULL); fprintf(stdout, "\n"); } else { ssize_t amt_written; - int amt_to_write = data_bytes; + int amt_to_write = valid_bytes; u_int8_t *buf_ptr = data_ptr; for (amt_written = 0; (amt_to_write > 0) && @@ -4478,7 +4482,7 @@ scsicmd(struct cam_device *device, int a } else if ((amt_written == 0) && (amt_to_write > 0)) { warnx("only wrote %u bytes out of %u", - data_bytes - amt_to_write, data_bytes); + valid_bytes - amt_to_write, valid_bytes); } } } From owner-svn-src-head@freebsd.org Sun Jan 15 13:40:16 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 232C0CB1C4C; Sun, 15 Jan 2017 13:40:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E467818D5; Sun, 15 Jan 2017 13:40:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FDeFWR073446; Sun, 15 Jan 2017 13:40:15 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FDeFdG073445; Sun, 15 Jan 2017 13:40:15 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201701151340.v0FDeFdG073445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 15 Jan 2017 13:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312230 - head/share/skel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 13:40:16 -0000 Author: jilles Date: Sun Jan 15 13:40:14 2017 New Revision: 312230 URL: https://svnweb.freebsd.org/changeset/base/312230 Log: skel: Do not set -o emacs in .shrc. sh has defaulted to 'set -o emacs' since FreeBSD 9.0. Therefore, do not set this again in .shrc, since that only serves to prevent invocations like 'sh -o vi' and 'sh +o emacs' to have the intended effect. PR: 215958 Submitted by: Andras Farkas MFC after: 1 week Modified: head/share/skel/dot.shrc Modified: head/share/skel/dot.shrc ============================================================================== --- head/share/skel/dot.shrc Sun Jan 15 12:58:14 2017 (r312229) +++ head/share/skel/dot.shrc Sun Jan 15 13:40:14 2017 (r312230) @@ -13,10 +13,6 @@ # # umask 022 -# Enable the builtin emacs(1) command line editor in sh(1), -# e.g. C-a -> beginning-of-line. -set -o emacs - # Uncomment this and comment the above to enable the builtin vi(1) command # line editor in sh(1), e.g. ESC to go into visual mode. # set -o vi From owner-svn-src-head@freebsd.org Sun Jan 15 13:51: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 6C222CB11EC; Sun, 15 Jan 2017 13:51:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3E6134D; Sun, 15 Jan 2017 13:51:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FDpiMC080611; Sun, 15 Jan 2017 13:51:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FDpiXV080609; Sun, 15 Jan 2017 13:51:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701151351.v0FDpiXV080609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Jan 2017 13:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312231 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 13:51:45 -0000 Author: mav Date: Sun Jan 15 13:51:44 2017 New Revision: 312231 URL: https://svnweb.freebsd.org/changeset/base/312231 Log: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io(). MFC after: 1 week Modified: head/sys/cam/ctl/ctl_util.c head/sys/cam/ctl/ctl_util.h Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Sun Jan 15 13:40:14 2017 (r312230) +++ head/sys/cam/ctl/ctl_util.c Sun Jan 15 13:51:44 2017 (r312231) @@ -697,7 +697,6 @@ ctl_scsi_free_io(union ctl_io *io) free(io); } -#endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io) { @@ -707,11 +706,10 @@ ctl_scsi_zero_io(union ctl_io *io) return; pool_ref = io->io_hdr.pool; - memset(io, 0, sizeof(*io)); - io->io_hdr.pool = pool_ref; } +#endif /* !_KERNEL */ const char * ctl_scsi_task_string(struct ctl_taskio *taskio) Modified: head/sys/cam/ctl/ctl_util.h ============================================================================== --- head/sys/cam/ctl/ctl_util.h Sun Jan 15 13:40:14 2017 (r312230) +++ head/sys/cam/ctl/ctl_util.h Sun Jan 15 13:51:44 2017 (r312231) @@ -96,8 +96,10 @@ void ctl_scsi_maintenance_in(union ctl_i #ifndef _KERNEL union ctl_io *ctl_scsi_alloc_io(uint32_t initid); void ctl_scsi_free_io(union ctl_io *io); -#endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io); +#else +#define ctl_scsi_zero_io(io) ctl_zero_io(io) +#endif /* !_KERNEL */ const char *ctl_scsi_task_string(struct ctl_taskio *taskio); void ctl_io_sbuf(union ctl_io *io, struct sbuf *sb); void ctl_io_error_sbuf(union ctl_io *io, From owner-svn-src-head@freebsd.org Sun Jan 15 13:57:43 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 BB17BCB134B; Sun, 15 Jan 2017 13:57:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB1C1783; Sun, 15 Jan 2017 13:57:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FDvgBW081871; Sun, 15 Jan 2017 13:57:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FDvg6P081869; Sun, 15 Jan 2017 13:57:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701151357.v0FDvg6P081869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Jan 2017 13:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312232 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 13:57:43 -0000 Author: mav Date: Sun Jan 15 13:57:42 2017 New Revision: 312232 URL: https://svnweb.freebsd.org/changeset/base/312232 Log: Add under-/overrun support to IOCTL and CAM SIM frontends. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_ioctl.c Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Jan 15 13:51:44 2017 (r312231) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Jan 15 13:57:42 2017 (r312232) @@ -304,10 +304,6 @@ cfcs_datamove(union ctl_io *io) int ctl_watermark, cam_watermark; int i, j; - - cam_sg_offset = 0; - cam_sg_start = 0; - ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; /* @@ -330,6 +326,8 @@ cfcs_datamove(union ctl_io *io) cam_sglist = (bus_dma_segment_t *)ccb->csio.data_ptr; cam_sg_count = ccb->csio.sglist_cnt; + cam_sg_start = cam_sg_count; + cam_sg_offset = 0; for (i = 0, len_seen = 0; i < cam_sg_count; i++) { if ((len_seen + cam_sglist[i].ds_len) >= @@ -422,9 +420,20 @@ cfcs_datamove(union ctl_io *io) io->scsiio.ext_data_filled += len_copied; + /* + * Report write underflow as error, since CTL and backends don't + * really support it. + */ + if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + j < ctl_sg_count) { + io->io_hdr.port_status = 43; + } else + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + ccb->csio.resid = ccb->csio.dxfer_len - + io->scsiio.ext_data_filled; ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_REQ_CMP; xpt_done(ccb); @@ -453,6 +462,10 @@ cfcs_done(union ctl_io *io) /* * Translate CTL status to CAM status. */ + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { + ccb->csio.resid = ccb->csio.dxfer_len - + io->scsiio.ext_data_filled; + } ccb->ccb_h.status &= ~CAM_STATUS_MASK; switch (io->io_hdr.status & CTL_STATUS_MASK) { case CTL_SUCCESS: Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_ioctl.c Sun Jan 15 13:51:44 2017 (r312231) +++ head/sys/cam/ctl/ctl_frontend_ioctl.c Sun Jan 15 13:57:42 2017 (r312232) @@ -143,16 +143,13 @@ ctl_ioctl_do_datamove(struct ctl_scsiio int ext_sglist_malloced; int i, j; - ext_sglist_malloced = 0; - ext_sg_start = 0; - ext_offset = 0; - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove\n")); /* * If this flag is set, fake the data transfer. */ if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { + ext_sglist_malloced = 0; ctsio->ext_data_filled = ctsio->ext_data_len; goto bailout; } @@ -165,7 +162,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio int len_seen; ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); - ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL, M_WAITOK); ext_sglist_malloced = 1; @@ -174,6 +170,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio goto bailout; } ext_sg_entries = ctsio->ext_sg_entries; + ext_sg_start = ext_sg_entries; + ext_offset = 0; len_seen = 0; for (i = 0; i < ext_sg_entries; i++) { if ((len_seen + ext_sglist[i].len) >= @@ -186,6 +184,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio } } else { ext_sglist = &ext_entry; + ext_sglist_malloced = 0; ext_sglist->addr = ctsio->ext_data_ptr; ext_sglist->len = ctsio->ext_data_len; ext_sg_entries = 1; @@ -203,7 +202,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_sg_entries = 1; } - kern_watermark = 0; ext_watermark = ext_offset; len_copied = 0; @@ -274,10 +272,16 @@ ctl_ioctl_do_datamove(struct ctl_scsiio "kern_data_len = %d\n", ctsio->ext_data_len, ctsio->kern_data_len)); + /* + * Report write underflow as error, since CTL and backends don't + * really support it. + */ + if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + j < kern_sg_entries) { + ctsio->io_hdr.port_status = 43; + } - /* XXX KDM set residual?? */ bailout: - if (ext_sglist_malloced != 0) free(ext_sglist, M_CTL); @@ -397,7 +401,7 @@ ctl_ioctl_io(struct cdev *dev, u_long cm struct thread *td) { union ctl_io *io; - void *pool_tmp; + void *pool_tmp, *sc_tmp; int retval = 0; /* @@ -414,8 +418,10 @@ ctl_ioctl_io(struct cdev *dev, u_long cm * spammed by the user's ctl_io. */ pool_tmp = io->io_hdr.pool; + sc_tmp = CTL_SOFTC(io); memcpy(io, (void *)addr, sizeof(*io)); io->io_hdr.pool = pool_tmp; + CTL_SOFTC(io) = sc_tmp; /* * No status yet, so make sure the status is set properly. From owner-svn-src-head@freebsd.org Sun Jan 15 14:45:37 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 5770BCB136A; Sun, 15 Jan 2017 14:45:37 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1827A122B; Sun, 15 Jan 2017 14:45:37 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cSm3n-000DEG-5v; Sun, 15 Jan 2017 17:45:31 +0300 Date: Sun, 15 Jan 2017 17:45:31 +0300 From: Slawa Olhovchenkov To: Julian Elischer Cc: Mark Johnston , Bruce Evans , svn-src-head@freebsd.org, rang@acm.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r311952 - head/sys/ddb Message-ID: <20170115144531.GB58505@zxy.spb.ru> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false 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: Sun, 15 Jan 2017 14:45:37 -0000 On Sun, Jan 15, 2017 at 01:07:58PM +0800, Julian Elischer wrote: > > the old DEC machines had (from memory) ^O which dropped all pending > output. > Not so useful when there is 2MB of network buffers queued up to you, > but very useful on > and asr-33 teletype. Now it useful too, on serial console. ^O processing be present years ago in FreeBSD, but removed at time of tty code rewrite. As I know patch for restore exist, nobody review/commit. From owner-svn-src-head@freebsd.org Sun Jan 15 17:54:07 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 B9625CB14CC; Sun, 15 Jan 2017 17:54:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52A7116DA; Sun, 15 Jan 2017 17:54:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FHs6IU081929; Sun, 15 Jan 2017 17:54:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FHs14W081882; Sun, 15 Jan 2017 17:54:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701151754.v0FHs14W081882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 15 Jan 2017 17:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312234 - in head: sbin/camcontrol share/man/man4 share/man/man9 sys/arm/arm sys/arm/freescale/imx sys/arm/mv sys/cam sys/dev/bhnd sys/dev/fdt sys/dev/isp sys/dev/mmc sys/dev/mpt sys/de... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 17:54:07 -0000 Author: cem Date: Sun Jan 15 17:54:01 2017 New Revision: 312234 URL: https://svnweb.freebsd.org/changeset/base/312234 Log: "Buses" is the preferred plural of "bus" Replace archaic "busses" with modern form "buses." Intentionally excluded: * Old/random drivers I didn't recognize * Old hardware in general * Use of "busses" in code as identifiers No functional change. http://grammarist.com/spelling/buses-busses/ PR: 216099 Reported by: bltsrc at mail.ru Sponsored by: Dell EMC Isilon Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/share/man/man4/ehci.4 head/share/man/man4/iicbus.4 head/share/man/man4/scsi.4 head/share/man/man9/BUS_CONFIG_INTR.9 head/share/man/man9/DEVICE_ATTACH.9 head/share/man/man9/DEVICE_IDENTIFY.9 head/share/man/man9/DRIVER_MODULE.9 head/share/man/man9/bus_generic_attach.9 head/share/man/man9/bus_generic_detach.9 head/share/man/man9/bus_generic_new_pass.9 head/share/man/man9/bus_generic_print_child.9 head/share/man/man9/bus_generic_read_ivar.9 head/share/man/man9/bus_generic_shutdown.9 head/share/man/man9/bus_space.9 head/share/man/man9/device.9 head/share/man/man9/device_add_child.9 head/share/man/man9/pci.9 head/sys/arm/arm/ofw_machdep.c head/sys/arm/freescale/imx/imx6_ccm.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_i2c.c head/sys/arm/mv/mv_pci.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h head/sys/dev/bhnd/bhnd.h head/sys/dev/fdt/simplebus.c head/sys/dev/isp/isp.c head/sys/dev/mmc/mmcreg.h head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_raid.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_private.h head/sys/dev/pci/pci_subr.c head/sys/dev/usb/usb_hub.c head/sys/kern/bus_if.m head/sys/kern/sched_ule.c head/sys/kern/subr_bus.c head/sys/sys/bus.h head/sys/x86/pci/pci_bus.c head/sys/x86/x86/mptable.c head/sys/x86/x86/nexus.c head/sys/xen/xenbus/xenbusb.c head/sys/xen/xenbus/xenbusb.h head/usr.sbin/mptutil/mpt_cam.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Jan 15 15:43:19 2017 (r312233) +++ head/sbin/camcontrol/camcontrol.8 Sun Jan 15 17:54:01 2017 (r312234) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2017 +.Dd January 15, 2017 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -565,12 +565,12 @@ start bit set and the load/eject bit set Send the SCSI Start/Stop Unit (0x1B) command to the given device with the start bit cleared and the load/eject bit set. .It Ic rescan -Tell the kernel to scan all busses in the system (with the +Tell the kernel to scan all buses in the system (with the .Ar all argument), the given bus (XPT_SCAN_BUS), or bus:target:lun (XPT_SCAN_LUN) for new devices or devices that have gone away. The user -may specify a scan of all busses, a single bus, or a lun. +may specify a scan of all buses, a single bus, or a lun. Scanning all luns on a target is not supported. .It Ic reprobe @@ -580,7 +580,7 @@ notify the upper layer, This includes sending the SCSI READ CAPACITY command and updating the disk size visible to the rest of the system. .It Ic reset -Tell the kernel to reset all busses in the system (with the +Tell the kernel to reset all buses in the system (with the .Ar all argument) or the given bus (XPT_RESET_BUS) by issuing a SCSI bus reset for that bus, or to reset the given bus:target:lun @@ -2557,7 +2557,7 @@ write reallocation settings, among other .Pp .Dl camcontrol rescan all .Pp -Rescan all SCSI busses in the system for devices that have been added, +Rescan all SCSI buses in the system for devices that have been added, removed or changed. .Pp .Dl camcontrol rescan 0 Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sbin/camcontrol/camcontrol.c Sun Jan 15 17:54:01 2017 (r312234) @@ -3179,8 +3179,8 @@ rescan_or_reset_bus(path_id_t bus, int r /* * The right way to handle this is to modify the xpt so that it can * handle a wildcarded bus in a rescan or reset CCB. At the moment - * that isn't implemented, so instead we enumerate the busses and - * send the rescan or reset to those busses in the case where the + * that isn't implemented, so instead we enumerate the buses and + * send the rescan or reset to those buses in the case where the * given bus is -1 (wildcard). We don't send a rescan or reset * to the xpt bus; sending a rescan to the xpt bus is effectively a * no-op, sending a rescan to the xpt bus would result in a status of @@ -8954,8 +8954,8 @@ usage(int printlong) "load send a Start Unit command to the device with the load bit set\n" "eject send a Stop Unit command to the device with the eject bit set\n" "reprobe update capacity information of the given device\n" -"rescan rescan all busses, the given bus, or bus:target:lun\n" -"reset reset all busses, the given bus, or bus:target:lun\n" +"rescan rescan all buses, the given bus, or bus:target:lun\n" +"reset reset all buses, the given bus, or bus:target:lun\n" "defects read the defect list of the specified device\n" "modepage display or edit (-e) the given mode page\n" "cmd send the given SCSI command, may need -i or -o as well\n" Modified: head/share/man/man4/ehci.4 ============================================================================== --- head/share/man/man4/ehci.4 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man4/ehci.4 Sun Jan 15 17:54:01 2017 (r312234) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2012 +.Dd January 15, 2017 .Dt EHCI 4 .Os .Sh NAME @@ -68,7 +68,7 @@ but can be noticed since 1.x and .Tn USB 2.0 devices plugged in to the same -connector appear to connect to different USB busses. +connector appear to connect to different USB buses. .Sh SEE ALSO .Xr ohci 4 , .Xr uhci 4 , Modified: head/share/man/man4/iicbus.4 ============================================================================== --- head/share/man/man4/iicbus.4 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man4/iicbus.4 Sun Jan 15 17:54:01 2017 (r312234) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 2014 +.Dd January 15, 2017 .Dt IICBUS 4 .Os .Sh NAME @@ -112,11 +112,11 @@ different speed. A general purpose I2C bus, such as those found in many embedded systems, will often support multiple bus frequencies. .Pp -When a system supports multiple I2C busses, a different frequency can +When a system supports multiple I2C buses, a different frequency can be configured for each bus by number, represented by the .Va %d in the variable names below. -Busses can be configured using any combination of device hints, +Buses can be configured using any combination of device hints, Flattened Device Tree (FDT) data, tunables set via .Xr loader 8 , or at runtime using Modified: head/share/man/man4/scsi.4 ============================================================================== --- head/share/man/man4/scsi.4 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man4/scsi.4 Sun Jan 15 17:54:01 2017 (r312234) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 7, 2012 +.Dd January 15, 2017 .Dt CAM 4 .Os .Sh NAME @@ -62,7 +62,7 @@ devices, and to utilize different and .Tn ATA host adapters through host adapter drivers. -When the system probes busses, it attaches any devices it finds to the +When the system probes buses, it attaches any devices it finds to the appropriate drivers. The .Xr pass 4 @@ -150,7 +150,7 @@ In that case, the will be reset to 100ms. .El .Pp -All devices and busses support dynamic allocation so that +All devices and buses support dynamic allocation so that an upper number of devices and controllers does not need to be configured; .Cd "device da" will suffice for any number of disk drivers. @@ -297,7 +297,7 @@ see printfs for multiple debugging level This allows to set the various debugging flags from a kernel config file. .It Dv CAM_DEBUG_BUS Specify a bus to debug. -To debug all busses, set this to -1. +To debug all buses, set this to -1. .It Dv CAM_DEBUG_TARGET Specify a target to debug. To debug all targets, set this to -1. Modified: head/share/man/man9/BUS_CONFIG_INTR.9 ============================================================================== --- head/share/man/man9/BUS_CONFIG_INTR.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/BUS_CONFIG_INTR.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2005 +.Dd January 15, 2017 .Dt BUS_CONFIG_INTR 9 .Os .\" @@ -45,7 +45,7 @@ The .Fn BUS_CONFIG_INTR method allows bus or device drivers to provide interrupt polarity and trigger -mode to parent busses. +mode to parent buses. This typically bubbles all the way up to the root bus (e.g.\& nexus) where the necessary actions are taken to actually program the hardware. Since the Modified: head/share/man/man9/DEVICE_ATTACH.9 ============================================================================== --- head/share/man/man9/DEVICE_ATTACH.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/DEVICE_ATTACH.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2005 +.Dd January 15, 2017 .Dt DEVICE_ATTACH 9 .Os .Sh NAME @@ -51,7 +51,7 @@ system resources (such as .Xr devfs 5 entries). .Pp -Devices which implement busses should use this method to probe for +Devices which implement buses should use this method to probe for the existence of devices attached to the bus and add them as children. If this is combined with the use of Modified: head/share/man/man9/DEVICE_IDENTIFY.9 ============================================================================== --- head/share/man/man9/DEVICE_IDENTIFY.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/DEVICE_IDENTIFY.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2004 +.Dd January 15, 2017 .Dt DEVICE_IDENTIFY 9 .Os .Sh NAME @@ -40,7 +40,7 @@ .Ft void .Fn DEVICE_IDENTIFY "driver_t *driver" "device_t parent" .Sh DESCRIPTION -The identify function for a device is only needed for devices on busses +The identify function for a device is only needed for devices on buses that cannot identify their children independently, e.g.\& the ISA bus. It is used to recognize the device (usually done by accessing non-ambiguous registers in the hardware) and to tell the kernel about it and thus Modified: head/share/man/man9/DRIVER_MODULE.9 ============================================================================== --- head/share/man/man9/DRIVER_MODULE.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/DRIVER_MODULE.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2012 +.Dd January 15, 2017 .Dt DRIVER_MODULE 9 .Os .Sh NAME @@ -69,9 +69,9 @@ or The identifier used in .Fn DRIVER_MODULE can be different from the driver name. -Also, the same driver identifier can exist on different busses, +Also, the same driver identifier can exist on different buses, which is a pretty clean way of making front ends for different cards -using the same driver on the same or different busses. +using the same driver on the same or different buses. For example, the following is allowed: .Pp .Fn DRIVER_MODULE foo isa foo_driver foo_devclass NULL NULL ; Modified: head/share/man/man9/bus_generic_attach.9 ============================================================================== --- head/share/man/man9/bus_generic_attach.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_attach.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,14 +28,14 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt BUS_GENERIC_ATTACH 9 .Os .Sh NAME .Nm bus_generic_attach .Nd generic implementation of .Dv DEVICE_ATTACH -for busses +for buses .Sh SYNOPSIS .In sys/param.h .In sys/bus.h Modified: head/share/man/man9/bus_generic_detach.9 ============================================================================== --- head/share/man/man9/bus_generic_detach.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_detach.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,14 +28,14 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt BUS_GENERIC_DETACH 9 .Os .Sh NAME .Nm bus_generic_detach .Nd generic implementation of .Dv DEVICE_DETACH -for busses +for buses .Sh SYNOPSIS .In sys/param.h .In sys/bus.h Modified: head/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- head/share/man/man9/bus_generic_new_pass.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_new_pass.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2009 +.Dd January 15, 2017 .Dt BUS_GENERIC_NEW_PASS 9 .Os .Sh NAME @@ -47,7 +47,7 @@ It first invokes the method for any drivers whose pass level is equal to the new pass level. Then, for each attached child device it calls .Xr BUS_NEW_PASS 9 -to rescan child busses, +to rescan child buses, and for each unattached child device it calls .Xr device_probe_and_attach 9 . .Sh SEE ALSO Modified: head/share/man/man9/bus_generic_print_child.9 ============================================================================== --- head/share/man/man9/bus_generic_print_child.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_print_child.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,14 +28,14 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt BUS_GENERIC_PRINT_CHILD 9 .Os .Sh NAME .Nm bus_generic_print_child .Nd generic implementation of .Dv DEVICE_PRINT_CHILD -for busses +for buses .Sh SYNOPSIS .In sys/param.h .In sys/bus.h Modified: head/share/man/man9/bus_generic_read_ivar.9 ============================================================================== --- head/share/man/man9/bus_generic_read_ivar.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_read_ivar.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt BUS_GENERIC_READ_IVAR 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .Dv BUS_READ_IVAR and .Dv BUS_WRITE_IVAR -for busses +for buses .Sh SYNOPSIS .In sys/param.h .In sys/bus.h Modified: head/share/man/man9/bus_generic_shutdown.9 ============================================================================== --- head/share/man/man9/bus_generic_shutdown.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_generic_shutdown.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,14 +28,14 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt BUS_GENERIC_SHUTDOWN 9 .Os .Sh NAME .Nm bus_generic_shutdown .Nd generic implementation of .Dv DEVICE_SHUTDOWN -for busses +for buses .Sh SYNOPSIS .In sys/param.h .In sys/bus.h Modified: head/share/man/man9/bus_space.9 ============================================================================== --- head/share/man/man9/bus_space.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/bus_space.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -51,7 +51,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2005 +.Dd January 15, 2017 .Dt BUS_SPACE 9 .Os .Sh NAME @@ -601,7 +601,7 @@ of devices on different system architect object file to manipulate a set of devices on multiple bus types on a single architecture. .Pp -Not all busses have to implement all functions described in this +Not all buses have to implement all functions described in this document, though that is encouraged if the operations are logically supported by the bus. Unimplemented functions should cause @@ -625,7 +625,7 @@ machine-dependent code. A given machine may have several different types of bus space (e.g.\& memory space and I/O space), and thus may provide multiple different bus space tags. -Individual busses or devices on a machine may use more than one bus space +Individual buses or devices on a machine may use more than one bus space tag. For instance, ISA devices are given an ISA memory space tag and an ISA I/O space tag. @@ -639,7 +639,7 @@ The bus address describes the start of the range in bus space. The bus size describes the size of the range in bytes. -Busses which are not byte +Buses which are not byte addressable may require use of bus space ranges with appropriately aligned addresses and properly rounded sizes. .Pp @@ -656,7 +656,7 @@ argument, at least one handle argument, The bus space tag specifies the space, each handle specifies a region in the space, and each offset specifies the offset into the region of the actual location(s) to be accessed. -Offsets are given in bytes, though busses +Offsets are given in bytes, though buses may impose alignment constraints. The offset used to access data relative to a given handle must be such that all of the data being @@ -1049,7 +1049,7 @@ The and .Fn bus_space_write_N families of functions provide -the ability to read and write 1, 2, 4, and 8 byte data items on busses +the ability to read and write 1, 2, 4, and 8 byte data items on buses which support those access sizes. .Ss Fn bus_space_read_1 space handle offset .Ss Fn bus_space_read_2 space handle offset Modified: head/share/man/man9/device.9 ============================================================================== --- head/share/man/man9/device.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/device.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd January 15, 2017 .Dt DEVICE 9 .Os .Sh NAME @@ -44,7 +44,7 @@ The system defines one device, .Va root_bus and all other devices are created dynamically during autoconfiguration. -Normally devices representing top-level busses in +Normally devices representing top-level buses in the system (ISA, PCI etc.) will be attached directly to .Va root_bus and other devices will be added as children of their relevant bus. Modified: head/share/man/man9/device_add_child.9 ============================================================================== --- head/share/man/man9/device_add_child.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/device_add_child.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 28, 2015 +.Dd January 15, 2017 .Dt DEVICE_ADD_CHILD 9 .Os .Sh NAME @@ -63,10 +63,10 @@ If no name is given then all drivers for In any event, only the name of the device is stored so that one may safely unload/load a driver bound to that name. .Pp -This allows busses which can uniquely identify device instances (such +This allows buses which can uniquely identify device instances (such as PCI) to allow each driver to check each device instance for a match. -For busses which rely on supplied probe hints where only one +For buses which rely on supplied probe hints where only one driver can have a chance of probing the device, the driver name should be specified as the device name. .Pp Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Sun Jan 15 15:43:19 2017 (r312233) +++ head/share/man/man9/pci.9 Sun Jan 15 17:54:01 2017 (r312234) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2016 +.Dd January 15, 2017 .Dt PCI 9 .Os .Sh NAME @@ -583,14 +583,14 @@ full functionality to the user. .It Dv PCI_POWERSTATE_D1 Class-specific low-power state in which device context may or may not be lost. -Busses in this state cannot do anything to the bus, to +Buses in this state cannot do anything to the bus, to force devices to lose context. .It Dv PCI_POWERSTATE_D2 Class-specific low-power state in which device context may or may not be lost. Attains greater power savings than .Dv PCI_POWERSTATE_D1 . -Busses in this state can cause devices to lose some context. +Buses in this state can cause devices to lose some context. Devices .Em must be prepared for the bus to be in this state or higher. Modified: head/sys/arm/arm/ofw_machdep.c ============================================================================== --- head/sys/arm/arm/ofw_machdep.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/arm/arm/ofw_machdep.c Sun Jan 15 17:54:01 2017 (r312234) @@ -50,7 +50,7 @@ OF_decode_addr(phandle_t dev, int regno, return (res); /* - * Nothing special to do for PCI busses right now. + * Nothing special to do for PCI buses right now. * This may need to be handled per-platform when it does come up. */ #ifdef notyet Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/arm/freescale/imx/imx6_ccm.c Sun Jan 15 17:54:01 2017 (r312234) @@ -90,7 +90,7 @@ ccm_init_gates(struct ccm_softc *sc) { uint32_t reg; - /* ahpbdma, aipstz 1 & 2 busses */ + /* ahpbdma, aipstz 1 & 2 buses */ reg = CCGR0_AIPS_TZ1 | CCGR0_AIPS_TZ2 | CCGR0_ABPHDMA; WR4(sc, CCM_CCGR0, reg); Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/arm/freescale/imx/imx6_machdep.c Sun Jan 15 17:54:01 2017 (r312234) @@ -117,7 +117,7 @@ fdt_pic_decode_t fdt_pic_table[] = { * - GIC node exists and is its own interrupt parent. * * This applies to all models of imx6. Luckily all of them have the devices - * involved at the same addresses on the same busses, so we don't need any + * involved at the same addresses on the same buses, so we don't need any * per-soc logic. We handle this at platform attach time rather than via the * fdt_fixup_table, because the latter requires matching on the FDT "model" * property, and this applies to all boards including those not yet invented. Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/arm/freescale/imx/imx_i2c.c Sun Jan 15 17:54:01 2017 (r312234) @@ -35,7 +35,7 @@ * Note that the hardware is capable of running as both a master and a slave. * This driver currently implements only master-mode operations. * - * This driver supports multi-master i2c busses, by detecting bus arbitration + * This driver supports multi-master i2c buses, by detecting bus arbitration * loss and returning IIC_EBUSBSY status. Notably, it does not do any kind of * retries if some other master jumps onto the bus and interrupts one of our * transfer cycles resulting in arbitration loss in mid-transfer. The caller Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/arm/mv/mv_pci.c Sun Jan 15 17:54:01 2017 (r312234) @@ -147,7 +147,7 @@ mv_pci_ranges_decode(phandle_t node, str /* * Initialize the ranges so that we don't have to worry about * having them all defined in the FDT. In particular, it is - * perfectly fine not to want I/O space on PCI busses. + * perfectly fine not to want I/O space on PCI buses. */ bzero(io_space, sizeof(*io_space)); bzero(mem_space, sizeof(*mem_space)); Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/cam/cam_xpt.c Sun Jan 15 17:54:01 2017 (r312234) @@ -106,7 +106,12 @@ struct xpt_softc { int buses_to_config; int buses_config_done; - /* Registered busses */ + /* + * Registered buses + * + * N.B., "busses" is an archaic spelling of "buses". In new code + * "buses" is preferred. + */ TAILQ_HEAD(,cam_eb) xpt_busses; u_int bus_generation; @@ -892,7 +897,7 @@ xpt_init(void *dummy) /* * The xpt layer is, itself, the equivalent of a SIM. * Allow 16 ccbs in the ccb pool for it. This should - * give decent parallelism when we probe busses and + * give decent parallelism when we probe buses and * perform other XPT functions. */ devq = cam_simq_alloc(16); @@ -1627,7 +1632,7 @@ xptedtbusfunc(struct cam_eb *bus, void * } /* - * If the user is only interested in busses, there's no + * If the user is only interested in buses, there's no * reason to descend to the next level in the tree. */ if ((retval & DM_RET_ACTION_MASK) == DM_RET_STOP) @@ -2070,7 +2075,7 @@ xptperiphlistmatch(struct ccb_dev_match /* * At this point in the edt traversal function, we check the bus - * list generation to make sure that no busses have been added or + * list generation to make sure that no buses have been added or * removed since the user last sent a XPT_DEV_MATCH ccb through. * For the peripheral driver list traversal function, however, we * don't have to worry about new peripheral driver types coming or @@ -2816,7 +2821,7 @@ call_sim: /* * There are two ways of getting at information in the EDT. * The first way is via the primary EDT tree. It starts - * with a list of busses, then a list of targets on a bus, + * with a list of buses, then a list of targets on a bus, * then devices/luns on a target, and then peripherals on a * device/lun. The "other" way is by the peripheral driver * lists. The peripheral driver lists are organized by @@ -3356,7 +3361,7 @@ xpt_run_devq(struct cam_devq *devq) /* * Device queues can be shared among multiple SIM instances - * that reside on different busses. Use the SIM from the + * that reside on different buses. Use the SIM from the * queued device, rather than the one from the calling bus. */ sim = device->sim; @@ -3865,7 +3870,7 @@ CAM_XPT_XPORT(xport_default); * A sim structure, listing the SIM entry points and instance * identification info is passed to xpt_bus_register to hook the SIM * into the CAM framework. xpt_bus_register creates a cam_eb entry - * for this new bus and places it in the array of busses and assigns + * for this new bus and places it in the array of buses and assigns * it a path_id. The path_id may be influenced by "hard wiring" * information specified by the user. Once interrupt services are * available, the bus will be probed. @@ -5040,7 +5045,7 @@ xpt_release_boot(void) xsoftc.buses_config_done = 1; xpt_unlock_buses(); - /* Call manually because we don't have any busses */ + /* Call manually because we don't have any buses */ task = malloc(sizeof(struct xpt_task), M_CAMXPT, M_NOWAIT); if (task != NULL) { TASK_INIT(&task->task, 0, xpt_finishconfig_task, task); @@ -5138,7 +5143,7 @@ xpt_register_async(int event, ac_callbac (csa.event_enable & AC_PATH_REGISTERED)) { /* * Get this peripheral up to date with all - * the currently existing busses. + * the currently existing buses. */ xpt_for_all_busses(xptsetasyncbusfunc, &csa); } Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/cam/cam_xpt_internal.h Sun Jan 15 17:54:01 2017 (r312234) @@ -88,7 +88,7 @@ SET_DECLARE(cam_xpt_proto_set, struct xp /* * The CAM EDT (Existing Device Table) contains the device information for - * all devices for all busses in the system. The table contains a + * all devices for all buses in the system. The table contains a * cam_ed structure for each device on the bus. */ struct cam_ed { Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/bhnd/bhnd.h Sun Jan 15 17:54:01 2017 (r312234) @@ -77,7 +77,7 @@ enum bhnd_device_vars { */ enum { BHND_PROBE_ROOT = 0, /**< Nexus or host bridge */ - BHND_PROBE_BUS = 1000, /**< Busses and bridges */ + BHND_PROBE_BUS = 1000, /**< Buses and bridges */ BHND_PROBE_CPU = 2000, /**< CPU devices */ BHND_PROBE_INTERRUPT = 3000, /**< Interrupt controllers. */ BHND_PROBE_TIMER = 4000, /**< Timers and clocks. */ Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/fdt/simplebus.c Sun Jan 15 17:54:01 2017 (r312234) @@ -125,7 +125,7 @@ simplebus_probe(device_t dev) /* * FDT data puts a "simple-bus" compatible string on many things that - * have children but aren't really busses in our world. Without a + * have children but aren't really buses in our world. Without a * ranges property we will fail to attach, so just fail to probe too. */ if (!(ofw_bus_is_compatible(dev, "simple-bus") && Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/isp/isp.c Sun Jan 15 17:54:01 2017 (r312234) @@ -4396,7 +4396,7 @@ isp_start(XS_T *xs) /* * Now see if we need to synchronize the ISP with respect to anything. - * We do dual duty here (cough) for synchronizing for busses other + * We do dual duty here (cough) for synchronizing for buses other * than which we got here to send a command to. */ reqp = (ispreq_t *) local; Modified: head/sys/dev/mmc/mmcreg.h ============================================================================== --- head/sys/dev/mmc/mmcreg.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/mmc/mmcreg.h Sun Jan 15 17:54:01 2017 (r312234) @@ -55,7 +55,7 @@ #define DEV_MMC_MMCREG_H /* - * This file contains the register definitions for the mmc and sd busses. + * This file contains the register definitions for the mmc and sd buses. * They are taken from publicly available sources. */ Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/mpt/mpt.c Sun Jan 15 17:54:01 2017 (r312234) @@ -1544,7 +1544,7 @@ mpt_get_portfacts(struct mpt_softc *mpt, /* * Send the initialization request. This is where we specify how many - * SCSI busses and how many devices per bus we wish to emulate. + * SCSI buses and how many devices per bus we wish to emulate. * This is also the command that specifies the max size of the reply * frames from the IOC that we will be allocating. */ @@ -1559,7 +1559,7 @@ mpt_send_ioc_init(struct mpt_softc *mpt, init.WhoInit = who; init.Function = MPI_FUNCTION_IOC_INIT; init.MaxDevices = 0; /* at least 256 devices per bus */ - init.MaxBuses = 16; /* at least 16 busses */ + init.MaxBuses = 16; /* at least 16 buses */ init.MsgVersion = htole16(MPI_VERSION); init.HeaderVersion = htole16(MPI_HEADER_VERSION); Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/mpt/mpt.h Sun Jan 15 17:54:01 2017 (r312234) @@ -809,7 +809,7 @@ mpt_read(struct mpt_softc *mpt, int offs /* * Some operations (e.g. diagnostic register writes while the ARM proccessor * is disabled), must be performed using "PCI pio" operations. On non-PCI - * busses, these operations likely map to normal register accesses. + * buses, these operations likely map to normal register accesses. */ static __inline void mpt_pio_write(struct mpt_softc *mpt, size_t offset, uint32_t val) Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/mpt/mpt_raid.c Sun Jan 15 17:54:01 2017 (r312234) @@ -782,7 +782,7 @@ mpt_raid_quiesce_disk(struct mpt_softc * } #endif -/* XXX Ignores that there may be multiple busses/IOCs involved. */ +/* XXX Ignores that there may be multiple buses/IOCs involved. */ cam_status mpt_map_physdisk(struct mpt_softc *mpt, union ccb *ccb, target_id_t *tgt) { @@ -799,7 +799,7 @@ mpt_map_physdisk(struct mpt_softc *mpt, return (-1); } -/* XXX Ignores that there may be multiple busses/IOCs involved. */ +/* XXX Ignores that there may be multiple buses/IOCs involved. */ int mpt_is_raid_member(struct mpt_softc *mpt, target_id_t tgt) { @@ -818,7 +818,7 @@ mpt_is_raid_member(struct mpt_softc *mpt } -/* XXX Ignores that there may be multiple busses/IOCs involved. */ +/* XXX Ignores that there may be multiple buses/IOCs involved. */ int mpt_is_raid_volume(struct mpt_softc *mpt, target_id_t tgt) { Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/pccbb/pccbb_pci.c Sun Jan 15 17:54:01 2017 (r312234) @@ -351,7 +351,7 @@ cbb_pci_attach(device_t brdev) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can - * reserve 1 extra bus just in case and (2) all sub busses + * reserve 1 extra bus just in case and (2) all sub buses * are in an appropriate range. */ DEVPRINTF((brdev, "Secondary bus is %d\n", sc->bus.sec)); Modified: head/sys/dev/pci/hostb_pci.c ============================================================================== --- head/sys/dev/pci/hostb_pci.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/pci/hostb_pci.c Sun Jan 15 17:54:01 2017 (r312234) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); /* * Provide a device to "eat" the host->pci bridge devices that show up - * on PCI busses and stop them showing up twice on the probes. This also + * on PCI buses and stop them showing up twice on the probes. This also * stops them showing up as 'none' in pciconf -l. If the host bridge * provides an AGP capability then we create a child agp device for the * agp GART driver to attach to. Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/pci/pci.c Sun Jan 15 17:54:01 2017 (r312234) @@ -3095,7 +3095,7 @@ pci_add_map(device_t bus, device_t dev, * If base is 0, then we have problems if this architecture does * not allow that. It is best to ignore such entries for the * moment. These will be allocated later if the driver specifically - * requests them. However, some removable busses look better when + * requests them. However, some removable buses look better when * all resources are allocated, so allow '0' to be overriden. * * Similarly treat maps whose values is the same as the test value @@ -4178,7 +4178,7 @@ pci_attach(device_t dev) /* * Since there can be multiple independently numbered PCI - * busses on systems with multiple PCI domains, we can't use + * buses on systems with multiple PCI domains, we can't use * the unit number to decide which bus we are probing. We ask * the parent pcib what our domain and bus numbers are. */ Modified: head/sys/dev/pci/pci_private.h ============================================================================== --- head/sys/dev/pci/pci_private.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/pci/pci_private.h Sun Jan 15 17:54:01 2017 (r312234) @@ -34,7 +34,7 @@ /* * Export definitions of the pci bus so that we can more easily share - * it with "subclass" busses. + * it with "subclass" buses. */ DECLARE_CLASS(pci_driver); Modified: head/sys/dev/pci/pci_subr.c ============================================================================== --- head/sys/dev/pci/pci_subr.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/pci/pci_subr.c Sun Jan 15 17:54:01 2017 (r312234) @@ -73,7 +73,7 @@ host_pcib_get_busno(pci_read_config_fn r * For the 450nx chipset, there is a whole bundle of * things pretending to be host bridges. The MIOC will * be seen first and isn't really a pci bridge (the - * actual busses are attached to the PXB's). We need to + * actual buses are attached to the PXB's). We need to * read the registers of the MIOC to figure out the * bus numbers for the PXB channels. * Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/dev/usb/usb_hub.c Sun Jan 15 17:54:01 2017 (r312234) @@ -2297,7 +2297,7 @@ usb_needs_explore(struct usb_bus *bus, u * usb_needs_explore_all * * This function is called whenever a new driver is loaded and will - * cause that all USB busses are re-explored. + * cause that all USB buses are re-explored. *------------------------------------------------------------------------*/ void usb_needs_explore_all(void) @@ -2315,7 +2315,7 @@ usb_needs_explore_all(void) return; } /* - * Explore all USB busses in parallel. + * Explore all USB buses in parallel. */ max = devclass_get_maxunit(dc); while (max >= 0) { Modified: head/sys/kern/bus_if.m ============================================================================== --- head/sys/kern/bus_if.m Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/kern/bus_if.m Sun Jan 15 17:54:01 2017 (r312234) @@ -206,7 +206,7 @@ METHOD void driver_added { /** * @brief Create a new child device * - * For busses which use use drivers supporting DEVICE_IDENTIFY() to + * For buses which use use drivers supporting DEVICE_IDENTIFY() to * enumerate their devices, this method is used to create new * device instances. The new device will be added after the last * existing child with the same order. Implementations of bus_add_child @@ -475,7 +475,7 @@ METHOD int teardown_intr { * @brief Define a resource which can be allocated with * BUS_ALLOC_RESOURCE(). * - * This method is used by some busses (typically ISA) to allow a + * This method is used by some buses (typically ISA) to allow a * driver to describe a resource range that it would like to * allocate. The resource defined by @p _type and @p _rid is defined * to start at @p _start and to include @p _count indices in its @@ -562,7 +562,7 @@ METHOD struct resource_list * get_resour * should return -1 if it is present. Any errors in determining * should be returned as a normal errno value. Client drivers are to * assume that the device is present, even if there is an error - * determining if it is there. Busses are to try to avoid returning + * determining if it is there. Buses are to try to avoid returning * errors, but newcard will return an error if the device fails to * implement this method. * Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/kern/sched_ule.c Sun Jan 15 17:54:01 2017 (r312234) @@ -656,7 +656,7 @@ int __noinline cpu_search_both(const str * according to the match argument. This routine actually compares the * load on all paths through the tree and finds the least loaded cpu on * the least loaded path, which may differ from the least loaded cpu in - * the system. This balances work among caches and busses. + * the system. This balances work among caches and buses. * * This inline is instantiated in three forms below using constants for the * match argument. It is reduced to the minimum set for each case. It is Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/kern/subr_bus.c Sun Jan 15 17:54:01 2017 (r312234) @@ -1093,7 +1093,7 @@ devclass_driver_added(devclass_t dc, dri int i; /* - * Call BUS_DRIVER_ADDED for any existing busses in this class. + * Call BUS_DRIVER_ADDED for any existing buses in this class. */ for (i = 0; i < dc->maxunit; i++) if (dc->devices[i] && device_is_attached(dc->devices[i])) @@ -3269,7 +3269,7 @@ resource_list_delete(struct resource_lis /** * @brief Allocate a reserved resource * - * This can be used by busses to force the allocation of resources + * This can be used by buses to force the allocation of resources * that are always active in the system even if they are not allocated * by a driver (e.g. PCI BARs). This function is usually called when * adding a new child to the bus. The resource is allocated from the @@ -3648,7 +3648,7 @@ bus_generic_probe(device_t dev) * only call the identify routines of eligible drivers * when this routine is called. Drivers for later * passes should have their identify routines called - * on early-pass busses during BUS_NEW_PASS(). + * on early-pass buses during BUS_NEW_PASS(). */ if (dl->pass > bus_current_pass) continue; Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/sys/bus.h Sun Jan 15 17:54:01 2017 (r312234) @@ -392,14 +392,14 @@ int resource_list_print_type(struct reso const char *format); /* - * The root bus, to which all top-level busses are attached. + * The root bus, to which all top-level buses are attached. */ extern device_t root_bus; extern devclass_t root_devclass; void root_bus_configure(void); /* - * Useful functions for implementing busses. + * Useful functions for implementing buses. */ int bus_generic_activate_resource(device_t dev, device_t child, int type, @@ -675,7 +675,7 @@ void bus_data_generation_update(void); * supports the newer ones would return BUS_PROBE_DEFAULT. BUS_PROBE_GENERIC * is for drivers that wish to have a generic form and a specialized form, * like is done with the pci bus and the acpi pci bus. BUS_PROBE_HOOVER is - * for those busses that implement a generic device place-holder for devices on + * for those buses that implement a generic device place-holder for devices on * the bus that have no more specific driver for them (aka ugen). * BUS_PROBE_NOWILDCARD or lower means that the device isn't really bidding * for a device node, but accepts only devices that its parent has told it @@ -699,7 +699,7 @@ void bus_data_generation_update(void); * probed in earlier passes. */ #define BUS_PASS_ROOT 0 /* Used to attach root0. */ -#define BUS_PASS_BUS 10 /* Busses and bridges. */ +#define BUS_PASS_BUS 10 /* Buses and bridges. */ #define BUS_PASS_CPU 20 /* CPU devices. */ #define BUS_PASS_RESOURCE 30 /* Resource discovery. */ #define BUS_PASS_INTERRUPT 40 /* Interrupt controllers. */ @@ -734,7 +734,7 @@ struct module; int driver_module_handler(struct module *, int, void *); /** - * Module support for automatically adding drivers to busses. + * Module support for automatically adding drivers to buses. */ struct driver_module_data { int (*dmd_chainevh)(struct module *, int, void *); Modified: head/sys/x86/pci/pci_bus.c ============================================================================== --- head/sys/x86/pci/pci_bus.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/x86/pci/pci_bus.c Sun Jan 15 17:54:01 2017 (r312234) @@ -195,7 +195,7 @@ legacy_pcib_is_host_bridge(int bus, int * For the 450nx chipset, there is a whole bundle of * things pretending to be host bridges. The MIOC will * be seen first and isn't really a pci bridge (the - * actual busses are attached to the PXB's). We need to + * actual buses are attached to the PXB's). We need to * read the registers of the MIOC to figure out the * bus numbers for the PXB channels. * @@ -566,7 +566,7 @@ legacy_pcib_write_ivar(device_t dev, dev * * If no memory preference is given, use upper 32MB slot most BIOSes * use for their memory window. This is typically only used on older - * laptops that don't have PCI busses behind a PCI bridge, so assuming + * laptops that don't have PCI buses behind a PCI bridge, so assuming * > 32MB is likely OK. * * However, this can cause problems for other chipsets, so we make @@ -723,7 +723,7 @@ DRIVER_MODULE(pcibus_pnp, isa, pcibus_pn #ifdef __HAVE_PIR /* - * Provide a PCI-PCI bridge driver for PCI busses behind PCI-PCI bridges + * Provide a PCI-PCI bridge driver for PCI buses behind PCI-PCI bridges * that appear in the PCIBIOS Interrupt Routing Table to use the routing * table for interrupt routing when possible. */ Modified: head/sys/x86/x86/mptable.c ============================================================================== --- head/sys/x86/x86/mptable.c Sun Jan 15 15:43:19 2017 (r312233) +++ head/sys/x86/x86/mptable.c Sun Jan 15 17:54:01 2017 (r312234) @@ -385,7 +385,7 @@ mptable_setup_io(void) for (i = 0; i <= mptable_maxbusid; i++) busses[i].bus_type = NOBUS; - /* Second, we run through adding I/O APIC's and busses. */ + /* Second, we run through adding I/O APIC's and buses. */ mptable_parse_apics_and_busses(); /* Third, we run through the table tweaking interrupt sources. */ @@ -584,7 +584,7 @@ mptable_parse_apics_and_busses_handler(u } /* - * Enumerate I/O APIC's and busses. + * Enumerate I/O APIC's and buses. */ static void mptable_parse_apics_and_busses(void) @@ -988,7 +988,7 @@ mptable_pci_setup(void) /* * Find the first pci bus and call it 0. Panic if pci0 is not - * bus zero and there are multiple PCI busses. + * bus zero and there are multiple PCI buses. */ for (i = 0; i <= mptable_maxbusid; i++) if (busses[i].bus_type == PCI) { @@ -996,7 +996,7 @@ mptable_pci_setup(void) pci0 = i; else if (pci0 != 0) panic( - "MPTable contains multiple PCI busses but no PCI bus 0"); + "MPTable contains multiple PCI buses but no PCI bus 0"); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Jan 15 18:00:48 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 50B69CB1732; Sun, 15 Jan 2017 18:00:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DB351AB5; Sun, 15 Jan 2017 18:00:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FI0lpi082319; Sun, 15 Jan 2017 18:00:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FI0kO7082305; Sun, 15 Jan 2017 18:00:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701151800.v0FI0kO7082305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 15 Jan 2017 18:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312235 - in head/sys: amd64/vmm cam netinet/cc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 18:00:48 -0000 Author: cem Date: Sun Jan 15 18:00:45 2017 New Revision: 312235 URL: https://svnweb.freebsd.org/changeset/base/312235 Log: Fix a variety of cosmetic typos and misspellings No functional change. PR: 216096, 216097, 216098, 216101, 216102, 216106, 216109, 216110 Reported by: Bulat Sponsored by: Dell EMC Isilon Modified: head/sys/amd64/vmm/vmm_host.h head/sys/cam/cam_compat.h head/sys/cam/cam_iosched.h head/sys/netinet/cc/cc.h head/sys/sys/buf_ring.h head/sys/sys/bus.h head/sys/sys/busdma_bufalloc.h head/sys/sys/devmap.h head/sys/sys/eventvar.h head/sys/sys/gtaskqueue.h head/sys/sys/ksem.h head/sys/sys/pipe.h head/sys/sys/sockopt.h head/sys/sys/taskqueue.h Modified: head/sys/amd64/vmm/vmm_host.h ============================================================================== --- head/sys/amd64/vmm/vmm_host.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/amd64/vmm/vmm_host.h Sun Jan 15 18:00:45 2017 (r312235) @@ -30,7 +30,7 @@ #define _VMM_HOST_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif struct xsave_limits { Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/cam/cam_compat.h Sun Jan 15 18:00:45 2017 (r312235) @@ -31,7 +31,7 @@ #ifndef _CAM_CAM_COMPAT_H #define _CAM_CAM_COMPAT_H -/* No user-servicable parts in here. */ +/* No user-serviceable parts in here. */ #ifdef _KERNEL int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, Modified: head/sys/cam/cam_iosched.h ============================================================================== --- head/sys/cam/cam_iosched.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/cam/cam_iosched.h Sun Jan 15 18:00:45 2017 (r312235) @@ -31,7 +31,7 @@ #ifndef _CAM_CAM_IOSCHED_H #define _CAM_CAM_IOSCHED_H -/* No user-servicable parts in here. */ +/* No user-serviceable parts in here. */ #ifdef _KERNEL /* Forward declare all structs to keep interface thin */ Modified: head/sys/netinet/cc/cc.h ============================================================================== --- head/sys/netinet/cc/cc.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/netinet/cc/cc.h Sun Jan 15 18:00:45 2017 (r312235) @@ -52,7 +52,7 @@ #define _NETINET_CC_CC_H_ #if !defined(_KERNEL) -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif /* Global CC vars. */ Modified: head/sys/sys/buf_ring.h ============================================================================== --- head/sys/sys/buf_ring.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/buf_ring.h Sun Jan 15 18:00:45 2017 (r312235) @@ -250,16 +250,16 @@ buf_ring_advance_sc(struct buf_ring *br) /* * Used to return a buffer (most likely already there) - * to the top od the ring. The caller should *not* + * to the top of the ring. The caller should *not* * have used any dequeue to pull it out of the ring * but instead should have used the peek() function. * This is normally used where the transmit queue - * of a driver is full, and an mubf must be returned. + * of a driver is full, and an mbuf must be returned. * Most likely whats in the ring-buffer is what * is being put back (since it was not removed), but * sometimes the lower transmit function may have * done a pullup or other function that will have - * changed it. As an optimzation we always put it + * changed it. As an optimization we always put it * back (since jhb says the store is probably cheaper), * if we have to do a multi-queue version we will need * the compare and an atomic. Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/bus.h Sun Jan 15 18:00:45 2017 (r312235) @@ -662,7 +662,7 @@ void bus_data_generation_update(void); * Some convenience defines for probe routines to return. These are just * suggested values, and there's nothing magical about them. * BUS_PROBE_SPECIFIC is for devices that cannot be reprobed, and that no - * possible other driver may exist (typically legacy drivers who don't fallow + * possible other driver may exist (typically legacy drivers who don't follow * all the rules, or special needs drivers). BUS_PROBE_VENDOR is the * suggested value that vendor supplied drivers use. This is for source or * binary drivers that are not yet integrated into the FreeBSD tree. Its use @@ -675,7 +675,7 @@ void bus_data_generation_update(void); * supports the newer ones would return BUS_PROBE_DEFAULT. BUS_PROBE_GENERIC * is for drivers that wish to have a generic form and a specialized form, * like is done with the pci bus and the acpi pci bus. BUS_PROBE_HOOVER is - * for those buses that implement a generic device place-holder for devices on + * for those buses that implement a generic device placeholder for devices on * the bus that have no more specific driver for them (aka ugen). * BUS_PROBE_NOWILDCARD or lower means that the device isn't really bidding * for a device node, but accepts only devices that its parent has told it Modified: head/sys/sys/busdma_bufalloc.h ============================================================================== --- head/sys/sys/busdma_bufalloc.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/busdma_bufalloc.h Sun Jan 15 18:00:45 2017 (r312235) @@ -71,7 +71,7 @@ typedef struct busdma_bufalloc *busdma_b * name appears in zone stats as 'dma name nnnnn' where 'dma' is fixed and * 'nnnnn' is the size of buffers in that zone. * - * If if the alloc/free function pointers are NULL, the regular uma internal + * If the alloc/free function pointers are NULL, the regular uma internal * allocators are used (I.E., you get "plain old kernel memory"). On a platform * with an exclusion zone that applies to all DMA operations, a custom allocator * could be used to ensure no buffer memory is ever allocated from that zone, @@ -116,4 +116,3 @@ void busdma_bufalloc_free_uncacheable(v uint8_t pflag); #endif /* _MACHINE_BUSDMA_BUFALLOC_H_ */ - Modified: head/sys/sys/devmap.h ============================================================================== --- head/sys/sys/devmap.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/devmap.h Sun Jan 15 18:00:45 2017 (r312235) @@ -30,7 +30,7 @@ #define _SYS_DEVMAP_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif /* Modified: head/sys/sys/eventvar.h ============================================================================== --- head/sys/sys/eventvar.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/eventvar.h Sun Jan 15 18:00:45 2017 (r312235) @@ -30,7 +30,7 @@ #define _SYS_EVENTVAR_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif #include Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/gtaskqueue.h Sun Jan 15 18:00:45 2017 (r312235) @@ -32,7 +32,7 @@ #include #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif struct gtaskqueue; Modified: head/sys/sys/ksem.h ============================================================================== --- head/sys/sys/ksem.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/ksem.h Sun Jan 15 18:00:45 2017 (r312235) @@ -30,7 +30,7 @@ #define _POSIX4_KSEM_H_ #if !defined(_KERNEL) && !defined(_WANT_FILE) -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif #include Modified: head/sys/sys/pipe.h ============================================================================== --- head/sys/sys/pipe.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/pipe.h Sun Jan 15 18:00:45 2017 (r312235) @@ -25,7 +25,7 @@ #define _SYS_PIPE_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif /* Modified: head/sys/sys/sockopt.h ============================================================================== --- head/sys/sys/sockopt.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/sockopt.h Sun Jan 15 18:00:45 2017 (r312235) @@ -34,7 +34,7 @@ #define _SYS_SOCKOPT_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Sun Jan 15 17:54:01 2017 (r312234) +++ head/sys/sys/taskqueue.h Sun Jan 15 18:00:45 2017 (r312235) @@ -30,7 +30,7 @@ #define _SYS_TASKQUEUE_H_ #ifndef _KERNEL -#error "no user-servicable parts inside" +#error "no user-serviceable parts inside" #endif #include From owner-svn-src-head@freebsd.org Sun Jan 15 18:46:38 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 ED8B9CB1BAB; Sun, 15 Jan 2017 18:46:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 7FA121F0A; Sun, 15 Jan 2017 18:46:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id d140so9191782wmd.2; Sun, 15 Jan 2017 10:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=26GazU3sJrMgoje46wSmt04HR2n8DIw4MTlAI9qOGHY=; b=oKnUUQshwhAeeoNa3CF+yPrsG4Clt+H+PXpFCJXydXUY8ZclIyvuyO/C7vJvkVD8Ue R2ZbVtiHyOXhE6F/fMqovYpNu0fVkqVSppTk4PcbwUMMVO99a7Hv9sdUhdGxOBOvQNp+ z4j3zQtqm+Xl+cuf87KqzDfc5a7vmXYMdsGeoSUB6dRzmmgjT0JTplgKv/vk+nN0NLHh yHG9oSjPKfADS7d36ZtGEGPqIi7SQoNv1I8D6f3hDTExIgplYkqK3aHQ3va/vhpQVRQK CoQTKMMuqHSt3bHhc+yCRKU+7ZOwWvftUfCW+EEKRPYxMjZnWM2P4rbebguyVcecVlCM PpKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=26GazU3sJrMgoje46wSmt04HR2n8DIw4MTlAI9qOGHY=; b=iS2oq2iVak7OtfTxPEhvD5dnDwKwQWaJc7Pg2JyaUxBryVdjNNsnQbxPDMQsVfgVWQ OoYt3slWOJfVhF7FSrJEgn1+pYZ/nbkPqcO8Y0Uof1cWzPrI3dTdWrFLXwGcK3IIwwTQ OdDLNAyEvEO0ukQ8BWGMGPXiXAtUo2gwF2Qffzmu+qdOnWpLaVqZszZrql/wnTfUqfpj Ca+Tvzcg4QQf441NxLd9lVLAecFeQGBq3CQqde2ojbPDeo8H+XBhDWlvDolGfeK0xRft 1Pr2QwXd0iF4GkeVZ2fUBwomW8aNHg/L6xzjpVfV3Si/KoJmhc/dxomU97SkuSLIRp74 1JmQ== X-Gm-Message-State: AIkVDXL+SlDvasu9XW2nvEHgeOUumzOHjStpG8nsDxAIb9oAIJyVzGhfNXfdjtbfu/TentVYWtE7E+w/Ga5RJA== X-Received: by 10.223.173.181 with SMTP id w50mr19541870wrc.177.1484505996905; Sun, 15 Jan 2017 10:46:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Sun, 15 Jan 2017 10:46:35 -0800 (PST) In-Reply-To: <20170115144531.GB58505@zxy.spb.ru> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> From: Adrian Chadd Date: Sun, 15 Jan 2017 10:46:35 -0800 Message-ID: Subject: Re: svn commit: r311952 - head/sys/ddb To: Slawa Olhovchenkov Cc: Julian Elischer , Mark Johnston , Bruce Evans , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@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: Sun, 15 Jan 2017 18:46:39 -0000 url? :) -a On 15 January 2017 at 06:45, Slawa Olhovchenkov wrote: > On Sun, Jan 15, 2017 at 01:07:58PM +0800, Julian Elischer wrote: > >> >> the old DEC machines had (from memory) ^O which dropped all pending >> output. >> Not so useful when there is 2MB of network buffers queued up to you, >> but very useful on >> and asr-33 teletype. > > Now it useful too, on serial console. > ^O processing be present years ago in FreeBSD, but removed at time of > tty code rewrite. As I know patch for restore exist, nobody > review/commit. > > From owner-svn-src-head@freebsd.org Sun Jan 15 19:49:48 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 D9C14CB1BE1; Sun, 15 Jan 2017 19:49:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F92A19B0; Sun, 15 Jan 2017 19:49:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FJnl8e027171; Sun, 15 Jan 2017 19:49:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FJnl2h027169; Sun, 15 Jan 2017 19:49:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701151949.v0FJnl2h027169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Jan 2017 19:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312236 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 19:49:49 -0000 Author: adrian Date: Sun Jan 15 19:49:47 2017 New Revision: 312236 URL: https://svnweb.freebsd.org/changeset/base/312236 Log: [net80211] add some more "is this XXX" macros for CTRL and DATA. There's already a macro for MGT. Modified: head/sys/net80211/ieee80211.h Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sun Jan 15 18:00:45 2017 (r312235) +++ head/sys/net80211/ieee80211.h Sun Jan 15 19:49:47 2017 (r312236) @@ -165,6 +165,12 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_IS_MGMT(wh) \ (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ == IEEE80211_FC0_TYPE_MGT)) +#define IEEE80211_IS_CTL(wh) \ + (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ + == IEEE80211_FC0_TYPE_CTL)) +#define IEEE80211_IS_DATA(wh) \ + (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ + == IEEE80211_FC0_TYPE_DATA)) #define IEEE80211_FC0_QOSDATA \ (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS|IEEE80211_FC0_VERSION_0) From owner-svn-src-head@freebsd.org Sun Jan 15 19:57:04 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 A2E89CB1DA9 for ; Sun, 15 Jan 2017 19:57:04 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31F771E10 for ; Sun, 15 Jan 2017 19:57:03 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c8b03494-db5c-11e6-9357-bffcd86bd944 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id c8b03494-db5c-11e6-9357-bffcd86bd944; Sun, 15 Jan 2017 19:57:04 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0FJusio012884; Sun, 15 Jan 2017 12:56:54 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1484510213.86335.110.camel@freebsd.org> Subject: Re: svn commit: r312236 - head/sys/net80211 From: Ian Lepore To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 15 Jan 2017 12:56:53 -0700 In-Reply-To: <201701151949.v0FJnl2h027169@repo.freebsd.org> References: <201701151949.v0FJnl2h027169@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 19:57:04 -0000 On Sun, 2017-01-15 at 19:49 +0000, Adrian Chadd wrote: > Author: adrian > Date: Sun Jan 15 19:49:47 2017 > New Revision: 312236 > URL: https://svnweb.freebsd.org/changeset/base/312236 > > Log: >   [net80211] add some more "is this XXX" macros for CTRL and DATA. >    >   There's already a macro for MGT. > > Modified: >   head/sys/net80211/ieee80211.h > > Modified: head/sys/net80211/ieee80211.h > ===================================================================== > ========= > --- head/sys/net80211/ieee80211.h Sun Jan 15 18:00:45 2017 > (r312235) > +++ head/sys/net80211/ieee80211.h Sun Jan 15 19:49:47 2017 > (r312236) > @@ -165,6 +165,12 @@ struct ieee80211_qosframe_addr4 { >  #define IEEE80211_IS_MGMT(wh) > \ >   (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) > \ >       == IEEE80211_FC0_TYPE_MGT)) > +#define IEEE80211_IS_CTL(wh) > \ > + (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) > \ > +     == IEEE80211_FC0_TYPE_CTL)) > +#define IEEE80211_IS_DATA(wh) > \ > + (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) > \ > +     == IEEE80211_FC0_TYPE_DATA)) >   >  #define IEEE80211_FC0_QOSDATA \ >   (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS|IEEE80211 > _FC0_VERSION_0) > What is the point of the !! in these macros?  The expressions already have boolean type (even in C++ where it matters) due to the ==.  Removing the !! would also make one level of parens redundant. -- Ian From owner-svn-src-head@freebsd.org Sun Jan 15 20:03:14 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 75373CB1F8B; Sun, 15 Jan 2017 20:03:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E33124D; Sun, 15 Jan 2017 20:03:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FK3D8Q035143; Sun, 15 Jan 2017 20:03:13 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FK3Dxh035142; Sun, 15 Jan 2017 20:03:13 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201701152003.v0FK3Dxh035142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 15 Jan 2017 20:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312237 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 15 Jan 2017 20:03:14 -0000 Author: tsoome Date: Sun Jan 15 20:03:13 2017 New Revision: 312237 URL: https://svnweb.freebsd.org/changeset/base/312237 Log: loader.efi: find_currdev() can leak memory The find_currdev() is using variable "copy" to store the reference to trimmed devpath pointer, if for some reason the efi_devpath_handle() fails, we will leak this copy. Also we can simplify the code there a bit. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9191 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Sun Jan 15 19:49:47 2017 (r312236) +++ head/sys/boot/efi/loader/main.c Sun Jan 15 20:03:13 2017 (r312237) @@ -219,20 +219,19 @@ find_currdev(EFI_LOADED_IMAGE *img, stru if (h == NULL) break; - if (efi_handle_lookup(h, dev, unit, extra) == 0) { - if (copy != NULL) - free(copy); + free(copy); + copy = NULL; + + if (efi_handle_lookup(h, dev, unit, extra) == 0) return (0); - } - if (copy != NULL) - free(copy); devpath = efi_lookup_devpath(h); if (devpath != NULL) { copy = efi_devpath_trim(devpath); devpath = copy; } } + free(copy); /* Try to fallback on first device */ if (devsw[0] != NULL) { From owner-svn-src-head@freebsd.org Sun Jan 15 20:18:02 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 D7CCECB11ED; Sun, 15 Jan 2017 20:18:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2BA17D4; Sun, 15 Jan 2017 20:18:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cSrFW-000Lec-JR; Sun, 15 Jan 2017 23:17:58 +0300 Date: Sun, 15 Jan 2017 23:17:58 +0300 From: Slawa Olhovchenkov To: Adrian Chadd Cc: Julian Elischer , Mark Johnston , Bruce Evans , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r311952 - head/sys/ddb Message-ID: <20170115201758.GA78888@zxy.spb.ru> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false 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: Sun, 15 Jan 2017 20:18:03 -0000 On Sun, Jan 15, 2017 at 10:46:35AM -0800, Adrian Chadd wrote: > url? :) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184987 Assignee: Adrian Chadd > On 15 January 2017 at 06:45, Slawa Olhovchenkov wrote: > > On Sun, Jan 15, 2017 at 01:07:58PM +0800, Julian Elischer wrote: > > > >> > >> the old DEC machines had (from memory) ^O which dropped all pending > >> output. > >> Not so useful when there is 2MB of network buffers queued up to you, > >> but very useful on > >> and asr-33 teletype. > > > > Now it useful too, on serial console. > > ^O processing be present years ago in FreeBSD, but removed at time of > > tty code rewrite. As I know patch for restore exist, nobody > > review/commit. > > > > From owner-svn-src-head@freebsd.org Sun Jan 15 20:40:51 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 6BC55CB1C36; Sun, 15 Jan 2017 20:40:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 000F616FE; Sun, 15 Jan 2017 20:40:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id r126so134744006wmr.0; Sun, 15 Jan 2017 12:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CxAjPAY7cjwG1VejzWzdMmpEYxB/LviQyv/SqYAhTaY=; b=vJCvBrIUXm3S86PgvJ1MuD2/2dFopxidhQ5Hyp8+Ut2XyCF57mjsE2z0IajDElM6LS VfhZZJ0BrogQu+sgWRGpL1CsZpPCxaIUI7Bkevz9YzPxbsNweu+II1ifuDB4Jd4jEVby 3vGjeoLXi9ctQMxHF5HKOJSXc7bn/aRf6LMWPxzAj7pyNI3wwUAnuvcHr6pKi4tZlYQK bKK3OPFYq0WQ2/2Gv5CcFrzB/ybRnIqNHwfEHwq5umCggj37EH71s92QOwMvo9z4hoXG fit46zPt/lZ59QNCZ9+CDFYa/W2DFEvHrA2oSkLYaYzrt2/2p8XhxEov4d31L26Mg2KT 1AMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CxAjPAY7cjwG1VejzWzdMmpEYxB/LviQyv/SqYAhTaY=; b=H/Tp0oFU9uDCL+iFs00Exzj24r5z818fpfdJ2Y5sMCqJY8j6Q7yqkXX4kQzYjhagIC tuA7etXjg92jFERgayMFWdkUXKVLoVQ6gfnEdMMHqgLBbFkc/iq7w7Mn1POxEY96p0Fr 1rb+pHjW7cAOXLFzMjB/LfFwpDeNae3tplPd71XTJL4rSjFatkEmtSJ6w1EtJNi3PPQT vxLYbV1AGTKcmsvS47ZfV+VbifyxoNznhZklY6g9/HLa4GsiXxQsm5hNBRpFXMM3MrfM SuIxwp0o4XzkaTrmgtaiE2sNPTCKfJf00f7wqLwQmBXWQq7hELPqDrF+nhU9ZYGlixTx kvwA== X-Gm-Message-State: AIkVDXKrUrQhob73OjOKuoa9F+szbu94fApH1BshjoAGLC8vqyQNYFOSX8Yra1s26I+RlQmgKlRj5kUbxC3ThQ== X-Received: by 10.223.151.205 with SMTP id t13mr20328613wrb.9.1484512849584; Sun, 15 Jan 2017 12:40:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Sun, 15 Jan 2017 12:40:48 -0800 (PST) In-Reply-To: <20170115201758.GA78888@zxy.spb.ru> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> <20170115201758.GA78888@zxy.spb.ru> From: Adrian Chadd Date: Sun, 15 Jan 2017 12:40:48 -0800 Message-ID: Subject: Re: svn commit: r311952 - head/sys/ddb To: Slawa Olhovchenkov Cc: Julian Elischer , Mark Johnston , Bruce Evans , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@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: Sun, 15 Jan 2017 20:40:51 -0000 hah, i took this, then life got in the way. :) Bruce - what do you think of https://bz-attachments.freebsd.org/attachment.cgi?id=138881 ? -adrian From owner-svn-src-head@freebsd.org Sun Jan 15 20:43:11 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 656ECCB1E75; Sun, 15 Jan 2017 20:43:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 F047A1B43; Sun, 15 Jan 2017 20:43:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id c85so134238751wmi.1; Sun, 15 Jan 2017 12:43:10 -0800 (PST) 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=ChvI3ZiTHmrIPgWa/OnABRyTeaVccmmK7bLU4x8RBEE=; b=ju3XFoqi0PYRo5p91ax47ApvuzrqEp6dbknBTGGj3CW7RJWHA4YOHran9Z/TlUI0LX lA4Qu/IPMvtkChiirXpYN5WGu842Aa07fHa+BNqZVQn2WVlanAOUZuTbGoO2l6RRKLT4 taTIPJKEDMCShnO7qkLYbsFaerN1zt8plHchsdAZjOW1vD8FATMAs7XaM0ZaqtpOQQjH oilnyz59QHK9oN6scQB0erN9o5p7avMlfwmWasyYC1xNJzen0tVYu/L5tZQP3Ihvp02w zJ+XtZGPBrIXGQtzKG6iZIwBATQB4DCViUZBjUA2zyXQ4B70/bpIabL2IWsuaYr3uo1j zQ/Q== 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=ChvI3ZiTHmrIPgWa/OnABRyTeaVccmmK7bLU4x8RBEE=; b=TySFTpI27fJzw+hr94+86nSzflYCszhdhn5T3DYePldg5KPA0BkEPi86Zr7sS8UHsa Cuv8/zWDeAT0RV/5wvldpPhef7RTyqoA61YZMCf9RA+KefF3hqVK3iihKSyJBNvQ27XI WJoNnthfUQt19d7t8sfWNJx3JnK9Ca+3Gk85Hjc+BKK+atRzQu5tRp3pqezcnXaG61pN 6MstutKpEbIov2a825/Qd3+zSViWcqnthjJ21qE0h/bf353yy/o+vGJqkCQWjBe89hTY rqqmAnb2qNt35/qIabXZ/IdeWyb7WDOWnwLNfK2N8l+0Zo52+gQ3bedQ2a8qmHY+dycy gN9g== X-Gm-Message-State: AIkVDXLHqTl8+zW4Q2uhG2GOMwPnmB8qOtBoOn9Gw6Y1S0JbBVHNzUPtepDP+o0KZDIaRj0gJ/2rJ7sxjhMycQ== X-Received: by 10.223.173.181 with SMTP id w50mr19768638wrc.177.1484512988460; Sun, 15 Jan 2017 12:43:08 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Sun, 15 Jan 2017 12:43:07 -0800 (PST) In-Reply-To: <1484510213.86335.110.camel@freebsd.org> References: <201701151949.v0FJnl2h027169@repo.freebsd.org> <1484510213.86335.110.camel@freebsd.org> From: Adrian Chadd Date: Sun, 15 Jan 2017 12:43:07 -0800 X-Google-Sender-Auth: qbPgVMH4SM83S58-i7VNG5f-1ew Message-ID: Subject: Re: svn commit: r312236 - head/sys/net80211 To: Ian Lepore 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: Sun, 15 Jan 2017 20:43:11 -0000 On 15 January 2017 at 11:56, Ian Lepore wrote: > > What is the point of the !! in these macros? The expressions already > have boolean type (even in C++ where it matters) due to the ==. > Removing the !! would also make one level of parens redundant. It's just a habit i picked up from linux-land. That way it really is only 1 or 0, so things like debugging output and such make easier sense. It's also fixed a handful of bugs in the past (but I can't think of exact cases right now) - primarily where other code expected 1 or 0 (for things like shifts into protocol fields) and the macro returns 0 or ${LARGEVAL}. -adrian From owner-svn-src-head@freebsd.org Sun Jan 15 21:14:02 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 A4F19CB1A2D; Sun, 15 Jan 2017 21:14:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x244.google.com (mail-ot0-x244.google.com [IPv6:2607:f8b0:4003:c0f::244]) (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 685741E69; Sun, 15 Jan 2017 21:14:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x244.google.com with SMTP id 73so4957615otj.1; Sun, 15 Jan 2017 13:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DxBzT9WWl817vtYI1PR9lHedLQkm+UOza/rPMEs3yOU=; b=PSZ/TG5Kg0dJF7AVi7w/6bdnv6/sfQr/EjJqNZftlcxrqdN3Kk3/tstAHwZlBUqLe1 9CwEILiygy4je99vS+JAkeApscjOgJHufPVzsvZaLA34FuQojeAOj5mC2SFw0okvMORg 3Qm5NriM0rXMlISeqMJ0whpxTXgjums5w3bujGN89iAk090Lddr7OCfw5KkYoqdPhlQw /tWGmOWEKO/OAldfgb4jmefezqHeO6diBOphv2S5dq1cs/RXzE73e1ExAVjmoO1AxO6F AkUaKt5OcQhmwhSNE1zVlmhB2+hzOhwWHOJvYXckvlfeXjtuiq9d0HYqktRBxfjnbTJf PHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DxBzT9WWl817vtYI1PR9lHedLQkm+UOza/rPMEs3yOU=; b=tRF4DICiX4MkGLa/FGRhMpAQNyuindCXcWrieMJOmCNXq+tfkJwWWvwAkYAdl0XxGY Hd1uLRaqp60RxkhF8Y9C+QDTe9OzZdV7ngO6KCihsakJNKJ0UotHkukRnIm055wxeT14 6qeBYwMI+ZOGbmIGeSIjHM0B/fZt7R3eqpEpMcLFEI5sJ/YpVzz6bb3d2V6QdQPkYmFM KI92cK104ioekvEJoa1VmE/n8cc8vEWdgHxUs0bdc4+N92Duj35mjdUG7DuE8tnYswqd i5iSzLKm9fP4P7vzZnMj75aSAxtQ32Fj0sQF9XnFZcjZtFxwQJtswUo8GrgHU8y01P0u pQlw== X-Gm-Message-State: AIkVDXLsueVpCSwUV4mvftmHSWG2GoKbYB2WO+ipaU8e0ZQ1eIIB2zstkaf/Do+KECzF+j2r3PcGFqhFa1Pc1w== X-Received: by 10.157.43.198 with SMTP id u64mr14028627ota.80.1484514841592; Sun, 15 Jan 2017 13:14:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.52.9 with HTTP; Sun, 15 Jan 2017 13:14:01 -0800 (PST) In-Reply-To: <201701151754.v0FHs14W081882@repo.freebsd.org> References: <201701151754.v0FHs14W081882@repo.freebsd.org> From: Benjamin Kaduk Date: Sun, 15 Jan 2017 15:14:01 -0600 Message-ID: Subject: Re: svn commit: r312234 - in head: sbin/camcontrol share/man/man4 share/man/man9 sys/arm/arm sys/arm/freescale/imx sys/arm/mv sys/cam sys/dev/bhnd sys/dev/fdt sys/dev/isp sys/dev/mmc sys/dev/mpt sys/de... To: "Conrad E. Meyer" 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-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: Sun, 15 Jan 2017 21:14:02 -0000 On Sun, Jan 15, 2017 at 11:54 AM, Conrad E. Meyer wrote: > Author: cem > Date: Sun Jan 15 17:54:01 2017 > New Revision: 312234 > URL: https://svnweb.freebsd.org/changeset/base/312234 > > Log: > "Buses" is the preferred plural of "bus" > > Replace archaic "busses" with modern form "buses." > > The link intending to support this assertion refers to the motor vehicle, which does not necessarily have the same usage as the hardware nexus. It would have been nice to see some discussion on -doc or similar before making a sweeping change like this, as I am not sure that the consensus of our team is for the "buses" spelling in this usage. -Ben > Intentionally excluded: > * Old/random drivers I didn't recognize > * Old hardware in general > * Use of "busses" in code as identifiers > > No functional change. > > http://grammarist.com/spelling/buses-busses/ > > PR: 216099 > Reported by: bltsrc at mail.ru > Sponsored by: Dell EMC Isilon > > From owner-svn-src-head@freebsd.org Mon Jan 16 02:00:06 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 5746FCB267D; Mon, 16 Jan 2017 02:00:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id E2E5E1F7D; Mon, 16 Jan 2017 02:00:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 4FD2A3C5EE3; Mon, 16 Jan 2017 13:00:02 +1100 (AEDT) Date: Mon, 16 Jan 2017 13:00:01 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Slawa Olhovchenkov cc: Julian Elischer , Mark Johnston , Bruce Evans , svn-src-head@freebsd.org, rang@acm.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r311952 - head/sys/ddb In-Reply-To: <20170115144531.GB58505@zxy.spb.ru> Message-ID: <20170116122019.E1170@besplex.bde.org> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=usmHoXVVML-mfzcKIW0A:9 a=CjuIK1q_8ugA:10 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, 16 Jan 2017 02:00:06 -0000 On Sun, 15 Jan 2017, Slawa Olhovchenkov wrote: > On Sun, Jan 15, 2017 at 01:07:58PM +0800, Julian Elischer wrote: > >> >> the old DEC machines had (from memory) ^O which dropped all pending >> output. >> Not so useful when there is 2MB of network buffers queued up to you, >> but very useful on >> and asr-33 teletype. > > Now it useful too, on serial console. > ^O processing be present years ago in FreeBSD, but removed at time of > tty code rewrite. As I know patch for restore exist, nobody > review/commit. Urk. I have fixes for hundreds of things broken in the rewrite, but didn't notice this one. The only fix I have near here is a partial one for funky quoting of control characters according to ECHOK and ECHOKE. ECHOK is a POSIX feature and ECHOKE is a BSD feature. The man page still docoments the old behaviour. Grepping for CCEQ (and its renaming to the worse name CMP_FLAG in the rewrite) shows that the only other control character with lost support is VDSUSP. Zgrepping for VDISCARD and VDSUSP in /usr/share/man shows the following bugs: - VDISCARD and VDSUSP are listed but not described in any useful way in termios(4) - VDSUSP (and dsusp) is listed but not described in any useful way in stty(1) - VDISCARD (and discard) are not mentioned in stty(1). However, 'stty discard c' works, and stty's display of the discard character works. stty's displays exactly the special characters that used to work. - VDISCARD and VDSUSP are otherwise undocumented. - FLUSHO in termios(4) and flusho in stty(1) are listed and described, but their close connection with VDISCARD is not mentioned (except stty says "being discarded"). FLUSHO is mostly an internal flag. In the working version, It is normally toggled by VDISCARD but is cleared by other actions. It can also be controlled by an ioctl, and stty supports the ioctl. But settings by stty are rarely useful since it is normally cleared by other The patch in the PR doesn't handle the other actions right. actions which stty can't control. Partial fixes for ECHOKE and nearby things: X Index: tty_ttydisc.c X =================================================================== X --- tty_ttydisc.c (revision 312117) X +++ tty_ttydisc.c (working copy) X @@ -798,6 +842,16 @@ X } X } else { X /* Don't print spaces. */ X + /* X + * XXX broken if VERASE is disabled. Can get here X + * then if ECHO is off and: X + * - for VERASE2 if that is not disabled X + * - for the buggy ECHOK/ECHOKE cases X + * - perhaps in other cases. X + * This routine is too generic. X + * X + * XXX the logic is not just non-printing of spaces. X + */ X ttydisc_echo(tp, tp->t_termios.c_cc[VERASE], 0); X } X } X @@ -993,7 +1049,30 @@ X ttydisc_rubchar(tp); X return (0); X } else if (CMP_CC(VKILL, c)) { X +#if 0 X + /* X + * XXX broken. This doesn't even look at ECHOK or X + * ECHOKE (nothing does now), and it doesn't produce X + * the documented behaviour of ECHOK. ECHOK exists X + * to be a non-erasing version of ECHOKE that uses X + * fewer terminal capabilities. ECHOPRT is also X + * broken (never even looked at). X + */ X while (ttydisc_rubchar(tp) == 0); X +#else X + if (CMP_FLAG(l, ECHOKE)) { X + /* XXX too hard to fix. */ X + while (ttydisc_rubchar(tp) == 0) X + ; X + } else { X + ttydisc_echo_force(tp, c, 0); X + if (CMP_FLAG(l, ECHOK)) X + ttydisc_echo_force(tp, '\n', 0); X + while (ttyinq_peekchar(&tp->t_inq, &c, X + "e) == 0) X + ttyinq_unputchar(&tp->t_inq); X + } X +#endif X return (0); X } else if (CMP_FLAG(l, IEXTEN)) { X if (CMP_CC(VWERASE, c)) { X @@ -1021,12 +1100,13 @@ X X parmrk: X if (CMP_FLAG(i, PARMRK)) { X - /* Prepend 0xff 0x00 0x.. */ X + /* Prepend 0xff 0x00. */ X ob[2] = c; X ol = 3; X quote = 1; X } else { X - ob[0] = c; X + /* Kill the character for read(). Keep it in c for echoing. */ X + ob[0] = '\0'; X ol = 1; X } X Bruce From owner-svn-src-head@freebsd.org Mon Jan 16 03:03:48 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 9ADE1CB161D; Mon, 16 Jan 2017 03:03:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7560B12E4; Mon, 16 Jan 2017 03:03:48 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0G33lUx007102; Mon, 16 Jan 2017 03:03:47 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0G33lJV007097; Mon, 16 Jan 2017 03:03:47 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201701160303.v0G33lJV007097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 16 Jan 2017 03:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312250 - in head: share/man/man4 sys/dev/alc sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 03:03:48 -0000 Author: sephe Date: Mon Jan 16 03:03:47 2017 New Revision: 312250 URL: https://svnweb.freebsd.org/changeset/base/312250 Log: alc: Add Killer E2500 support Reviewed by: jhb, yongari MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9058 Modified: head/share/man/man4/alc.4 head/sys/dev/alc/if_alc.c head/sys/dev/alc/if_alcreg.h head/sys/dev/pci/pci.c Modified: head/share/man/man4/alc.4 ============================================================================== --- head/share/man/man4/alc.4 Mon Jan 16 01:38:34 2017 (r312249) +++ head/share/man/man4/alc.4 Mon Jan 16 03:03:47 2017 (r312250) @@ -124,6 +124,8 @@ Atheros AR8172 PCI Express Fast Ethernet Killer E2200 Gigabit Ethernet controller .It Killer E2400 Gigabit Ethernet controller +.It +Killer E2500 Gigabit Ethernet controller .El .Sh LOADER TUNABLES Tunables can be set at the Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Mon Jan 16 01:38:34 2017 (r312249) +++ head/sys/dev/alc/if_alc.c Mon Jan 16 03:03:47 2017 (r312250) @@ -123,6 +123,8 @@ static struct alc_ident alc_ident_table[ "Killer E2200 Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2400, 9 * 1024, "Killer E2400 Gigabit Ethernet" }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2500, 9 * 1024, + "Killer E2500 Gigabit Ethernet" }, { 0, 0, 0, NULL} }; @@ -1083,6 +1085,7 @@ alc_phy_down(struct alc_softc *sc) case DEVICEID_ATHEROS_AR8161: case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: case DEVICEID_ATHEROS_AR8162: case DEVICEID_ATHEROS_AR8171: case DEVICEID_ATHEROS_AR8172: @@ -1402,6 +1405,7 @@ alc_attach(device_t dev) switch (sc->alc_ident->deviceid) { case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: sc->alc_flags |= ALC_FLAG_E2X00; /* FALLTHROUGH */ case DEVICEID_ATHEROS_AR8161: @@ -1480,7 +1484,8 @@ alc_attach(device_t dev) if (alc_dma_burst[sc->alc_dma_wr_burst] > 1024) sc->alc_dma_wr_burst = 3; /* - * Force maximum payload size to 128 bytes for E2200/E2400. + * Force maximum payload size to 128 bytes for + * E2200/E2400/E2500. * Otherwise it triggers DMA write error. */ if ((sc->alc_flags & ALC_FLAG_E2X00) != 0) Modified: head/sys/dev/alc/if_alcreg.h ============================================================================== --- head/sys/dev/alc/if_alcreg.h Mon Jan 16 01:38:34 2017 (r312249) +++ head/sys/dev/alc/if_alcreg.h Mon Jan 16 03:03:47 2017 (r312250) @@ -50,6 +50,7 @@ #define DEVICEID_ATHEROS_AR8172 0x10A0 #define DEVICEID_ATHEROS_E2200 0xE091 #define DEVICEID_ATHEROS_E2400 0xE0A1 +#define DEVICEID_ATHEROS_E2500 0xE0B1 #define ATHEROS_AR8152_B_V10 0xC0 #define ATHEROS_AR8152_B_V11 0xC1 Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Mon Jan 16 01:38:34 2017 (r312249) +++ head/sys/dev/pci/pci.c Mon Jan 16 03:03:47 2017 (r312250) @@ -281,13 +281,14 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200/E2400 Ethernet controllers have a - * bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit + * Atheros AR8161/AR8162/E2200/E2400/E2500 Ethernet controllers have + * a bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit * of the command register is set. */ { 0x10911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0A11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0xE0B11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* From owner-svn-src-head@freebsd.org Mon Jan 16 03:11:31 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 4FB68CB1929; Mon, 16 Jan 2017 03:11:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C11B1A63; Mon, 16 Jan 2017 03:11:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0G3BURX008829; Mon, 16 Jan 2017 03:11:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0G3BUAu008828; Mon, 16 Jan 2017 03:11:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701160311.v0G3BUAu008828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Jan 2017 03:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312251 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 03:11:31 -0000 Author: ian Date: Mon Jan 16 03:11:30 2017 New Revision: 312251 URL: https://svnweb.freebsd.org/changeset/base/312251 Log: Remove a bit of armv6 support that didn't get deleted when this file was split from trap.c into trap-v4.c and trap-v6.c. Modified: head/sys/arm/arm/trap-v4.c Modified: head/sys/arm/arm/trap-v4.c ============================================================================== --- head/sys/arm/arm/trap-v4.c Mon Jan 16 03:03:47 2017 (r312250) +++ head/sys/arm/arm/trap-v4.c Mon Jan 16 03:11:30 2017 (r312251) @@ -139,11 +139,7 @@ static const struct data_abort data_abor {dab_align, "Alignment Fault 3"}, {dab_buserr, "External Linefetch Abort (S)"}, {NULL, "Translation Fault (S)"}, -#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 - {NULL, "Translation Flag Fault"}, -#else {dab_buserr, "External Linefetch Abort (P)"}, -#endif {NULL, "Translation Fault (P)"}, {dab_buserr, "External Non-Linefetch Abort (S)"}, {NULL, "Domain Fault (S)"}, From owner-svn-src-head@freebsd.org Mon Jan 16 03:53:29 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 EF9E1C65425; Mon, 16 Jan 2017 03:53:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 99246100A; Mon, 16 Jan 2017 03:53:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 7B7DA3C4644; Mon, 16 Jan 2017 14:53:26 +1100 (AEDT) Date: Mon, 16 Jan 2017 14:53:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Adrian Chadd cc: Slawa Olhovchenkov , Julian Elischer , Mark Johnston , Bruce Evans , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r311952 - head/sys/ddb In-Reply-To: Message-ID: <20170116130020.B1170@besplex.bde.org> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> <20170115201758.GA78888@zxy.spb.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=XH5kUvO47jxvWokLP7IA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 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, 16 Jan 2017 03:53:30 -0000 On Sun, 15 Jan 2017, Adrian Chadd wrote: > hah, i took this, then life got in the way. :) > > Bruce - what do you think of > https://bz-attachments.freebsd.org/attachment.cgi?id=138881 ? Also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184987 . I think it is hard to read and review since it is not in the mail. After fetching it and quoting it: X diff -r 91820d9948e0 -r 13f40d577646 sys/kern/tty_ttydisc.c X --- a/sys/kern/tty_ttydisc.c Fri Feb 22 09:45:32 2013 +0100 X +++ b/sys/kern/tty_ttydisc.c Tue Dec 17 23:03:17 2013 +0100 X @@ -448,6 +448,9 @@ X if (tp->t_flags & TF_ZOMBIE) X return (EIO); X X + if (tp->t_termios.c_lflag & FLUSHO) X + return (0); X + This seems to be far too simple. As pointed out in the PR thread, it is missing at least the clearing of uio_resid. (BTW, returns for TF_ZOMBIE and IO_NDELAY tend to have the opposite problem. The tend to reduce uio_resid to count i/o that they have not done. They should just return an error like the above return for TF_ZOMBIE does. Upper layers are supposed to translate this error to success if any i/o has been done. Upper layers often get this wrong, and my fixes currently do too much compensation in lower layers.) The old tty driver has squillions of FLUSHO checks for output not involving uio. Mostly for echo of input. However, any input (and other operations?) normally turns of FLUSHO, so this is hard to see. To see if this works compatibly now, try typing 111^O2. ^O should be echoed as ^O^R followed by reprinting the line according to the implicit VREPRINT (^R). This should cancel FLUSHO, so the 2 is just echoed on the new line. However ^O instead of 2 should just cancel FLUSHO. So ^O^O should be equivalent to ^R except it prints ^O before ^R. It is wrong for FLUSHO to have any effect except in modes where VDISCARD has an effect. VDISCARD seems to be conditional on precisely !EXTPROC && IEXTEN. Its inactivity in other modes should be implemented by forcing it off on certain mode changes. The old tty driver forces it off in squillions of places, perhaps including all mode changes for simplicity. There would be a problem if stty(1) could actually set it, since then invalid settings like "raw flusho" would be allowed. Clearing it after all mode changes would prevent stty actually setting it. X /* X * We don't need to check whether the process is the foreground X * process group or if we have a carrier. This is already done X @@ -881,6 +884,14 @@ X X /* Special control characters that are implementation dependent. */ X if (CMP_FLAG(l, IEXTEN)) { X + /* Discard (^O) */ Style bug. This comment is missing a "." and does less than echo the code. The code doesn't hard-code VDISCARD as ^O, and it is unclear whether the comment applies to the previous or the next line (except it is further from echoing the previous line). X + if (CMP_CC(VDISCARD, c)) { X + if (!(tp->t_termios.c_lflag & FLUSHO)) Style bug. This file elsewhere always uses the funky style of explicit comparison of (sets of ) flags with 0. X + ttyoutq_write_nofrag(&tp->t_outq, "^O", 2); This also hard-codes ^O. The old driver echos the actual discard character using ttyecho(c, tp). I don't know if the funky rules for quoting control characters apply in this case, but ttyecho() has to be quite complicated to handle general cases. X + tp->t_termios.c_lflag ^= FLUSHO; The old driver adds an implicit VREPRINT char here if the input queue is nonempty. This usually results in echoing ^O^R and reprinting the line. X + return(0); X + } X + Otherwise, the action here is identical with the old driver. X /* Accept the next character as literal. */ X if (CMP_CC(VLNEXT, c)) { X if (CMP_FLAG(l, ECHO)) { The old driver needs 23 lines mentioning FLUSHO to keep it mostly clear. These are: - 3 in compat code (still there) - 3 here - 1 clear whenever restarting output at the end of interrupt input (most cases interrupt input) - 4 checks in ttyoutput() which is used manly for echoing. 1 at the beginning would be simpler, but the checks are more or less before each putc() and there are many inconsistences for counting characters and the column position from the complications - 1 clear in ttioctl() in 1 case of turning 1 type of flow control back on. Buggy, since FLUSHO should not be affected by flow control except by the xon char being treated as an ordinary char for canceling VDISCARD. - 1 clear in ttioctl() for the same flow control done by TIOCSTART - 1 check for ordinary writes as in this patch - 2 in comments - 2 more checks in the loop for ordinary writes. Some checks are necessary, but these are misplaced. FLUSHO can change underneath when we unlock to do the i/o, so it must be re-checked when we wake up. It is not checked in quite the right places in the old code, but at least the main check is placed at the top of the loop so it mostly works. In the patch, the check is outside of the loop, so it is never checked after waking up. - 1 clear at the start of ttyrub() - 1 set and 1 clear in ttyrub() for TAB processing - 1 clear in ttyecho() related to the TAB processing - 1 other case. So the main missing details are: - clear FLUSHO for almost any input - check FLUSHO in echo processing? (should the new input clear the flag before the echo?) - missing uio handling for writing - missing race handling for writing - clear FLUSHO for most ioctls more than the old code did. Clear it at least when changing the mode to one where VDISCARD doesn't apply. Bruce From owner-svn-src-head@freebsd.org Mon Jan 16 05:30:11 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 9B4CECB1D15; Mon, 16 Jan 2017 05:30:11 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBC514F2; Mon, 16 Jan 2017 05:30:11 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-228-247.lns20.per1.internode.on.net [121.45.228.247]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v0G5TUCh023918 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 15 Jan 2017 21:29:33 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r311952 - head/sys/ddb To: Bruce Evans , Adrian Chadd References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> <20170115201758.GA78888@zxy.spb.ru> <20170116130020.B1170@besplex.bde.org> Cc: Slawa Olhovchenkov , Julian Elischer , Mark Johnston , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Julian Elischer Message-ID: <9810b254-7d68-cb93-3766-9d943afae632@freebsd.org> Date: Mon, 16 Jan 2017 13:29:24 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170116130020.B1170@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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, 16 Jan 2017 05:30:11 -0000 On 16/01/2017 11:53 AM, Bruce Evans wrote: > On Sun, 15 Jan 2017, Adrian Chadd wrote: > >> hah, i took this, then life got in the way. :) >> >> Bruce - what do you think of >> https://bz-attachments.freebsd.org/attachment.cgi?id=138881 ? > > Also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184987 . > > I think it is hard to read and review since it is not in the mail. > After fetching it and quoting it: review it in the review page and just send a link in the email.. that's what it's for. > > X diff -r 91820d9948e0 -r 13f40d577646 sys/kern/tty_ttydisc.c > X --- a/sys/kern/tty_ttydisc.c Fri Feb 22 09:45:32 2013 +0100 > X +++ b/sys/kern/tty_ttydisc.c Tue Dec 17 23:03:17 2013 +0100 > X @@ -448,6 +448,9 @@ > X if (tp->t_flags & TF_ZOMBIE) > X return (EIO); > X X + if (tp->t_termios.c_lflag & FLUSHO) > X + return (0); > X + > > This seems to be far too simple. As pointed out in the PR thread, it > is missing at least the clearing of uio_resid. > > (BTW, returns for TF_ZOMBIE and IO_NDELAY tend to have the opposite > problem. The tend to reduce uio_resid to count i/o that they have > not done. They should just return an error like the above return > for TF_ZOMBIE does. Upper layers are supposed to translate this > error to success if any i/o has been done. Upper layers often get > this wrong, and my fixes currently do too much compensation in lower > layers.) > > The old tty driver has squillions of FLUSHO checks for output not > involving > uio. Mostly for echo of input. However, any input (and other > operations?) > normally turns of FLUSHO, so this is hard to see. > > To see if this works compatibly now, try typing 111^O2. ^O should be > echoed as ^O^R followed by reprinting the line according to the > implicit > VREPRINT (^R). This should cancel FLUSHO, so the 2 is just echoed on > the new line. However ^O instead of 2 should just cancel FLUSHO. So > ^O^O should be equivalent to ^R except it prints ^O before ^R. > > It is wrong for FLUSHO to have any effect except in modes where > VDISCARD > has an effect. VDISCARD seems to be conditional on precisely > !EXTPROC && IEXTEN. Its inactivity in other modes should be > implemented > by forcing it off on certain mode changes. The old tty driver > forces it > off in squillions of places, perhaps including all mode changes for > simplicity. There would be a problem if stty(1) could actually set it, > since then invalid settings like "raw flusho" would be allowed. > Clearing > it after all mode changes would prevent stty actually setting it. > > > X /* > X * We don't need to check whether the process is the foreground > X * process group or if we have a carrier. This is already done > X @@ -881,6 +884,14 @@ > X X /* Special control characters that are implementation > dependent. */ > X if (CMP_FLAG(l, IEXTEN)) { > X + /* Discard (^O) */ > > Style bug. This comment is missing a "." and does less than echo > the code. > The code doesn't hard-code VDISCARD as ^O, and it is unclear whether > the > comment applies to the previous or the next line (except it is further > from echoing the previous line). > > X + if (CMP_CC(VDISCARD, c)) { > X + if (!(tp->t_termios.c_lflag & FLUSHO)) > > Style bug. This file elsewhere always uses the funky style of explicit > comparison of (sets of ) flags with 0. > > X + ttyoutq_write_nofrag(&tp->t_outq, "^O", 2); > > This also hard-codes ^O. The old driver echos the actual discard > character > using ttyecho(c, tp). I don't know if the funky rules for quoting > control > characters apply in this case, but ttyecho() has to be quite > complicated to > handle general cases. > > X + tp->t_termios.c_lflag ^= FLUSHO; > > The old driver adds an implicit VREPRINT char here if the input > queue is > nonempty. This usually results in echoing ^O^R and reprinting the > line. > > X + return(0); > X + } > X + > > Otherwise, the action here is identical with the old driver. > > X /* Accept the next character as literal. */ > X if (CMP_CC(VLNEXT, c)) { > X if (CMP_FLAG(l, ECHO)) { > > The old driver needs 23 lines mentioning FLUSHO to keep it mostly > clear. > These are: > - 3 in compat code (still there) > - 3 here > - 1 clear whenever restarting output at the end of interrupt input > (most > cases interrupt input) > - 4 checks in ttyoutput() which is used manly for echoing. 1 at the > beginning would be simpler, but the checks are more or less before > each putc() and there are many inconsistences for counting characters > and the column position from the complications > - 1 clear in ttioctl() in 1 case of turning 1 type of flow control > back on. > Buggy, since FLUSHO should not be affected by flow control except > by the > xon char being treated as an ordinary char for canceling VDISCARD. > - 1 clear in ttioctl() for the same flow control done by TIOCSTART > - 1 check for ordinary writes as in this patch > - 2 in comments > - 2 more checks in the loop for ordinary writes. Some checks are > necessary, > but these are misplaced. FLUSHO can change underneath when we > unlock to > do the i/o, so it must be re-checked when we wake up. It is not > checked > in quite the right places in the old code, but at least the main > check > is placed at the top of the loop so it mostly works. In the > patch, the > check is outside of the loop, so it is never checked after waking up. > - 1 clear at the start of ttyrub() > - 1 set and 1 clear in ttyrub() for TAB processing > - 1 clear in ttyecho() related to the TAB processing > - 1 other case. > > So the main missing details are: > - clear FLUSHO for almost any input > - check FLUSHO in echo processing? (should the new input clear the flag > before the echo?) > - missing uio handling for writing > - missing race handling for writing > - clear FLUSHO for most ioctls more than the old code did. Clear it at > least when changing the mode to one where VDISCARD doesn't apply. > > Bruce > From owner-svn-src-head@freebsd.org Mon Jan 16 08:25:35 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 5A8C6CB112D; Mon, 16 Jan 2017 08:25:35 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 175BC1E4B; Mon, 16 Jan 2017 08:25:35 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0G8PYKb036830; Mon, 16 Jan 2017 08:25:34 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0G8PYL4036827; Mon, 16 Jan 2017 08:25:34 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201701160825.v0G8PYL4036827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 16 Jan 2017 08:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312277 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 08:25:35 -0000 Author: hiren Date: Mon Jan 16 08:25:33 2017 New Revision: 312277 URL: https://svnweb.freebsd.org/changeset/base/312277 Log: Add kevent EVFILT_EMPTY for notification when a client has received all data i.e. everything outstanding has been acked. Reviewed by: bz, gnn (previous version) MFC after: 3 days Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D9150 Modified: head/sys/kern/kern_event.c head/sys/kern/uipc_socket.c head/sys/sys/event.h Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Mon Jan 16 07:41:39 2017 (r312276) +++ head/sys/kern/kern_event.c Mon Jan 16 08:25:33 2017 (r312277) @@ -344,6 +344,7 @@ static struct { { &null_filtops }, /* EVFILT_LIO */ { &user_filtops, 1 }, /* EVFILT_USER */ { &null_filtops }, /* EVFILT_SENDFILE */ + { &file_filtops, 1 }, /* EVFILT_EMPTY */ }; /* Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Jan 16 07:41:39 2017 (r312276) +++ head/sys/kern/uipc_socket.c Mon Jan 16 08:25:33 2017 (r312277) @@ -161,6 +161,7 @@ static void filt_sowdetach(struct knote static int filt_sowrite(struct knote *kn, long hint); static int filt_solisten(struct knote *kn, long hint); static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t h_id); +static int filt_soempty(struct knote *kn, long hint); fo_kqfilter_t soo_kqfilter; static struct filterops solisten_filtops = { @@ -178,6 +179,11 @@ static struct filterops sowrite_filtops .f_detach = filt_sowdetach, .f_event = filt_sowrite, }; +static struct filterops soempty_filtops = { + .f_isfd = 1, + .f_detach = filt_sowdetach, + .f_event = filt_soempty, +}; so_gen_t so_gencnt; /* generation count for sockets */ @@ -3083,6 +3089,10 @@ soo_kqfilter(struct file *fp, struct kno kn->kn_fop = &sowrite_filtops; sb = &so->so_snd; break; + case EVFILT_EMPTY: + kn->kn_fop = &soempty_filtops; + sb = &so->so_snd; + break; default: return (EINVAL); } @@ -3344,6 +3354,21 @@ filt_sowrite(struct knote *kn, long hint return (kn->kn_data >= so->so_snd.sb_lowat); } +static int +filt_soempty(struct knote *kn, long hint) +{ + struct socket *so; + + so = kn->kn_fp->f_data; + SOCKBUF_LOCK_ASSERT(&so->so_snd); + kn->kn_data = sbused(&so->so_snd); + + if (kn->kn_data == 0) + return (1); + else + return (0); +} + /*ARGSUSED*/ static int filt_solisten(struct knote *kn, long hint) Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Mon Jan 16 07:41:39 2017 (r312276) +++ head/sys/sys/event.h Mon Jan 16 08:25:33 2017 (r312277) @@ -43,7 +43,8 @@ #define EVFILT_LIO (-10) /* attached to lio requests */ #define EVFILT_USER (-11) /* User events */ #define EVFILT_SENDFILE (-12) /* attached to sendfile requests */ -#define EVFILT_SYSCOUNT 12 +#define EVFILT_EMPTY (-13) /* empty send socket buf */ +#define EVFILT_SYSCOUNT 13 #define EV_SET(kevp_, a, b, c, d, e, f) do { \ struct kevent *kevp = (kevp_); \ From owner-svn-src-head@freebsd.org Mon Jan 16 09:39:46 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 D8977CB2E5B; Mon, 16 Jan 2017 09:39:46 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (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 983B713CA; Mon, 16 Jan 2017 09:39:46 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-qt0-x22e.google.com with SMTP id x49so98972684qtc.2; Mon, 16 Jan 2017 01:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cfm56PFUNAM12mnRTmJQmQ9/89bvI9IjDXdyh5su2Ok=; b=ITFPfpCwSPzBe5iZ5dQpfMORzIKWOruK2vA0KAj6OAykgdcDSa6M7gexFf9a9goxaj m9CzV2fRpgQiqzJ59GnRFlhPdcvqOAVYraDhek/zZRfAUhC50/u0VDPI/yQRnLtZ9Yve YZUA9vl81dgc9qhHrtsAExUOaRb6t7erlWoOQcP6/oZ8LB4GcN2CodoTd+YLP0e4nj3i cYoeoGOcnZ07Gza5hKEVwUp07xX5mWMFSbWwQFDZ8Pinwa6+d/EVC221XXURS3Cpk/uG EB+23UgbxQlHsVrM0y4SmULAM1U9dGIEN/RE7NutE7ZzT7SXE/5T58MLIRrPDQkP7O7k UvMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cfm56PFUNAM12mnRTmJQmQ9/89bvI9IjDXdyh5su2Ok=; b=ZSyct13DgUbYBzTytqEnKw/dsLtVSnz69XXcjOsmUmgKN6xP+oip/IPrhGhWwBKMCH wqPXrWv9/hfZYgOlhQUU7Rf2AI2jMiT9Ar4sbN8g5/do3+SESmOG+FPkwOJSOOg7mHIM yKVB/4MdYGZnFxVcKp9psX4q9Dpn9ewwd43zi2stv31Wjdz1O9O9WTieV44apyYTMx0b v4EVxXT2Y6iVjqjoaX3xIZ1mPAmNKwWzKOACfgrx20E6hjH8QaSUx2qskpLEnxJyKddi eS9qeHFsutcuzRAY8gAHhQ8PmC2QdWNTjEi57LtY3fZejOD+TBP0/XZAz5XNg0cAMv9+ aKbQ== X-Gm-Message-State: AIkVDXJIngGeU7Ow2gubRIm37/rgcV06NtY8wZLjkEv9TfY5r0KGMAaA5CfXGj9tYiBV+TCJiXCNMCDNwhGapQ== X-Received: by 10.200.37.85 with SMTP id 21mr31305509qtn.238.1484559585654; Mon, 16 Jan 2017 01:39:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.150.188 with HTTP; Mon, 16 Jan 2017 01:39:45 -0800 (PST) In-Reply-To: <201701160825.v0G8PYL4036827@repo.freebsd.org> References: <201701160825.v0G8PYL4036827@repo.freebsd.org> From: Sergey Kandaurov Date: Mon, 16 Jan 2017 12:39:45 +0300 Message-ID: Subject: Re: svn commit: r312277 - in head/sys: kern sys To: Hiren Panchasara 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-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, 16 Jan 2017 09:39:47 -0000 On 16 January 2017 at 11:25, Hiren Panchasara wrote: > Author: hiren > Date: Mon Jan 16 08:25:33 2017 > New Revision: 312277 > URL: https://svnweb.freebsd.org/changeset/base/312277 > > Log: > Add kevent EVFILT_EMPTY for notification when a client has received all > data > i.e. everything outstanding has been acked. > > Reviewed by: bz, gnn (previous version) > MFC after: 3 days > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D9150 > > Modified: > head/sys/kern/kern_event.c > head/sys/kern/uipc_socket.c > head/sys/sys/event.h > > Hello. Is kqueue(2) man page update planned? -- wbr, pluknet From owner-svn-src-head@freebsd.org Mon Jan 16 14:49:30 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 7D2CACB2109; Mon, 16 Jan 2017 14:49:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3535A15E5; Mon, 16 Jan 2017 14:49:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GEnTmt093548; Mon, 16 Jan 2017 14:49:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GEnTTN093545; Mon, 16 Jan 2017 14:49:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701161449.v0GEnTTN093545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 16 Jan 2017 14:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312288 - head/libexec/rtld-elf/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 14:49:30 -0000 Author: emaste Date: Mon Jan 16 14:49:29 2017 New Revision: 312288 URL: https://svnweb.freebsd.org/changeset/base/312288 Log: rtld: do not rely on a populated GOT on amd64 On rela architectures GNU BFD ld and gold store the relocation addend in GOT entries (in addition to the relocation's r_addend field). rtld previously relied on this to access its own _DYNAMIC symbol in order to apply its own relocations. However, recording addends in the GOT is not specified by the ABI, and some versions of LLVM's LLD linker leave the GOT uninitialized on rela architectures. BFD ld does not populate the GOT on sparc64, and sparc64 rtld has a machine-dependent rtld_dynamic_addr() function that returns the _DYNAMIC address. Use the same approach on amd64, obtaining the %rip- relative _DYNAMIC address following a suggestion from Rafael Espíndola. Architectures other than amd64 should be addressed in future work. PR: 214972 Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9180 Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h head/libexec/rtld-elf/amd64/rtld_start.S Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_machdep.h Mon Jan 16 14:31:17 2017 (r312287) +++ head/libexec/rtld-elf/amd64/rtld_machdep.h Mon Jan 16 14:49:29 2017 (r312288) @@ -35,8 +35,8 @@ struct Struct_Obj_Entry; /* Return the address of the .dynamic section in the dynamic linker. */ -#define rtld_dynamic(obj) \ - ((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC)) +Elf_Dyn *rtld_dynamic_addr(void); +#define rtld_dynamic(obj) rtld_dynamic_addr() /* Fixup the jump slot at "where" to transfer control to "target". */ static inline Elf_Addr Modified: head/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_start.S Mon Jan 16 14:31:17 2017 (r312287) +++ head/libexec/rtld-elf/amd64/rtld_start.S Mon Jan 16 14:49:29 2017 (r312288) @@ -156,4 +156,16 @@ _rtld_bind_start: .cfi_endproc .size _rtld_bind_start, . - _rtld_bind_start + .align 4 + .globl rtld_dynamic_addr + .type rtld_dynamic_addr,@function +rtld_dynamic_addr: + .cfi_startproc + .weak _DYNAMIC + .hidden _DYNAMIC + lea _DYNAMIC(%rip),%rax + ret + .cfi_endproc + .size rtld_dynamic_addr, . - rtld_dynamic_addr + .section .note.GNU-stack,"",%progbits From owner-svn-src-head@freebsd.org Mon Jan 16 15:23:56 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 E06CBCB2BC9; Mon, 16 Jan 2017 15:23:56 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BA2163A; Mon, 16 Jan 2017 15:23:56 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GFNtnW011528; Mon, 16 Jan 2017 15:23:55 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GFNtku011527; Mon, 16 Jan 2017 15:23:55 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201701161523.v0GFNtku011527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 16 Jan 2017 15:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312289 - head/sys/dev/spibus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 15:23:57 -0000 Author: mizhka Date: Mon Jan 16 15:23:55 2017 New Revision: 312289 URL: https://svnweb.freebsd.org/changeset/base/312289 Log: [spibus] small code refactoring Merge 3 sequential printf calls into one. Reported by: rpokala Reviewed by: rpokala, adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8795 Modified: head/sys/dev/spibus/spibus.c Modified: head/sys/dev/spibus/spibus.c ============================================================================== --- head/sys/dev/spibus/spibus.c Mon Jan 16 14:49:29 2017 (r312288) +++ head/sys/dev/spibus/spibus.c Mon Jan 16 15:23:55 2017 (r312289) @@ -116,9 +116,8 @@ spibus_probe_nomatch(device_t bus, devic { struct spibus_ivar *devi = SPIBUS_IVAR(child); - device_printf(bus, ""); - printf(" at cs %d", devi->cs); - printf(" mode %d\n", devi->mode); + device_printf(bus, " at cs %d mode %d\n", devi->cs, + devi->mode); return; } From owner-svn-src-head@freebsd.org Mon Jan 16 15:36:38 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 344FBCB20A4; Mon, 16 Jan 2017 15:36:38 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113FE102E; Mon, 16 Jan 2017 15:36:38 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GFabbf016246; Mon, 16 Jan 2017 15:36:37 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GFabfY016244; Mon, 16 Jan 2017 15:36:37 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201701161536.v0GFabfY016244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 16 Jan 2017 15:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312290 - in head/sys: conf dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 15:36:38 -0000 Author: mizhka Date: Mon Jan 16 15:36:36 2017 New Revision: 312290 URL: https://svnweb.freebsd.org/changeset/base/312290 Log: [gpioths] new driver for temperature/humidity sensor DHT11 This patch adds driver for temperature/humidity sensor connected via GPIO. To compile it into kernel add "device gpioths". To activate driver, use hints (.at and .pins) for gpiobus. As result it will provide temperature & humidity values via sysctl. DHT11 is cheap & popular temperature/humidity sensor used via GPIO on ARM or MIPS devices like Raspberry Pi or Onion Omega. Reviewed by: adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D9185 Added: head/sys/dev/gpio/gpioths.c (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jan 16 15:23:55 2017 (r312289) +++ head/sys/conf/files Mon Jan 16 15:36:36 2017 (r312290) @@ -1714,6 +1714,7 @@ dev/gpio/gpioled_fdt.c optional gpioled dev/gpio/gpiopower.c optional gpiopower fdt dev/gpio/gpioregulator.c optional gpioregulator fdt ext_resources dev/gpio/gpiospi.c optional gpiospi +dev/gpio/gpioths.c optional gpioths dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps Added: head/sys/dev/gpio/gpioths.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gpio/gpioths.c Mon Jan 16 15:36:36 2017 (r312290) @@ -0,0 +1,405 @@ +/*- + * Copyright (c) 2016 Michael Zhilin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "gpiobus_if.h" + +/* + * GPIOTHS - Temp/Humidity sensor over GPIO, e.g. DHT11/DHT22 + * This is driver for Temperature & Humidity sensor which provides digital + * output over single-wire protocol from embedded 8-bit microcontroller. + * + * Temp/Humidity sensor can't be discovered automatically, please specify hints + * as part of loader or kernel configuration: + * hint.gpioths.0.at="gpiobus0" + * hint.gpioths.0.pins= + */ + +#define GPIOTHS_POLLTIME 5 /* in seconds */ + +#define GPIOTHS_DHT_STARTCYCLE 20000 /* 20ms = 20000us */ +#define GPIOTHS_DHT_TIMEOUT 1000 /* 1ms = 1000us */ +#define GPIOTHS_DHT_CYCLES 41 +#define GPIOTHS_DHT_ONEBYTEMASK 0xFF +#define GPIOTHS_DHT_TEMP_SHIFT 8 +#define GPIOTHS_DHT_HUM_SHIFT 24 + +struct gpioths_softc { + device_t dev; + int temp; + int hum; + int fails; + struct sysctl_oid *temp_oid; + struct sysctl_oid *hum_oid; + struct sysctl_oid *fails_oid; + struct callout callout; +}; + +static devclass_t gpioths_devclass; + +/* Prototypes */ +static int gpioths_probe(device_t dev); +static int gpioths_attach(device_t dev); +static int gpioths_detach(device_t dev); +static void gpioths_poll(void *arg); +static int gpioths_temp_sysctl(SYSCTL_HANDLER_ARGS); +static int gpioths_hum_sysctl(SYSCTL_HANDLER_ARGS); +static int gpioths_fails_sysctl(SYSCTL_HANDLER_ARGS); + +/* DHT-specific methods */ +static int gpioths_dht_initread(device_t bus, device_t dev); +static int gpioths_dht_readbytes(device_t bus, device_t dev); +static int gpioths_dht_timeuntil(device_t bus, device_t dev, + uint32_t lev, uint32_t *time); + +/* Implementation */ +static int +gpioths_probe(device_t dev) +{ + device_set_desc(dev, "Temperature and Humidity Sensor over GPIO"); + return (0); +} + +static int +gpioths_dht_timeuntil(device_t bus, device_t dev, uint32_t lev, uint32_t *time) +{ + uint32_t cur_level; + int i; + + for (i = 0; i < GPIOTHS_DHT_TIMEOUT; i++) { + GPIOBUS_PIN_GET(bus, dev, 0, &cur_level); + if (cur_level == lev) { + if (time != NULL) + *time = i; + return (0); + } + DELAY(1); + } + + /* Timeout */ + return (ETIMEDOUT); +} + +static int +gpioths_dht_initread(device_t bus, device_t dev) +{ + int err; + + err = GPIOBUS_PIN_SETFLAGS(bus, dev, 0, GPIO_PIN_OUTPUT); + if (err != 0) { + device_printf(dev, "err(GPIOBUS_PIN_SETFLAGS, OUT) = %d\n", err); + return (err); + } + DELAY(1); + + err = GPIOBUS_PIN_SET(bus, dev, 0, GPIO_PIN_LOW); + if (err != 0) { + device_printf(dev, "err(GPIOBUS_PIN_SET, LOW) = %d\n", err); + return (err); + } + + /* + * According to specifications we need to wait no more than 18ms + * to start data transfer + */ + DELAY(GPIOTHS_DHT_STARTCYCLE); + err = GPIOBUS_PIN_SET(bus, dev, 0, GPIO_PIN_HIGH); + if (err != 0) { + device_printf(dev, "err(GPIOBUS_PIN_SET, HIGH) = %d\n", err); + return (err); + } + + DELAY(1); + err = GPIOBUS_PIN_SETFLAGS(bus, dev, 0, GPIO_PIN_INPUT) ; + if (err != 0) { + device_printf(dev, "err(GPIOBUS_PIN_SETFLAGS, IN) = %d\n", err); + return (err); + } + + DELAY(1); + return (0); +} + +static int +gpioths_dht_readbytes(device_t bus, device_t dev) +{ + struct gpioths_softc *sc; + uint32_t calibrations[GPIOTHS_DHT_CYCLES]; + uint32_t intervals[GPIOTHS_DHT_CYCLES]; + uint32_t err, avglen, value; + uint8_t crc, calc; + int i, offset, size; + + sc = device_get_softc(dev); + + err = gpioths_dht_initread(bus,dev); + if (err) { + device_printf(dev, "gpioths_dht_initread error = %d\n", err); + goto error; + } + + err = gpioths_dht_timeuntil(bus, dev, GPIO_PIN_LOW, NULL); + if (err) { + device_printf(dev, "err(START) = %d\n", err); + goto error; + } + + /* reading - 41 cycles */ + for (i = 0; i < GPIOTHS_DHT_CYCLES; i++) { + err = gpioths_dht_timeuntil(bus, dev, GPIO_PIN_HIGH, + &calibrations[i]); + if (err) { + device_printf(dev, "err(CAL, %d) = %d\n", i, err); + goto error; + } + err = gpioths_dht_timeuntil(bus, dev, GPIO_PIN_LOW, + &intervals[i]); + if (err) { + device_printf(dev, "err(INTERVAL, %d) = %d\n", i, err); + goto error; + } + } + + err = GPIOBUS_PIN_SETFLAGS(bus, dev, 0, GPIO_PIN_OUTPUT); + if (err != 0) { + device_printf(dev, "err(FINAL_SETFLAGS, OUT) = %d\n", err); + goto error; + } + DELAY(1); + + /* Calculate average data calibration cycle length */ + avglen = 0; + for (i = 1; i < GPIOTHS_DHT_CYCLES; i++) + avglen += calibrations[i]; + + avglen = avglen / (GPIOTHS_DHT_CYCLES - 1); + + /* Calculate data */ + value = 0; + offset = 1; + size = sizeof(value) * 8; + for (i = offset; i < size + offset; i++) { + value <<= 1; + if (intervals[i] > avglen) + value += 1; + } + + /* Calculate CRC */ + crc = 0; + offset = sizeof(value) * 8 + 1; + size = sizeof(crc) * 8; + for (i = offset; i < size + offset; i++) { + crc <<= 1; + if (intervals[i] > avglen) + crc += 1; + } + + calc = 0; + for (i = 0; i < sizeof(value); i++) + calc += (value >> (8*i)) & GPIOTHS_DHT_ONEBYTEMASK; + +#ifdef GPIOTHS_DEBUG + /* Debug bits */ + for (i = 0; i < GPIOTHS_DHT_CYCLES; i++) + device_printf(dev, "%d: %d %d\n", i, calibrations[i], + intervals[i]); + + device_printf(dev, "len=%d, data=%x, crc=%x/%x\n", avglen, value, crc, + calc); +#endif /* GPIOTHS_DEBUG */ + + /* CRC check */ + if (calc != crc) { + err = -1; + goto error; + } + + sc->fails = 0; + sc->temp = (value >> GPIOTHS_DHT_TEMP_SHIFT) & GPIOTHS_DHT_ONEBYTEMASK; + sc->hum = (value >> GPIOTHS_DHT_HUM_SHIFT) & GPIOTHS_DHT_ONEBYTEMASK; + +#ifdef GPIOTHS_DEBUG + /* Debug bits */ + device_printf(dev, "fails=%d, temp=%d, hum=%d\n", sc->fails, + sc->temp, sc->hum); +#endif /* GPIOTHS_DEBUG */ + + return (0); +error: + sc->fails++; + return (err); +} + +static void +gpioths_poll(void *arg) +{ + struct gpioths_softc *sc; + device_t dev; + + dev = (device_t)arg; + sc = device_get_softc(dev); + + gpioths_dht_readbytes(device_get_parent(dev), dev); + callout_schedule(&sc->callout, GPIOTHS_POLLTIME * hz); +} + +static int +gpioths_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct gpioths_softc *sc; + int value; + + sc = (struct gpioths_softc*)arg1; + value = sc->temp; + + return (sysctl_handle_int(oidp, &value, 0, req)); +} + +static int +gpioths_hum_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct gpioths_softc *sc; + int value; + + sc = (struct gpioths_softc*)arg1; + value = sc->hum; + + return (sysctl_handle_int(oidp, &value, 0, req)); +} + + +static int +gpioths_fails_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct gpioths_softc *sc; + int value; + + sc = (struct gpioths_softc*)arg1; + value = sc->fails; + + return (sysctl_handle_int(oidp, &value, 0, req)); +} + +static int +gpioths_attach(device_t dev) +{ + struct gpioths_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + + sc = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + sc->dev = dev; + + callout_init(&sc->callout, 1); + callout_reset(&sc->callout, GPIOTHS_POLLTIME * hz, gpioths_poll, dev); + + sc->temp_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + gpioths_temp_sysctl, "I", "temperature(C)"); + + sc->hum_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "humidity", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + gpioths_hum_sysctl, "I", "humidity(%)"); + + sc->fails_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "fails", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + gpioths_fails_sysctl, "I", "fails since last successful read"); + + return (0); +} + +static int +gpioths_detach(device_t dev) +{ + + return (0); +} + +/* DDB bits */ +#include "opt_ddb.h" +#ifdef DDB +#include +#include +#include + +static struct command_table db_gpioths_table = LIST_HEAD_INITIALIZER(db_t4_table); +_DB_SET(_show, gpioths, NULL, db_show_table, 0, &db_gpioths_table); + +DB_FUNC(read, db_show_gpiothsread, db_gpioths_table, CS_OWN, NULL) +{ + device_t dev; + int t; + int init; + + init = 0; + t = db_read_token(); + if (t == tIDENT) { + dev = device_lookup_by_name(db_tok_string); + init = 1; + } + + db_skip_to_eol(); + + if (init) + db_printf("read: 0x%x\n", + gpioths_dht_readbytes(dev, device_get_parent(dev))); + else + db_printf("usage: show gpioths read \n"); + +return; +} +#endif /* DDB */ + +/* Driver bits */ +static device_method_t gpioths_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, gpioths_probe), + DEVMETHOD(device_attach, gpioths_attach), + DEVMETHOD(device_detach, gpioths_detach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(gpioths, gpioths_driver, gpioths_methods, sizeof(struct gpioths_softc)); +DRIVER_MODULE(gpioths, gpiobus, gpioths_driver, gpioths_devclass, 0, 0); From owner-svn-src-head@freebsd.org Mon Jan 16 16:19:58 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 09418CB221B; Mon, 16 Jan 2017 16:19:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B4161C67; Mon, 16 Jan 2017 16:19:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GGJuSk033025; Mon, 16 Jan 2017 16:19:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GGJtrQ033013; Mon, 16 Jan 2017 16:19:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701161619.v0GGJtrQ033013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Jan 2017 16:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312291 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 16:19:58 -0000 Author: mav Date: Mon Jan 16 16:19:55 2017 New Revision: 312291 URL: https://svnweb.freebsd.org/changeset/base/312291 Log: Make CTL frontends report kern_data_resid for under-/overruns. It seems like kern_data_resid was never really implemented. This change finally does it. Now frontends update this field while transferring data, while CTL/backends getting it can more flexibly handle the result. At this point behavior should not change significantly, still reporting errors on write overrun, but that may be changed later, if we decide so. CAM target frontend still does not properly handle overruns due to CAM API limitations. We may need to add some fields to struct ccb_accept_tio to pass information about initiator requested transfer size(s). MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_error.h head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_ioctl.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/ctl_tpc_local.c head/sys/cam/ctl/scsi_ctl.c head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl.c Mon Jan 16 16:19:55 2017 (r312291) @@ -5053,18 +5053,13 @@ ctl_config_move_done(union ctl_io *io) if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } if (ctl_debug & CTL_DEBUG_CDB_DATA) @@ -5462,7 +5457,6 @@ ctl_format(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK); ctsio->kern_data_len = length; ctsio->kern_total_len = length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -5588,7 +5582,6 @@ ctl_read_buffer(struct ctl_scsiio *ctsio } ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctl_set_success(ctsio); @@ -5634,7 +5627,6 @@ ctl_write_buffer(struct ctl_scsiio *ctsi ctsio->kern_data_ptr = lun->write_buffer + buffer_offset; ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -5742,7 +5734,6 @@ ctl_write_same(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -5788,7 +5779,6 @@ ctl_unmap(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -6278,7 +6268,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -6508,7 +6497,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6861,7 +6849,6 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6929,7 +6916,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -6995,7 +6981,6 @@ ctl_read_capacity_16(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -7050,7 +7035,6 @@ ctl_get_lba_status(struct ctl_scsiio *ct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -7112,7 +7096,6 @@ ctl_read_defect(struct ctl_scsiio *ctsio ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -7211,7 +7194,6 @@ ctl_report_tagret_port_groups(struct ctl ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (ext) { @@ -7412,7 +7394,6 @@ ctl_report_supported_opcodes(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; switch (cdb->options & RSO_OPTIONS_MASK) { @@ -7526,7 +7507,6 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; @@ -7574,7 +7554,6 @@ ctl_report_timestamp(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; @@ -7647,7 +7626,6 @@ retry: ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -8225,7 +8203,6 @@ ctl_persistent_reserve_out(struct ctl_sc ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -9207,7 +9184,6 @@ ctl_report_luns(struct ctl_scsiio *ctsio ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9270,7 +9246,6 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9409,7 +9384,6 @@ ctl_inquiry_evpd_supported(struct ctl_sc ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9478,7 +9452,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9537,7 +9510,6 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9613,7 +9585,6 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9678,7 +9649,6 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9807,7 +9777,6 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9883,7 +9852,6 @@ ctl_inquiry_evpd_block_limits(struct ctl ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9959,7 +9927,6 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -10016,7 +9983,6 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -10151,7 +10117,6 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10379,7 +10344,6 @@ ctl_get_config(struct ctl_scsiio *ctsio) sizeof(struct scsi_get_config_feature) + 4; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; hdr = (struct scsi_get_config_header *)ctsio->kern_data_ptr; @@ -10585,7 +10549,6 @@ ctl_get_event_status(struct ctl_scsiio * data_len = sizeof(struct scsi_get_event_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10623,7 +10586,6 @@ ctl_mechanism_status(struct ctl_scsiio * data_len = sizeof(struct scsi_mechanism_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10683,7 +10645,6 @@ ctl_read_toc(struct ctl_scsiio *ctsio) data_len += sizeof(struct scsi_read_toc_type01_descr); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -12585,6 +12546,9 @@ ctl_datamove(union ctl_io *io) CTL_DEBUG_PRINT(("ctl_datamove\n")); + /* No data transferred yet. Frontend must update this when done. */ + io->scsiio.kern_data_resid = io->scsiio.kern_data_len; + #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { char str[256]; Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_backend_block.c Mon Jan 16 16:19:55 2017 (r312291) @@ -419,6 +419,16 @@ ctl_be_block_move_done(union ctl_io *io) */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { lbalen = ARGS(beio->io); @@ -428,21 +438,6 @@ ctl_be_block_move_done(union ctl_io *io) /* We have two data blocks ready for comparison. */ ctl_be_block_compare(io); } - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } /* @@ -1634,7 +1629,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc else io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Mon Jan 16 16:19:55 2017 (r312291) @@ -231,6 +231,16 @@ ctl_backend_ramdisk_move_done(union ctl_ io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if (io->io_hdr.port_status != 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { @@ -243,21 +253,6 @@ ctl_backend_ramdisk_move_done(union ctl_ return (0); } ctl_set_success(&io->scsiio); - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } ctl_data_submit_done(io); return(0); @@ -318,7 +313,6 @@ ctl_backend_ramdisk_continue(union ctl_i #endif /* CTL_RAMDISK_PAGES */ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_data_len = len_filled; io->scsiio.kern_sg_entries = sg_filled; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_error.c Mon Jan 16 16:19:55 2017 (r312291) @@ -641,6 +641,18 @@ ctl_set_invalid_field(struct ctl_scsiio /*data*/ sks, SSD_ELEM_NONE); } +void +ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio) +{ + + /* "Invalid field in command information unit" */ + ctl_set_sense(ctsio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ABORTED_COMMAND, + /*ascq*/ 0x0E, + /*ascq*/ 0x03, + SSD_ELEM_NONE); +} void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio) Modified: head/sys/cam/ctl/ctl_error.h ============================================================================== --- head/sys/cam/ctl/ctl_error.h Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_error.h Mon Jan 16 16:19:55 2017 (r312291) @@ -66,6 +66,7 @@ void ctl_set_overlapped_cmd(struct ctl_s void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag); void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command, int field, int bit_valid, int bit); +void ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio); void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio); void ctl_set_param_len_error(struct ctl_scsiio *ctsio); void ctl_set_already_locked(struct ctl_scsiio *ctsio); Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jan 16 16:19:55 2017 (r312291) @@ -300,7 +300,7 @@ cfcs_datamove(union ctl_io *io) struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; int cam_sg_count, ctl_sg_count, cam_sg_start; int cam_sg_offset; - int len_to_copy, len_copied; + int len_to_copy; int ctl_watermark, cam_watermark; int i, j; @@ -365,7 +365,6 @@ cfcs_datamove(union ctl_io *io) ctl_watermark = 0; cam_watermark = cam_sg_offset; - len_copied = 0; for (i = cam_sg_start, j = 0; i < cam_sg_count && j < ctl_sg_count;) { uint8_t *cam_ptr, *ctl_ptr; @@ -387,9 +386,6 @@ cfcs_datamove(union ctl_io *io) ctl_ptr = (uint8_t *)ctl_sglist[j].addr; ctl_ptr = ctl_ptr + ctl_watermark; - ctl_watermark += len_to_copy; - cam_watermark += len_to_copy; - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to CAM\n", @@ -405,30 +401,22 @@ cfcs_datamove(union ctl_io *io) bcopy(cam_ptr, ctl_ptr, len_to_copy); } - len_copied += len_to_copy; + io->scsiio.ext_data_filled += len_to_copy; + io->scsiio.kern_data_resid -= len_to_copy; + cam_watermark += len_to_copy; if (cam_sglist[i].ds_len == cam_watermark) { i++; cam_watermark = 0; } + ctl_watermark += len_to_copy; if (ctl_sglist[j].len == ctl_watermark) { j++; ctl_watermark = 0; } } - io->scsiio.ext_data_filled += len_copied; - - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < ctl_sg_count) { - io->io_hdr.port_status = 43; - } else - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_ioctl.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_frontend_ioctl.c Mon Jan 16 16:19:55 2017 (r312291) @@ -138,7 +138,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio struct ctl_sg_entry ext_entry, kern_entry; int ext_sglen, ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; int ext_sglist_malloced; int i, j; @@ -150,7 +150,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio */ if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { ext_sglist_malloced = 0; - ctsio->ext_data_filled = ctsio->ext_data_len; + ctsio->ext_data_filled += ctsio->kern_data_len; + ctsio->kern_data_resid = 0; goto bailout; } @@ -204,7 +205,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -226,9 +226,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " @@ -250,21 +247,22 @@ ctl_ioctl_do_datamove(struct ctl_scsiio } } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, " "kern_sg_entries: %d\n", ext_sg_entries, kern_sg_entries)); @@ -272,15 +270,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio "kern_data_len = %d\n", ctsio->ext_data_len, ctsio->kern_data_len)); - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < kern_sg_entries) { - ctsio->io_hdr.port_status = 43; - } - bailout: if (ext_sglist_malloced != 0) free(ext_sglist, M_CTL); Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Jan 16 16:19:55 2017 (r312291) @@ -769,6 +769,7 @@ cfiscsi_handle_data_segment(struct icl_p cdw->cdw_sg_len -= copy_len; off += copy_len; io->scsiio.ext_data_filled += copy_len; + io->scsiio.kern_data_resid -= copy_len; if (cdw->cdw_sg_len == 0) { /* @@ -2514,6 +2515,7 @@ cfiscsi_datamove_in(union ctl_io *io) } sg_addr += len; sg_len -= len; + io->scsiio.kern_data_resid -= len; KASSERT(buffer_offset + response->ip_data_len <= expected_len, ("buffer_offset %zd + ip_data_len %zd > expected_len %zd", @@ -2599,7 +2601,7 @@ cfiscsi_datamove_out(union ctl_io *io) struct iscsi_bhs_r2t *bhsr2t; struct cfiscsi_data_wait *cdw; struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; - uint32_t expected_len, r2t_off, r2t_len; + uint32_t expected_len, datamove_len, r2t_off, r2t_len; uint32_t target_transfer_tag; bool done; @@ -2618,16 +2620,15 @@ cfiscsi_datamove_out(union ctl_io *io) PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; /* - * Report write underflow as error since CTL and backends don't - * really support it, and SCSI does not tell how to do it right. + * Complete write underflow. Not a single byte to read. Return. */ expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); - if (io->scsiio.kern_rel_offset + io->scsiio.kern_data_len > - expected_len) { - io->scsiio.io_hdr.port_status = 43; + if (io->scsiio.kern_rel_offset > expected_len) { io->scsiio.be_move_done(io); return; } + datamove_len = MIN(io->scsiio.kern_data_len, + expected_len - io->scsiio.kern_rel_offset); target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); @@ -2650,7 +2651,7 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_ctl_io = io; cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - cdw->cdw_r2t_end = io->scsiio.kern_data_len; + cdw->cdw_r2t_end = datamove_len; cdw->cdw_datasn = 0; /* Set initial data pointer for the CDW respecting ext_data_filled. */ @@ -2659,7 +2660,7 @@ cfiscsi_datamove_out(union ctl_io *io) } else { ctl_sglist = &ctl_sg_entry; ctl_sglist->addr = io->scsiio.kern_data_ptr; - ctl_sglist->len = io->scsiio.kern_data_len; + ctl_sglist->len = datamove_len; } cdw->cdw_sg_index = 0; cdw->cdw_sg_addr = ctl_sglist[cdw->cdw_sg_index].addr; @@ -2690,7 +2691,7 @@ cfiscsi_datamove_out(union ctl_io *io) } r2t_off = io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled; - r2t_len = MIN(io->scsiio.kern_data_len - io->scsiio.ext_data_filled, + r2t_len = MIN(datamove_len - io->scsiio.ext_data_filled, cs->cs_max_burst_length); cdw->cdw_r2t_end = io->scsiio.ext_data_filled + r2t_len; Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_tpc.c Mon Jan 16 16:19:55 2017 (r312291) @@ -293,7 +293,6 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -470,7 +469,6 @@ ctl_receive_copy_operating_parameters(st ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; @@ -568,7 +566,6 @@ ctl_receive_copy_status_lid1(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; @@ -646,7 +643,6 @@ ctl_receive_copy_failure_details(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; @@ -718,7 +714,6 @@ ctl_receive_copy_status_lid4(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -1730,7 +1725,6 @@ ctl_extended_copy_lid1(struct ctl_scsiio ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -1885,7 +1879,6 @@ ctl_extended_copy_lid4(struct ctl_scsiio ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -2083,7 +2076,6 @@ ctl_populate_token(struct ctl_scsiio *ct ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -2247,7 +2239,6 @@ ctl_write_using_token(struct ctl_scsiio ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); ctsio->kern_data_len = len; ctsio->kern_total_len = len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -2423,7 +2414,6 @@ ctl_receive_rod_token_information(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -2504,7 +2494,6 @@ ctl_report_all_rod_tokens(struct ctl_scs ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; Modified: head/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc_local.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/ctl_tpc_local.c Mon Jan 16 16:19:55 2017 (r312291) @@ -137,7 +137,7 @@ tpcl_datamove(union ctl_io *io) struct ctl_sg_entry ext_entry, kern_entry; int ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; struct ctl_scsiio *ctsio; int i, j; @@ -196,7 +196,6 @@ tpcl_datamove(union ctl_io *io) kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -218,9 +217,6 @@ tpcl_datamove(union ctl_io *io) kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to user\n", @@ -236,27 +232,27 @@ tpcl_datamove(union ctl_io *io) memcpy(kern_ptr, ext_ptr, len_to_copy); } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("%s: ext_sg_entries: %d, kern_sg_entries: %d\n", __func__, ext_sg_entries, kern_sg_entries)); CTL_DEBUG_PRINT(("%s: ext_data_len = %d, kern_data_len = %d\n", __func__, ctsio->ext_data_len, ctsio->kern_data_len)); - /* XXX KDM set residual?? */ bailout: io->scsiio.be_move_done(io); } Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Mon Jan 16 15:36:36 2017 (r312290) +++ head/sys/cam/ctl/scsi_ctl.c Mon Jan 16 16:19:55 2017 (r312291) @@ -721,15 +721,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, idx = cmd_info->cur_transfer_index; off = cmd_info->cur_transfer_off; cmd_info->flags &= ~CTLFE_CMD_PIECEWISE; - if (io->scsiio.kern_sg_entries == 0) { - /* No S/G list. */ + if (io->scsiio.kern_sg_entries == 0) { /* No S/G list. */ + + /* One time shift for SRR offset. */ + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + *data_ptr = io->scsiio.kern_data_ptr + off; if (io->scsiio.kern_data_len - off <= bus_softc->maxio) { *dxfer_len = io->scsiio.kern_data_len - off; } else { *dxfer_len = bus_softc->maxio; - cmd_info->cur_transfer_index = -1; - cmd_info->cur_transfer_off = bus_softc->maxio; + cmd_info->cur_transfer_off += bus_softc->maxio; cmd_info->flags |= CTLFE_CMD_PIECEWISE; } *sglist_cnt = 0; @@ -738,9 +741,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, *flags |= CAM_DATA_PADDR; else *flags |= CAM_DATA_VADDR; - } else { - /* S/G list with physical or virtual pointers. */ + } else { /* S/G list with physical or virtual pointers. */ ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + + /* One time shift for SRR offset. */ + while (io->scsiio.ext_data_filled >= ctl_sglist[idx].len - off) { + io->scsiio.ext_data_filled -= ctl_sglist[idx].len - off; + idx++; + off = 0; + } + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + cam_sglist = cmd_info->cam_sglist; *dxfer_len = 0; for (i = 0; i < io->scsiio.kern_sg_entries - idx; i++) { @@ -818,18 +830,8 @@ ctlfestart(struct cam_periph *periph, un /* * Datamove call, we need to setup the S/G list. */ - scsi_status = 0; - csio->cdb_len = atio->cdb_len; ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - io->scsiio.ext_data_filled += dxfer_len; - if (io->scsiio.ext_data_filled > io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "fill len %u > total %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_filled, - io->scsiio.kern_total_len); - } } else { /* * We're done, send status back. @@ -891,8 +893,8 @@ ctlfestart(struct cam_periph *periph, un data_ptr = NULL; dxfer_len = 0; csio->sglist_cnt = 0; - scsi_status = 0; } + scsi_status = 0; if ((io->io_hdr.flags & CTL_FLAG_STATUS_QUEUED) && (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || @@ -1246,13 +1248,36 @@ ctlfedone(struct cam_periph *periph, uni | (done_ccb->csio.msg_ptr[6]); } + /* + * If we have an SRR and we're still sending data, we + * should be able to adjust offsets and cycle again. + * It is possible only if offset is from this datamove. + */ + if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) && + srr_off >= io->scsiio.kern_rel_offset && + srr_off < io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len) { + io->scsiio.kern_data_resid = + io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len - srr_off; + io->scsiio.ext_data_filled = srr_off; + io->scsiio.io_hdr.status = CTL_STATUS_NONE; + io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED; + softc->ccbs_freed++; + xpt_release_ccb(done_ccb); + TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, + periph_links.tqe); + xpt_schedule(periph, /*priority*/ 1); + break; + } + + /* + * If status was being sent, the back end data is now history. + * Hack it up and resubmit a new command with the CDB adjusted. + * If the SIM does the right thing, all of the resid math + * should work. + */ if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { - /* - * If status was being sent, the back end data is now - * history. Hack it up and resubmit a new command with - * the CDB adjusted. If the SIM does the right thing, - * all of the resid math should work. - */ softc->ccbs_freed++; xpt_release_ccb(done_ccb); if (ctlfe_adjust_cdb(atio, srr_off) == 0) { @@ -1262,22 +1287,6 @@ ctlfedone(struct cam_periph *periph, uni /* * Fall through to doom.... */ - } else if (srr) { - /* - * If we have an srr and we're still sending data, we - * should be able to adjust offsets and cycle again. - */ - io->scsiio.kern_rel_offset = - io->scsiio.ext_data_filled = srr_off; - io->scsiio.ext_data_len = io->scsiio.kern_total_len - - io->scsiio.kern_rel_offset; - softc->ccbs_freed++; - io->scsiio.io_hdr.status = CTL_STATUS_NONE; - xpt_release_ccb(done_ccb); - TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, - periph_links.tqe); - xpt_schedule(periph, /*priority*/ 1); - break; } if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && @@ -1320,16 +1329,6 @@ ctlfedone(struct cam_periph *periph, uni io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; - io->scsiio.ext_data_len += csio->dxfer_len; - if (io->scsiio.ext_data_len > - io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "done len %u > total %u sent %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_len, - io->scsiio.kern_total_len, - io->scsiio.ext_data_filled); - } /* * Translate CAM status to CTL status. Success * does not change the overall, ctl_io status. In @@ -1339,6 +1338,7 @@ ctlfedone(struct cam_periph *periph, uni */ switch (done_ccb->ccb_h.status & CAM_STATUS_MASK) { case CAM_REQ_CMP: + io->scsiio.kern_data_resid -= csio->dxfer_len; io->io_hdr.port_status = 0; break; default: @@ -1368,7 +1368,6 @@ ctlfedone(struct cam_periph *periph, uni if ((cmd_info->flags & CTLFE_CMD_PIECEWISE) && (io->io_hdr.port_status == 0)) { ccb_flags flags; - uint8_t scsi_status; uint8_t *data_ptr; uint32_t dxfer_len; @@ -1379,8 +1378,6 @@ ctlfedone(struct cam_periph *periph, uni ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - scsi_status = 0; - if (((flags & CAM_SEND_STATUS) == 0) && (dxfer_len == 0)) { printf("%s: tag %04x no status or " @@ -1400,7 +1397,7 @@ ctlfedone(struct cam_periph *periph, uni MSG_SIMPLE_Q_TAG : 0, atio->tag_id, atio->init_id, - scsi_status, + 0, /*data_ptr*/ data_ptr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jan 16 16:44:15 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 B2B92CB2F29; Mon, 16 Jan 2017 16:44:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6630B10F9; Mon, 16 Jan 2017 16:44:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GGiE2o045308; Mon, 16 Jan 2017 16:44:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GGiDcU045297; Mon, 16 Jan 2017 16:44:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701161644.v0GGiDcU045297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Jan 2017 16:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312292 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 16:44:15 -0000 Author: ian Date: Mon Jan 16 16:44:13 2017 New Revision: 312292 URL: https://svnweb.freebsd.org/changeset/base/312292 Log: Remove arm's cpuconf.h, and references to it, after moving a few lines from it into pmap-v4.h where they are used. Other than those few lines of support for different MMU types, nothing in cpuconf.h has been used in our code for quite a while. The file existed to set up a variety of symbols to describe the architecture. Over the past few years we have converted all of our source to use the new architecture symbols standardized by ARM Inc, and predefined by both clang and gcc. PR: 216104 Deleted: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/arm/bus_space_asm_generic.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/locore-v4.S head/sys/arm/arm/locore-v6.S head/sys/arm/include/atomic.h head/sys/arm/include/cpufunc.h head/sys/arm/include/pcpu.h head/sys/arm/include/pmap-v4.h Modified: head/sys/arm/arm/bus_space_asm_generic.S ============================================================================== --- head/sys/arm/arm/bus_space_asm_generic.S Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/arm/bus_space_asm_generic.S Mon Jan 16 16:44:13 2017 (r312292) @@ -36,7 +36,6 @@ */ #include -#include __FBSDID("$FreeBSD$"); /* Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/arm/cpufunc.c Mon Jan 16 16:44:13 2017 (r312292) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #if defined(CPU_XSCALE_81342) Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/arm/identcpu-v4.c Mon Jan 16 16:44:13 2017 (r312292) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include char machine[] = "arm"; Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/arm/locore-v4.S Mon Jan 16 16:44:13 2017 (r312292) @@ -37,7 +37,6 @@ #include #include #include -#include #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/arm/locore-v6.S Mon Jan 16 16:44:13 2017 (r312292) @@ -34,7 +34,6 @@ #include #include #include -#include #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/include/atomic.h Mon Jan 16 16:44:13 2017 (r312292) @@ -44,8 +44,6 @@ #ifndef _KERNEL #include -#else -#include #endif #if __ARM_ARCH >= 6 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/include/cpufunc.h Mon Jan 16 16:44:13 2017 (r312292) @@ -48,7 +48,6 @@ #include #include -#include static __inline void breakpoint(void) Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/include/pcpu.h Mon Jan 16 16:44:13 2017 (r312292) @@ -32,8 +32,6 @@ #ifdef _KERNEL -#include - #define ALT_STACK_SIZE 128 struct vmspace; Modified: head/sys/arm/include/pmap-v4.h ============================================================================== --- head/sys/arm/include/pmap-v4.h Mon Jan 16 16:19:55 2017 (r312291) +++ head/sys/arm/include/pmap-v4.h Mon Jan 16 16:44:13 2017 (r312292) @@ -51,7 +51,30 @@ #define _MACHINE_PMAP_V4_H_ #include -#include + +/* + * Define the MMU types we support based on the cpu types. While the code has + * some theoretical support for multiple MMU types in a single kernel, there are + * no actual working configurations that use that feature. + */ +#if (defined(CPU_ARM9) || defined(CPU_ARM9E) || defined(CPU_FA526)) +#define ARM_MMU_GENERIC 1 +#else +#define ARM_MMU_GENERIC 0 +#endif + +#if (defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_XSCALE_81342)) +#define ARM_MMU_XSCALE 1 +#else +#define ARM_MMU_XSCALE 0 +#endif + +#define ARM_NMMUS (ARM_MMU_GENERIC + ARM_MMU_XSCALE) +#if ARM_NMMUS == 0 && !defined(KLD_MODULE) && defined(_KERNEL) +#error ARM_NMMUS is 0 +#endif + /* * Pte related macros */ From owner-svn-src-head@freebsd.org Mon Jan 16 16:58:14 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 5CF21CAF914; Mon, 16 Jan 2017 16:58:14 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 297CF1064; Mon, 16 Jan 2017 16:58:14 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GGwDNl050068; Mon, 16 Jan 2017 16:58:13 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GGwD0Z050066; Mon, 16 Jan 2017 16:58:13 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701161658.v0GGwD0Z050066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 16 Jan 2017 16:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312293 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 16:58:14 -0000 Author: sbruno Date: Mon Jan 16 16:58:12 2017 New Revision: 312293 URL: https://svnweb.freebsd.org/changeset/base/312293 Log: Change startup order for the no EARLY_AP_STARTUP case to initialize gtaskqueue bits at SI_SUB_INIT_IF instead of waiting until SI_SUB_SMP which is far too late. Add an assertion in taskqgroup_attach() to catch startup initialization failures in the future. Reported by: kib bde Modified: head/sys/kern/subr_gtaskqueue.c head/sys/sys/gtaskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Mon Jan 16 16:44:13 2017 (r312292) +++ head/sys/kern/subr_gtaskqueue.c Mon Jan 16 16:58:12 2017 (r312293) @@ -646,6 +646,7 @@ taskqgroup_attach(struct taskqgroup *qgr qid = taskqgroup_find(qgroup, uniq); qgroup->tqg_queue[qid].tgc_cnt++; LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); + MPASS(qgroup->tqg_queue[qid].tgc_taskq != NULL); gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; if (irq != -1 && (smp_started || mp_ncpus == 1)) { gtask->gt_cpu = qgroup->tqg_queue[qid].tgc_cpu; Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Mon Jan 16 16:44:13 2017 (r312292) +++ head/sys/sys/gtaskqueue.h Mon Jan 16 16:58:12 2017 (r312293) @@ -115,7 +115,7 @@ taskqgroup_adjust_##name(void *arg) taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ } \ \ -SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \ +SYSINIT(taskqgroup_adj_##name, SI_SUB_INIT_IF, SI_ORDER_ANY, \ taskqgroup_adjust_##name, NULL); \ \ struct __hack From owner-svn-src-head@freebsd.org Mon Jan 16 17:34:18 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 D68BCCB1930; Mon, 16 Jan 2017 17:34:18 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id C5CA91AF4; Mon, 16 Jan 2017 17:34:17 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id F35A917661; Mon, 16 Jan 2017 09:28:17 -0800 (PST) Date: Mon, 16 Jan 2017 09:28:17 -0800 From: Hiren Panchasara To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312277 - in head/sys: kern sys Message-ID: <20170116172817.GC86256@strugglingcoder.info> References: <201701160825.v0G8PYL4036827@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="L6iaP+gRLNZHKoI4" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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, 16 Jan 2017 17:34:19 -0000 --L6iaP+gRLNZHKoI4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01/16/17 at 12:39P, Sergey Kandaurov wrote: > On 16 January 2017 at 11:25, Hiren Panchasara wrote: >=20 > > Author: hiren > > Date: Mon Jan 16 08:25:33 2017 > > New Revision: 312277 > > URL: https://svnweb.freebsd.org/changeset/base/312277 > > > > Log: > > Add kevent EVFILT_EMPTY for notification when a client has received a= ll > > data > > i.e. everything outstanding has been acked. > > > > Reviewed by: bz, gnn (previous version) > > MFC after: 3 days > > Sponsored by: Limelight Networks > > Differential Revision: https://reviews.freebsd.org/D9150 > > > > Modified: > > head/sys/kern/kern_event.c > > head/sys/kern/uipc_socket.c > > head/sys/sys/event.h > > > > > Hello. >=20 > Is kqueue(2) man page update planned? Thanks for the reminder, I'll do it. Cheers, Hiren --L6iaP+gRLNZHKoI4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYfQKxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lY1kIAJrTvXKoqxs8+OuxHVP3sA+4 qnB5h4kSuJHwoUplVQPpwT86CWwCGtQmEZUh2sAcS7CCllpGX+G1WmUhjr+BZCih /Llr2dclzqu8EqzNXdI+fQLoTkab5OyPKgWFlvrDVj8WOJPD5AizBeIGK6r22BYh U+M9cF2GxYaLaZIBEMacmGUMtCJzKkarQBZ1SQEX+/nGGHtT+P502+NxI1KEVNhp PZtPKaBKp+9Eof4c5efGNF06LMh4FPCerJnZMaxMspfh1eR6khWamj/Cq9/fjKv/ 3yJl348cq+7n+gHOGtraQQ/mqbw1YLGB2/Nc6rjf2v4XNx9XKS41Sp680BnzGcg= =N/Ud -----END PGP SIGNATURE----- --L6iaP+gRLNZHKoI4-- From owner-svn-src-head@freebsd.org Mon Jan 16 17:46:41 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 518FECB20E8; Mon, 16 Jan 2017 17:46:41 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE77D164B; Mon, 16 Jan 2017 17:46:40 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GHkeYu071541; Mon, 16 Jan 2017 17:46:40 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GHkcPX071529; Mon, 16 Jan 2017 17:46:38 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201701161746.v0GHkcPX071529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Mon, 16 Jan 2017 17:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 17:46:41 -0000 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 Added: head/tools/regression/sockets/udp_pingpong/ head/tools/regression/sockets/udp_pingpong/Makefile (contents, props changed) head/tools/regression/sockets/udp_pingpong/udp_pingpong.c (contents, props changed) Modified: head/lib/libc/sys/getsockopt.2 head/sys/kern/uipc_socket.c head/sys/kern/uipc_usrreq.c head/sys/netinet/ip_input.c head/sys/netinet6/ip6_input.c head/sys/sys/socket.h head/sys/sys/socketvar.h head/tools/regression/sockets/unix_cmsg/Makefile head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Mon Jan 16 17:43:43 2017 (r312295) +++ head/lib/libc/sys/getsockopt.2 Mon Jan 16 17:46:38 2017 (r312296) @@ -187,6 +187,7 @@ The following options are recognized in .It Dv SO_LISTENQLEN Ta "get complete queue length of the socket (get only)" .It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)" .It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)" +.It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP" .El .Pp .Dv SO_DEBUG @@ -435,7 +436,7 @@ for .Dv SO_BINTIME . The .Vt cmsghdr -fields have the following values for TIMESTAMP: +fields have the following values for TIMESTAMP by default: .Bd -literal cmsg_len = CMSG_LEN(sizeof(struct timeval)); cmsg_level = SOL_SOCKET; @@ -450,6 +451,24 @@ and for cmsg_type = SCM_BINTIME; .Ed .Pp +Additional timestamp types are available by following +.Dv SO_TIMESTAMP +with +.Dv SO_TS_CLOCK , +which requests specific timestamp format to be returned instead of +.Dv SCM_TIMESTAMP when +.Dv SO_TIMESTAMP is enabled. +The following +.Dv SO_TS_CLOCK +values are recognized in +.Fx : +.Bl -column SO_TS_CLOCK -offset indent +.It Dv SO_TS_REALTIME_MICRO Ta "realtime (SCM_TIMESTAMP, struct timeval), default" +.It Dv SO_TS_BINTIME Ta "realtime (SCM_BINTIME, struct bintime)" +.It Dv SO_TS_REALTIME Ta "realtime (SCM_REALTIME, struct timespec)" +.It Dv SO_TS_MONOTONIC Ta "monotonic time (SCM_MONOTONIC, struct timespec)" +.El +.Pp .Dv SO_ACCEPTCONN , .Dv SO_TYPE , .Dv SO_PROTOCOL Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/kern/uipc_socket.c Mon Jan 16 17:46:38 2017 (r312296) @@ -2687,6 +2687,18 @@ sosetopt(struct socket *so, struct socko #endif break; + case SO_TS_CLOCK: + error = sooptcopyin(sopt, &optval, sizeof optval, + sizeof optval); + if (error) + goto bad; + if (optval < 0 || optval > SO_TS_CLOCK_MAX) { + error = EINVAL; + goto bad; + } + so->so_ts_clock = optval; + break; + default: if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) error = hhook_run_socket(so, sopt, @@ -2874,6 +2886,10 @@ integer: optval = so->so_incqlen; goto integer; + case SO_TS_CLOCK: + optval = so->so_ts_clock; + goto integer; + default: if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) error = hhook_run_socket(so, sopt, Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/kern/uipc_usrreq.c Mon Jan 16 17:46:38 2017 (r312296) @@ -1899,6 +1899,7 @@ unp_internalize(struct mbuf **controlp, struct filedescent *fde, **fdep, *fdev; struct file *fp; struct timeval *tv; + struct timespec *ts; int i, *fdp; void *data; socklen_t clen = control->m_len, datalen; @@ -2019,6 +2020,30 @@ unp_internalize(struct mbuf **controlp, bintime(bt); break; + case SCM_REALTIME: + *controlp = sbcreatecontrol(NULL, sizeof(*ts), + SCM_REALTIME, SOL_SOCKET); + if (*controlp == NULL) { + error = ENOBUFS; + goto out; + } + ts = (struct timespec *) + CMSG_DATA(mtod(*controlp, struct cmsghdr *)); + nanotime(ts); + break; + + case SCM_MONOTONIC: + *controlp = sbcreatecontrol(NULL, sizeof(*ts), + SCM_MONOTONIC, SOL_SOCKET); + if (*controlp == NULL) { + error = ENOBUFS; + goto out; + } + ts = (struct timespec *) + CMSG_DATA(mtod(*controlp, struct cmsghdr *)); + nanouptime(ts); + break; + default: error = EINVAL; goto out; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/netinet/ip_input.c Mon Jan 16 17:46:38 2017 (r312296) @@ -1157,30 +1157,48 @@ ip_forward(struct mbuf *m, int srcrt) icmp_error(mcopy, type, code, dest.s_addr, mtu); } +#define CHECK_SO_CT(sp, ct) \ + (((sp->so_options & SO_TIMESTAMP) && (sp->so_ts_clock == ct)) ? 1 : 0) + void ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip, struct mbuf *m) { - if (inp->inp_socket->so_options & (SO_BINTIME | SO_TIMESTAMP)) { + if ((inp->inp_socket->so_options & SO_BINTIME) || + CHECK_SO_CT(inp->inp_socket, SO_TS_BINTIME)) { struct bintime bt; bintime(&bt); - if (inp->inp_socket->so_options & SO_BINTIME) { - *mp = sbcreatecontrol((caddr_t)&bt, sizeof(bt), - SCM_BINTIME, SOL_SOCKET); - if (*mp) - mp = &(*mp)->m_next; - } - if (inp->inp_socket->so_options & SO_TIMESTAMP) { - struct timeval tv; + *mp = sbcreatecontrol((caddr_t)&bt, sizeof(bt), + SCM_BINTIME, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + } + if (CHECK_SO_CT(inp->inp_socket, SO_TS_REALTIME_MICRO)) { + struct timeval tv; - bintime2timeval(&bt, &tv); - *mp = sbcreatecontrol((caddr_t)&tv, sizeof(tv), - SCM_TIMESTAMP, SOL_SOCKET); - if (*mp) - mp = &(*mp)->m_next; - } + microtime(&tv); + *mp = sbcreatecontrol((caddr_t)&tv, sizeof(tv), + SCM_TIMESTAMP, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + } else if (CHECK_SO_CT(inp->inp_socket, SO_TS_REALTIME)) { + struct timespec ts; + + nanotime(&ts); + *mp = sbcreatecontrol((caddr_t)&ts, sizeof(ts), + SCM_REALTIME, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + } else if (CHECK_SO_CT(inp->inp_socket, SO_TS_MONOTONIC)) { + struct timespec ts; + + nanouptime(&ts); + *mp = sbcreatecontrol((caddr_t)&ts, sizeof(ts), + SCM_MONOTONIC, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; } if (inp->inp_flags & INP_RECVDSTADDR) { *mp = sbcreatecontrol((caddr_t)&ip->ip_dst, Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/netinet6/ip6_input.c Mon Jan 16 17:46:38 2017 (r312296) @@ -1226,13 +1226,48 @@ ip6_savecontrol_v4(struct inpcb *inp, st #ifdef SO_TIMESTAMP if ((inp->inp_socket->so_options & SO_TIMESTAMP) != 0) { - struct timeval tv; + union { + struct timeval tv; + struct bintime bt; + struct timespec ts; + } t; + + switch (inp->inp_socket->so_ts_clock) { + case SO_TS_REALTIME_MICRO: + microtime(&t.tv); + *mp = sbcreatecontrol((caddr_t) &t.tv, sizeof(t.tv), + SCM_TIMESTAMP, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + break; - microtime(&tv); - *mp = sbcreatecontrol((caddr_t) &tv, sizeof(tv), - SCM_TIMESTAMP, SOL_SOCKET); - if (*mp) - mp = &(*mp)->m_next; + case SO_TS_BINTIME: + bintime(&t.bt); + *mp = sbcreatecontrol((caddr_t)&t.bt, sizeof(t.bt), + SCM_BINTIME, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + break; + + case SO_TS_REALTIME: + nanotime(&t.ts); + *mp = sbcreatecontrol((caddr_t)&t.ts, sizeof(t.ts), + SCM_REALTIME, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + break; + + case SO_TS_MONOTONIC: + nanouptime(&t.ts); + *mp = sbcreatecontrol((caddr_t)&t.ts, sizeof(t.ts), + SCM_MONOTONIC, SOL_SOCKET); + if (*mp) + mp = &(*mp)->m_next; + break; + + default: + panic("unknown (corrupted) so_ts_clock"); + } } #endif Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/sys/socket.h Mon Jan 16 17:46:38 2017 (r312296) @@ -158,6 +158,16 @@ typedef __uintptr_t uintptr_t; #define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ #define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ #define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ +#define SO_TS_CLOCK 0x1017 /* clock type used for SO_TIMESTAMP */ +#endif + +#if __BSD_VISIBLE +#define SO_TS_REALTIME_MICRO 0 /* microsecond resolution, realtime */ +#define SO_TS_BINTIME 1 /* sub-nanosecond resolution, realtime */ +#define SO_TS_REALTIME 2 /* nanosecond resolution, realtime */ +#define SO_TS_MONOTONIC 3 /* nanosecond resolution, monotonic */ +#define SO_TS_DEFAULT SO_TS_REALTIME_MICRO +#define SO_TS_CLOCK_MAX SO_TS_MONOTONIC #endif /* @@ -534,6 +544,8 @@ struct sockcred { #define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ #define SCM_BINTIME 0x04 /* timestamp (struct bintime) */ +#define SCM_REALTIME 0x05 /* timestamp (struct timespec) */ +#define SCM_MONOTONIC 0x06 /* timestamp (struct timespec) */ #endif #if __BSD_VISIBLE Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Mon Jan 16 17:43:43 2017 (r312295) +++ head/sys/sys/socketvar.h Mon Jan 16 17:46:38 2017 (r312296) @@ -127,6 +127,8 @@ struct socket { int so_fibnum; /* routing domain for this socket */ uint32_t so_user_cookie; + int so_ts_clock; /* type of the clock used for timestamps */ + void *so_pspare[2]; /* packet pacing / general use */ int so_ispare[2]; /* packet pacing / general use */ }; Added: head/tools/regression/sockets/udp_pingpong/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/sockets/udp_pingpong/Makefile Mon Jan 16 17:46:38 2017 (r312296) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= udp_pingpong +MAN= +WARNS?= 6 + +.include Added: head/tools/regression/sockets/udp_pingpong/udp_pingpong.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/sockets/udp_pingpong/udp_pingpong.c Mon Jan 16 17:46:38 2017 (r312296) @@ -0,0 +1,651 @@ +/*- + * Copyright (c) 2017 Maksym Sobolyev + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * The test that setups two processes A and B and make A sending + * B UDP packet(s) and B send it back. The time of sending is recorded + * in the payload and time of the arrival is either determined by + * reading clock after recv() completes or using kernel-supplied + * via recvmsg(). End-to-end time t(A->B->A) is then calculated + * and compared against time for both t(A->B) + t(B->A) to make + * sure it makes sense. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define NPKTS 1000 +#define PKT_SIZE 128 +/* Timeout to receive pong on the side A, 100ms */ +#define SRECV_TIMEOUT (1 * 100) +/* + * Timeout to receive ping on the side B. 4x as large as on the side A, + * so that in the case of packet loss the side A will have a chance to + * realize that and send few more before B bails out. + */ +#define RRECV_TIMEOUT (SRECV_TIMEOUT * 4) +#define MIN_NRECV ((NPKTS * 99) / 100) /* 99% */ + +//#define SIMULATE_PLOSS + +struct trip_ts { + struct timespec sent; + struct timespec recvd; +}; + +struct test_pkt { + int pnum; + struct trip_ts tss[2]; + int lost; + unsigned char data[PKT_SIZE]; +}; + +struct test_ctx { + const char *name; + int fds[2]; + struct pollfd pfds[2]; + union { + struct sockaddr_in v4; + struct sockaddr_in6 v6; + } sin[2]; + struct test_pkt test_pkts[NPKTS]; + int nsent; + int nrecvd; + clockid_t clock; + int use_recvmsg; + int ts_type; +}; + +struct rtt { + struct timespec a2b; + struct timespec b2a; + struct timespec e2e; + struct timespec a2b_b2a; +}; + +#define SEC(x) ((x)->tv_sec) +#define NSEC(x) ((x)->tv_nsec) +#define NSEC_MAX 1000000000L +#define NSEC_IN_USEC 1000L + +#define timespecsub2(r, v, u) \ + do { \ + SEC(r) = SEC(v) - SEC(u); \ + NSEC(r) = NSEC(v) - NSEC(u); \ + if (NSEC(r) < 0 && (SEC(r) > 0 || NSEC(r) <= -NSEC_MAX)) { \ + SEC(r)--; \ + NSEC(r) += NSEC_MAX; \ + } \ + } while (0); + +#define timespecadd2(r, v, u) \ + do { \ + SEC(r) = SEC(v) + SEC(u); \ + NSEC(r) = NSEC(v) + NSEC(u); \ + if (NSEC(r) >= NSEC_MAX) { \ + SEC(r)++; \ + NSEC(r) -= NSEC_MAX; \ + } \ + } while (0); + +#define timespeccmp(t, c, u) \ + ((SEC(t) == SEC(u)) ? \ + (NSEC(t) c NSEC(u)) : \ + (SEC(t) c SEC(u))) + +#define timeval2timespec(tv, ts) \ + do { \ + SEC(ts) = (tv)->tv_sec; \ + NSEC(ts) = (tv)->tv_usec * NSEC_IN_USEC; \ + } while (0); + +static const struct timespec zero_ts; +/* 0.01s, should be more than enough for the loopback communication */ +static const struct timespec max_ts = {.tv_nsec = (NSEC_MAX / 100)}; + +enum ts_types {TT_TIMESTAMP = -2, TT_BINTIME = -1, + TT_REALTIME_MICRO = SO_TS_REALTIME_MICRO, TT_TS_BINTIME = SO_TS_BINTIME, + TT_REALTIME = SO_TS_REALTIME, TT_MONOTONIC = SO_TS_MONOTONIC}; + +static clockid_t +get_clock_type(struct test_ctx *tcp) +{ + switch (tcp->ts_type) { + case TT_TIMESTAMP: + case TT_BINTIME: + case TT_REALTIME_MICRO: + case TT_TS_BINTIME: + case TT_REALTIME: + return (CLOCK_REALTIME); + + case TT_MONOTONIC: + return (CLOCK_MONOTONIC); + } + abort(); +} + +static int +get_scm_type(struct test_ctx *tcp) +{ + switch (tcp->ts_type) { + case TT_TIMESTAMP: + case TT_REALTIME_MICRO: + return (SCM_TIMESTAMP); + + case TT_BINTIME: + case TT_TS_BINTIME: + return (SCM_BINTIME); + + case TT_REALTIME: + return (SCM_REALTIME); + + case TT_MONOTONIC: + return (SCM_MONOTONIC); + } + abort(); +} + +static size_t +get_scm_size(struct test_ctx *tcp) +{ + switch (tcp->ts_type) { + case TT_TIMESTAMP: + case TT_REALTIME_MICRO: + return (sizeof(struct timeval)); + + case TT_BINTIME: + case TT_TS_BINTIME: + return (sizeof(struct bintime)); + + case TT_REALTIME: + case TT_MONOTONIC: + return (sizeof(struct timespec)); + } + abort(); +} + +static void +setup_ts_sockopt(struct test_ctx *tcp, int fd) +{ + int rval, oname1, oname2, sval1, sval2; + + oname1 = SO_TIMESTAMP; + oname2 = -1; + sval2 = -1; + + switch (tcp->ts_type) { + case TT_REALTIME_MICRO: + case TT_TS_BINTIME: + case TT_REALTIME: + case TT_MONOTONIC: + oname2 = SO_TS_CLOCK; + sval2 = tcp->ts_type; + break; + + case TT_TIMESTAMP: + break; + + case TT_BINTIME: + oname1 = SO_BINTIME; + break; + + default: + abort(); + } + + sval1 = 1; + rval = setsockopt(fd, SOL_SOCKET, oname1, &sval1, + sizeof(sval1)); + if (rval != 0) { + err(1, "%s: setup_udp: setsockopt(%d, %d, 1)", tcp->name, + fd, oname1); + } + if (oname2 == -1) + return; + rval = setsockopt(fd, SOL_SOCKET, oname2, &sval2, + sizeof(sval2)); + if (rval != 0) { + err(1, "%s: setup_udp: setsockopt(%d, %d, %d)", + tcp->name, fd, oname2, sval2); + } +} + + +static void +setup_udp(struct test_ctx *tcp) +{ + int i; + socklen_t sin_len, af_len; + + af_len = sizeof(tcp->sin[0].v4); + for (i = 0; i < 2; i++) { + tcp->sin[i].v4.sin_len = af_len; + tcp->sin[i].v4.sin_family = AF_INET; + tcp->sin[i].v4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + tcp->fds[i] = socket(PF_INET, SOCK_DGRAM, 0); + if (tcp->fds[i] < 0) + err(1, "%s: setup_udp: socket", tcp->name); + if (bind(tcp->fds[i], (struct sockaddr *)&tcp->sin[i], af_len) < 0) + err(1, "%s: setup_udp: bind(%s, %d)", tcp->name, + inet_ntoa(tcp->sin[i].v4.sin_addr), 0); + sin_len = af_len; + if (getsockname(tcp->fds[i], (struct sockaddr *)&tcp->sin[i], &sin_len) < 0) + err(1, "%s: setup_udp: getsockname(%d)", tcp->name, tcp->fds[i]); + if (tcp->use_recvmsg != 0) { + setup_ts_sockopt(tcp, tcp->fds[i]); + } + + tcp->pfds[i].fd = tcp->fds[i]; + tcp->pfds[i].events = POLLIN; + } + + if (connect(tcp->fds[0], (struct sockaddr *)&tcp->sin[1], af_len) < 0) + err(1, "%s: setup_udp: connect(%s, %d)", tcp->name, + inet_ntoa(tcp->sin[1].v4.sin_addr), ntohs(tcp->sin[1].v4.sin_port)); + if (connect(tcp->fds[1], (struct sockaddr *)&tcp->sin[0], af_len) < 0) + err(1, "%s: setup_udp: connect(%s, %d)", tcp->name, + inet_ntoa(tcp->sin[0].v4.sin_addr), ntohs(tcp->sin[0].v4.sin_port)); +} + +static char * +inet_ntoa6(const void *sin6_addr) +{ + static char straddr[INET6_ADDRSTRLEN]; + + inet_ntop(AF_INET6, sin6_addr, straddr, sizeof(straddr)); + return (straddr); +} + +static void +setup_udp6(struct test_ctx *tcp) +{ + int i; + socklen_t sin_len, af_len; + + af_len = sizeof(tcp->sin[0].v6); + for (i = 0; i < 2; i++) { + tcp->sin[i].v6.sin6_len = af_len; + tcp->sin[i].v6.sin6_family = AF_INET6; + tcp->sin[i].v6.sin6_addr = in6addr_loopback; + tcp->fds[i] = socket(PF_INET6, SOCK_DGRAM, 0); + if (tcp->fds[i] < 0) + err(1, "%s: setup_udp: socket", tcp->name); + if (bind(tcp->fds[i], (struct sockaddr *)&tcp->sin[i], af_len) < 0) + err(1, "%s: setup_udp: bind(%s, %d)", tcp->name, + inet_ntoa6(&tcp->sin[i].v6.sin6_addr), 0); + sin_len = af_len; + if (getsockname(tcp->fds[i], (struct sockaddr *)&tcp->sin[i], &sin_len) < 0) + err(1, "%s: setup_udp: getsockname(%d)", tcp->name, tcp->fds[i]); + if (tcp->use_recvmsg != 0) { + setup_ts_sockopt(tcp, tcp->fds[i]); + } + + tcp->pfds[i].fd = tcp->fds[i]; + tcp->pfds[i].events = POLLIN; + } + + if (connect(tcp->fds[0], (struct sockaddr *)&tcp->sin[1], af_len) < 0) + err(1, "%s: setup_udp: connect(%s, %d)", tcp->name, + inet_ntoa6(&tcp->sin[1].v6.sin6_addr), + ntohs(tcp->sin[1].v6.sin6_port)); + if (connect(tcp->fds[1], (struct sockaddr *)&tcp->sin[0], af_len) < 0) + err(1, "%s: setup_udp: connect(%s, %d)", tcp->name, + inet_ntoa6(&tcp->sin[0].v6.sin6_addr), + ntohs(tcp->sin[0].v6.sin6_port)); +} + +static void +teardown_udp(struct test_ctx *tcp) +{ + + close(tcp->fds[0]); + close(tcp->fds[1]); +} + +static void +send_pkt(struct test_ctx *tcp, int pnum, int fdidx, const char *face) +{ + ssize_t r; + size_t slen; + + slen = sizeof(tcp->test_pkts[pnum]); + clock_gettime(get_clock_type(tcp), &tcp->test_pkts[pnum].tss[fdidx].sent); + r = send(tcp->fds[fdidx], &tcp->test_pkts[pnum], slen, 0); + if (r < 0) { + err(1, "%s: %s: send(%d)", tcp->name, face, tcp->fds[fdidx]); + } + if (r < (ssize_t)slen) { + errx(1, "%s: %s: send(%d): short send", tcp->name, face, + tcp->fds[fdidx]); + } + tcp->nsent += 1; +} + +#define PDATA(tcp, i) ((tcp)->test_pkts[(i)].data) + +static void +hdr_extract_ts(struct test_ctx *tcp, struct msghdr *mhp, struct timespec *tp) +{ + int scm_type; + size_t scm_size; + union { + struct timespec ts; + struct bintime bt; + struct timeval tv; + } tdata; + struct cmsghdr *cmsg; + + scm_type = get_scm_type(tcp); + scm_size = get_scm_size(tcp); + for (cmsg = CMSG_FIRSTHDR(mhp); cmsg != NULL; + cmsg = CMSG_NXTHDR(mhp, cmsg)) { + if ((cmsg->cmsg_level == SOL_SOCKET) && + (cmsg->cmsg_type == scm_type)) { + memcpy(&tdata, CMSG_DATA(cmsg), scm_size); + break; + } + } + if (cmsg == NULL) { + abort(); + } + switch (tcp->ts_type) { + case TT_REALTIME: + case TT_MONOTONIC: + *tp = tdata.ts; + break; + + case TT_TIMESTAMP: + case TT_REALTIME_MICRO: + timeval2timespec(&tdata.tv, tp); + break; + + case TT_BINTIME: + case TT_TS_BINTIME: + bintime2timespec(&tdata.bt, tp); + break; + + default: + abort(); + } +} + +static void +recv_pkt_recvmsg(struct test_ctx *tcp, int fdidx, const char *face, void *buf, + size_t rlen, struct timespec *tp) +{ + /* We use a union to make sure hdr is aligned */ + union { + struct cmsghdr hdr; + unsigned char buf[CMSG_SPACE(1024)]; + } cmsgbuf; + struct msghdr msg; + struct iovec iov; + ssize_t rval; + + memset(&msg, '\0', sizeof(msg)); + iov.iov_base = buf; + iov.iov_len = rlen; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); + + rval = recvmsg(tcp->fds[fdidx], &msg, 0); + if (rval < 0) { + err(1, "%s: %s: recvmsg(%d)", tcp->name, face, tcp->fds[fdidx]); + } + if (rval < (ssize_t)rlen) { + errx(1, "%s: %s: recvmsg(%d): short recv", tcp->name, face, + tcp->fds[fdidx]); + } + + hdr_extract_ts(tcp, &msg, tp); +} + +static void +recv_pkt_recv(struct test_ctx *tcp, int fdidx, const char *face, void *buf, + size_t rlen, struct timespec *tp) +{ + ssize_t rval; + + rval = recv(tcp->fds[fdidx], buf, rlen, 0); + clock_gettime(get_clock_type(tcp), tp); + if (rval < 0) { + err(1, "%s: %s: recv(%d)", tcp->name, face, tcp->fds[fdidx]); + } + if (rval < (ssize_t)rlen) { + errx(1, "%s: %s: recv(%d): short recv", tcp->name, face, + tcp->fds[fdidx]); + } +} + +static int +recv_pkt(struct test_ctx *tcp, int fdidx, const char *face, int tout) +{ + int pr; + struct test_pkt recv_buf; + size_t rlen; + + pr = poll(&tcp->pfds[fdidx], 1, tout); + if (pr < 0) { + err(1, "%s: %s: poll(%d)", tcp->name, face, tcp->fds[fdidx]); + } + if (pr == 0) { + return (-1); + } + if(tcp->pfds[fdidx].revents != POLLIN) { + errx(1, "%s: %s: poll(%d): unexpected result", tcp->name, face, + tcp->fds[fdidx]); + } + rlen = sizeof(recv_buf); + if (tcp->use_recvmsg == 0) { + recv_pkt_recv(tcp, fdidx, face, &recv_buf, rlen, + &recv_buf.tss[fdidx].recvd); + } else { + recv_pkt_recvmsg(tcp, fdidx, face, &recv_buf, rlen, + &recv_buf.tss[fdidx].recvd); + } + if (recv_buf.pnum < 0 || recv_buf.pnum >= NPKTS || + memcmp(recv_buf.data, PDATA(tcp, recv_buf.pnum), PKT_SIZE) != 0) { + errx(1, "%s: %s: recv(%d): corrupted data, packet %d", tcp->name, + face, tcp->fds[fdidx], recv_buf.pnum); + } + tcp->nrecvd += 1; + memcpy(tcp->test_pkts[recv_buf.pnum].tss, recv_buf.tss, + sizeof(recv_buf.tss)); + tcp->test_pkts[recv_buf.pnum].lost = 0; + return (recv_buf.pnum); +} + +static void +test_server(struct test_ctx *tcp) +{ + int i, j; + + for (i = 0; i < NPKTS; i++) { + send_pkt(tcp, i, 0, __FUNCTION__); + j = recv_pkt(tcp, 0, __FUNCTION__, SRECV_TIMEOUT); + if (j < 0) { + warnx("packet %d is lost", i); + /* timeout */ + continue; + } + } +} + +static void +test_client(struct test_ctx *tcp) +{ + int i, j; + + for (i = 0; i < NPKTS; i++) { + j = recv_pkt(tcp, 1, __FUNCTION__, RRECV_TIMEOUT); + if (j < 0) { + /* timeout */ + return; + } +#if defined(SIMULATE_PLOSS) + if ((i % 99) == 0) { + warnx("dropping packet %d", i); + continue; + } +#endif + send_pkt(tcp, j, 1, __FUNCTION__); + } +} + +static void +calc_rtt(struct test_pkt *tpp, struct rtt *rttp) +{ + + timespecsub2(&rttp->a2b, &tpp->tss[1].recvd, &tpp->tss[0].sent); + timespecsub2(&rttp->b2a, &tpp->tss[0].recvd, &tpp->tss[1].sent); + timespecadd2(&rttp->a2b_b2a, &rttp->a2b, &rttp->b2a); + timespecsub2(&rttp->e2e, &tpp->tss[0].recvd, &tpp->tss[0].sent); +} + +static void +test_run(int ts_type, int use_ipv6, int use_recvmsg, const char *name) +{ + struct test_ctx test_ctx; + pid_t pid, cpid; + int i, j, status; + + printf("Testing %s via %s: ", name, (use_ipv6 == 0) ? "IPv4" : "IPv6"); + fflush(stdout); + bzero(&test_ctx, sizeof(test_ctx)); + test_ctx.name = name; + test_ctx.use_recvmsg = use_recvmsg; + test_ctx.ts_type = ts_type; + if (use_ipv6 == 0) { + setup_udp(&test_ctx); + } else { + setup_udp6(&test_ctx); + } + for (i = 0; i < NPKTS; i++) { + test_ctx.test_pkts[i].pnum = i; + test_ctx.test_pkts[i].lost = 1; + for (j = 0; j < PKT_SIZE; j++) { + test_ctx.test_pkts[i].data[j] = (unsigned char)random(); + } + } + cpid = fork(); + if (cpid < 0) { + err(1, "%s: fork()", test_ctx.name); + } + if (cpid == 0) { + test_client(&test_ctx); + exit(0); + } + test_server(&test_ctx); + pid = waitpid(cpid, &status, 0); + if (pid == (pid_t)-1) { + err(1, "%s: waitpid(%d)", test_ctx.name, cpid); + } + + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) != EXIT_SUCCESS) { + errx(1, "client exit status is %d", + WEXITSTATUS(status)); + } + } else { + if (WIFSIGNALED(status)) + errx(1, "abnormal termination of client, signal %d%s", + WTERMSIG(status), WCOREDUMP(status) ? + " (core file generated)" : ""); + else + errx(1, "termination of client, unknown status"); + } + if (test_ctx.nrecvd < MIN_NRECV) { + errx(1, "packet loss is too high %d received out of %d, min %d", + test_ctx.nrecvd, test_ctx.nsent, MIN_NRECV); + } + for (i = 0; i < NPKTS; i++) { + struct rtt rtt; + if (test_ctx.test_pkts[i].lost != 0) { + continue; + } + calc_rtt(&test_ctx.test_pkts[i], &rtt); + if (!timespeccmp(&rtt.e2e, >, &rtt.a2b_b2a)) + errx(1, "end-to-end trip time is too small"); + if (!timespeccmp(&rtt.e2e, <, &max_ts)) + errx(1, "end-to-end trip time is too large"); + if (!timespeccmp(&rtt.a2b, >, &zero_ts)) + errx(1, "A2B trip time is not positive"); + if (!timespeccmp(&rtt.b2a, >, &zero_ts)) + errx(1, "B2A trip time is not positive"); + } + teardown_udp(&test_ctx); +} + +int +main(void) +{ + int i; + + srandomdev(); + + for (i = 0; i < 2; i++) { + test_run(0, i, 0, "send()/recv()"); + printf("OK\n"); + test_run(TT_TIMESTAMP, i, 1, + "send()/recvmsg(), setsockopt(SO_TIMESTAMP, 1)"); + printf("OK\n"); + if (i == 0) { + test_run(TT_BINTIME, i, 1, + "send()/recvmsg(), setsockopt(SO_BINTIME, 1)"); + printf("OK\n"); + } + test_run(TT_REALTIME_MICRO, i, 1, + "send()/recvmsg(), setsockopt(SO_TS_CLOCK, SO_TS_REALTIME_MICRO)"); + printf("OK\n"); + test_run(TT_TS_BINTIME, i, 1, + "send()/recvmsg(), setsockopt(SO_TS_CLOCK, SO_TS_BINTIME)"); + printf("OK\n"); + test_run(TT_REALTIME, i, 1, + "send()/recvmsg(), setsockopt(SO_TS_CLOCK, SO_TS_REALTIME)"); + printf("OK\n"); + test_run(TT_MONOTONIC, i, 1, + "send()/recvmsg(), setsockopt(SO_TS_CLOCK, SO_TS_MONOTONIC)"); + printf("OK\n"); + } + exit(0); +} Modified: head/tools/regression/sockets/unix_cmsg/Makefile ============================================================================== --- head/tools/regression/sockets/unix_cmsg/Makefile Mon Jan 16 17:43:43 2017 (r312295) +++ head/tools/regression/sockets/unix_cmsg/Makefile Mon Jan 16 17:46:38 2017 (r312296) @@ -16,8 +16,14 @@ REXP_bintime= 's|%%TTYPE%%|bintime|g ; s REXP_timeval= 's|%%TTYPE%%|timeval|g ; s|%%DTYPE%%|timeval|g ; \ s|%%SCM_TTYPE%%|SCM_TIMESTAMP|g ; \ s|%%MAJ_MEMB%%|tv_sec|g ; s|%%MIN_MEMB%%|tv_usec|g' +REXP_timespec_real= 's|%%TTYPE%%|timespec_real|g ; s|%%DTYPE%%|timespec|g ; \ + s|%%SCM_TTYPE%%|SCM_REALTIME|g ; \ + s|%%MAJ_MEMB%%|tv_sec|g ; s|%%MIN_MEMB%%|tv_nsec|g' +REXP_timespec_mono= 's|%%TTYPE%%|timespec_mono|g ; s|%%DTYPE%%|timespec|g ; \ + s|%%SCM_TTYPE%%|SCM_MONOTONIC|g ; \ + s|%%MAJ_MEMB%%|tv_sec|g ; s|%%MIN_MEMB%%|tv_nsec|g' -.for ttype in bintime timeval +.for ttype in bintime timeval timespec_real timespec_mono AUTOSRCS+= t_${ttype}.h t_${ttype}.c t_${ttype}.o: t_${ttype}.c t_${ttype}.h Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c ============================================================================== --- head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Jan 16 17:43:43 2017 (r312295) +++ head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Jan 16 17:46:38 2017 (r312296) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include "t_sockcred.h" #include "t_cmsgcred_sockcred.h" #include "t_cmsg_len.h" +#include "t_timespec_real.h" +#include "t_timespec_mono.h" /* * There are tables with tests descriptions and pointers to test @@ -117,7 +119,19 @@ static const struct test_func test_strea { .func = t_peercred, .desc = "Check LOCAL_PEERCRED socket option" + }, +#if defined(SCM_REALTIME) + { + .func = t_timespec_real, + .desc = "Sending, receiving realtime" + }, +#endif +#if defined(SCM_MONOTONIC) + { + .func = t_timespec_mono, + .desc = "Sending, receiving monotonic time (uptime)" } +#endif }; #define TEST_STREAM_TBL_SIZE \ @@ -152,6 +166,18 @@ static const struct test_func test_dgram { .func = t_cmsg_len, .desc = "Check cmsghdr.cmsg_len" + }, +#endif +#if defined(SCM_REALTIME) + { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jan 16 19:01:42 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 5D18DCB2E19; Mon, 16 Jan 2017 19:01:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F2491D3A; Mon, 16 Jan 2017 19:01:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GJ1f0j003098; Mon, 16 Jan 2017 19:01:41 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GJ1fIs003097; Mon, 16 Jan 2017 19:01:41 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701161901.v0GJ1fIs003097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 16 Jan 2017 19:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312305 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 19:01:42 -0000 Author: sbruno Date: Mon Jan 16 19:01:41 2017 New Revision: 312305 URL: https://svnweb.freebsd.org/changeset/base/312305 Log: Remove Assert that seems to be hit in various configurations during normal operations. Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Mon Jan 16 18:52:05 2017 (r312304) +++ head/sys/kern/subr_gtaskqueue.c Mon Jan 16 19:01:41 2017 (r312305) @@ -646,7 +646,6 @@ taskqgroup_attach(struct taskqgroup *qgr qid = taskqgroup_find(qgroup, uniq); qgroup->tqg_queue[qid].tgc_cnt++; LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); - MPASS(qgroup->tqg_queue[qid].tgc_taskq != NULL); gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; if (irq != -1 && (smp_started || mp_ncpus == 1)) { gtask->gt_cpu = qgroup->tqg_queue[qid].tgc_cpu; From owner-svn-src-head@freebsd.org Mon Jan 16 19:03:11 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 CEE75CB2032; Mon, 16 Jan 2017 19:03:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 9C6A91076; Mon, 16 Jan 2017 19:03:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id f144so14581046pfa.2; Mon, 16 Jan 2017 11:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=RfOwlQYAYCWctTLfXwchAr/Tw4RKW76uUSaDa82uKu8=; b=HLwYAETtGAvbROogKfDWWZyFWrdCmaWidHGPOBHBpSq8vYdMvYeV0BqfewgW+/OEGl xW8ARygGc3h+Y0melf365nTAN1WOV65XHZjG2hA7HDS5DVVwfjEIJ2Vuc9RVte4TISbS p1WD9RyvzvWfUIwdm+vhU8cD2Nr21JxqUOMGCb8OVdOkcOZrXOsb29oAbklac8Zf/FlE 175B7PAg2LACck/cBHkpCSAeLGaXbk+KjSaJF1xmDLcaw8F8P+Hoth8hCZmnZ2FjRvm3 CTv4H/8ZNoVH6KTKLU0cdAW4NUVhFFk3jhbHfhOKnSZSpwpjg4fgIFU1ydbhy5oB5/1N aTVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=RfOwlQYAYCWctTLfXwchAr/Tw4RKW76uUSaDa82uKu8=; b=ATmngPHoubmPHojgmFui1GTsYP7kfOCy8r4UtdU4dTYXpUjhkbfixfTSfIA3E7P+su JrTWFG5mbwHR5wCuvo9snsJEnWVicAThV5mz6T4D7ZSe3tf0KdtTnouXGhOZMFcRC2WB oMXl3FLKKVvyuTv3jPQlfkO7pV7F57x1qSrrIYWWoe4qXCVETCBMIoHGS96J00pVM7V/ IvGTXUrOnFq4epTvYHFGiYL+WoS5l7VK/JHMdjWG+7IwO8C6tI12XoDPEHXM7Ntug5wX 6vrhvwmIntk0k0SCAKt08NNlBsaibzbw2GP8EyJeSH4IVjFOmFj5+zx3Cks6qoQazfDx /hgg== X-Gm-Message-State: AIkVDXIX3WZzMWc+URTEep2ZABO1SaMhphI9N3e0w5WbcEo1/lbOH2TGQDQTVyIPY2B/MA== X-Received: by 10.84.136.34 with SMTP id 31mr45885753plk.52.1484593391003; Mon, 16 Jan 2017 11:03:11 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z66sm25569649pfd.49.2017.01.16.11.03.10 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 11:03:10 -0800 (PST) Subject: Re: svn commit: r312305 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_70179366-E7BD-4DFB-808D-E9D4407D0C43"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701161901.v0GJ1fIs003097@repo.freebsd.org> Date: Mon, 16 Jan 2017 11:03:09 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701161901.v0GJ1fIs003097@repo.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.3124) 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, 16 Jan 2017 19:03:11 -0000 --Apple-Mail=_70179366-E7BD-4DFB-808D-E9D4407D0C43 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2017, at 11:01, Sean Bruno wrote: >=20 > Author: sbruno > Date: Mon Jan 16 19:01:41 2017 > New Revision: 312305 > URL: https://svnweb.freebsd.org/changeset/base/312305 >=20 > Log: > Remove Assert that seems to be hit in various configurations during > normal operations. Do you have any links/references/reporters to note=E2=80=A6? Thanks! -Ngie --Apple-Mail=_70179366-E7BD-4DFB-808D-E9D4407D0C43 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYfRjtAAoJEPWDqSZpMIYVCvQQAII2u50xpX1pODpQ3cTOVSDe t/Rl6VDDY5eYnR3CX8VrAiCZ+9naIeDl6Je7xPkhQjyWNLk4PGjru4h714GQtxmp g/xwKGlsJTlCkE3+1p2BrCIEi3cuc3c9JM/ZR1pIbnDCj3da2NFqzNXN3YBQHxTN X+S7GMQYg7exyvBNJYqKo6WBGcdhomPfqJcK7IuNtwQMU3iyRVff40GRvijDJJUW h85/jyQB1Hk4U0H0nhZS0ldRVQB2DHwvYtx2Q7H3DQurk58UQMEeiNsTYcY7HhnG VSGMlmvHAe9HhXtsAKfRQKKjUgA3HIvWQBuV5ers5MJ1vBGZ4NC4/mDfN+bwyYDZ TUAQcGWht9j2Ihow9NjMXHJi/gN7V3YNn4AaiKu8KJnY1tj3HY00/m7tYgrR0Wsu CDZNKS2sz+BVTY0XY3OYkC3C/kTBPn7LV77vML+oAIvjS15zsjmZQzasRxSN0VdG X9/RLBOMyiZNNZs/UO9copXo5BrT5tWX3ltlP9ook6eIvDbkqa/xn54p+VyqVx/m QDcnKdJ7jicTCzv3FUNFsQpV3fT3PgFRM6ZULsZeyeTxrAu208XcxSjmcrg+Sy/8 5NaMnGpmmlE/bW0W9DfCTIPIzL84JTU0YlI8bNrKh3Z3WYU1byBQe9vsYs5bj7Aa koKHqVGUVtfDdlbUakVt =DS8Q -----END PGP SIGNATURE----- --Apple-Mail=_70179366-E7BD-4DFB-808D-E9D4407D0C43-- From owner-svn-src-head@freebsd.org Mon Jan 16 19:35:20 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 66A08CB3040; Mon, 16 Jan 2017 19:35:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28E521C0E; Mon, 16 Jan 2017 19:35:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GJZJEp018226; Mon, 16 Jan 2017 19:35:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GJZJLQ018225; Mon, 16 Jan 2017 19:35:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701161935.v0GJZJLQ018225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 16 Jan 2017 19:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312307 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 19:35:20 -0000 Author: markj Date: Mon Jan 16 19:35:19 2017 New Revision: 312307 URL: https://svnweb.freebsd.org/changeset/base/312307 Log: Improve some of the sysctl descriptions added in r299827. Submitted by: Marie Helene Kvello-Aune (original version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5336 Modified: head/sys/netinet6/in6_proto.c Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Mon Jan 16 19:04:57 2017 (r312306) +++ head/sys/netinet6/in6_proto.c Mon Jan 16 19:35:19 2017 (r312307) @@ -507,19 +507,21 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_forwarding), 0, - "Enable IPv6 forwarding between interfaces"); + "Enable forwarding of IPv6 packets between interfaces"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_sendredirects), 0, - "Send a redirect message when forwarding back to a source link"); + "Send ICMPv6 redirects for unforwardable IPv6 packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defhlim), 0, - "Default hop limit"); + "Default hop limit to use for outgoing IPv6 packets"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, - "Maximum allowed number of outstanding fragmented IPv6 packets"); + "Default maximum number of outstanding fragmented IPv6 packets. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); @@ -541,7 +543,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_I "Frequency in seconds at which to log IPv6 forwarding errors"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, hdrnestlimit, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_hdrnestlimit), 0, - "Maximum allowed number of nested protocol headers"); + "Default maximum number of IPv6 extension headers permitted on " + "incoming IPv6 packets, 0 for no artificial limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, dad_count, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_dad_count), 0, "Number of ICMPv6 NS messages sent during duplicate address detection"); @@ -550,7 +553,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_ "Provide an IPv6 flowlabel in outbound packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, defmcasthlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defmcasthlim), 0, - "Default hop limit for multicast packets"); + "Default hop limit for IPv6 multicast packets originating from this " + "node"); SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, kame_version, CTLFLAG_RD, __KAME_VERSION, 0, "KAME version string"); From owner-svn-src-head@freebsd.org Mon Jan 16 20:24:13 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 1E846CB3D7C; Mon, 16 Jan 2017 20:24:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 F335B1B03; Mon, 16 Jan 2017 20:24:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1B7D510A7B9; Mon, 16 Jan 2017 15:24:12 -0500 (EST) From: John Baldwin To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312205 - in head/sys: kern net Date: Mon, 16 Jan 2017 10:47:14 -0800 Message-ID: <30935285.ropjfVExpa@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701150050.v0F0oAU8055428@repo.freebsd.org> References: <201701150050.v0F0oAU8055428@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 16 Jan 2017 15:24:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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, 16 Jan 2017 20:24:13 -0000 On Sunday, January 15, 2017 12:50:10 AM Sean Bruno wrote: > Author: sbruno > Date: Sun Jan 15 00:50:10 2017 > New Revision: 312205 > URL: https://svnweb.freebsd.org/changeset/base/312205 > > Log: > Fix hangs in a uniprocessor configuration (qemu, virtualbox, real hw). > > sys/net/iflib.c: > Add ctx to filter_info and don't skpi interrupt early on unless we're on an > SMP system On an SMP system with EARLY_AP_STARTUP (default on x86) this code should never see smp_started as false anyway, so these checks should likely just be conditional on EARLY_AP_STARTUP (since that option will eventually go away). -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jan 16 20:34:43 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 48811CB2665; Mon, 16 Jan 2017 20:34:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A9C716F7; Mon, 16 Jan 2017 20:34:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GKYgKX042516; Mon, 16 Jan 2017 20:34:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GKYgV2042515; Mon, 16 Jan 2017 20:34:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701162034.v0GKYgV2042515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 16 Jan 2017 20:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312311 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 20:34:43 -0000 Author: emaste Date: Mon Jan 16 20:34:42 2017 New Revision: 312311 URL: https://svnweb.freebsd.org/changeset/base/312311 Log: disambiguate msleep KASSERT diagnostics Previously "panic: msleep" could happen for a few different reasons. Break the KASSERTs out into individual cases to identify the failing condition. Found during the investigation that resulted in r308288. Reviewed by: kib, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8604 Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Jan 16 20:29:28 2017 (r312310) +++ head/sys/kern/kern_synch.c Mon Jan 16 20:34:42 2017 (r312311) @@ -152,8 +152,8 @@ _sleep(void *ident, struct lock_object * "Sleeping on \"%s\"", wmesg); KASSERT(sbt != 0 || mtx_owned(&Giant) || lock != NULL, ("sleeping without a lock")); - KASSERT(p != NULL, ("msleep1")); - KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); + KASSERT(ident != NULL, ("_sleep: NULL ident")); + KASSERT(TD_IS_RUNNING(td), ("_sleep: curthread not running")); if (priority & PDROP) KASSERT(lock != NULL && lock != &Giant.lock_object, ("PDROP requires a non-Giant lock")); @@ -247,8 +247,8 @@ msleep_spin_sbt(void *ident, struct mtx td = curthread; p = td->td_proc; KASSERT(mtx != NULL, ("sleeping without a mutex")); - KASSERT(p != NULL, ("msleep1")); - KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); + KASSERT(ident != NULL, ("msleep_spin_sbt: NULL ident")); + KASSERT(TD_IS_RUNNING(td), ("msleep_spin_sbt: curthread not running")); if (SCHEDULER_STOPPED()) return (0); From owner-svn-src-head@freebsd.org Mon Jan 16 20:57:03 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 202DDCB2EE0; Mon, 16 Jan 2017 20:57:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F18491636; Mon, 16 Jan 2017 20:57:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0GKv25x050977; Mon, 16 Jan 2017 20:57:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0GKv20I050975; Mon, 16 Jan 2017 20:57:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201701162057.v0GKv20I050975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Jan 2017 20:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312314 - in head/sys/boot/efi: include libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 16 Jan 2017 20:57:03 -0000 Author: tsoome Date: Mon Jan 16 20:57:01 2017 New Revision: 312314 URL: https://svnweb.freebsd.org/changeset/base/312314 Log: loader: move device path definitions to include/efidevp.h No functional change, only moving uuid and protocol bits to include/efidevp.h Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D9192 Modified: head/sys/boot/efi/include/efidevp.h head/sys/boot/efi/libefi/devpath.c Modified: head/sys/boot/efi/include/efidevp.h ============================================================================== --- head/sys/boot/efi/include/efidevp.h Mon Jan 16 20:46:40 2017 (r312313) +++ head/sys/boot/efi/include/efidevp.h Mon Jan 16 20:57:01 2017 (r312314) @@ -73,8 +73,6 @@ typedef struct _EFI_DEVICE_PATH { (a)->Length[1] = 0; \ } - - /* * */ @@ -424,5 +422,33 @@ typedef union { } EFI_DEV_PATH_PTR; +#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ + { 0xbc62157e, 0x3e33, 0x4fec, { 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } } + +#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ + { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } } + +INTERFACE_DECL(_EFI_DEVICE_PATH_PROTOCOL); + +typedef +CHAR16* +(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) ( + IN struct _EFI_DEVICE_PATH *This, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortCuts + ); + +typedef +CHAR16* +(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) ( + IN struct _EFI_DEVICE_PATH *This, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortCuts + ); + +typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL { + EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; + EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; +} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; #endif Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Mon Jan 16 20:46:40 2017 (r312313) +++ head/sys/boot/efi/libefi/devpath.c Mon Jan 16 20:57:01 2017 (r312314) @@ -30,36 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* XXX: This belongs in an efifoo.h header. */ -#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ - { 0xbc62157e, 0x3e33, 0x4fec, { 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } } - -#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ - { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } } - -INTERFACE_DECL(_EFI_DEVICE_PATH_PROTOCOL); - -typedef -CHAR16* -(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) ( - IN struct _EFI_DEVICE_PATH *This, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortCuts - ); - -typedef -CHAR16* -(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) ( - IN struct _EFI_DEVICE_PATH *This, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortCuts - ); - -typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL { - EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; - EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; -} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; - static EFI_GUID ImageDevicePathGUID = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID; static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL; From owner-svn-src-head@freebsd.org Tue Jan 17 00:35:26 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 D182ECB3AD7; Tue, 17 Jan 2017 00:35:26 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94D14176A; Tue, 17 Jan 2017 00:35:26 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H0ZPgj042317; Tue, 17 Jan 2017 00:35:25 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H0ZNUu042297; Tue, 17 Jan 2017 00:35:23 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701170035.v0H0ZNUu042297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 17 Jan 2017 00:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312315 - in head/sys/dev/rtwn: . pci rtl8188e rtl8188e/usb rtl8192c rtl8192c/pci rtl8192c/usb rtl8812a rtl8812a/usb rtl8821a/usb usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 00:35:26 -0000 Author: avos Date: Tue Jan 17 00:35:23 2017 New Revision: 312315 URL: https://svnweb.freebsd.org/changeset/base/312315 Log: rtwn: export more stats to net80211 Setup more ieee80211_rx_stats fields for received frames: - pktflags: * IEEE80211_RX_F_FAIL_FCSCRC; * IEEE80211_RX_F_AMPDU; * IEEE80211_RX_F_AMPDU_MORE; * IEEE80211_RX_F_SHORTGI; - rate flags (CCK, OFDM, HT); - width; - phytype; - rate; - rx_tsf; - rssi; - nf; - ieee, freq (RTL8188EU only, when ht40 support is disabled). Tested with: - RTL8188CE, RTL8188EU, RTL8821AU (STA / AP modes, i386) - (by kevlo) RTL8188EU and RTL8812AU (amd64) Reviewed by: adrian (previous version), kevlo Differential Revision: https://reviews.freebsd.org/D9021 Modified: head/sys/dev/rtwn/if_rtwn.c head/sys/dev/rtwn/if_rtwn_rx.c head/sys/dev/rtwn/if_rtwn_rx.h head/sys/dev/rtwn/if_rtwnvar.h head/sys/dev/rtwn/pci/rtwn_pci_rx.c head/sys/dev/rtwn/rtl8188e/r88e.h head/sys/dev/rtwn/rtl8188e/r88e_rx.c head/sys/dev/rtwn/rtl8188e/usb/r88eu_attach.c head/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c head/sys/dev/rtwn/rtl8192c/r92c.h head/sys/dev/rtwn/rtl8192c/r92c_reg.h head/sys/dev/rtwn/rtl8192c/r92c_rx.c head/sys/dev/rtwn/rtl8192c/r92c_rx_desc.h head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c head/sys/dev/rtwn/rtl8812a/r12a.h head/sys/dev/rtwn/rtl8812a/r12a_rx.c head/sys/dev/rtwn/rtl8812a/r12a_rx_desc.h head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c head/sys/dev/rtwn/usb/rtwn_usb_rx.c Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/if_rtwn.c Tue Jan 17 00:35:23 2017 (r312315) @@ -1999,6 +1999,7 @@ rtwn_stop(struct rtwn_softc *sc) sc->fwver = 0; sc->thcal_temp = 0; sc->cur_bcnq_id = RTWN_VAP_ID_INVALID; + bzero(&sc->last_physt, sizeof(sc->last_physt)); #ifdef D4054 ieee80211_tx_watchdog_stop(&sc->sc_ic); Modified: head/sys/dev/rtwn/if_rtwn_rx.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/if_rtwn_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -117,18 +117,19 @@ rtwn_set_basicrates(struct rtwn_softc *s } static void -rtwn_update_avgrssi(struct rtwn_softc *sc, struct rtwn_node *un, int rate) +rtwn_update_avgrssi(struct rtwn_softc *sc, struct rtwn_node *un, int8_t rssi, + int is_cck) { int pwdb; /* Convert antenna signal to percentage. */ - if (un->last_rssi <= -100 || un->last_rssi >= 20) + if (rssi <= -100 || rssi >= 20) pwdb = 0; - else if (un->last_rssi >= 0) + else if (rssi >= 0) pwdb = 100; else - pwdb = 100 + un->last_rssi; - if (RTWN_RATE_IS_CCK(rate)) { + pwdb = 100 + rssi; + if (is_cck) { /* CCK gain is smaller than OFDM/MCS gain. */ pwdb += 6; if (pwdb > 100) @@ -155,11 +156,11 @@ rtwn_update_avgrssi(struct rtwn_softc *s } static int8_t -rtwn_get_rssi(struct rtwn_softc *sc, int rate, void *physt) +rtwn_get_rssi(struct rtwn_softc *sc, void *physt, int is_cck) { int8_t rssi; - if (RTWN_RATE_IS_CCK(rate)) + if (is_cck) rssi = rtwn_get_rssi_cck(sc, physt); else /* OFDM/HT. */ rssi = rtwn_get_rssi_ofdm(sc, physt); @@ -188,81 +189,133 @@ rtwn_get_tsf(struct rtwn_softc *sc, uint *buf += rtwn_get_tsf_low(sc, id); } +static uint64_t +rtwn_extend_rx_tsf(struct rtwn_softc *sc, const struct r92c_rx_stat *stat) +{ + uint64_t tsft; + uint32_t rxdw3, tsfl, tsfl_curr; + int id; + + rxdw3 = le32toh(stat->rxdw3); + tsfl = le32toh(stat->tsf_low); + id = MS(rxdw3, R92C_RXDW3_BSSID_FIT); + + switch (id) { + case 1: + case 2: + id >>= 1; + tsfl_curr = rtwn_get_tsf_low(sc, id); + break; + default: + { + uint32_t tsfl0, tsfl1; + + tsfl0 = rtwn_get_tsf_low(sc, 0); + tsfl1 = rtwn_get_tsf_low(sc, 1); + + if (abs(tsfl0 - tsfl) < abs(tsfl1 - tsfl)) { + id = 0; + tsfl_curr = tsfl0; + } else { + id = 1; + tsfl_curr = tsfl1; + } + break; + } + } + + tsft = rtwn_get_tsf_high(sc, id); + if (tsfl > tsfl_curr && tsfl > 0xffff0000) + tsft--; + tsft <<= 32; + tsft += tsfl; + + return (tsft); +} + struct ieee80211_node * -rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, void *desc, - int8_t *rssi) +rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, void *desc) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; struct ieee80211_frame_min *wh; + struct ieee80211_rx_stats rxs; struct rtwn_node *un; struct r92c_rx_stat *stat; - uint32_t rxdw0, rxdw3; - int cipher, infosz, pktlen, rate, shift; + void *physt; + uint32_t rxdw0; + int8_t rssi; + int cipher, infosz, is_cck, pktlen, shift; stat = desc; rxdw0 = le32toh(stat->rxdw0); - rxdw3 = le32toh(stat->rxdw3); cipher = MS(rxdw0, R92C_RXDW0_CIPHER); infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); shift = MS(rxdw0, R92C_RXDW0_SHIFT); - rate = MS(rxdw3, R92C_RXDW3_RATE); wh = (struct ieee80211_frame_min *)(mtodo(m, shift + infosz)); if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) && cipher != R92C_CAM_ALGO_NONE) m->m_flags |= M_WEP; - if (pktlen >= sizeof(*wh)) + if (pktlen >= sizeof(*wh)) { ni = ieee80211_find_rxnode(ic, wh); - else + if (ni != NULL && (ni->ni_flags & IEEE80211_NODE_HT)) + m->m_flags |= M_AMPDU; + } else ni = NULL; un = RTWN_NODE(ni); - /* Get RSSI from PHY status descriptor if present. */ - if (infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) { - *rssi = rtwn_get_rssi(sc, rate, mtod(m, void *)); - RTWN_DPRINTF(sc, RTWN_DEBUG_RSSI, "%s: rssi %d, ridx %d\n", - __func__, *rssi, rate); - - sc->last_rssi = *rssi; - if (un != NULL) { - un->last_rssi = *rssi; + if (infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) + physt = (void *)mtodo(m, shift); + else + physt = (un != NULL) ? &un->last_physt : &sc->last_physt; - /* Update our average RSSI. */ - rtwn_update_avgrssi(sc, un, rate); - } - } else - *rssi = (un != NULL) ? un->last_rssi : sc->last_rssi; + bzero(&rxs, sizeof(rxs)); + rtwn_get_rx_stats(sc, &rxs, desc, physt); + if (rxs.c_pktflags & IEEE80211_RX_F_AMPDU) { + /* Next MPDU will come without PHY info. */ + memcpy(&sc->last_physt, physt, sizeof(sc->last_physt)); + if (un != NULL) + memcpy(&un->last_physt, physt, sizeof(sc->last_physt)); + } + + /* Add some common bits. */ + /* NB: should not happen. */ + if (rxdw0 & R92C_RXDW0_CRCERR) + rxs.c_pktflags |= IEEE80211_RX_F_FAIL_FCSCRC; + + rxs.r_flags |= IEEE80211_R_TSF_START; /* XXX undocumented */ + rxs.r_flags |= IEEE80211_R_TSF64; + rxs.c_rx_tsf = rtwn_extend_rx_tsf(sc, stat); + + /* Get RSSI from PHY status descriptor. */ + is_cck = (rxs.c_pktflags & IEEE80211_RX_F_CCK) != 0; + rssi = rtwn_get_rssi(sc, physt, is_cck); + + /* XXX TODO: we really need a rate-to-string method */ + RTWN_DPRINTF(sc, RTWN_DEBUG_RSSI, "%s: rssi %d, rate %d\n", + __func__, rssi, rxs.c_rate); + if (un != NULL && infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) { + /* Update our average RSSI. */ + rtwn_update_avgrssi(sc, un, rssi, is_cck); + } + + rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; + rxs.c_nf = RTWN_NOISE_FLOOR; + rxs.c_rssi = rssi - rxs.c_nf; + (void) ieee80211_add_rx_params(m, &rxs); if (ieee80211_radiotap_active(ic)) { struct rtwn_rx_radiotap_header *tap = &sc->sc_rxtap; - int id = RTWN_VAP_ID_INVALID; - - if (ni != NULL) - id = RTWN_VAP(ni->ni_vap)->id; - if (id == RTWN_VAP_ID_INVALID) - id = 0; tap->wr_flags = rtwn_rx_radiotap_flags(sc, desc); - tap->wr_tsft = rtwn_get_tsf_high(sc, id); - if (le32toh(stat->tsf_low) > rtwn_get_tsf_low(sc, id)) - tap->wr_tsft--; - tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32; - tap->wr_tsft += stat->tsf_low; - - /* XXX 20/40? */ - - /* Map HW rate index to 802.11 rate. */ - if (rate < RTWN_RIDX_MCS(0)) - tap->wr_rate = ridx2rate[rate]; - else /* MCS0~15. */ - tap->wr_rate = IEEE80211_RATE_MCS | (rate - 12); - - tap->wr_dbm_antsignal = *rssi; - tap->wr_dbm_antnoise = RTWN_NOISE_FLOOR; + tap->wr_tsft = htole64(rxs.c_rx_tsf); + tap->wr_rate = rxs.c_rate; + tap->wr_dbm_antsignal = rssi; + tap->wr_dbm_antnoise = rxs.c_nf; } /* Drop PHY descriptor. */ Modified: head/sys/dev/rtwn/if_rtwn_rx.h ============================================================================== --- head/sys/dev/rtwn/if_rtwn_rx.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/if_rtwn_rx.h Tue Jan 17 00:35:23 2017 (r312315) @@ -26,7 +26,7 @@ void rtwn_get_rates(struct rtwn_softc *, const struct ieee80211_htrateset *, uint32_t *, int *, int); void rtwn_set_basicrates(struct rtwn_softc *, uint32_t); struct ieee80211_node * rtwn_rx_common(struct rtwn_softc *, struct mbuf *, - void *, int8_t *); + void *); void rtwn_adhoc_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, const struct ieee80211_rx_stats *, int, int); void rtwn_set_multi(struct rtwn_softc *); Modified: head/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnvar.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/if_rtwnvar.h Tue Jan 17 00:35:23 2017 (r312315) @@ -76,6 +76,12 @@ struct rtwn_tx_buf { uint8_t txd[RTWN_TX_DESC_SIZE]; } __attribute__((aligned(4))); +#define RTWN_PHY_STATUS_SIZE 32 +struct rtwn_tx_phystat { + uint32_t phydw[RTWN_PHY_STATUS_SIZE / sizeof(uint32_t)]; +}; + + struct rtwn_softc; union sec_param { @@ -95,7 +101,8 @@ struct rtwn_cmdq { struct rtwn_node { struct ieee80211_node ni; /* must be the first */ int id; - int8_t last_rssi; + + struct rtwn_tx_phystat last_physt; int avg_pwdb; }; #define RTWN_NODE(ni) ((struct rtwn_node *)(ni)) @@ -195,7 +202,7 @@ struct rtwn_softc { const char *name; int sc_ant; - int8_t last_rssi; + struct rtwn_tx_phystat last_physt; uint8_t thcal_temp; int cur_bcnq_id; @@ -336,6 +343,9 @@ struct rtwn_softc { struct ieee80211vap *, int); void (*sc_set_rssi)(struct rtwn_softc *); #endif + void (*sc_get_rx_stats)(struct rtwn_softc *, + struct ieee80211_rx_stats *, const void *, + const void *); int8_t (*sc_get_rssi_cck)(struct rtwn_softc *, void *); int8_t (*sc_get_rssi_ofdm)(struct rtwn_softc *, void *); int (*sc_classify_intr)(struct rtwn_softc *, void *, int); @@ -478,6 +488,8 @@ void rtwn_suspend(struct rtwn_softc *); (((_sc)->sc_parse_rom)((_sc), (_rom))) #define rtwn_set_led(_sc, _led, _on) \ (((_sc)->sc_set_led)((_sc), (_led), (_on))) +#define rtwn_get_rx_stats(_sc, _rxs, _desc, _physt) \ + (((_sc)->sc_get_rx_stats((_sc), (_rxs), (_desc), (_physt)))) #define rtwn_get_rssi_cck(_sc, _physt) \ (((_sc)->sc_get_rssi_cck)((_sc), (_physt))) #define rtwn_get_rssi_ofdm(_sc, _physt) \ Modified: head/sys/dev/rtwn/pci/rtwn_pci_rx.c ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/pci/rtwn_pci_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -95,7 +95,6 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct ieee80211_node *ni; uint32_t rxdw0; struct mbuf *m, *m1; - int8_t rssi = 0, nf; int infosz, pktlen, shift, error; /* Dump Rx descriptor. */ @@ -162,12 +161,11 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, rx_data->m = m1; m->m_pkthdr.len = m->m_len = pktlen + infosz + shift; - nf = RTWN_NOISE_FLOOR; - ni = rtwn_rx_common(sc, m, rx_desc, &rssi); + ni = rtwn_rx_common(sc, m, rx_desc); RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, - "%s: Rx frame len %d, infosz %d, shift %d, rssi %d\n", - __func__, pktlen, infosz, shift, rssi); + "%s: Rx frame len %d, infosz %d, shift %d\n", + __func__, pktlen, infosz, shift); /* Update RX descriptor. */ rtwn_pci_setup_rx_desc(pc, rx_desc, rx_data->paddr, MJUMPAGESIZE, @@ -176,11 +174,11 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, /* Send the frame to the 802.11 layer. */ RTWN_UNLOCK(sc); if (ni != NULL) { - (void)ieee80211_input(ni, m, rssi - nf, nf); + (void)ieee80211_input_mimo(ni, m); /* Node is no longer needed. */ ieee80211_free_node(ni); } else - (void)ieee80211_input_all(ic, m, rssi - nf, nf); + (void)ieee80211_input_mimo_all(ic, m); RTWN_LOCK(sc); Modified: head/sys/dev/rtwn/rtl8188e/r88e.h ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8188e/r88e.h Tue Jan 17 00:35:23 2017 (r312315) @@ -85,6 +85,8 @@ void r88e_ratectl_tx_complete(struct rtw void r88e_handle_c2h_report(struct rtwn_softc *, uint8_t *, int); int8_t r88e_get_rssi_cck(struct rtwn_softc *, void *); int8_t r88e_get_rssi_ofdm(struct rtwn_softc *, void *); +void r88e_get_rx_stats(struct rtwn_softc *, struct ieee80211_rx_stats *, + const void *, const void *); /* r88e_tx.c */ void r88e_tx_enable_ampdu(void *, int); Modified: head/sys/dev/rtwn/rtl8188e/r88e_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8188e/r88e_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -209,3 +210,19 @@ r88e_get_rssi_ofdm(struct rtwn_softc *sc return (rssi); } + +void +r88e_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, + const void *desc, const void *physt_ptr) +{ + const struct r88e_rx_phystat *physt = physt_ptr; + + r92c_get_rx_stats(sc, rxs, desc, physt_ptr); + + if (!sc->sc_ht40) { /* XXX center channel */ + rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->c_ieee = le16toh(physt->chan); + rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, + IEEE80211_CHAN_2GHZ); + } +} Modified: head/sys/dev/rtwn/rtl8188e/usb/r88eu_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/usb/r88eu_attach.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8188e/usb/r88eu_attach.c Tue Jan 17 00:35:23 2017 (r312315) @@ -127,6 +127,7 @@ r88eu_attach(struct rtwn_usb_softc *uc) sc->sc_dump_tx_desc = r92cu_dump_tx_desc; sc->sc_tx_radiotap_flags = r92c_tx_radiotap_flags; sc->sc_rx_radiotap_flags = r92c_rx_radiotap_flags; + sc->sc_get_rx_stats = r88e_get_rx_stats; sc->sc_get_rssi_cck = r88e_get_rssi_cck; sc->sc_get_rssi_ofdm = r88e_get_rssi_ofdm; sc->sc_classify_intr = r88eu_classify_intr; Modified: head/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c Tue Jan 17 00:35:23 2017 (r312315) @@ -172,6 +172,7 @@ r92ce_attach(struct rtwn_pci_softc *pc) sc->sc_dump_tx_desc = r92ce_dump_tx_desc; sc->sc_tx_radiotap_flags = r92c_tx_radiotap_flags; sc->sc_rx_radiotap_flags = r92c_rx_radiotap_flags; + sc->sc_get_rx_stats = r92c_get_rx_stats; sc->sc_get_rssi_cck = r92c_get_rssi_cck; sc->sc_get_rssi_ofdm = r92c_get_rssi_ofdm; sc->sc_classify_intr = r92ce_classify_intr; Modified: head/sys/dev/rtwn/rtl8192c/r92c.h ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/r92c.h Tue Jan 17 00:35:23 2017 (r312315) @@ -99,6 +99,8 @@ void r92c_parse_rom(struct rtwn_softc *, int8_t r92c_get_rssi_cck(struct rtwn_softc *, void *); int8_t r92c_get_rssi_ofdm(struct rtwn_softc *, void *); uint8_t r92c_rx_radiotap_flags(const void *); +void r92c_get_rx_stats(struct rtwn_softc *, struct ieee80211_rx_stats *, + const void *, const void *); /* r92c_tx.c */ void r92c_tx_enable_ampdu(void *, int); Modified: head/sys/dev/rtwn/rtl8192c/r92c_reg.h ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_reg.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/r92c_reg.h Tue Jan 17 00:35:23 2017 (r312315) @@ -420,6 +420,7 @@ #define R92C_PBP_1024 4 /* Bits for R92C_TRXDMA_CTRL. */ +#define R92C_TRXDMA_CTRL_RX_SHIFT_EN 0x0002 #define R92C_TRXDMA_CTRL_RXDMA_AGG_EN 0x0004 #define R92C_TRXDMA_CTRL_TXDMA_VOQ_MAP_M 0x0030 #define R92C_TRXDMA_CTRL_TXDMA_VOQ_MAP_S 4 @@ -593,7 +594,8 @@ #define R92C_RCR_APPFCS 0x80000000 /* Bits for R92C_RX_DRVINFO_SZ. */ -#define R92C_RX_DRVINFO_SZ_DEF 4 /* XXX other values will not work */ +/* XXX other values will not work */ +#define R92C_RX_DRVINFO_SZ_DEF ((RTWN_PHY_STATUS_SIZE) / 8) /* Bits for R92C_WMAC_TRXPTCL_CTL. */ #define R92C_WMAC_TRXPTCL_SHPRE 0x00020000 Modified: head/sys/dev/rtwn/rtl8192c/r92c_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/r92c_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -100,3 +100,47 @@ r92c_rx_radiotap_flags(const void *buf) flags = IEEE80211_RADIOTAP_F_SHORTGI; return (flags); } + +void +r92c_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, + const void *desc, const void *physt_ptr) +{ + const struct r92c_rx_stat *stat = desc; + uint32_t rxdw1, rxdw3; + uint8_t rate; + + rxdw1 = le32toh(stat->rxdw1); + rxdw3 = le32toh(stat->rxdw3); + rate = MS(rxdw3, R92C_RXDW3_RATE); + + if (rxdw1 & R92C_RXDW1_AMPDU) + rxs->c_pktflags |= IEEE80211_RX_F_AMPDU; + else if (rxdw1 & R92C_RXDW1_AMPDU_MORE) + rxs->c_pktflags |= IEEE80211_RX_F_AMPDU_MORE; + if ((rxdw3 & R92C_RXDW3_SPLCP) && rate >= RTWN_RIDX_MCS(0)) + rxs->c_pktflags |= IEEE80211_RX_F_SHORTGI; + + if (rxdw3 & R92C_RXDW3_HT40) + rxs->c_width = IEEE80211_RX_FW_40MHZ; + else + rxs->c_width = IEEE80211_RX_FW_20MHZ; + + if (RTWN_RATE_IS_CCK(rate)) + rxs->c_phytype = IEEE80211_RX_FP_11B; + else if (rate < RTWN_RIDX_MCS(0)) + rxs->c_phytype = IEEE80211_RX_FP_11G; + else + rxs->c_phytype = IEEE80211_RX_FP_11NG; + + /* Map HW rate index to 802.11 rate. */ + if (rate < RTWN_RIDX_MCS(0)) { + rxs->c_rate = ridx2rate[rate]; + if (RTWN_RATE_IS_CCK(rate)) + rxs->c_pktflags |= IEEE80211_RX_F_CCK; + else + rxs->c_pktflags |= IEEE80211_RX_F_OFDM; + } else { /* MCS0~15. */ + rxs->c_rate = IEEE80211_RATE_MCS | (rate - 12); + rxs->c_pktflags |= IEEE80211_RX_F_HT; + } +} Modified: head/sys/dev/rtwn/rtl8192c/r92c_rx_desc.h ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_rx_desc.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/r92c_rx_desc.h Tue Jan 17 00:35:23 2017 (r312315) @@ -45,6 +45,9 @@ struct r92c_rx_stat { uint32_t rxdw1; #define R92C_RXDW1_MACID_M 0x0000001f #define R92C_RXDW1_MACID_S 0 +#define R92C_RXDW1_AMSDU 0x00002000 +#define R92C_RXDW1_AMPDU_MORE 0x00004000 +#define R92C_RXDW1_AMPDU 0x00008000 #define R92C_RXDW1_MC 0x40000000 #define R92C_RXDW1_BC 0x80000000 @@ -56,6 +59,8 @@ struct r92c_rx_stat { #define R92C_RXDW3_SPLCP 0x00000100 #define R92C_RXDW3_HT40 0x00000200 #define R92C_RXDW3_HTC 0x00000400 +#define R92C_RXDW3_BSSID_FIT_M 0x00003000 +#define R92C_RXDW3_BSSID_FIT_S 12 uint32_t rxdw4; uint32_t tsf_low; Modified: head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Tue Jan 17 00:35:23 2017 (r312315) @@ -165,6 +165,7 @@ r92cu_attach(struct rtwn_usb_softc *uc) sc->sc_dump_tx_desc = r92cu_dump_tx_desc; sc->sc_tx_radiotap_flags = r92c_tx_radiotap_flags; sc->sc_rx_radiotap_flags = r92c_rx_radiotap_flags; + sc->sc_get_rx_stats = r92c_get_rx_stats; sc->sc_get_rssi_cck = r92c_get_rssi_cck; sc->sc_get_rssi_ofdm = r92c_get_rssi_ofdm; sc->sc_classify_intr = r92cu_classify_intr; Modified: head/sys/dev/rtwn/rtl8812a/r12a.h ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8812a/r12a.h Tue Jan 17 00:35:23 2017 (r312315) @@ -128,6 +128,8 @@ void r12a_ratectl_tx_complete(struct rtw void r12a_handle_c2h_report(struct rtwn_softc *, uint8_t *, int); int r12a_check_frame_checksum(struct rtwn_softc *, struct mbuf *); uint8_t r12a_rx_radiotap_flags(const void *); +void r12a_get_rx_stats(struct rtwn_softc *, struct ieee80211_rx_stats *, + const void *, const void *); /* r12a_tx.c */ void r12a_fill_tx_desc(struct rtwn_softc *, struct ieee80211_node *, Modified: head/sys/dev/rtwn/rtl8812a/r12a_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8812a/r12a_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -229,10 +229,97 @@ r12a_rx_radiotap_flags(const void *buf) if (!(stat->rxdw4 & htole32(R12A_RXDW4_SPLCP))) return (0); - rate = MS(le32toh(stat->rxdw3), R92C_RXDW3_RATE); + rate = MS(le32toh(stat->rxdw3), R12A_RXDW3_RATE); if (RTWN_RATE_IS_CCK(rate)) flags = IEEE80211_RADIOTAP_F_SHORTPRE; else flags = IEEE80211_RADIOTAP_F_SHORTGI; return (flags); } + +void +r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, + const void *desc, const void *physt_ptr) +{ + const struct r92c_rx_stat *stat = desc; + const struct r12a_rx_phystat *physt = physt_ptr; + uint32_t rxdw0, rxdw1, rxdw3, rxdw4; + uint8_t rate; + + rxdw0 = le32toh(stat->rxdw0); + rxdw1 = le32toh(stat->rxdw1); + rxdw3 = le32toh(stat->rxdw3); + rxdw4 = le32toh(stat->rxdw4); + rate = MS(rxdw3, R12A_RXDW3_RATE); + + /* TODO: STBC, LDPC */ + if (rxdw1 & R12A_RXDW1_AMPDU) { + if (rxdw0 & R92C_RXDW0_PHYST) + rxs->c_pktflags |= IEEE80211_RX_F_AMPDU; + else + rxs->c_pktflags |= IEEE80211_RX_F_AMPDU_MORE; + } + + if ((rxdw4 & R12A_RXDW4_SPLCP) && rate >= RTWN_RIDX_MCS(0)) + rxs->c_pktflags |= IEEE80211_RX_F_SHORTGI; + + switch (MS(rxdw4, R12A_RXDW4_BW)) { + case R12A_RXDW4_BW20: + rxs->c_width = IEEE80211_RX_FW_20MHZ; + break; + case R12A_RXDW4_BW40: + rxs->c_width = IEEE80211_RX_FW_40MHZ; + break; + case R12A_RXDW4_BW80: + rxs->c_width = IEEE80211_RX_FW_80MHZ; + break; + default: + break; + } + + if (RTWN_RATE_IS_CCK(rate)) + rxs->c_phytype = IEEE80211_RX_FP_11B; + else { + int is5ghz; + + /* XXX magic */ + /* XXX check with RTL8812AU */ + is5ghz = (physt->cfosho[2] != 0x01); + + if (rate < RTWN_RIDX_MCS(0)) { + if (is5ghz) + rxs->c_phytype = IEEE80211_RX_FP_11A; + else + rxs->c_phytype = IEEE80211_RX_FP_11G; + } else { + if (is5ghz) + rxs->c_phytype = IEEE80211_RX_FP_11NA; + else + rxs->c_phytype = IEEE80211_RX_FP_11NG; + } + } + + /* Map HW rate index to 802.11 rate. */ + if (rate < RTWN_RIDX_MCS(0)) { + rxs->c_rate = ridx2rate[rate]; + if (RTWN_RATE_IS_CCK(rate)) + rxs->c_pktflags |= IEEE80211_RX_F_CCK; + else + rxs->c_pktflags |= IEEE80211_RX_F_OFDM; + } else { /* MCS0~15. */ + /* TODO: VHT rates */ + rxs->c_rate = IEEE80211_RATE_MCS | (rate - 12); + rxs->c_pktflags |= IEEE80211_RX_F_HT; + } + + /* + * XXX always zero for RTL8821AU + * (vendor driver does not check this field) + */ +#if 0 + rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->c_ieee = MS(le16toh(physt->phyw1), R12A_PHYW1_CHAN); + rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, + (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); +#endif +} Modified: head/sys/dev/rtwn/rtl8812a/r12a_rx_desc.h ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_rx_desc.h Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8812a/r12a_rx_desc.h Tue Jan 17 00:35:23 2017 (r312315) @@ -34,18 +34,26 @@ /* Rx MAC descriptor defines (chip-specific). */ /* Rx dword 1 */ #define R12A_RXDW1_AMSDU 0x00002000 +#define R12A_RXDW1_AMPDU 0x00008000 #define R12A_RXDW1_CKSUM_ERR 0x00100000 #define R12A_RXDW1_IPV6 0x00200000 #define R12A_RXDW1_UDP 0x00400000 #define R12A_RXDW1_CKSUM 0x00800000 /* Rx dword 2 */ #define R12A_RXDW2_RPT_C2H 0x10000000 +/* Rx dword 3 */ +#define R12A_RXDW3_RATE_M 0x0000007f +#define R12A_RXDW3_RATE_S 0 /* Rx dword 4 */ #define R12A_RXDW4_SPLCP 0x00000001 #define R12A_RXDW4_LDPC 0x00000002 #define R12A_RXDW4_STBC 0x00000004 #define R12A_RXDW4_BW_M 0x00000030 #define R12A_RXDW4_BW_S 4 +#define R12A_RXDW4_BW20 0 +#define R12A_RXDW4_BW40 1 +#define R12A_RXDW4_BW80 2 +#define R12A_RXDW4_BW160 3 /* Rx PHY descriptor. */ struct r12a_rx_phystat { Modified: head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c Tue Jan 17 00:35:23 2017 (r312315) @@ -190,6 +190,7 @@ r12au_attach(struct rtwn_usb_softc *uc) sc->sc_dump_tx_desc = r12au_dump_tx_desc; sc->sc_tx_radiotap_flags = r12a_tx_radiotap_flags; sc->sc_rx_radiotap_flags = r12a_rx_radiotap_flags; + sc->sc_get_rx_stats = r12a_get_rx_stats; sc->sc_get_rssi_cck = r88e_get_rssi_cck; sc->sc_get_rssi_ofdm = r88e_get_rssi_ofdm; sc->sc_classify_intr = r12au_classify_intr; Modified: head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c Tue Jan 17 00:35:23 2017 (r312315) @@ -182,6 +182,7 @@ r21au_attach(struct rtwn_usb_softc *uc) sc->sc_dump_tx_desc = r12au_dump_tx_desc; sc->sc_tx_radiotap_flags = r12a_tx_radiotap_flags; sc->sc_rx_radiotap_flags = r12a_rx_radiotap_flags; + sc->sc_get_rx_stats = r12a_get_rx_stats; sc->sc_get_rssi_cck = r21a_get_rssi_cck; sc->sc_get_rssi_ofdm = r88e_get_rssi_ofdm; sc->sc_classify_intr = r12au_classify_intr; Modified: head/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_rx.c Mon Jan 16 20:57:01 2017 (r312314) +++ head/sys/dev/rtwn/usb/rtwn_usb_rx.c Tue Jan 17 00:35:23 2017 (r312315) @@ -236,7 +236,7 @@ rtwn_report_intr(struct rtwn_usb_softc * } static struct ieee80211_node * -rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m, int8_t *rssi) +rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) { struct r92c_rx_stat stat; @@ -244,7 +244,7 @@ rtwn_rx_frame(struct rtwn_softc *sc, str m_copydata(m, 0, sizeof(struct r92c_rx_stat), (caddr_t)&stat); m_adj(m, sizeof(struct r92c_rx_stat)); - return (rtwn_rx_common(sc, m, &stat, rssi)); + return (rtwn_rx_common(sc, m, &stat)); } void @@ -256,7 +256,6 @@ rtwn_bulk_rx_callback(struct usb_xfer *x struct ieee80211_node *ni; struct mbuf *m = NULL, *next; struct rtwn_data *data; - int8_t nf, rssi; RTWN_ASSERT_LOCKED(sc); @@ -291,19 +290,15 @@ tr_setup: next = m->m_next; m->m_next = NULL; - ni = rtwn_rx_frame(sc, m, &rssi); + ni = rtwn_rx_frame(sc, m); RTWN_UNLOCK(sc); - nf = RTWN_NOISE_FLOOR; if (ni != NULL) { - if (ni->ni_flags & IEEE80211_NODE_HT) - m->m_flags |= M_AMPDU; - (void)ieee80211_input(ni, m, rssi - nf, nf); + (void)ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); } else { - (void)ieee80211_input_all(ic, m, - rssi - nf, nf); + (void)ieee80211_input_mimo_all(ic, m); } RTWN_LOCK(sc); m = next; From owner-svn-src-head@freebsd.org Tue Jan 17 00:39:10 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 7CC08CB3C46; Tue, 17 Jan 2017 00:39:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ED5B1A0E; Tue, 17 Jan 2017 00:39:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H0d9rT042502; Tue, 17 Jan 2017 00:39:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H0d9PA042501; Tue, 17 Jan 2017 00:39:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701170039.v0H0d9PA042501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 17 Jan 2017 00:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312316 - head/sys/arm/xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 00:39:10 -0000 Author: gonzo Date: Tue Jan 17 00:39:09 2017 New Revision: 312316 URL: https://svnweb.freebsd.org/changeset/base/312316 Log: [zynq] Fix panic on USB PHY initialization failure The Zedboard has a hardware bug where initialization of the USB PHY occasionally fails on boot-up. Fix regression in -CURRENT when kernel panics on such occasion. 11-RELEASE branch works fine PR: 215862 Submitted by: Thomas Skibo Modified: head/sys/arm/xilinx/zy7_ehci.c Modified: head/sys/arm/xilinx/zy7_ehci.c ============================================================================== --- head/sys/arm/xilinx/zy7_ehci.c Tue Jan 17 00:35:23 2017 (r312315) +++ head/sys/arm/xilinx/zy7_ehci.c Tue Jan 17 00:39:09 2017 (r312316) @@ -325,13 +325,10 @@ zy7_ehci_detach(device_t dev) /* during module unload there are lots of children leftover */ device_delete_children(dev); - sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; - - if (sc->sc_irq_res && sc->sc_intr_hdl) - /* call ehci_detach() after ehci_init() called after - * successful bus_setup_intr(). - */ + if ((sc->sc_flags & EHCI_SCFLG_DONEINIT) != 0) { ehci_detach(sc); + sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; + } if (sc->sc_irq_res) { if (sc->sc_intr_hdl != NULL) From owner-svn-src-head@freebsd.org Tue Jan 17 00:48:03 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 D9994CB3F71; Tue, 17 Jan 2017 00:48:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9F1B1ECE; Tue, 17 Jan 2017 00:48:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H0m2wB046404; Tue, 17 Jan 2017 00:48:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H0m2Vv046403; Tue, 17 Jan 2017 00:48:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701170048.v0H0m2Vv046403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 17 Jan 2017 00:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312317 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 00:48:04 -0000 Author: avos Date: Tue Jan 17 00:48:02 2017 New Revision: 312317 URL: https://svnweb.freebsd.org/changeset/base/312317 Log: Add sys/dev/rtwn/rtl8821a/usb/r21au_dfs.c into sys/conf/files Reported by: adrian Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 17 00:39:09 2017 (r312316) +++ head/sys/conf/files Tue Jan 17 00:48:02 2017 (r312317) @@ -2716,6 +2716,7 @@ dev/rtwn/rtl8821a/r21a_led.c optional rt dev/rtwn/rtl8821a/r21a_rom.c optional rtwn dev/rtwn/rtl8821a/r21a_rx.c optional rtwn dev/rtwn/rtl8821a/usb/r21au_attach.c optional rtwn_usb +dev/rtwn/rtl8821a/usb/r21au_dfs.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_init.c optional rtwn_usb rtwn-rtl8188eufw.c optional rtwn-rtl8188eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eufw.fw:rtwn-rtl8188eufw:111 -mrtwn-rtl8188eufw -c${.TARGET}" \ From owner-svn-src-head@freebsd.org Tue Jan 17 01:02:59 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 5E805CB13F7; Tue, 17 Jan 2017 01:02:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 21F771820; Tue, 17 Jan 2017 01:02:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id DC0BFD6720E; Tue, 17 Jan 2017 12:02:50 +1100 (AEDT) Date: Tue, 17 Jan 2017 12:02:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312205 - in head/sys: kern net In-Reply-To: <30935285.ropjfVExpa@ralph.baldwin.cx> Message-ID: <20170117113927.E1043@besplex.bde.org> References: <201701150050.v0F0oAU8055428@repo.freebsd.org> <30935285.ropjfVExpa@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=sYOr5FrkeuhcdU5QBEUA:9 a=CjuIK1q_8ugA:10 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: Tue, 17 Jan 2017 01:02:59 -0000 On Mon, 16 Jan 2017, John Baldwin wrote: > On Sunday, January 15, 2017 12:50:10 AM Sean Bruno wrote: >> ... >> Log: >> Fix hangs in a uniprocessor configuration (qemu, virtualbox, real hw). >> >> sys/net/iflib.c: >> Add ctx to filter_info and don't skpi interrupt early on unless we're on an >> SMP system > > On an SMP system with EARLY_AP_STARTUP (default on x86) this code should > never see smp_started as false anyway, so these checks should likely just > be conditional on EARLY_AP_STARTUP (since that option will eventually go > away). Ifdefs on EARLY_AP_STARTUP give strange results for the UP case (at least for SMP with 1 CPU). First, the ifdef in sys/kernel.h moves SI_SUB_SMP from late to early, although the CPU initialization order has not changed when there is only 1 CPU. Then everything that uses SI_SUB_SMP is reordered, and bugs in the new order show up even in the UP case. sys/gtaskqueue.h uses a complicated combination of EARLY_AP_STARTUP and SI_SUB ifdefs to try to get the order right. I think the last commit to it helps for the UP case but harms for the SMP case (both for the !EARLY_AP_STARTUP case). Its code is simpler for the EARLY_AP_STARTUP case. In the !EARLY_AP_STARTUP case, it has to split up the initialization to delay calculations depending on the number of CPUs until after SMP has started. The last commit to it seems to have turned the split into nonsense by removing the delay. But in the UP case, the split is not really necessary and removing the delay should help. EARLY_AP_STARTUP works badly here. It doesn't give a much faster startup for the early part of the boot. Then it gives a much slower boot by hanging for almost a minute waiting for USB or something. Starting all the CPUs early also unimproves debugging by interleaving the boot messages a bit. I use colorized console messages (with the color indexed by the CPU). This makes interleaved messages quite readable and gives interesting patterns when multiple CPUs are running. Bruce From owner-svn-src-head@freebsd.org Tue Jan 17 01:54:16 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 E3E9DCB39AA; Tue, 17 Jan 2017 01:54:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 787CE1B32; Tue, 17 Jan 2017 01:54:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 454D1D45F9C; Tue, 17 Jan 2017 12:54:08 +1100 (AEDT) Date: Tue, 17 Jan 2017 12:54:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sean Bruno cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312293 - in head/sys: kern sys In-Reply-To: <201701161658.v0GGwD0Z050066@repo.freebsd.org> Message-ID: <20170117120313.K1043@besplex.bde.org> References: <201701161658.v0GGwD0Z050066@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=_hRaNZH9cyDBuD_93R8A:9 a=V7xSkV4eWzfH1oLK:21 a=wwmg7bA4uAeZwAJW:21 a=CjuIK1q_8ugA:10 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: Tue, 17 Jan 2017 01:54:17 -0000 On Mon, 16 Jan 2017, Sean Bruno wrote: > Log: > Change startup order for the no EARLY_AP_STARTUP case to initialize > gtaskqueue bits at SI_SUB_INIT_IF instead of waiting until SI_SUB_SMP > which is far too late. > > Add an assertion in taskqgroup_attach() to catch startup initialization > failures in the future. > > Reported by: kib bde I don't see how this can work. The purpose of the EARLY_AP_STARTUP ifdef is to split up the initialization so that part of it is much later in the !EARLY_AP_STARTUP case. The second part was too late to work, except possibly in the UP case where the split isn't needed. This commit turns the split into almost a non-split and does the second part too early to work. Also, I don't see how dynamic management of CPUs can work. The adjustment function was delayed so that it can see the correct number of CPUs. I think this number can change dynamically later still, but the adjustment is static so it doesn't run again. > Modified: head/sys/kern/subr_gtaskqueue.c > ============================================================================== > --- head/sys/kern/subr_gtaskqueue.c Mon Jan 16 16:44:13 2017 (r312292) > +++ head/sys/kern/subr_gtaskqueue.c Mon Jan 16 16:58:12 2017 (r312293) > @@ -646,6 +646,7 @@ taskqgroup_attach(struct taskqgroup *qgr > qid = taskqgroup_find(qgroup, uniq); > qgroup->tqg_queue[qid].tgc_cnt++; > LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); > + MPASS(qgroup->tqg_queue[qid].tgc_taskq != NULL); This was removed in the next commit. Failure to run the adjustment function early enough to work (or at all) results in this assertion failing. I don't see how the pointer can become non-null later if this assertion fails, so this shouldn't be removed. > Modified: head/sys/sys/gtaskqueue.h > ============================================================================== > --- head/sys/sys/gtaskqueue.h Mon Jan 16 16:44:13 2017 (r312292) > +++ head/sys/sys/gtaskqueue.h Mon Jan 16 16:58:12 2017 (r312293) > @@ -115,7 +115,7 @@ taskqgroup_adjust_##name(void *arg) > taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ > } \ > \ > -SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \ > +SYSINIT(taskqgroup_adj_##name, SI_SUB_INIT_IF, SI_ORDER_ANY, \ > taskqgroup_adjust_##name, NULL); \ > \ > struct __hack Note that in the EARLY_AP_STARTUP case, this operation is done sequentially at SI_SUB_INIT_IF:SI_ORDER_FIRST in the taskgroup_define* method. In the !EARLY_AP_STARTUP case, the order was significantly different, but now it is just: taskqgroup_define_##name, SI_SUB_INIT_IF, SI_ORDER_FIRST, taskqgroup_adj_##name, SI_SUB_INIT_IF, SI_ORDER_ANY, (or even the reverse, if ANY really means "any", but according to its comment it means "last". It is last numerically, and I think it really is last). So split is almost null -- only a few other SI_SUB_INIT_IF's can run before the last one, and the APs are never started before this. The ifdef is still on EARLY_AP_STARTUP, so makes no sense now. Testing shows that this works as predicted: with !EARLY_AP_STARTUP: - UP case now works (because taskqgroup_adj_##name now runs early enough to work) - SMP case still gives null pointer panic (because taskqgroup_adj_##name now runs too early to work (cnt = 1, stride = 1, smp_started = 0, mp_ncpus = 8). After this commit, smp_started is always 0 at attach time for obvious reasons, but this only causes _taskqgroup_adj_##name to do nothing in the SMP case (mp_ncpus != 1). Bruce From owner-svn-src-head@freebsd.org Tue Jan 17 03:38:51 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 4E5F8CB3415; Tue, 17 Jan 2017 03:38:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04485125B; Tue, 17 Jan 2017 03:38:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H3coSY017068; Tue, 17 Jan 2017 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H3coqg017066; Tue, 17 Jan 2017 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701170338.v0H3coqg017066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 17 Jan 2017 03:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312328 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 03:38:51 -0000 Author: ngie Date: Tue Jan 17 03:38:49 2017 New Revision: 312328 URL: https://svnweb.freebsd.org/changeset/base/312328 Log: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9099 Modified: head/share/mk/bsd.README head/share/mk/bsd.snmpmod.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Tue Jan 17 01:59:42 2017 (r312327) +++ head/share/mk/bsd.README Tue Jan 17 03:38:49 2017 (r312328) @@ -418,7 +418,15 @@ tree. bsd.snmpmod.mk leverages bsd.lib.mk for building MIB modules and bsd.files.mk for installing MIB description and definition files. -It has no additional targets. +It implements the following additional targets: + + smilint: + execute smilint on the MIBs defined by BMIBS. + + The net-mgmt/libsmi package must be installed before + executing this target. The net-mgmt/net-snmp package + should be installed as well to reduce false positives + from smilint. It sets/uses the following variables: @@ -444,8 +452,19 @@ EXTRAMIBSYMS Extra MIB definition files See ${MOD}_oid.h for more details. +LOCALBASE The package root where smilint and the net-snmp + definitions can be found + MOD The bsnmpd module name. +SMILINT smilint binary to use with the smilint make target. + +SMILINT_FLAGS flags to pass to smilint. + +SMIPATH A colon-separated directory path where MIBs definitions + can be found. See "SMIPATH" in smi_config for more + details. + XSYM MIB names to extract symbols for. See ${MOD}_oid.h for more details. Modified: head/share/mk/bsd.snmpmod.mk ============================================================================== --- head/share/mk/bsd.snmpmod.mk Tue Jan 17 01:59:42 2017 (r312327) +++ head/share/mk/bsd.snmpmod.mk Tue Jan 17 03:38:49 2017 (r312328) @@ -25,4 +25,18 @@ FILESGROUPS+= BMIBS BMIBSDIR?= ${SHAREDIR}/snmp/mibs .endif +.if !target(smilint) && !empty(BMIBS) +LOCALBASE?= /usr/local + +SMILINT?= ${LOCALBASE}/bin/smilint + +SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs + +SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership + +smilint: ${BMIBS} + SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC} +.endif +smilint: .PHONY + .include From owner-svn-src-head@freebsd.org Tue Jan 17 03:41:24 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 803D4CB3649; Tue, 17 Jan 2017 03:41:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5202B15E0; Tue, 17 Jan 2017 03:41:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H3fNNd019966; Tue, 17 Jan 2017 03:41:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H3fN6U019964; Tue, 17 Jan 2017 03:41:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701170341.v0H3fN6U019964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 17 Jan 2017 03:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312329 - in head/usr.sbin/bsnmpd/modules: snmp_hostres snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 03:41:24 -0000 Author: ngie Date: Tue Jan 17 03:41:23 2017 New Revision: 312329 URL: https://svnweb.freebsd.org/changeset/base/312329 Log: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 MFC after: 1 week X-MFC with: r312328 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Tue Jan 17 03:38:49 2017 (r312328) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Tue Jan 17 03:41:23 2017 (r312329) @@ -75,8 +75,3 @@ LIBADD= kvm devinfo m geom memstat printcap.pico: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=.:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} Modified: head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Tue Jan 17 03:38:49 2017 (r312328) +++ head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Tue Jan 17 03:41:23 2017 (r312329) @@ -21,8 +21,3 @@ INCS= snmp_${MOD}.h BMIBS= BEGEMOT-IP-MIB.txt BEGEMOT-MIB2-MIB.txt .include - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} From owner-svn-src-head@freebsd.org Tue Jan 17 03:44:46 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 5895DCB389C; Tue, 17 Jan 2017 03:44:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27E0F19F9; Tue, 17 Jan 2017 03:44:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H3ijZS020869; Tue, 17 Jan 2017 03:44:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H3ijS2020868; Tue, 17 Jan 2017 03:44:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701170344.v0H3ijS2020868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 17 Jan 2017 03:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312330 - head/usr.sbin/bsnmpd/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 03:44:46 -0000 Author: ngie Date: Tue Jan 17 03:44:45 2017 New Revision: 312330 URL: https://svnweb.freebsd.org/changeset/base/312330 Log: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsnmpd/modules/Makefile Modified: head/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/Makefile Tue Jan 17 03:41:23 2017 (r312329) +++ head/usr.sbin/bsnmpd/modules/Makefile Tue Jan 17 03:44:45 2017 (r312330) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd +.PATH: ${SRCTOP}/contrib/bsnmp/snmpd .if ${MK_ATM} != "no" _snmp_atm= snmp_atm @@ -36,4 +36,6 @@ SUBDIR+=snmp_wlan INCS= snmpmod.h INCSDIR= ${INCLUDEDIR}/bsnmp +SUBDIR_TARGETS+= smilint + .include From owner-svn-src-head@freebsd.org Tue Jan 17 03:52:58 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 9EFA0CB3DDC; Tue, 17 Jan 2017 03:52:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA0C10A7; Tue, 17 Jan 2017 03:52:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H3qvBB025189; Tue, 17 Jan 2017 03:52:57 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H3qvNJ025187; Tue, 17 Jan 2017 03:52:57 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701170352.v0H3qvNJ025187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Jan 2017 03:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312331 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 03:52:58 -0000 Author: glebius Date: Tue Jan 17 03:52:57 2017 New Revision: 312331 URL: https://svnweb.freebsd.org/changeset/base/312331 Log: Fix regression from r310655, which broke operation of bsnmpd if it is bound to a non-wildcard address. As documented in ip(4), doing sendmsg(2) with IP_SENDSRCADDR on a socket that is bound to non-wildcard address is completely different to using this control message on a wildcard one. A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR) on the socket, and use IP_SENDSRCADDR control message only if we did. While here, garbage collect absolutely useless udp_recv() function that establishes some structures on stack to never use them later. Modified: head/contrib/bsnmp/snmpd/trans_udp.c head/contrib/bsnmp/snmpd/trans_udp.h Modified: head/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_udp.c Tue Jan 17 03:44:45 2017 (r312330) +++ head/contrib/bsnmp/snmpd/trans_udp.c Tue Jan 17 03:52:57 2017 (r312331) @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -119,13 +120,15 @@ udp_init_port(struct tport *tp) addr.sin_port = htons(p->port); addr.sin_family = AF_INET; addr.sin_len = sizeof(addr); - if (addr.sin_addr.s_addr == INADDR_ANY && - setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, - sizeof(on)) == -1) { - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); + if (addr.sin_addr.s_addr == INADDR_ANY) { + if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } + p->recvdstaddr = true; } if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { if (errno == EADDRNOTAVAIL) { @@ -218,7 +221,6 @@ udp_send(struct tport *tp, const u_char { struct udp_port *p = (struct udp_port *)tp; struct cmsghdr *cmsg; - struct in_addr *src_addr; struct msghdr msg; char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; struct iovec iov; @@ -231,15 +233,20 @@ udp_send(struct tport *tp, const u_char msg.msg_iovlen = 1; msg.msg_name = __DECONST(void *, addr); msg.msg_namelen = addrlen; - msg.msg_control = cbuf; - msg.msg_controllen = sizeof(cbuf); - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = IPPROTO_IP; - cmsg->cmsg_type = IP_SENDSRCADDR; - cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); - src_addr = (struct in_addr *)(void*)CMSG_DATA(cmsg); - memcpy(src_addr, &p->recv_addr, sizeof(struct in_addr)); + if (p->recvdstaddr) { + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); + + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = IPPROTO_IP; + cmsg->cmsg_type = IP_SENDSRCADDR; + cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); + memcpy(CMSG_DATA(cmsg), &p->dstaddr, sizeof(struct in_addr)); + } else { + msg.msg_control = NULL; + msg.msg_controllen = 0; + } return (sendmsg(p->input.fd, &msg, 0)); } @@ -260,11 +267,12 @@ check_priv_dgram(struct port_input *pi, * Each receive should return one datagram. */ static ssize_t -recv_dgram(struct port_input *pi, struct in_addr *laddr) +udp_recv(struct tport *tp, struct port_input *pi) { u_char embuf[1000]; char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(struct in_addr))]; + struct udp_port *p = (struct udp_port *)tp; struct msghdr msg; struct iovec iov[1]; ssize_t len; @@ -316,7 +324,8 @@ recv_dgram(struct port_input *pi, struct cmsg = CMSG_NXTHDR(&msg, cmsg)) { if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_RECVDSTADDR) - memcpy(laddr, CMSG_DATA(cmsg), sizeof(struct in_addr)); + memcpy(&p->dstaddr, CMSG_DATA(cmsg), + sizeof(struct in_addr)); if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) cred = (struct sockcred *)CMSG_DATA(cmsg); @@ -329,42 +338,6 @@ recv_dgram(struct port_input *pi, struct } /* - * Receive something - */ -static ssize_t -udp_recv(struct tport *tp, struct port_input *pi) -{ - struct udp_port *p = (struct udp_port *)tp; - struct cmsghdr *cmsgp; - struct in_addr *laddr; - struct msghdr msg; - char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; - ssize_t ret; - - memset(cbuf, 0, sizeof(cbuf)); - - msg.msg_control = cbuf; - msg.msg_controllen = sizeof(cbuf); - - cmsgp = CMSG_FIRSTHDR(&msg); - cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); - cmsgp->cmsg_level = IPPROTO_IP; - cmsgp->cmsg_type = IP_SENDSRCADDR; - laddr = (struct in_addr *)CMSG_DATA(cmsgp); - - ret = recv_dgram(pi, laddr); - - memcpy(&p->recv_addr, laddr, sizeof(struct in_addr)); - - if (laddr->s_addr == INADDR_ANY) { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } - - return (ret); -} - -/* * Port table */ int Modified: head/contrib/bsnmp/snmpd/trans_udp.h ============================================================================== --- head/contrib/bsnmp/snmpd/trans_udp.h Tue Jan 17 03:44:45 2017 (r312330) +++ head/contrib/bsnmp/snmpd/trans_udp.h Tue Jan 17 03:52:57 2017 (r312331) @@ -39,7 +39,9 @@ struct udp_port { struct port_input input; /* common input stuff */ struct sockaddr_in ret; /* the return address */ - struct in_addr recv_addr; /* the address the request was sent to */ + + bool recvdstaddr; /* IP_RECVDSTADDR is on */ + struct in_addr dstaddr; /* address the request was sent to */ }; /* argument for open call */ From owner-svn-src-head@freebsd.org Tue Jan 17 03:57:52 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 BCC26CB307E; Tue, 17 Jan 2017 03:57:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 89EE613A2; Tue, 17 Jan 2017 03:57:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 75so6834426pgf.3; Mon, 16 Jan 2017 19:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=fTjMo6ItsIoDuoOXxs5bAGC7achJEJ9OklVeMI0ejOA=; b=rO5fc0kE2kEiH7nQILAZWSF58dR0EC8pRCB58tNShz6/Uwal3+Pj911mOi1R7qqR9D ITrdLB1yberKp/aDHBIkYtKnadlVKY2VHtd9Tz7aDyocGF4+YM2Md53YCW92CLzRkBf/ qwSJzAQzrQ6DRj5RWWpo7UNiK4jEMhiRMF4u2emwC6KYKGGaQ+7hQvSzuf2t/1xPvLGR WcAJwpAZQ8KYPc0b3SbAwQ1haiPnFCjArgXelgHV/uURqJkeL9oDYwuMO7ZXmeINBB8t VJJBCKT3zHdCk9R+yi3giOp2Tz4BKDQF6qjjgiwoV7yBxXv3IRImlXRYyOLPAMYsV/be z8gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=fTjMo6ItsIoDuoOXxs5bAGC7achJEJ9OklVeMI0ejOA=; b=Zn3j+3RlRnD845OZg4KG625R+nodNsGp4Hukgb3dpyK2e+jU4+qDNXju4g2Q4cGQJF w1B2Ri5Z96VL05eVA/cl/SlOBHOij6VXM6vd4u37nBBbKZMq+L0R4UkHnq5x+1mH/kaZ Rw67kp8caWPWudNV3jQSvf1I878SgoN2h5tQ44aGbIed/t5+UvfQ+Ys2Dk6i2JFrrD/c YPF6DzznvhX+tZT1bUMTtfowRSL55vRXz7jIl1Fp/QJsNgKTmNYTVSYALMcFpXpGB72h ZUzTV2zJIxQh+urnfFsbiiXDuXmdx6OvM12GQmUyJ6fDmccYY+5xkKw5pucNgsSwsuEK qSVg== X-Gm-Message-State: AIkVDXLzLzeG2qkfTuYQHYQmLtLdjC9zkZOENE6jtpwAy02ZFn4y5JLpyKAiBsI/qI5B1Q== X-Received: by 10.99.47.199 with SMTP id v190mr16673073pgv.26.1484625471988; Mon, 16 Jan 2017 19:57:51 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s17sm51286122pgo.27.2017.01.16.19.57.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 19:57:51 -0800 (PST) Subject: Re: svn commit: r312331 - head/contrib/bsnmp/snmpd Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_91EC0E32-A2C3-46FD-9560-48973F51C376"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701170352.v0H3qvNJ025187@repo.freebsd.org> Date: Mon, 16 Jan 2017 19:57:50 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2C5D1730-6F2F-4D57-B977-420B0CFA81B1@gmail.com> References: <201701170352.v0H3qvNJ025187@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3124) 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: Tue, 17 Jan 2017 03:57:52 -0000 --Apple-Mail=_91EC0E32-A2C3-46FD-9560-48973F51C376 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2017, at 19:52, Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Tue Jan 17 03:52:57 2017 > New Revision: 312331 > URL: https://svnweb.freebsd.org/changeset/base/312331 >=20 > Log: > Fix regression from r310655, which broke operation of bsnmpd if it is = bound > to a non-wildcard address. As documented in ip(4), doing sendmsg(2) = with > IP_SENDSRCADDR on a socket that is bound to non-wildcard address is > completely different to using this control message on a wildcard one. >=20 > A fix is to add a bool to mark whether we did = setsockopt(IP_RECVDSTADDR) > on the socket, and use IP_SENDSRCADDR control message only if we did. >=20 > While here, garbage collect absolutely useless udp_recv() function = that > establishes some structures on stack to never use them later. I wasn=E2=80=99t aware of that =E2=80=94 thank you for fixing my = mistake (and I=E2=80=99ll add you to the next set of CRs here). udp_recv(..) was meant to provide a layer for doing the = necessary bits for IPv6.. I guess I=E2=80=99ll have to adjust (and hope = that the team doing it internally =E2=80=9Cgets it right=E2=80=9D). Cheers, -Ngie --Apple-Mail=_91EC0E32-A2C3-46FD-9560-48973F51C376 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYfZY+AAoJEPWDqSZpMIYVjSoQALZ4adbErShz4VYpa0wjF61Q krmDlBndAAKp3n6bfTCqfh+Yw+nhXhjjLffe40igpgr1y+EMfJktstkreNiGreXV ZO3G55b0iP7MpsQHfgTFDRKzuRP0yfkqin8w/5N4KMVxpZ7oPjC6DGKDfbFxTmc3 I1CftNo1SW9szQFgYw6ScPY+eZ8ECnrwUOnPUdC/IBH50N01amQeS44n1ZPGa2Ds ZpHC2R0XDGEtTQblmmOuFDVG/fKfCAyk5rrZVcv6d7J7ADivYgnYU/NnT6Low7l8 c2+J3TaBC7OuLOwPdJFGRYR6urWWLMDiMTEXFVoIRbotljqA8tPHsqbEB6mUt1AT GFhwQ10Nzf5y6635LX1P18wuKyFmiN/fdvWakKosvbM4k+DXxJJvjP4FhrOpgO/h +7UQ/MJiYcgK6MMAjM/KCyKlU4bZJz8O+3r0sPfZiC2VpQQvFH5FYUeSxTzHU7gf AZN7Tz6DjjNjHKDXgkWdz9bZZ9LsG61E7IuiEn6dI+oLoDBJi8SJz+rXuiNfshHm JUVzgpYmfZZh5HX5McW13PlPwlni9jKBebmPqpGYQOMaEskBFxaccT95vsam/QDi mQ850BvORbAK1jTSYnaJXtP9CdFODBgWS9OiNyYxPc4ZTDbLajfvjXISe4VjIZ9d ZT1c9EjvAl+2alk7k2a+ =cAcQ -----END PGP SIGNATURE----- --Apple-Mail=_91EC0E32-A2C3-46FD-9560-48973F51C376-- From owner-svn-src-head@freebsd.org Tue Jan 17 03:58:38 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 5A6B8CB3181; Tue, 17 Jan 2017 03:58:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29D6A15CE; Tue, 17 Jan 2017 03:58:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H3wbiI025471; Tue, 17 Jan 2017 03:58:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H3wb12025470; Tue, 17 Jan 2017 03:58:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701170358.v0H3wb12025470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 17 Jan 2017 03:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312332 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 03:58:38 -0000 Author: ngie Date: Tue Jan 17 03:58:37 2017 New Revision: 312332 URL: https://svnweb.freebsd.org/changeset/base/312332 Log: Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make MFC after: 1 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/regex/grot/Makefile Modified: head/lib/libc/regex/grot/Makefile ============================================================================== --- head/lib/libc/regex/grot/Makefile Tue Jan 17 03:52:57 2017 (r312331) +++ head/lib/libc/regex/grot/Makefile Tue Jan 17 03:58:37 2017 (r312332) @@ -5,7 +5,7 @@ # Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's # for my use in some special contexts). -PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include +PATHS= ${.CURDIR:H} ${.CURDIR:H:H}/locale ${SRCTOP}/include .PATH: ${PATHS} CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) From owner-svn-src-head@freebsd.org Tue Jan 17 04:00:16 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 E6AB9CB329A; Tue, 17 Jan 2017 04:00:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CB921179A; Tue, 17 Jan 2017 04:00:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0H409mH044827 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Jan 2017 20:00:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0H409XA044826; Mon, 16 Jan 2017 20:00:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 16 Jan 2017 20:00:09 -0800 From: Gleb Smirnoff To: ngie@FreeBSD.org, Thor Steingrimsson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312331 - head/contrib/bsnmp/snmpd Message-ID: <20170117040009.GT2611@FreeBSD.org> References: <201701170352.v0H3qvNJ025187@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701170352.v0H3qvNJ025187@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Tue, 17 Jan 2017 04:00:17 -0000 Hi, Ngie! Please notice this regression when doing MFCs. Notice, that I'm fixing this problem for a second time. See r240734. Please add this to a regression suite. Also, there is another regression in r310586, which actually isn't your fault. Before r310586 in snmpd_input() there was stack variable struct msghdr msg, which wasn't properly initialized. However, before r310586 stack usage of descendants of snmpd_input() have hidden the problem. After r310586, sendmsg() would fail since msg will have garbage in msg.msg_control and msg.msg_controllen. Basicly, between r310586 and r310655 doesn't work at all. And with r310655 it is working again on 0.0.0.0 and doesn't work on any specific address. So, if you plan to do MFC r310586 separately from further revisions, you need to add 2 lines to snmpd_input() with this MFC: Index: main.c =================================================================== --- main.c (revision 310586) +++ main.c (working copy) @@ -1192,6 +1192,8 @@ snmpd_input(struct port_input *pi, struct tport *t msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_flags = 0; + msg.msg_control = NULL; + msg.msg_controllen = 0; iov[0].iov_base = sndbuf; iov[0].iov_len = sndlen; On Tue, Jan 17, 2017 at 03:52:57AM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Tue Jan 17 03:52:57 2017 T> New Revision: 312331 T> URL: https://svnweb.freebsd.org/changeset/base/312331 T> T> Log: T> Fix regression from r310655, which broke operation of bsnmpd if it is bound T> to a non-wildcard address. As documented in ip(4), doing sendmsg(2) with T> IP_SENDSRCADDR on a socket that is bound to non-wildcard address is T> completely different to using this control message on a wildcard one. T> T> A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR) T> on the socket, and use IP_SENDSRCADDR control message only if we did. T> T> While here, garbage collect absolutely useless udp_recv() function that T> establishes some structures on stack to never use them later. T> T> Modified: T> head/contrib/bsnmp/snmpd/trans_udp.c T> head/contrib/bsnmp/snmpd/trans_udp.h T> T> Modified: head/contrib/bsnmp/snmpd/trans_udp.c T> ============================================================================== T> --- head/contrib/bsnmp/snmpd/trans_udp.c Tue Jan 17 03:44:45 2017 (r312330) T> +++ head/contrib/bsnmp/snmpd/trans_udp.c Tue Jan 17 03:52:57 2017 (r312331) T> @@ -34,6 +34,7 @@ T> #include T> #include T> T> +#include T> #include T> #include T> #include T> @@ -119,13 +120,15 @@ udp_init_port(struct tport *tp) T> addr.sin_port = htons(p->port); T> addr.sin_family = AF_INET; T> addr.sin_len = sizeof(addr); T> - if (addr.sin_addr.s_addr == INADDR_ANY && T> - setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, T> - sizeof(on)) == -1) { T> - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); T> - close(p->input.fd); T> - p->input.fd = -1; T> - return (SNMP_ERR_GENERR); T> + if (addr.sin_addr.s_addr == INADDR_ANY) { T> + if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, T> + sizeof(on)) == -1) { T> + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); T> + close(p->input.fd); T> + p->input.fd = -1; T> + return (SNMP_ERR_GENERR); T> + } T> + p->recvdstaddr = true; T> } T> if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { T> if (errno == EADDRNOTAVAIL) { T> @@ -218,7 +221,6 @@ udp_send(struct tport *tp, const u_char T> { T> struct udp_port *p = (struct udp_port *)tp; T> struct cmsghdr *cmsg; T> - struct in_addr *src_addr; T> struct msghdr msg; T> char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; T> struct iovec iov; T> @@ -231,15 +233,20 @@ udp_send(struct tport *tp, const u_char T> msg.msg_iovlen = 1; T> msg.msg_name = __DECONST(void *, addr); T> msg.msg_namelen = addrlen; T> - msg.msg_control = cbuf; T> - msg.msg_controllen = sizeof(cbuf); T> T> - cmsg = CMSG_FIRSTHDR(&msg); T> - cmsg->cmsg_level = IPPROTO_IP; T> - cmsg->cmsg_type = IP_SENDSRCADDR; T> - cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); T> - src_addr = (struct in_addr *)(void*)CMSG_DATA(cmsg); T> - memcpy(src_addr, &p->recv_addr, sizeof(struct in_addr)); T> + if (p->recvdstaddr) { T> + msg.msg_control = cbuf; T> + msg.msg_controllen = sizeof(cbuf); T> + T> + cmsg = CMSG_FIRSTHDR(&msg); T> + cmsg->cmsg_level = IPPROTO_IP; T> + cmsg->cmsg_type = IP_SENDSRCADDR; T> + cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); T> + memcpy(CMSG_DATA(cmsg), &p->dstaddr, sizeof(struct in_addr)); T> + } else { T> + msg.msg_control = NULL; T> + msg.msg_controllen = 0; T> + } T> T> return (sendmsg(p->input.fd, &msg, 0)); T> } T> @@ -260,11 +267,12 @@ check_priv_dgram(struct port_input *pi, T> * Each receive should return one datagram. T> */ T> static ssize_t T> -recv_dgram(struct port_input *pi, struct in_addr *laddr) T> +udp_recv(struct tport *tp, struct port_input *pi) T> { T> u_char embuf[1000]; T> char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + T> CMSG_SPACE(sizeof(struct in_addr))]; T> + struct udp_port *p = (struct udp_port *)tp; T> struct msghdr msg; T> struct iovec iov[1]; T> ssize_t len; T> @@ -316,7 +324,8 @@ recv_dgram(struct port_input *pi, struct T> cmsg = CMSG_NXTHDR(&msg, cmsg)) { T> if (cmsg->cmsg_level == IPPROTO_IP && T> cmsg->cmsg_type == IP_RECVDSTADDR) T> - memcpy(laddr, CMSG_DATA(cmsg), sizeof(struct in_addr)); T> + memcpy(&p->dstaddr, CMSG_DATA(cmsg), T> + sizeof(struct in_addr)); T> if (cmsg->cmsg_level == SOL_SOCKET && T> cmsg->cmsg_type == SCM_CREDS) T> cred = (struct sockcred *)CMSG_DATA(cmsg); T> @@ -329,42 +338,6 @@ recv_dgram(struct port_input *pi, struct T> } T> T> /* T> - * Receive something T> - */ T> -static ssize_t T> -udp_recv(struct tport *tp, struct port_input *pi) T> -{ T> - struct udp_port *p = (struct udp_port *)tp; T> - struct cmsghdr *cmsgp; T> - struct in_addr *laddr; T> - struct msghdr msg; T> - char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; T> - ssize_t ret; T> - T> - memset(cbuf, 0, sizeof(cbuf)); T> - T> - msg.msg_control = cbuf; T> - msg.msg_controllen = sizeof(cbuf); T> - T> - cmsgp = CMSG_FIRSTHDR(&msg); T> - cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); T> - cmsgp->cmsg_level = IPPROTO_IP; T> - cmsgp->cmsg_type = IP_SENDSRCADDR; T> - laddr = (struct in_addr *)CMSG_DATA(cmsgp); T> - T> - ret = recv_dgram(pi, laddr); T> - T> - memcpy(&p->recv_addr, laddr, sizeof(struct in_addr)); T> - T> - if (laddr->s_addr == INADDR_ANY) { T> - msg.msg_control = NULL; T> - msg.msg_controllen = 0; T> - } T> - T> - return (ret); T> -} T> - T> -/* T> * Port table T> */ T> int T> T> Modified: head/contrib/bsnmp/snmpd/trans_udp.h T> ============================================================================== T> --- head/contrib/bsnmp/snmpd/trans_udp.h Tue Jan 17 03:44:45 2017 (r312330) T> +++ head/contrib/bsnmp/snmpd/trans_udp.h Tue Jan 17 03:52:57 2017 (r312331) T> @@ -39,7 +39,9 @@ struct udp_port { T> struct port_input input; /* common input stuff */ T> T> struct sockaddr_in ret; /* the return address */ T> - struct in_addr recv_addr; /* the address the request was sent to */ T> + T> + bool recvdstaddr; /* IP_RECVDSTADDR is on */ T> + struct in_addr dstaddr; /* address the request was sent to */ T> }; T> T> /* argument for open call */ T> _______________________________________________ T> svn-src-all@freebsd.org mailing list T> https://lists.freebsd.org/mailman/listinfo/svn-src-all T> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Jan 17 05:37:50 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 D80ABCB3FCE; Tue, 17 Jan 2017 05:37:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C49601BE9; Tue, 17 Jan 2017 05:37:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0H5bnGN045462 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Jan 2017 21:37:49 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0H5bn4n045461; Mon, 16 Jan 2017 21:37:49 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 16 Jan 2017 21:37:49 -0800 From: Gleb Smirnoff To: Josh Paetzel Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r310847 - head/sys/netinet Message-ID: <20170117053749.GV2611@FreeBSD.org> References: <201612301846.uBUIkLu9035070@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201612301846.uBUIkLu9035070@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Tue, 17 Jan 2017 05:37:50 -0000 Josh, if you don't mind, here is some review inlined down below. On Fri, Dec 30, 2016 at 06:46:21PM +0000, Josh Paetzel wrote: J> Author: jpaetzel J> Date: Fri Dec 30 18:46:21 2016 J> New Revision: 310847 J> URL: https://svnweb.freebsd.org/changeset/base/310847 J> J> Log: J> Harden CARP against network loops. J> J> If there is a loop in the network a CARP that is in MASTER state will see it's J> own broadcasts, which will then cause it to assume BACKUP state. When it J> assumes BACKUP it will stop sending advertisements. In that state it will no J> longer see advertisements and will assume MASTER... J> J> We can't catch all the cases where we are seeing our own CARP broadcast, but J> we can catch the obvious case. J> J> Submitted by: torek J> Obtained from: FreeNAS J> MFC after: 2 weeks J> Sponsored by: iXsystems J> J> Modified: J> head/sys/netinet/ip_carp.c J> J> Modified: head/sys/netinet/ip_carp.c J> ============================================================================== J> --- head/sys/netinet/ip_carp.c Fri Dec 30 18:23:58 2016 (r310846) J> +++ head/sys/netinet/ip_carp.c Fri Dec 30 18:46:21 2016 (r310847) J> @@ -581,27 +581,90 @@ carp6_input(struct mbuf **mp, int *offp, J> } J> #endif /* INET6 */ J> J> +/* J> + * This routine should not be necessary at all, but some switches J> + * (VMWare ESX vswitches) can echo our own packets back at us, J> + * and we must ignore them or they will cause us to drop out of J> + * MASTER mode. J> + * J> + * We cannot catch all cases of network loops. Instead, what we J> + * do here is catch any packet that arrives with a carp header J> + * with a VHID of 0, that comes from an address that is our own. J> + * These packets are by definition "from us" (even if they are from J> + * a misconfigured host that is pretending to be us). I failed to find in the patch a place where we generate packets with VHID 0, we only check for them. Can you please explain how this loop detection works? J> + * The VHID test is outside this mini-function. J> + */ J> +static int J> +carp_source_is_self(struct mbuf *m, struct ifaddr *ifa, sa_family_t af) J> +{ J> + struct ip *ip4; J> + struct in_addr in4; J> + struct ip6_hdr *ip6; J> + struct in6_addr in6; J> + J> + switch (af) { J> + case AF_INET: J> + ip4 = mtod(m, struct ip *); J> + in4 = ifatoia(ifa)->ia_addr.sin_addr; J> + return (in4.s_addr == ip4->ip_src.s_addr); J> + J> + case AF_INET6: J> + ip6 = mtod(m, struct ip6_hdr *); J> + in6 = ifatoia6(ifa)->ia_addr.sin6_addr; J> + return (memcmp(&in6, &ip6->ip6_src, sizeof(in6)) == 0); J> + J> + default: /* how did this happen? */ J> + break; This must be panic(). J> + } J> + return (0); J> +} J> + J> static void J> carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af) J> { J> struct ifnet *ifp = m->m_pkthdr.rcvif; J> - struct ifaddr *ifa; J> + struct ifaddr *ifa, *match; J> struct carp_softc *sc; J> uint64_t tmp_counter; J> struct timeval sc_tv, ch_tv; J> + int error; J> J> - /* verify that the VHID is valid on the receiving interface */ J> + /* J> + * Verify that the VHID is valid on the receiving interface. J> + * J> + * There should be just one match. If there are none J> + * the VHID is not valid and we drop the packet. If J> + * there are multiple VHID matches, take just the first J> + * one, for compatibility with previous code. While we're J> + * scanning, check for obvious loops in the network topology J> + * (these should never happen, and as noted above, we may J> + * miss real loops; this is just a double-check). J> + */ J> IF_ADDR_RLOCK(ifp); J> - IFNET_FOREACH_IFA(ifp, ifa) J> - if (ifa->ifa_addr->sa_family == af && J> - ifa->ifa_carp->sc_vhid == ch->carp_vhid) { J> - ifa_ref(ifa); J> - break; J> - } J> + error = 0; J> + match = NULL; J> + IFNET_FOREACH_IFA(ifp, ifa) { J> + if (match == NULL && ifa->ifa_carp != NULL && J> + ifa->ifa_addr->sa_family == af && J> + ifa->ifa_carp->sc_vhid == ch->carp_vhid) J> + match = ifa; J> + if (ch->carp_vhid == 0 && carp_source_is_self(m, ifa, af)) J> + error = ELOOP; J> + } J> + ifa = error ? NULL : match; J> + if (ifa != NULL) J> + ifa_ref(ifa); J> IF_ADDR_RUNLOCK(ifp); J> J> if (ifa == NULL) { J> - CARPSTATS_INC(carps_badvhid); J> + if (error == ELOOP) { J> + CARP_DEBUG("dropping looped packet on interface %s\n", J> + ifp->if_xname); J> + CARPSTATS_INC(carps_badif); /* ??? */ J> + } else { J> + CARPSTATS_INC(carps_badvhid); J> + } J> m_freem(m); J> return; J> } J> @@ -787,12 +850,41 @@ carp_send_ad_error(struct carp_softc *sc J> } J> } J> J> +/* J> + * Pick the best ifaddr on the given ifp for sending CARP J> + * advertisements. J> + * J> + * "Best" here is defined by ifa_preferred(). This function is much J> + * much like ifaof_ifpforaddr() except that we just use ifa_preferred(). J> + * J> + * (This could be simplified to return the actual address, except that J> + * it has a different format in AF_INET and AF_INET6.) J> + */ J> +static struct ifaddr * J> +carp_best_ifa(int af, struct ifnet *ifp) J> +{ J> + struct ifaddr *ifa, *best; J> + J> + if (af >= AF_MAX) J> + return (NULL); This must be: KASSERT(af == AF_INET || af == AF_INET6, (... J> + best = NULL; J> + IF_ADDR_RLOCK(ifp); J> + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { J> + if (ifa->ifa_addr->sa_family == af && J> + (best == NULL || ifa_preferred(best, ifa))) J> + best = ifa; J> + } J> + IF_ADDR_RUNLOCK(ifp); J> + if (best != NULL) J> + ifa_ref(best); ifa_ref() should happen inside IF_ADDR_RLOCK(). J> + return (best); J> +} J> + J> static void J> carp_send_ad_locked(struct carp_softc *sc) J> { J> struct carp_header ch; J> struct timeval tv; J> - struct sockaddr sa; J> struct ifaddr *ifa; J> struct carp_header *ch_ptr; J> struct mbuf *m; J> @@ -841,9 +933,7 @@ carp_send_ad_locked(struct carp_softc *s J> ip->ip_sum = 0; J> ip_fillid(ip); J> J> - bzero(&sa, sizeof(sa)); J> - sa.sa_family = AF_INET; J> - ifa = ifaof_ifpforaddr(&sa, sc->sc_carpdev); J> + ifa = carp_best_ifa(AF_INET, sc->sc_carpdev); J> if (ifa != NULL) { J> ip->ip_src.s_addr = J> ifatoia(ifa)->ia_addr.sin_addr.s_addr; J> @@ -887,11 +977,9 @@ carp_send_ad_locked(struct carp_softc *s J> ip6->ip6_vfc |= IPV6_VERSION; J> ip6->ip6_hlim = CARP_DFLTTL; J> ip6->ip6_nxt = IPPROTO_CARP; J> - bzero(&sa, sizeof(sa)); J> J> /* set the source address */ J> - sa.sa_family = AF_INET6; J> - ifa = ifaof_ifpforaddr(&sa, sc->sc_carpdev); J> + ifa = carp_best_ifa(AF_INET6, sc->sc_carpdev); J> if (ifa != NULL) { J> bcopy(IFA_IN6(ifa), &ip6->ip6_src, J> sizeof(struct in6_addr)); J> _______________________________________________ J> svn-src-all@freebsd.org mailing list J> https://lists.freebsd.org/mailman/listinfo/svn-src-all J> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Jan 17 05:55:50 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 48F3DCB45A7; Tue, 17 Jan 2017 05:55:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B86916F7; Tue, 17 Jan 2017 05:55:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H5tnRa073373; Tue, 17 Jan 2017 05:55:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H5tmLv073362; Tue, 17 Jan 2017 05:55:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701170555.v0H5tmLv073362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 17 Jan 2017 05:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312335 - head/contrib/zlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 05:55:50 -0000 Author: delphij Date: Tue Jan 17 05:55:47 2017 New Revision: 312335 URL: https://svnweb.freebsd.org/changeset/base/312335 Log: MFV r312333: zlib 1.2.11. MFC after: 1 month Modified: head/contrib/zlib/ChangeLog head/contrib/zlib/README head/contrib/zlib/deflate.c head/contrib/zlib/gzlib.c head/contrib/zlib/gzwrite.c head/contrib/zlib/inffast.c head/contrib/zlib/inftrees.c head/contrib/zlib/trees.c head/contrib/zlib/zlib.3 head/contrib/zlib/zlib.h head/contrib/zlib/zutil.c Directory Properties: head/contrib/zlib/ (props changed) Modified: head/contrib/zlib/ChangeLog ============================================================================== --- head/contrib/zlib/ChangeLog Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/ChangeLog Tue Jan 17 05:55:47 2017 (r312335) @@ -1,6 +1,10 @@ ChangeLog file for zlib +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + Changes in 1.2.10 (2 Jan 2017) - Avoid warnings on snprintf() return value - Fix bug in deflate_stored() for zero-length input Modified: head/contrib/zlib/README ============================================================================== --- head/contrib/zlib/README Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/README Tue Jan 17 05:55:47 2017 (r312335) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.10 is a general purpose data compression library. All the code is +zlib 1.2.11 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.10 are documented in the file ChangeLog. +The changes made in version 1.2.11 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: head/contrib/zlib/deflate.c ============================================================================== --- head/contrib/zlib/deflate.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/deflate.c Tue Jan 17 05:55:47 2017 (r312335) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.10 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -586,7 +586,8 @@ int ZEXPORT deflateParams(strm, level, s } func = configuration_table[s->level].func; - if ((strategy != s->strategy || func != configuration_table[level].func)) { + if ((strategy != s->strategy || func != configuration_table[level].func) && + s->high_water) { /* Flush the last buffer: */ int err = deflate(strm, Z_BLOCK); if (err == Z_STREAM_ERROR) @@ -1671,8 +1672,6 @@ local block_state deflate_stored(s, flus len = left + s->strm->avail_in; /* limit len to the input */ if (len > have) len = have; /* limit len to the output */ - if (left > len) - left = len; /* limit window pull to len */ /* If the stored block would be less than min_block in length, or if * unable to copy all of the available input when flushing, then try @@ -1681,13 +1680,13 @@ local block_state deflate_stored(s, flus */ if (len < min_block && ((len == 0 && flush != Z_FINISH) || flush == Z_NO_FLUSH || - len - left != s->strm->avail_in)) + len != left + s->strm->avail_in)) break; /* Make a dummy stored block in pending to get the header bytes, * including any pending bits. This also updates the debugging counts. */ - last = flush == Z_FINISH && len - left == s->strm->avail_in ? 1 : 0; + last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; _tr_stored_block(s, (char *)0, 0L, last); /* Replace the lengths in the dummy stored block with len. */ @@ -1699,14 +1698,16 @@ local block_state deflate_stored(s, flus /* Write the stored block header bytes. */ flush_pending(s->strm); - /* Update debugging counts for the data about to be copied. */ #ifdef ZLIB_DEBUG + /* Update debugging counts for the data about to be copied. */ s->compressed_len += len << 3; s->bits_sent += len << 3; #endif /* Copy uncompressed bytes from the window to next_out. */ if (left) { + if (left > len) + left = len; zmemcpy(s->strm->next_out, s->window + s->block_start, left); s->strm->next_out += left; s->strm->avail_out -= left; @@ -1756,6 +1757,8 @@ local block_state deflate_stored(s, flus s->block_start = s->strstart; s->insert += MIN(used, s->w_size - s->insert); } + if (s->high_water < s->strstart) + s->high_water = s->strstart; /* If the last block was written to next_out, then done. */ if (last) @@ -1783,6 +1786,8 @@ local block_state deflate_stored(s, flus read_buf(s->strm, s->window + s->strstart, have); s->strstart += have; } + if (s->high_water < s->strstart) + s->high_water = s->strstart; /* There was not enough avail_out to write a complete worthy or flushed * stored block to next_out. Write a stored block to pending instead, if we Modified: head/contrib/zlib/gzlib.c ============================================================================== --- head/contrib/zlib/gzlib.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/gzlib.c Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler + * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: head/contrib/zlib/gzwrite.c ============================================================================== --- head/contrib/zlib/gzwrite.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/gzwrite.c Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: head/contrib/zlib/inffast.c ============================================================================== --- head/contrib/zlib/inffast.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/inffast.c Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler + * Copyright (C) 1995-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ Modified: head/contrib/zlib/inftrees.c ============================================================================== --- head/contrib/zlib/inftrees.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/inftrees.c Tue Jan 17 05:55:47 2017 (r312335) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.10 Copyright 1995-2017 Mark Adler "; + " inflate 1.2.11 Copyright 1995-2017 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 202}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: head/contrib/zlib/trees.c ============================================================================== --- head/contrib/zlib/trees.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/trees.c Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2016 Jean-loup Gailly + * Copyright (C) 1995-2017 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -906,7 +906,7 @@ void ZLIB_INTERNAL _tr_align(s) /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. + * trees or store, and write out the encoded block. */ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; Modified: head/contrib/zlib/zlib.3 ============================================================================== --- head/contrib/zlib/zlib.3 Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/zlib.3 Tue Jan 17 05:55:47 2017 (r312335) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "2 Jan 2017" +.TH ZLIB 3 "15 Jan 2017" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -105,7 +105,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS AND LICENSE -Version 1.2.10 +Version 1.2.11 .LP Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler .LP Modified: head/contrib/zlib/zlib.h ============================================================================== --- head/contrib/zlib/zlib.h Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/zlib.h Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.10, January 2nd, 2017 + version 1.2.11, January 15th, 2017 Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.10" -#define ZLIB_VERNUM 0x12a0 +#define ZLIB_VERSION "1.2.11" +#define ZLIB_VERNUM 0x12b0 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 10 +#define ZLIB_VER_REVISION 11 #define ZLIB_VER_SUBREVISION 0 /* @@ -712,10 +712,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_ used to switch between compression and straight copy of the input data, or to switch to a different kind of input data requiring a different strategy. If the compression approach (which is a function of the level) or the - strategy is changed, then the input available so far is compressed with the - old level and strategy using deflate(strm, Z_BLOCK). There are three - approaches for the compression levels 0, 1..3, and 4..9 respectively. The - new level and strategy will take effect at the next call of deflate(). + strategy is changed, and if any input has been consumed in a previous + deflate() call, then the input available so far is compressed with the old + level and strategy using deflate(strm, Z_BLOCK). There are three approaches + for the compression levels 0, 1..3, and 4..9 respectively. The new level + and strategy will take effect at the next call of deflate(). If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does not have enough output space to complete, then the parameter change will not Modified: head/contrib/zlib/zutil.c ============================================================================== --- head/contrib/zlib/zutil.c Tue Jan 17 05:47:54 2017 (r312334) +++ head/contrib/zlib/zutil.c Tue Jan 17 05:55:47 2017 (r312335) @@ -1,5 +1,5 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly + * Copyright (C) 1995-2017 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ From owner-svn-src-head@freebsd.org Tue Jan 17 06:52:33 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 5C465CB3342; Tue, 17 Jan 2017 06:52:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 211CF1113; Tue, 17 Jan 2017 06:52:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0H6qVJp046022 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Jan 2017 22:52:31 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0H6qVHR046021; Mon, 16 Jan 2017 22:52:31 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 16 Jan 2017 22:52:31 -0800 From: Gleb Smirnoff To: Maxim Sobolev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org 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 Message-ID: <20170117065231.GW2611@FreeBSD.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701161746.v0GHkcPX071529@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Tue, 17 Jan 2017 06:52:33 -0000 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. From owner-svn-src-head@freebsd.org Tue Jan 17 08:15:12 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 50C09CB36F8; Tue, 17 Jan 2017 08:15:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B47A1CD0; Tue, 17 Jan 2017 08:15:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H8FBaI029736; Tue, 17 Jan 2017 08:15:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H8FAA2029731; Tue, 17 Jan 2017 08:15:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701170815.v0H8FAA2029731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jan 2017 08:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312338 - in head: share/man/man4 sys/dev/sound/usb sys/dev/usb sys/dev/usb/quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 08:15:12 -0000 Author: hselasky Date: Tue Jan 17 08:15:10 2017 New Revision: 312338 URL: https://svnweb.freebsd.org/changeset/base/312338 Log: Add USB audio support for S/PDIF output with C-Media CM6206 devices. Submitted by: Julien Nadeau PR: 216131 MFC after: 1 week Modified: head/share/man/man4/usb_quirk.4 head/sys/dev/sound/usb/uaudio.c head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/quirk/usb_quirk.h head/sys/dev/usb/usbdevs Modified: head/share/man/man4/usb_quirk.4 ============================================================================== --- head/share/man/man4/usb_quirk.4 Tue Jan 17 07:43:37 2017 (r312337) +++ head/share/man/man4/usb_quirk.4 Tue Jan 17 08:15:10 2017 (r312338) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 2016 +.Dd January 17, 2017 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -52,6 +52,10 @@ input is async despite claim of adaptive do not adjust for fractional samples .It UQ_AU_NO_XU audio device has broken extension unit +.It UQ_AU_VENDOR_CLASS +audio device uses vendor class to identify itself +.It UQ_AU_SET_SPDIF_CM6206 +audio device needs special programming to enable S/PDIF audio output .It UQ_BAD_ADC bad audio spec version number .It UQ_BAD_AUDIO Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Tue Jan 17 07:43:37 2017 (r312337) +++ head/sys/dev/sound/usb/uaudio.c Tue Jan 17 08:15:10 2017 (r312338) @@ -337,6 +337,11 @@ struct uaudio_hid { uint8_t mute_id; }; +#define UAUDIO_SPDIF_OUT 0x01 /* Enable S/PDIF output */ +#define UAUDIO_SPDIF_OUT_48K 0x02 /* Out sample rate = 48K */ +#define UAUDIO_SPDIF_OUT_96K 0x04 /* Out sample rate = 96K */ +#define UAUDIO_SPDIF_IN_MIX 0x10 /* Input mix enable */ + struct uaudio_softc { struct sbuf sc_sndstat; struct sndcard_func sc_sndcard_func; @@ -354,6 +359,7 @@ struct uaudio_softc { struct usb_xfer *sc_mixer_xfer[1]; struct uaudio_mixer_node *sc_mixer_root; struct uaudio_mixer_node *sc_mixer_curr; + int (*sc_set_spdif_fn) (struct uaudio_softc *, int); uint32_t sc_mix_info; uint32_t sc_recsrc_info; @@ -885,6 +891,46 @@ uaudio_probe(device_t dev) return (ENXIO); } +/* + * Set Cmedia CM6206 S/PDIF settings + * Source: CM6206 Datasheet v2.3. + */ +static int +uaudio_set_spdif_cm6206(struct uaudio_softc *sc, int flags) +{ + uint8_t cmd[2][4] = { + {0x20, 0x20, 0x00, 0}, + {0x20, 0x30, 0x02, 1} + }; + int i; + + if (flags & UAUDIO_SPDIF_OUT) + cmd[1][1] = 0x00; + else + cmd[1][1] = 0x02; + + if (flags & UAUDIO_SPDIF_OUT_96K) + cmd[0][1] = 0x60; /* 96K: 3'b110 */ + + if (flags & UAUDIO_SPDIF_IN_MIX) + cmd[1][1] = 0x03; /* SPDIFMIX */ + + for (i = 0; i < 2; i++) { + if (usbd_req_set_report(sc->sc_udev, NULL, + cmd[i], sizeof(cmd[0]), + sc->sc_mixer_iface_index, UHID_OUTPUT_REPORT, 0) != 0) { + return (ENXIO); + } + } + return (0); +} + +static int +uaudio_set_spdif_dummy(struct uaudio_softc *sc, int flags) +{ + return (0); +} + static int uaudio_attach(device_t dev) { @@ -919,6 +965,12 @@ uaudio_attach(device_t dev) if (usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS)) sc->sc_uq_au_vendor_class = 1; + /* set S/PDIF function */ + if (usb_test_quirk(uaa, UQ_AU_SET_SPDIF_CM6206)) + sc->sc_set_spdif_fn = uaudio_set_spdif_cm6206; + else + sc->sc_set_spdif_fn = uaudio_set_spdif_dummy; + umidi_init(dev); device_set_usb_desc(dev); @@ -1055,6 +1107,11 @@ uaudio_attach(device_t dev) /* reload all mixer settings */ uaudio_mixer_reload_all(sc); + /* enable S/PDIF output, if any */ + if (sc->sc_set_spdif_fn(sc, + UAUDIO_SPDIF_OUT | UAUDIO_SPDIF_OUT_48K) != 0) { + device_printf(dev, "Failed to enable S/PDIF at 48K\n"); + } return (0); /* success */ detach: @@ -1139,6 +1196,9 @@ uaudio_detach_sub(device_t dev) struct uaudio_softc *sc = device_get_softc(device_get_parent(dev)); int error = 0; + /* disable S/PDIF output, if any */ + (void) sc->sc_set_spdif_fn(sc, 0); + repeat: if (sc->sc_pcm_registered) { error = pcm_unregister(dev); Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Tue Jan 17 07:43:37 2017 (r312337) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Jan 17 08:15:10 2017 (r312338) @@ -519,6 +519,7 @@ static struct usb_quirk_entry usb_quirks /* Non-standard USB AUDIO devices */ USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), /* * Quirks for manufacturers which USB devices does not respond @@ -605,6 +606,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_AU_VENDOR_CLASS] = "UQ_AU_VENDOR_CLASS", [UQ_SINGLE_CMD_MIDI] = "UQ_SINGLE_CMD_MIDI", [UQ_MSC_DYMO_EJECT] = "UQ_MSC_DYMO_EJECT", + [UQ_AU_SET_SPDIF_CM6206] = "UQ_AU_SET_SPDIF_CM6206", }; /*------------------------------------------------------------------------* Modified: head/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.h Tue Jan 17 07:43:37 2017 (r312337) +++ head/sys/dev/usb/quirk/usb_quirk.h Tue Jan 17 08:15:10 2017 (r312338) @@ -109,6 +109,7 @@ enum { UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ + UQ_AU_SET_SPDIF_CM6206, /* enable S/PDIF audio output */ USB_QUIRK_MAX }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 17 07:43:37 2017 (r312337) +++ head/sys/dev/usb/usbdevs Tue Jan 17 08:15:10 2017 (r312338) @@ -1443,6 +1443,9 @@ product CLIPSAL 5000CT2 0x0304 5000CT2 product CLIPSAL C5000CT2 0x0305 C5000CT2 C-Bus Touch Screen product CLIPSAL L51xx 0x0401 L51xx C-Bus Dimmer +/* C-Media products */ +product CMEDIA CM6206 0x0102 CM106 compatible sound device + /* CMOTECH products */ product CMOTECH CNU510 0x5141 CDMA Technologies USB modem product CMOTECH CNU550 0x5543 CDMA 2000 1xRTT/1xEVDO USB modem From owner-svn-src-head@freebsd.org Tue Jan 17 10:50:29 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 A1945CB37A2; Tue, 17 Jan 2017 10:50:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D9551382; Tue, 17 Jan 2017 10:50:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HAoSJx091486; Tue, 17 Jan 2017 10:50:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HAoSln091485; Tue, 17 Jan 2017 10:50:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201701171050.v0HAoSln091485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 17 Jan 2017 10:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312341 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 10:50:29 -0000 Author: ae Date: Tue Jan 17 10:50:28 2017 New Revision: 312341 URL: https://svnweb.freebsd.org/changeset/base/312341 Log: Initialize IPFW static rules rmlock with RM_RECURSE flag. This lock was replaced from rwlock in r272840. But unlike rwlock, rmlock doesn't allow recursion on rm_rlock(), so at this time fix this with RM_RECURSE flag. Later we need to change ipfw to avoid such recursions. PR: 216171 Reported by: Eugene Grosbein MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Tue Jan 17 10:34:31 2017 (r312340) +++ head/sys/netpfil/ipfw/ip_fw_private.h Tue Jan 17 10:50:28 2017 (r312341) @@ -414,7 +414,7 @@ struct ipfw_ifc { #define IPFW_PF_RUNLOCK(p) IPFW_RUNLOCK(p) #else /* FreeBSD */ #define IPFW_LOCK_INIT(_chain) do { \ - rm_init(&(_chain)->rwmtx, "IPFW static rules"); \ + rm_init_flags(&(_chain)->rwmtx, "IPFW static rules", RM_RECURSE); \ rw_init(&(_chain)->uh_lock, "IPFW UH lock"); \ } while (0) From owner-svn-src-head@freebsd.org Tue Jan 17 14:13:16 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 13F31CB469A; Tue, 17 Jan 2017 14:13:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C473B138B; Tue, 17 Jan 2017 14:13:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HEDEnv077884; Tue, 17 Jan 2017 14:13:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HEDEnt077883; Tue, 17 Jan 2017 14:13:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701171413.v0HEDEnt077883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 Jan 2017 14:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312343 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 14:13:16 -0000 Author: mav Date: Tue Jan 17 14:13:14 2017 New Revision: 312343 URL: https://svnweb.freebsd.org/changeset/base/312343 Log: Improve error message on duplicate iSCSI port. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jan 17 12:43:55 2017 (r312342) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Jan 17 14:13:14 2017 (r312343) @@ -2084,7 +2084,8 @@ cfiscsi_ioctl_port_create(struct ctl_req if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "target \"%s\" already exists", target); + "target \"%s\" for portal group tag %u already exists", + target, tag); cfiscsi_target_release(ct); ctl_free_opts(&opts); return; From owner-svn-src-head@freebsd.org Tue Jan 17 14:22:55 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 392ACCB49F8 for ; Tue, 17 Jan 2017 14:22:55 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 096661ADB for ; Tue, 17 Jan 2017 14:22:54 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x236.google.com with SMTP id v96so115504555ioi.0 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=pkHV9cl8bmUP78oGaLcxkTIsrVyVrMfDGto3CGcQ2mrOB2eIqPH2Cbr6eyuiwyx4wU y8Kr2WsxoLrGHIDY/whdjA6JPfOd80ogQ7JStSlhLXSWqiohfC+nEbj+mizj7Xul5iIp hbYDv9gLehIdxsMhIzCWlKpdmjoUYW+SeYfjcbWbpBCOFYz6GBW2iQ2R1FeccaW63x1T G8zsHFrYTqUt5k7nxNP7I4k/LxFJBW44ko97yz95VcvTng5aGbo3Ozni4geZSSEijR6q jsjiVwhMTsjMWATyl5b8AILTCXaWs/trFz6l0+JD0Ooh7d1hG1meQWnKR7AHijLjrCPF tMpQ== X-Gm-Message-State: AIkVDXJoWSSTbEqobcHxH2PiZFK/m1b71jKldiV5zgCYlkbSoBWusTvukwHoLey0dIm05xhFxFkYQlhpYmTm/jTT 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-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: 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. > > From owner-svn-src-head@freebsd.org Tue Jan 17 14:52:49 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 BAA4CCB34B1; Tue, 17 Jan 2017 14:52:49 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF6E1E5D; Tue, 17 Jan 2017 14:52:49 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HEqmXU094559; Tue, 17 Jan 2017 14:52:48 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HEqm4m094557; Tue, 17 Jan 2017 14:52:48 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701171452.v0HEqm4m094557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 17 Jan 2017 14:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312344 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 14:52:49 -0000 Author: sbruno Date: Tue Jan 17 14:52:48 2017 New Revision: 312344 URL: https://svnweb.freebsd.org/changeset/base/312344 Log: Add 4k quirk for Micron 5100 and Intel S3610 SSDs Submitted by: Jason Wolfe MFH: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D9209 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Jan 17 14:13:14 2017 (r312343) +++ head/sys/cam/ata/ata_da.c Tue Jan 17 14:52:48 2017 (r312344) @@ -513,6 +513,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2BX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * Intel X25-M Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -569,6 +577,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Micron 5100 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * OCZ Agility 2 SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jan 17 14:13:14 2017 (r312343) +++ head/sys/cam/scsi/scsi_da.c Tue Jan 17 14:52:48 2017 (r312344) @@ -829,6 +829,11 @@ static struct da_quirk_entry da_quirk_ta /*quirks*/DA_Q_4K }, { + /* Micron Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/DA_Q_4K + }, + { /* Samsung Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD155UI*", "*" }, /*quirks*/DA_Q_4K @@ -1151,6 +1156,14 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "INTEL SSDSC2BX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * Intel X25-M Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ From owner-svn-src-head@freebsd.org Tue Jan 17 07:38:23 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 A372CCB4212; Tue, 17 Jan 2017 07:38:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 6495615BD; Tue, 17 Jan 2017 07:38:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id CC8E81A0BE2; Tue, 17 Jan 2017 18:38:12 +1100 (AEDT) Date: Tue, 17 Jan 2017 18:38:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Julian Elischer cc: Bruce Evans , Adrian Chadd , Slawa Olhovchenkov , Julian Elischer , Mark Johnston , "svn-src-head@freebsd.org" , rang@acm.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r311952 - head/sys/ddb In-Reply-To: <9810b254-7d68-cb93-3766-9d943afae632@freebsd.org> Message-ID: <20170117183424.G841@besplex.bde.org> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> <20170114220629.GB18065@raichu> <1755552c-a5e2-848a-38e2-3bacfbecfb23@elischer.org> <20170115144531.GB58505@zxy.spb.ru> <20170115201758.GA78888@zxy.spb.ru> <20170116130020.B1170@besplex.bde.org> <9810b254-7d68-cb93-3766-9d943afae632@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=8fH027HRg59UKfw-vY0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Mailman-Approved-At: Tue, 17 Jan 2017 15:40:49 +0000 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: Tue, 17 Jan 2017 07:38:23 -0000 On Mon, 16 Jan 2017, Julian Elischer wrote: > On 16/01/2017 11:53 AM, Bruce Evans wrote: >> On Sun, 15 Jan 2017, Adrian Chadd wrote: >> >>> hah, i took this, then life got in the way. :) >>> >>> Bruce - what do you think of >>> https://bz-attachments.freebsd.org/attachment.cgi?id=138881 ? >> >> Also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184987 . >> >> I think it is hard to read and review since it is not in the mail. >> After fetching it and quoting it: > > review it in the review page and just send a link in the email.. that's what > it's for. That's what is hard to read and harder to review. Bruce From owner-svn-src-head@freebsd.org Tue Jan 17 16:40:51 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 A05B4CB468B for ; Tue, 17 Jan 2017 16:40:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 73A261AA1 for ; Tue, 17 Jan 2017 16:40:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x229.google.com with SMTP id j13so118783211iod.3 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=n53F5u9RVdIUku5jz9YX01B96XvpylsFVZJjviF+awQKNiyIg+CyalOMDfzKM6sQja 8Ydc7k1FqxoQa3PvulI0/+Lk/NCwcS7UvK1BK5m4OMEm8iwbgzg16O7+rYCDGZKhXdWF H1gMUfQvcpdHDOl0Gy/txkxxn0EGstByi8sSgTP1mK09U50SgePKCQ9Ru90MyRGQjCI5 6IeeP8UbMV8z9hHVRJaL3CNs07eQre4gNru8x3WZMOpB+l+J/ZT7cNV1qOlB8i03RVQ1 kYfvVpbxlAPS2tHi6/16tYZGysJ4FHgVItlMhcUpafmrItHbN1ejJrcLHz6uxm37/1YA Up2A== X-Gm-Message-State: AIkVDXKsTHoawburumF1NUWJ3NGBbKfnVdJ9YFJ9/aJwCPOFrBdI9MKghWS/TAFkGHWZ1ca6HvABw9hriQNRog6W 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-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: 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. >> >> > From owner-svn-src-head@freebsd.org Tue Jan 17 16:57:57 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 AEAA7CB4298 for ; Tue, 17 Jan 2017 16:57:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA751965 for ; Tue, 17 Jan 2017 16:57:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 15440b64-dcd6-11e6-9357-bffcd86bd944 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 15440b64-dcd6-11e6-9357-bffcd86bd944; Tue, 17 Jan 2017 16:57:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0HGvgnA017712; Tue, 17 Jan 2017 09:57:42 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1484672262.86335.163.camel@freebsd.org> 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 From: Ian Lepore To: Maxim Sobolev , Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 17 Jan 2017 09:57:42 -0700 In-Reply-To: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 16:57:57 -0000 In my experience, enums are a superior way to define integer constants (compared to #define), but they are pure poison as variable types in APIs and structures because their size is a compiler implementation choice. -- Ian On Tue, 2017-01-17 at 08:40 -0800, Maxim Sobolev wrote: > 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 > g> > > 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. > > > > > > From owner-svn-src-head@freebsd.org Tue Jan 17 17:32:42 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 898C5CB4089; Tue, 17 Jan 2017 17:32:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 646F5156E; Tue, 17 Jan 2017 17:32:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 8307610A7DB; Tue, 17 Jan 2017 12:32:41 -0500 (EST) From: John Baldwin To: Bruce Evans Cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312205 - in head/sys: kern net Date: Tue, 17 Jan 2017 07:04:03 -0800 Message-ID: <2068311.SHO1HLFUnD@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170117113927.E1043@besplex.bde.org> References: <201701150050.v0F0oAU8055428@repo.freebsd.org> <30935285.ropjfVExpa@ralph.baldwin.cx> <20170117113927.E1043@besplex.bde.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 17 Jan 2017 12:32:41 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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: Tue, 17 Jan 2017 17:32:42 -0000 On Tuesday, January 17, 2017 12:02:49 PM Bruce Evans wrote: > On Mon, 16 Jan 2017, John Baldwin wrote: > > > On Sunday, January 15, 2017 12:50:10 AM Sean Bruno wrote: > >> ... > >> Log: > >> Fix hangs in a uniprocessor configuration (qemu, virtualbox, real hw). > >> > >> sys/net/iflib.c: > >> Add ctx to filter_info and don't skpi interrupt early on unless we're on an > >> SMP system > > > > On an SMP system with EARLY_AP_STARTUP (default on x86) this code should > > never see smp_started as false anyway, so these checks should likely just > > be conditional on EARLY_AP_STARTUP (since that option will eventually go > > away). > > Ifdefs on EARLY_AP_STARTUP give strange results for the UP case (at least > for SMP with 1 CPU). First, the ifdef in sys/kernel.h moves SI_SUB_SMP > from late to early, although the CPU initialization order has not changed > when there is only 1 CPU. Then everything that uses SI_SUB_SMP is > reordered, and bugs in the new order show up even in the UP case. Most of the things that used to use SI_SUB_SMP no longer do (there is now a SI_SUB_LAST that many of those things use). > sys/gtaskqueue.h uses a complicated combination of EARLY_AP_STARTUP and > SI_SUB ifdefs to try to get the order right. I think the last commit to > it helps for the UP case but harms for the SMP case (both for the > !EARLY_AP_STARTUP case). Its code is simpler for the EARLY_AP_STARTUP > case. In the !EARLY_AP_STARTUP case, it has to split up the initialization > to delay calculations depending on the number of CPUs until after SMP > has started. The last commit to it seems to have turned the split into > nonsense by removing the delay. But in the UP case, the split is not > really necessary and removing the delay should help. > > EARLY_AP_STARTUP works badly here. It doesn't give a much faster startup > for the early part of the boot. Then it gives a much slower boot by > hanging for almost a minute waiting for USB or something. Starting all > the CPUs early also unimproves debugging by interleaving the boot messages > a bit. I use colorized console messages (with the color indexed by the > CPU). This makes interleaved messages quite readable and gives interesting > patterns when multiple CPUs are running. The interleaving I am aware of is from USB which starts its own kthreads during attach directly rather than using config_intrhook like other drivers which do bus exploration later in boot (e.g. all the SCSI devices). I tried to describe this to Hans but will probably just come up with a patch to change USB to use config_intrhook which might help. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Jan 17 17:39:48 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 CFFCFCB4630; Tue, 17 Jan 2017 17:39:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B56E1F37; Tue, 17 Jan 2017 17:39:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AAF531FE025; Tue, 17 Jan 2017 18:39:30 +0100 (CET) Subject: Re: svn commit: r312205 - in head/sys: kern net To: John Baldwin , Bruce Evans References: <201701150050.v0F0oAU8055428@repo.freebsd.org> <30935285.ropjfVExpa@ralph.baldwin.cx> <20170117113927.E1043@besplex.bde.org> <2068311.SHO1HLFUnD@ralph.baldwin.cx> Cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <3981459d-c3ea-30ae-75d9-e4258817a427@selasky.org> Date: Tue, 17 Jan 2017 18:39:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2068311.SHO1HLFUnD@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 17 Jan 2017 17:39:48 -0000 On 01/17/17 16:04, John Baldwin wrote: > Then it gives a much slower boot by >> hanging for almost a minute waiting for USB or something. Hi, This might be related to a bug in the timer init which I've observed too. Can you show output from: vmstat -i When the booting is slow? --HPS From owner-svn-src-head@freebsd.org Tue Jan 17 17:41:15 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 A96F9CB4827; Tue, 17 Jan 2017 17:41:15 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7927E1173; Tue, 17 Jan 2017 17:41:15 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HHfE92062418; Tue, 17 Jan 2017 17:41:14 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HHfEZZ062417; Tue, 17 Jan 2017 17:41:14 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701171741.v0HHfEZZ062417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 17 Jan 2017 17:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312346 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 17:41:15 -0000 Author: loos Date: Tue Jan 17 17:41:14 2017 New Revision: 312346 URL: https://svnweb.freebsd.org/changeset/base/312346 Log: Set the the wp_disabled flag when asked to. While here, add the missing new line. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Jan 17 16:20:21 2017 (r312345) +++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Jan 17 17:41:14 2017 (r312346) @@ -90,7 +90,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, ph gpio->slot->opt |= SDHCI_NON_REMOVABLE; gpio->cd_disabled = true; if (bootverbose) - device_printf(dev, "Non-removable media"); + device_printf(dev, "Non-removable media\n"); return; } @@ -177,8 +177,12 @@ wp_setup(struct sdhci_fdt_gpio *gpio, ph dev = gpio->dev; - if (OF_hasprop(node, "wp-disable")) + if (OF_hasprop(node, "wp-disable")) { + gpio->wp_disabled = true; + if (bootverbose) + device_printf(dev, "Write protect disabled\n"); return; + } if (gpio_pin_get_by_ofw_property(dev, node, "wp-gpios", &gpio->wp_pin)) return; From owner-svn-src-head@freebsd.org Tue Jan 17 17:48:05 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 38A57CB4ADC; Tue, 17 Jan 2017 17:48:05 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x235.google.com (mail-ot0-x235.google.com [IPv6:2607:f8b0:4003:c0f::235]) (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 EE82C18D3; Tue, 17 Jan 2017 17:48:04 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x235.google.com with SMTP id f9so67637794otd.1; Tue, 17 Jan 2017 09:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3GMi3WWM1kA5FJzq4UGkGp6R7BIf8z4u6m7pUev/h6g=; b=sPtGl2X7OWnIb2yirrpvDreNQrcP3bswxPip8VhaQsJkiFa0DEadaPO6mQAuigDofh eXmrpqONbnSvVxqmpGs5pCqMXFK5uyN13iK9fkAndzWAEXRq48Yos6UT20E1AlShOnIq 7rROhDqbvz0Rbumxot1BCJm/UkckrkHzLFjFbgERcW8AkVxdIZq1Tpu3fnmictJfAjw1 0KKeFEpMnkv93seMYkXtrVgFMBWtZAf1JW25Z1+T1tMd7JwYUsJRZ80rSi+kes0mPax2 rcJJkVUiGi7YvYxnF5cBc4jhAbFCcsD4QADuG81mtCaVFHEDT1YaNBwNmWlaJwcnJGsj QfCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3GMi3WWM1kA5FJzq4UGkGp6R7BIf8z4u6m7pUev/h6g=; b=Ysma85BPByH9Z+kEwk1pMB5j/pVTfPUZnFRQS4hYIHXa+NwddN7HQ5kxyFFkKO4YtW S7YGVO0OdsUnwwsyq4w+kOiCrv2GTA1dHwd7+g+hsw5bfbRaz4myz7B+JjgNxn6WA1pi cmYYZ0D0nshHP2UKNG6yYkl5Khr3Q4+BbY5JjxG/WfKcYRIbTOKjlQaWYfWL2IJ3OYuD B0ELXGHgY7HHx/KkVnyOBxVLSEz38jquS8RGs3nCjEk/9Qu/Yoq+zB0HHktDkE0/hTjN cIqEAA5YKHBrPAzKJs3HzTzAKS2rL9QZqkx0pLLXGWZZ812+4eX6U7HxEUTE6HiQT5D/ Kwqw== X-Gm-Message-State: AIkVDXI+St3zlWJQ/8/Hzdb+iC+w2Mvpdeteor6EIUlJ9bz5OKmMTvSQd4S+tXqaoiqKc5xZ3I+Q5Hd8TuNVeA== X-Received: by 10.157.61.244 with SMTP id l107mr19550798otc.122.1484675284226; Tue, 17 Jan 2017 09:48:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.52.9 with HTTP; Tue, 17 Jan 2017 09:48:03 -0800 (PST) In-Reply-To: <1484672262.86335.163.camel@freebsd.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <1484672262.86335.163.camel@freebsd.org> From: Benjamin Kaduk Date: Tue, 17 Jan 2017 11:48:03 -0600 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: Ian Lepore Cc: Maxim Sobolev , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Tue, 17 Jan 2017 17:48:05 -0000 On Tue, Jan 17, 2017 at 10:57 AM, Ian Lepore wrote: > In my experience, enums are a superior way to define integer constants > (compared to #define), but they are pure poison as variable types in > APIs and structures because their size is a compiler implementation > choice. > Well, to some extent. For example, the amd64 sysV ABI says that enum types are signed fourbyte, with a footnote that "C++ and some implementations of C permit enums larger than an int. The underlying type is bumped to an unsigned int, long int or unsigned long int, in that order." -Ben From owner-svn-src-head@freebsd.org Tue Jan 17 18:04:14 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 B8297CB4537; Tue, 17 Jan 2017 18:04:14 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87ABF1687; Tue, 17 Jan 2017 18:04:14 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HI4DbH073942; Tue, 17 Jan 2017 18:04:13 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HI4D6G073941; Tue, 17 Jan 2017 18:04:13 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701171804.v0HI4D6G073941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 17 Jan 2017 18:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312347 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 18:04:14 -0000 Author: loos Date: Tue Jan 17 18:04:13 2017 New Revision: 312347 URL: https://svnweb.freebsd.org/changeset/base/312347 Log: The write-protect is not wired on uFW, disable it to allow writes to SD card. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/boot/fdt/dts/arm/ufw.dts Modified: head/sys/boot/fdt/dts/arm/ufw.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/ufw.dts Tue Jan 17 17:41:14 2017 (r312346) +++ head/sys/boot/fdt/dts/arm/ufw.dts Tue Jan 17 18:04:13 2017 (r312347) @@ -278,6 +278,7 @@ pinctrl-0 = <&mmc1_pins>; bus-width = <4>; non-removable; + wp-disable; status = "okay"; }; From owner-svn-src-head@freebsd.org Tue Jan 17 18:32:49 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 7B149CB306A; Tue, 17 Jan 2017 18:32:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28A0F1D2C; Tue, 17 Jan 2017 18:32:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HIWmSK086484; Tue, 17 Jan 2017 18:32:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HIWmjM086481; Tue, 17 Jan 2017 18:32:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701171832.v0HIWmjM086481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 Jan 2017 18:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312348 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 18:32:49 -0000 Author: mav Date: Tue Jan 17 18:32:47 2017 New Revision: 312348 URL: https://svnweb.freebsd.org/changeset/base/312348 Log: Remove writing 'residual' field of struct ctl_scsiio. This field has no practical use and never readed. Initiators already receive respective residual size from frontends. Removed field had different semantics, which looks useless, and was never passed through by any frontend. While there, fix kern_data_resid field support in case of HA, missed in r312291. MFC after: 13 days Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Jan 17 18:04:13 2017 (r312347) +++ head/sys/cam/ctl/ctl.c Tue Jan 17 18:32:47 2017 (r312348) @@ -696,8 +696,6 @@ ctl_ha_done(union ctl_io *io) msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.residual = io->scsiio.residual; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, @@ -725,8 +723,6 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->io_hdr.status = msg_info->hdr.status; ctsio->scsi_status = msg_info->scsi.scsi_status; ctsio->sense_len = msg_info->scsi.sense_len; - ctsio->sense_residual = msg_info->scsi.sense_residual; - ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, msg_info->scsi.sense_len); ctl_enqueue_isc((union ctl_io *)ctsio); @@ -1495,13 +1491,12 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; - io->io_hdr.port_status = msg->scsi.fetd_status; - io->scsiio.residual = msg->scsi.residual; + io->io_hdr.port_status = msg->scsi.port_status; + io->scsiio.kern_data_resid = msg->scsi.kern_data_resid; if (msg->hdr.status != CTL_STATUS_NONE) { io->io_hdr.status = msg->hdr.status; io->scsiio.scsi_status = msg->scsi.scsi_status; io->scsiio.sense_len = msg->scsi.sense_len; - io->scsiio.sense_residual =msg->scsi.sense_residual; memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); @@ -6498,15 +6493,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (ctsio->cdb[0]) { case MODE_SENSE_6: { @@ -6850,15 +6838,8 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; header = (struct scsi_log_header *)ctsio->kern_data_ptr; header->page = page_index->page_code; @@ -6913,7 +6894,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data *)ctsio->kern_data_ptr; - ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); ctsio->kern_rel_offset = 0; @@ -6971,18 +6951,10 @@ ctl_read_capacity_16(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data_long *)ctsio->kern_data_ptr; - - if (sizeof(*data) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*data); - ctsio->kern_data_len = sizeof(*data); - ctsio->kern_total_len = sizeof(*data); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*data), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ @@ -7025,18 +6997,10 @@ ctl_get_lba_status(struct ctl_scsiio *ct total_len = sizeof(*data) + sizeof(data->descr[0]); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_get_lba_status_data *)ctsio->kern_data_ptr; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* Fill dummy data in case backend can't tell anything. */ scsi_ulto4b(4 + sizeof(data->descr[0]), data->length); @@ -7087,17 +7051,10 @@ ctl_read_defect(struct ctl_scsiio *ctsio } ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { data10 = (struct scsi_read_defect_data_hdr_10 *) @@ -7182,19 +7139,10 @@ ctl_report_tagret_port_groups(struct ctl alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ext) { rtg_ext_ptr = (struct scsi_target_group_data_extended *) @@ -7382,19 +7330,10 @@ ctl_report_supported_opcodes(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (cdb->options & RSO_OPTIONS_MASK) { case RSO_OPTIONS_ALL: @@ -7495,19 +7434,10 @@ ctl_report_supported_tmf(struct ctl_scsi alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_QTS | @@ -7542,19 +7472,10 @@ ctl_report_timestamp(struct ctl_scsiio * alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*data) - 2, data->length); @@ -7615,19 +7536,10 @@ retry: mtx_unlock(&lun->lun_lock); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } - ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; mtx_lock(&lun->lun_lock); switch (cdb->action) { @@ -9174,18 +9086,10 @@ ctl_report_luns(struct ctl_scsiio *ctsio */ lun_datalen = sizeof(*lun_data) + (num_filled * sizeof(struct scsi_report_luns_lundata)); - - if (lun_datalen < alloc_len) { - ctsio->residual = alloc_len - lun_datalen; - ctsio->kern_data_len = lun_datalen; - ctsio->kern_total_len = lun_datalen; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(lun_datalen, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * We set this to the actual data length, regardless of how much @@ -9236,19 +9140,16 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*sense_ptr), M_CTL, M_WAITOK); sense_ptr = (struct scsi_sense_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; + ctsio->kern_rel_offset = 0; /* * struct scsi_sense_data, which is currently set to 256 bytes, is * larger than the largest allowed value for the length field in the * REQUEST SENSE CDB, which is 252 bytes as of SPC-4. */ - ctsio->residual = 0; ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - /* * If we don't have a LUN, we don't have any pending sense. */ @@ -9373,19 +9274,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc SCSI_EVPD_NUM_SUPPORTED_PAGES; ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO); pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (sup_page_size < alloc_len) { - ctsio->residual = alloc_len - sup_page_size; - ctsio->kern_data_len = sup_page_size; - ctsio->kern_total_len = sup_page_size; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sup_page_size, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9443,17 +9335,10 @@ ctl_inquiry_evpd_serial(struct ctl_scsii data_len = 4 + CTL_SN_LEN; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr; - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9500,18 +9385,9 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); eid_ptr = (struct scsi_vpd_extended_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9574,19 +9450,10 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); mpp_ptr = (struct scsi_vpd_mode_page_policy *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9639,18 +9506,10 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9767,18 +9626,10 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sp = (struct scsi_vpd_scsi_ports *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9842,18 +9693,10 @@ ctl_inquiry_evpd_block_limits(struct ctl ctsio->kern_data_ptr = malloc(sizeof(*bl_ptr), M_CTL, M_WAITOK | M_ZERO); bl_ptr = (struct scsi_vpd_block_limits *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*bl_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*bl_ptr); - ctsio->kern_data_len = sizeof(*bl_ptr); - ctsio->kern_total_len = sizeof(*bl_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bl_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9917,18 +9760,9 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*bdc_ptr), M_CTL, M_WAITOK | M_ZERO); bdc_ptr = (struct scsi_vpd_block_device_characteristics *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*bdc_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*bdc_ptr); - ctsio->kern_data_len = sizeof(*bdc_ptr); - ctsio->kern_total_len = sizeof(*bdc_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bdc_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9973,18 +9807,9 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*lbp_ptr), M_CTL, M_WAITOK | M_ZERO); lbp_ptr = (struct scsi_vpd_logical_block_prov *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*lbp_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*lbp_ptr); - ctsio->kern_data_len = sizeof(*lbp_ptr); - ctsio->kern_total_len = sizeof(*lbp_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*lbp_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -10118,16 +9943,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (lun != NULL) { if ((lun->flags & CTL_LUN_PRIMARY_SC) || @@ -10511,15 +10328,8 @@ done: data_len = (uint8_t *)feature - (uint8_t *)hdr; } scsi_ulto4b(data_len - 4, hdr->data_length); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -10550,16 +10360,8 @@ ctl_get_event_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_get_event_status_header *)ctsio->kern_data_ptr; scsi_ulto2b(0, hdr->descr_length); @@ -10587,16 +10389,8 @@ ctl_mechanism_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_mechanism_status_header *)ctsio->kern_data_ptr; hdr->state1 = 0x00; @@ -10646,16 +10440,8 @@ ctl_read_toc(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_read_toc_hdr *)ctsio->kern_data_ptr; if (format == 0) { @@ -12647,15 +12433,14 @@ ctl_send_datamove_done(union ctl_io *io, msg.hdr.serializing_sc = io->io_hdr.serializing_sc; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; + msg.scsi.kern_data_resid = io->scsiio.kern_data_resid; msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.scsi_status = io->scsiio.scsi_status; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.fetd_status = io->io_hdr.port_status; - msg.scsi.residual = io->scsiio.residual; + msg.scsi.port_status = io->io_hdr.port_status; io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { ctl_failover_io(io, /*have_lock*/ have_lock); Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Tue Jan 17 18:04:13 2017 (r312347) +++ head/sys/cam/ctl/ctl_io.h Tue Jan 17 18:32:47 2017 (r312348) @@ -320,7 +320,7 @@ struct ctl_scsiio { uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_residual; /* Unused. */ - uint32_t residual; /* data residual length */ + uint32_t residual; /* Unused */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ uint8_t cdb_len; /* CDB length */ @@ -373,7 +373,7 @@ struct ctl_taskio { /* * HA link messages. */ -#define CTL_HA_VERSION 2 +#define CTL_HA_VERSION 3 /* * Used for CTL_MSG_LOGIN. @@ -469,7 +469,8 @@ struct ctl_ha_msg_dt { }; /* - * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU. + * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU, + * and CTL_MSG_DATAMOVE_DONE. */ struct ctl_ha_msg_scsi { struct ctl_ha_msg_hdr hdr; @@ -479,10 +480,9 @@ struct ctl_ha_msg_scsi { uint8_t cdb_len; /* CDB length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_len; /* Returned sense length */ - uint8_t sense_residual; /* sense residual length */ - uint32_t residual; /* data residual length */ - uint32_t fetd_status; /* trans status, set by FETD, + uint32_t port_status; /* trans status, set by FETD, 0 = good*/ + uint32_t kern_data_resid; /* for DATAMOVE_DONE */ struct scsi_sense_data sense_data; /* sense data */ }; Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Tue Jan 17 18:04:13 2017 (r312347) +++ head/sys/cam/ctl/ctl_tpc.c Tue Jan 17 18:32:47 2017 (r312348) @@ -282,19 +282,10 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); tpc_ptr = (struct scsi_vpd_tpc *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -457,19 +448,10 @@ ctl_receive_copy_operating_parameters(st alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + 4, data->length); @@ -554,19 +536,10 @@ ctl_receive_copy_status_lid1(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4, data->available_data); @@ -631,19 +604,10 @@ ctl_receive_copy_failure_details(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; if (list_copy.completed && (list_copy.error || list_copy.abort)) { @@ -702,19 +666,10 @@ ctl_receive_copy_status_lid4(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, @@ -2402,19 +2357,10 @@ ctl_receive_rod_token_information(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len + @@ -2482,19 +2428,10 @@ ctl_report_all_rod_tokens(struct ctl_scs alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; i = 0; From owner-svn-src-head@freebsd.org Tue Jan 17 19:37:35 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 D8C49CB4717; Tue, 17 Jan 2017 19:37:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id BB34B149D; Tue, 17 Jan 2017 19:37:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id A81F656483; Tue, 17 Jan 2017 13:37:28 -0600 (CST) 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: Benjamin Kaduk , Ian Lepore References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <1484672262.86335.163.camel@freebsd.org> Cc: Maxim Sobolev , Gleb Smirnoff , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Eric van Gyzen Message-ID: Date: Tue, 17 Jan 2017 13:37:27 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Tue, 17 Jan 2017 19:37:36 -0000 On 01/17/2017 11:48, Benjamin Kaduk wrote: > On Tue, Jan 17, 2017 at 10:57 AM, Ian Lepore > wrote: > > In my experience, enums are a superior way to define integer constants > (compared to #define), but they are pure poison as variable types in > APIs and structures because their size is a compiler implementation > choice. > > > Well, to some extent. For example, the amd64 sysV ABI says that enum > types are signed fourbyte, with a footnote that "C++ and some > implementations of C permit enums larger than an int. The underlying > type is bumped to an unsigned int, long int or unsigned long int, in > that order." And in C++11 and later, you can specify the exact type: enum color #if defined(__cplusplus) && __cplusplus >= 201103L : int #endif { blue, ... Eric From owner-svn-src-head@freebsd.org Tue Jan 17 20:31:42 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 81435CB40EC; Tue, 17 Jan 2017 20:31:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0AC561A61; Tue, 17 Jan 2017 20:31:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA03181; Tue, 17 Jan 2017 22:31:30 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cTaPh-000PJF-Ju; Tue, 17 Jan 2017 22:31:29 +0200 Subject: Re: svn commit: r312236 - head/sys/net80211 To: Adrian Chadd , Ian Lepore References: <201701151949.v0FJnl2h027169@repo.freebsd.org> <1484510213.86335.110.camel@freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andriy Gapon Message-ID: <0c2cb416-9d33-3d50-95be-c84154c11797@FreeBSD.org> Date: Tue, 17 Jan 2017 22:30:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Tue, 17 Jan 2017 20:31:42 -0000 On 15/01/2017 22:43, Adrian Chadd wrote: > On 15 January 2017 at 11:56, Ian Lepore wrote: > >> >> What is the point of the !! in these macros? The expressions already >> have boolean type (even in C++ where it matters) due to the ==. >> Removing the !! would also make one level of parens redundant. > > It's just a habit i picked up from linux-land. That way it really is > only 1 or 0, so things like debugging output and such make easier > sense. Well, that habit is useful when applied to results of bit-wise operations. It does nothing but obfuscating the code when applied to results of logical operations. Which is the case here. And even with the bit-wise operation we have a FreeBSD idiom of comparing the result with zero using != 0. More verbose, but also more stylish. > It's also fixed a handful of bugs in the past (but I can't think of > exact cases right now) - primarily where other code expected 1 or 0 > (for things like shifts into protocol fields) and the macro returns 0 > or ${LARGEVAL}. -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Jan 17 21:12:22 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 AA15DCB4D12; Tue, 17 Jan 2017 21:12:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7948311FF; Tue, 17 Jan 2017 21:12:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HLCLTT051100; Tue, 17 Jan 2017 21:12:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HLCLEb051099; Tue, 17 Jan 2017 21:12:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201701172112.v0HLCLEb051099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 17 Jan 2017 21:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312350 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 21:12:22 -0000 Author: bdrewery Date: Tue Jan 17 21:12:21 2017 New Revision: 312350 URL: https://svnweb.freebsd.org/changeset/base/312350 Log: Don't compute MPATH during install. This saves time when building over NFS. Nothing should be building during this phase anyhow. Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Jan 17 19:19:29 2017 (r312349) +++ head/sys/conf/kern.pre.mk Tue Jan 17 21:12:21 2017 (r312350) @@ -192,7 +192,7 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(NO_MODULES) && !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) __MPATH!=find ${S:tA}/ -name \*_if.m .endif From owner-svn-src-head@freebsd.org Tue Jan 17 21:27:15 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 A3011CB5491; Tue, 17 Jan 2017 21:27:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A66C1BE9; Tue, 17 Jan 2017 21:27:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0HLREnW052299 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Jan 2017 13:27:14 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0HLRE6M052298; Tue, 17 Jan 2017 13:27:14 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 17 Jan 2017 13:27:14 -0800 From: Gleb Smirnoff To: Maxim Sobolev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org 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 Message-ID: <20170117212713.GZ2611@FreeBSD.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) 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: Tue, 17 Jan 2017 21:27:15 -0000 On Tue, Jan 17, 2017 at 08:40:50AM -0800, Maxim Sobolev wrote: M> That being said, is there any other socket option value in there M> implemented as enum? I don't see anything obvious, so that I am curious if M> it would stick out as an odd one in there. What do you think? Simply because 30 years ago the language didn't allow that, and later additions mimiced the older sockopts. We need to break this loop :) -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Jan 17 21:34:35 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 316E9CB5891 for ; Tue, 17 Jan 2017 21:34:35 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 EB7F614B0 for ; Tue, 17 Jan 2017 21:34:34 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-it0-x22f.google.com with SMTP id 203so104772911ith.0 for ; Tue, 17 Jan 2017 13:34:34 -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=an+zzmbcc4NXJ9RHhd0Ukxlry+sRFIqg43GVtGpsrB4=; b=EUHDXzq+QXeQXwvd7DU37umFMQ7pLodka1UVrrN8F4/rzRJ4su/eics8W9009V1Bpv PheT/ACQDDDPwIDXPxXQguGz/zSsVMPDv5rhIDw0nuCnEE4oSLkzLodMA5fEi0kka/jn D1ekiO6CbAVyGxFZtDd48nXXzy2xnPrFfWe2Um8lcCol2Q4x3F/hCBUVQqbq7TrByv0e qBM7qUjrqWrY8gUbYt/nD0vu7ojzH4QphoY9h7UKQrqYdAlH59H8j96HlIBGawzzGwyY 9NKGpQn+U6+8UqbeVBXDButVlsfRd5g5kPtyKmhNpwgM+6cPEIVVNn91GYc/otuUjY3r JT5w== 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=an+zzmbcc4NXJ9RHhd0Ukxlry+sRFIqg43GVtGpsrB4=; b=cHlIU2O3f/O9RSb1FKb1a+u263QV2VOV5wT3OZB2gcFAgdJy90+ZF5gzCQLyAIZYOX YqOfzH246//V74MsJ/0hETmZIs1GYadMcNqslMBb57E72lVRiubeWmv9XL/AdXBpzaor Yup+zYBSzNF5XM3DpciEsVm5S80jdcUT4haYpu/km4Fk3yTUtEGJt85bVmuVwit5XIiM bilGcWzEQz2wACShMy8szHUX/DdrUp7V+OWyb01tfssTWeZKi5NHu5BZhKMf0KO/nCGc IlT6AugCuKojzZEBlhatLR2g9iG4e3WY3cPcLKBtYjn9kPSM12OcR+PaiVJvV8VoY+/l 39vw== X-Gm-Message-State: AIkVDXLbEs5W917mtkKM8QRrRsdNwdtNa0nd4odSBbP5i4Fqb+O0RwDJDOHS0EPlBF8wjaMGqI6eYcL6zs+zQJ/K X-Received: by 10.36.13.195 with SMTP id 186mr23031794itx.22.1484688874169; Tue, 17 Jan 2017 13:34:34 -0800 (PST) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.160.66 with HTTP; Tue, 17 Jan 2017 13:34:33 -0800 (PST) In-Reply-To: <20170117212713.GZ2611@FreeBSD.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> From: Maxim Sobolev Date: Tue, 17 Jan 2017 13:34:33 -0800 X-Google-Sender-Auth: bh6V8wlG4fGk3t-ngmI9rsF18TM 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-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: Tue, 17 Jan 2017 21:34:35 -0000 Well as other pointed out there are some concerns with using enums from C++ and ABI prospective. So it looks to me that there is no general consensus on that direction. -Max On Tue, Jan 17, 2017 at 1:27 PM, Gleb Smirnoff wrote: > On Tue, Jan 17, 2017 at 08:40:50AM -0800, Maxim Sobolev wrote: > M> That being said, is there any other socket option value in there > M> implemented as enum? I don't see anything obvious, so that I am curious > if > M> it would stick out as an odd one in there. What do you think? > > Simply because 30 years ago the language didn't allow that, and later > additions mimiced the older sockopts. We need to break this loop :) > > -- > Totus tuus, Glebius. > > From owner-svn-src-head@freebsd.org Tue Jan 17 22:03:10 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 0197FCB456F; Tue, 17 Jan 2017 22:03:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2F571E37; Tue, 17 Jan 2017 22:03:09 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HM38kU071333; Tue, 17 Jan 2017 22:03:08 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HM38bC071327; Tue, 17 Jan 2017 22:03:08 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201701172203.v0HM38bC071327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 17 Jan 2017 22:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312353 - head/sys/contrib/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 22:03:10 -0000 Author: ed Date: Tue Jan 17 22:03:08 2017 New Revision: 312353 URL: https://svnweb.freebsd.org/changeset/base/312353 Log: Sync in the latest CloudABI generated source files. Languages like C++17 and Go provide direct support for slice types: pointer/length pairs. The CloudABI generator now has more complete for this, meaning that for the C binding, pointer/length pairs now use an automatic naming scheme of ${name} and ${name}_len. Apart from this change and some reformatting, the ABI definitions are identical. Binary compatibility is preserved entirely. Modified: head/sys/contrib/cloudabi/cloudabi32_types.h head/sys/contrib/cloudabi/cloudabi64_types.h head/sys/contrib/cloudabi/cloudabi_types_common.h head/sys/contrib/cloudabi/syscalls32.master head/sys/contrib/cloudabi/syscalls64.master Modified: head/sys/contrib/cloudabi/cloudabi32_types.h ============================================================================== --- head/sys/contrib/cloudabi/cloudabi32_types.h Tue Jan 17 22:02:22 2017 (r312352) +++ head/sys/contrib/cloudabi/cloudabi32_types.h Tue Jan 17 22:03:08 2017 (r312353) @@ -44,11 +44,11 @@ _Static_assert(sizeof(cloudabi32_auxv_t) _Static_assert(_Alignof(cloudabi32_auxv_t) == 4, "Incorrect layout"); typedef struct { - _Alignas(4) uint32_t iov_base; - _Alignas(4) uint32_t iov_len; + _Alignas(4) uint32_t buf; + _Alignas(4) uint32_t buf_len; } cloudabi32_ciovec_t; -_Static_assert(offsetof(cloudabi32_ciovec_t, iov_base) == 0, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_ciovec_t, iov_len) == 4, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_ciovec_t, buf) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_ciovec_t, buf_len) == 4, "Incorrect layout"); _Static_assert(sizeof(cloudabi32_ciovec_t) == 8, "Incorrect layout"); _Static_assert(_Alignof(cloudabi32_ciovec_t) == 4, "Incorrect layout"); @@ -94,11 +94,11 @@ _Static_assert(sizeof(cloudabi32_event_t _Static_assert(_Alignof(cloudabi32_event_t) == 8, "Incorrect layout"); typedef struct { - _Alignas(4) uint32_t iov_base; - _Alignas(4) uint32_t iov_len; + _Alignas(4) uint32_t buf; + _Alignas(4) uint32_t buf_len; } cloudabi32_iovec_t; -_Static_assert(offsetof(cloudabi32_iovec_t, iov_base) == 0, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_iovec_t, iov_len) == 4, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_iovec_t, buf) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_iovec_t, buf_len) == 4, "Incorrect layout"); _Static_assert(sizeof(cloudabi32_iovec_t) == 8, "Incorrect layout"); _Static_assert(_Alignof(cloudabi32_iovec_t) == 4, "Incorrect layout"); @@ -106,30 +106,30 @@ typedef void cloudabi32_processentry_t(u typedef struct { _Alignas(4) uint32_t ri_data; - _Alignas(4) uint32_t ri_datalen; + _Alignas(4) uint32_t ri_data_len; _Alignas(4) uint32_t ri_fds; - _Alignas(4) uint32_t ri_fdslen; + _Alignas(4) uint32_t ri_fds_len; _Alignas(2) cloudabi_msgflags_t ri_flags; } cloudabi32_recv_in_t; _Static_assert(offsetof(cloudabi32_recv_in_t, ri_data) == 0, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_recv_in_t, ri_datalen) == 4, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_recv_in_t, ri_data_len) == 4, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_recv_in_t, ri_fds) == 8, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_recv_in_t, ri_fdslen) == 12, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_recv_in_t, ri_fds_len) == 12, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_recv_in_t, ri_flags) == 16, "Incorrect layout"); _Static_assert(sizeof(cloudabi32_recv_in_t) == 20, "Incorrect layout"); _Static_assert(_Alignof(cloudabi32_recv_in_t) == 4, "Incorrect layout"); typedef struct { _Alignas(4) uint32_t si_data; - _Alignas(4) uint32_t si_datalen; + _Alignas(4) uint32_t si_data_len; _Alignas(4) uint32_t si_fds; - _Alignas(4) uint32_t si_fdslen; + _Alignas(4) uint32_t si_fds_len; _Alignas(2) cloudabi_msgflags_t si_flags; } cloudabi32_send_in_t; _Static_assert(offsetof(cloudabi32_send_in_t, si_data) == 0, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_send_in_t, si_datalen) == 4, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_send_in_t, si_data_len) == 4, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_send_in_t, si_fds) == 8, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_send_in_t, si_fdslen) == 12, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_send_in_t, si_fds_len) == 12, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_send_in_t, si_flags) == 16, "Incorrect layout"); _Static_assert(sizeof(cloudabi32_send_in_t) == 20, "Incorrect layout"); _Static_assert(_Alignof(cloudabi32_send_in_t) == 4, "Incorrect layout"); @@ -219,12 +219,12 @@ _Static_assert(_Alignof(cloudabi32_recv_ typedef struct { _Alignas(4) uint32_t entry_point; _Alignas(4) uint32_t stack; - _Alignas(4) uint32_t stack_size; + _Alignas(4) uint32_t stack_len; _Alignas(4) uint32_t argument; } cloudabi32_threadattr_t; _Static_assert(offsetof(cloudabi32_threadattr_t, entry_point) == 0, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_threadattr_t, stack) == 4, "Incorrect layout"); -_Static_assert(offsetof(cloudabi32_threadattr_t, stack_size) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi32_threadattr_t, stack_len) == 8, "Incorrect layout"); _Static_assert(offsetof(cloudabi32_threadattr_t, argument) == 12, "Incorrect layout"); _Static_assert(sizeof(cloudabi32_threadattr_t) == 16, "Incorrect layout"); _Static_assert(_Alignof(cloudabi32_threadattr_t) == 4, "Incorrect layout"); Modified: head/sys/contrib/cloudabi/cloudabi64_types.h ============================================================================== --- head/sys/contrib/cloudabi/cloudabi64_types.h Tue Jan 17 22:02:22 2017 (r312352) +++ head/sys/contrib/cloudabi/cloudabi64_types.h Tue Jan 17 22:03:08 2017 (r312353) @@ -44,12 +44,11 @@ _Static_assert(sizeof(cloudabi64_auxv_t) _Static_assert(_Alignof(cloudabi64_auxv_t) == 8, "Incorrect layout"); typedef struct { - _Alignas(8) uint64_t iov_base; - _Alignas(8) uint64_t iov_len; + _Alignas(8) uint64_t buf; + _Alignas(8) uint64_t buf_len; } cloudabi64_ciovec_t; -_Static_assert(offsetof(cloudabi64_ciovec_t, iov_base) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_ciovec_t, iov_len) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_ciovec_t, buf) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_ciovec_t, buf_len) == 8, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_ciovec_t) == 16, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_ciovec_t) == 8, "Incorrect layout"); @@ -82,33 +81,24 @@ typedef struct { _Static_assert(offsetof(cloudabi64_event_t, userdata) == 0, "Incorrect layout"); _Static_assert(offsetof(cloudabi64_event_t, error) == 8, "Incorrect layout"); _Static_assert(offsetof(cloudabi64_event_t, type) == 10, "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, clock.identifier) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, condvar.condvar) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.nbytes) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.fd) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.flags) == 28, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, lock.lock) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.fd) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.signal) == 20, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.exitcode) == 24, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, clock.identifier) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, condvar.condvar) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.nbytes) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.fd) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.flags) == 28, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, lock.lock) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.fd) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.signal) == 20, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.exitcode) == 24, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_event_t) == 32, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_event_t) == 8, "Incorrect layout"); typedef struct { - _Alignas(8) uint64_t iov_base; - _Alignas(8) uint64_t iov_len; + _Alignas(8) uint64_t buf; + _Alignas(8) uint64_t buf_len; } cloudabi64_iovec_t; -_Static_assert(offsetof(cloudabi64_iovec_t, iov_base) == 0, "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_iovec_t, iov_len) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_iovec_t, buf) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_iovec_t, buf_len) == 8, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_iovec_t) == 16, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_iovec_t) == 8, "Incorrect layout"); @@ -116,47 +106,38 @@ typedef void cloudabi64_processentry_t(u typedef struct { _Alignas(8) uint64_t ri_data; - _Alignas(8) uint64_t ri_datalen; + _Alignas(8) uint64_t ri_data_len; _Alignas(8) uint64_t ri_fds; - _Alignas(8) uint64_t ri_fdslen; + _Alignas(8) uint64_t ri_fds_len; _Alignas(2) cloudabi_msgflags_t ri_flags; } cloudabi64_recv_in_t; -_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_in_t, ri_datalen) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fdslen) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_in_t, ri_flags) == 32, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data_len) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds_len) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_in_t, ri_flags) == 32, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_recv_in_t) == 40, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_recv_in_t) == 8, "Incorrect layout"); typedef struct { _Alignas(8) uint64_t si_data; - _Alignas(8) uint64_t si_datalen; + _Alignas(8) uint64_t si_data_len; _Alignas(8) uint64_t si_fds; - _Alignas(8) uint64_t si_fdslen; + _Alignas(8) uint64_t si_fds_len; _Alignas(2) cloudabi_msgflags_t si_flags; } cloudabi64_send_in_t; -_Static_assert(offsetof(cloudabi64_send_in_t, si_data) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_send_in_t, si_datalen) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_send_in_t, si_fds) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_send_in_t, si_fdslen) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_send_in_t, si_flags) == 32, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_send_in_t, si_data) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_send_in_t, si_data_len) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_send_in_t, si_fds) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_send_in_t, si_fds_len) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_send_in_t, si_flags) == 32, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_send_in_t) == 40, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_send_in_t) == 8, "Incorrect layout"); -typedef struct { _Alignas(8) uint64_t so_datalen; } cloudabi64_send_out_t; -_Static_assert(offsetof(cloudabi64_send_out_t, so_datalen) == 0, - "Incorrect layout"); +typedef struct { + _Alignas(8) uint64_t so_datalen; +} cloudabi64_send_out_t; +_Static_assert(offsetof(cloudabi64_send_out_t, so_datalen) == 0, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_send_out_t) == 8, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_send_out_t) == 8, "Incorrect layout"); @@ -191,44 +172,29 @@ typedef struct { } proc_terminate; }; } cloudabi64_subscription_t; -_Static_assert(offsetof(cloudabi64_subscription_t, userdata) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, flags) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, type) == 10, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, clock.identifier) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, clock.clock_id) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, clock.timeout) == 32, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, clock.precision) == 40, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, clock.flags) == 48, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar_scope) == 32, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock_scope) == 33, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.fd) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.flags) == 20, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock_scope) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_subscription_t, proc_terminate.fd) == 16, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, userdata) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, flags) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, type) == 10, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, clock.identifier) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, clock.clock_id) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, clock.timeout) == 32, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, clock.precision) == 40, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, clock.flags) == 48, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar_scope) == 32, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock_scope) == 33, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.fd) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.flags) == 20, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock_scope) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_subscription_t, proc_terminate.fd) == 16, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_subscription_t) == 56, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_subscription_t) == 8, "Incorrect layout"); -typedef struct { _Alignas(8) uint64_t parent; } cloudabi64_tcb_t; +typedef struct { + _Alignas(8) uint64_t parent; +} cloudabi64_tcb_t; _Static_assert(offsetof(cloudabi64_tcb_t, parent) == 0, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_tcb_t) == 8, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_tcb_t) == 8, "Incorrect layout"); @@ -242,33 +208,24 @@ typedef struct { _Alignas(2) cloudabi_sockaddr_t ro_peername; _Alignas(2) cloudabi_msgflags_t ro_flags; } cloudabi64_recv_out_t; -_Static_assert(offsetof(cloudabi64_recv_out_t, ro_datalen) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_out_t, ro_fdslen) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_out_t, ro_sockname) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_out_t, ro_peername) == 36, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_recv_out_t, ro_flags) == 56, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_out_t, ro_datalen) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_out_t, ro_fdslen) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_out_t, ro_sockname) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_out_t, ro_peername) == 36, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_recv_out_t, ro_flags) == 56, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_recv_out_t) == 64, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_recv_out_t) == 8, "Incorrect layout"); typedef struct { _Alignas(8) uint64_t entry_point; _Alignas(8) uint64_t stack; - _Alignas(8) uint64_t stack_size; + _Alignas(8) uint64_t stack_len; _Alignas(8) uint64_t argument; } cloudabi64_threadattr_t; -_Static_assert(offsetof(cloudabi64_threadattr_t, entry_point) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_threadattr_t, stack) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_threadattr_t, stack_size) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi64_threadattr_t, argument) == 24, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_threadattr_t, entry_point) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_threadattr_t, stack) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_threadattr_t, stack_len) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi64_threadattr_t, argument) == 24, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_threadattr_t) == 32, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_threadattr_t) == 8, "Incorrect layout"); Modified: head/sys/contrib/cloudabi/cloudabi_types_common.h ============================================================================== --- head/sys/contrib/cloudabi/cloudabi_types_common.h Tue Jan 17 22:02:22 2017 (r312352) +++ head/sys/contrib/cloudabi/cloudabi_types_common.h Tue Jan 17 22:03:08 2017 (r312353) @@ -38,34 +38,34 @@ #endif typedef uint8_t cloudabi_advice_t; -#define CLOUDABI_ADVICE_DONTNEED 1 -#define CLOUDABI_ADVICE_NOREUSE 2 -#define CLOUDABI_ADVICE_NORMAL 3 -#define CLOUDABI_ADVICE_RANDOM 4 +#define CLOUDABI_ADVICE_DONTNEED 1 +#define CLOUDABI_ADVICE_NOREUSE 2 +#define CLOUDABI_ADVICE_NORMAL 3 +#define CLOUDABI_ADVICE_RANDOM 4 #define CLOUDABI_ADVICE_SEQUENTIAL 5 -#define CLOUDABI_ADVICE_WILLNEED 6 +#define CLOUDABI_ADVICE_WILLNEED 6 typedef uint32_t cloudabi_auxtype_t; -#define CLOUDABI_AT_ARGDATA 256 -#define CLOUDABI_AT_ARGDATALEN 257 -#define CLOUDABI_AT_BASE 7 -#define CLOUDABI_AT_CANARY 258 -#define CLOUDABI_AT_CANARYLEN 259 -#define CLOUDABI_AT_NCPUS 260 -#define CLOUDABI_AT_NULL 0 -#define CLOUDABI_AT_PAGESZ 6 -#define CLOUDABI_AT_PHDR 3 -#define CLOUDABI_AT_PHNUM 4 +#define CLOUDABI_AT_ARGDATA 256 +#define CLOUDABI_AT_ARGDATALEN 257 +#define CLOUDABI_AT_BASE 7 +#define CLOUDABI_AT_CANARY 258 +#define CLOUDABI_AT_CANARYLEN 259 +#define CLOUDABI_AT_NCPUS 260 +#define CLOUDABI_AT_NULL 0 +#define CLOUDABI_AT_PAGESZ 6 +#define CLOUDABI_AT_PHDR 3 +#define CLOUDABI_AT_PHNUM 4 #define CLOUDABI_AT_SYSINFO_EHDR 262 -#define CLOUDABI_AT_TID 261 +#define CLOUDABI_AT_TID 261 typedef uint32_t cloudabi_backlog_t; typedef uint32_t cloudabi_clockid_t; -#define CLOUDABI_CLOCK_MONOTONIC 1 +#define CLOUDABI_CLOCK_MONOTONIC 1 #define CLOUDABI_CLOCK_PROCESS_CPUTIME_ID 2 -#define CLOUDABI_CLOCK_REALTIME 3 -#define CLOUDABI_CLOCK_THREAD_CPUTIME_ID 4 +#define CLOUDABI_CLOCK_REALTIME 3 +#define CLOUDABI_CLOCK_THREAD_CPUTIME_ID 4 typedef uint32_t cloudabi_condvar_t; #define CLOUDABI_CONDVAR_HAS_NO_WAITERS 0 @@ -76,110 +76,110 @@ typedef uint64_t cloudabi_dircookie_t; #define CLOUDABI_DIRCOOKIE_START 0 typedef uint16_t cloudabi_errno_t; -#define CLOUDABI_E2BIG 1 -#define CLOUDABI_EACCES 2 -#define CLOUDABI_EADDRINUSE 3 -#define CLOUDABI_EADDRNOTAVAIL 4 -#define CLOUDABI_EAFNOSUPPORT 5 -#define CLOUDABI_EAGAIN 6 -#define CLOUDABI_EALREADY 7 -#define CLOUDABI_EBADF 8 -#define CLOUDABI_EBADMSG 9 -#define CLOUDABI_EBUSY 10 -#define CLOUDABI_ECANCELED 11 -#define CLOUDABI_ECHILD 12 -#define CLOUDABI_ECONNABORTED 13 -#define CLOUDABI_ECONNREFUSED 14 -#define CLOUDABI_ECONNRESET 15 -#define CLOUDABI_EDEADLK 16 -#define CLOUDABI_EDESTADDRREQ 17 -#define CLOUDABI_EDOM 18 -#define CLOUDABI_EDQUOT 19 -#define CLOUDABI_EEXIST 20 -#define CLOUDABI_EFAULT 21 -#define CLOUDABI_EFBIG 22 -#define CLOUDABI_EHOSTUNREACH 23 -#define CLOUDABI_EIDRM 24 -#define CLOUDABI_EILSEQ 25 -#define CLOUDABI_EINPROGRESS 26 -#define CLOUDABI_EINTR 27 -#define CLOUDABI_EINVAL 28 -#define CLOUDABI_EIO 29 -#define CLOUDABI_EISCONN 30 -#define CLOUDABI_EISDIR 31 -#define CLOUDABI_ELOOP 32 -#define CLOUDABI_EMFILE 33 -#define CLOUDABI_EMLINK 34 -#define CLOUDABI_EMSGSIZE 35 -#define CLOUDABI_EMULTIHOP 36 -#define CLOUDABI_ENAMETOOLONG 37 -#define CLOUDABI_ENETDOWN 38 -#define CLOUDABI_ENETRESET 39 -#define CLOUDABI_ENETUNREACH 40 -#define CLOUDABI_ENFILE 41 -#define CLOUDABI_ENOBUFS 42 -#define CLOUDABI_ENODEV 43 -#define CLOUDABI_ENOENT 44 -#define CLOUDABI_ENOEXEC 45 -#define CLOUDABI_ENOLCK 46 -#define CLOUDABI_ENOLINK 47 -#define CLOUDABI_ENOMEM 48 -#define CLOUDABI_ENOMSG 49 -#define CLOUDABI_ENOPROTOOPT 50 -#define CLOUDABI_ENOSPC 51 -#define CLOUDABI_ENOSYS 52 -#define CLOUDABI_ENOTCONN 53 -#define CLOUDABI_ENOTDIR 54 -#define CLOUDABI_ENOTEMPTY 55 +#define CLOUDABI_E2BIG 1 +#define CLOUDABI_EACCES 2 +#define CLOUDABI_EADDRINUSE 3 +#define CLOUDABI_EADDRNOTAVAIL 4 +#define CLOUDABI_EAFNOSUPPORT 5 +#define CLOUDABI_EAGAIN 6 +#define CLOUDABI_EALREADY 7 +#define CLOUDABI_EBADF 8 +#define CLOUDABI_EBADMSG 9 +#define CLOUDABI_EBUSY 10 +#define CLOUDABI_ECANCELED 11 +#define CLOUDABI_ECHILD 12 +#define CLOUDABI_ECONNABORTED 13 +#define CLOUDABI_ECONNREFUSED 14 +#define CLOUDABI_ECONNRESET 15 +#define CLOUDABI_EDEADLK 16 +#define CLOUDABI_EDESTADDRREQ 17 +#define CLOUDABI_EDOM 18 +#define CLOUDABI_EDQUOT 19 +#define CLOUDABI_EEXIST 20 +#define CLOUDABI_EFAULT 21 +#define CLOUDABI_EFBIG 22 +#define CLOUDABI_EHOSTUNREACH 23 +#define CLOUDABI_EIDRM 24 +#define CLOUDABI_EILSEQ 25 +#define CLOUDABI_EINPROGRESS 26 +#define CLOUDABI_EINTR 27 +#define CLOUDABI_EINVAL 28 +#define CLOUDABI_EIO 29 +#define CLOUDABI_EISCONN 30 +#define CLOUDABI_EISDIR 31 +#define CLOUDABI_ELOOP 32 +#define CLOUDABI_EMFILE 33 +#define CLOUDABI_EMLINK 34 +#define CLOUDABI_EMSGSIZE 35 +#define CLOUDABI_EMULTIHOP 36 +#define CLOUDABI_ENAMETOOLONG 37 +#define CLOUDABI_ENETDOWN 38 +#define CLOUDABI_ENETRESET 39 +#define CLOUDABI_ENETUNREACH 40 +#define CLOUDABI_ENFILE 41 +#define CLOUDABI_ENOBUFS 42 +#define CLOUDABI_ENODEV 43 +#define CLOUDABI_ENOENT 44 +#define CLOUDABI_ENOEXEC 45 +#define CLOUDABI_ENOLCK 46 +#define CLOUDABI_ENOLINK 47 +#define CLOUDABI_ENOMEM 48 +#define CLOUDABI_ENOMSG 49 +#define CLOUDABI_ENOPROTOOPT 50 +#define CLOUDABI_ENOSPC 51 +#define CLOUDABI_ENOSYS 52 +#define CLOUDABI_ENOTCONN 53 +#define CLOUDABI_ENOTDIR 54 +#define CLOUDABI_ENOTEMPTY 55 #define CLOUDABI_ENOTRECOVERABLE 56 -#define CLOUDABI_ENOTSOCK 57 -#define CLOUDABI_ENOTSUP 58 -#define CLOUDABI_ENOTTY 59 -#define CLOUDABI_ENXIO 60 -#define CLOUDABI_EOVERFLOW 61 -#define CLOUDABI_EOWNERDEAD 62 -#define CLOUDABI_EPERM 63 -#define CLOUDABI_EPIPE 64 -#define CLOUDABI_EPROTO 65 +#define CLOUDABI_ENOTSOCK 57 +#define CLOUDABI_ENOTSUP 58 +#define CLOUDABI_ENOTTY 59 +#define CLOUDABI_ENXIO 60 +#define CLOUDABI_EOVERFLOW 61 +#define CLOUDABI_EOWNERDEAD 62 +#define CLOUDABI_EPERM 63 +#define CLOUDABI_EPIPE 64 +#define CLOUDABI_EPROTO 65 #define CLOUDABI_EPROTONOSUPPORT 66 -#define CLOUDABI_EPROTOTYPE 67 -#define CLOUDABI_ERANGE 68 -#define CLOUDABI_EROFS 69 -#define CLOUDABI_ESPIPE 70 -#define CLOUDABI_ESRCH 71 -#define CLOUDABI_ESTALE 72 -#define CLOUDABI_ETIMEDOUT 73 -#define CLOUDABI_ETXTBSY 74 -#define CLOUDABI_EXDEV 75 -#define CLOUDABI_ENOTCAPABLE 76 +#define CLOUDABI_EPROTOTYPE 67 +#define CLOUDABI_ERANGE 68 +#define CLOUDABI_EROFS 69 +#define CLOUDABI_ESPIPE 70 +#define CLOUDABI_ESRCH 71 +#define CLOUDABI_ESTALE 72 +#define CLOUDABI_ETIMEDOUT 73 +#define CLOUDABI_ETXTBSY 74 +#define CLOUDABI_EXDEV 75 +#define CLOUDABI_ENOTCAPABLE 76 typedef uint16_t cloudabi_eventrwflags_t; #define CLOUDABI_EVENT_FD_READWRITE_HANGUP 0x0001 typedef uint8_t cloudabi_eventtype_t; -#define CLOUDABI_EVENTTYPE_CLOCK 1 -#define CLOUDABI_EVENTTYPE_CONDVAR 2 -#define CLOUDABI_EVENTTYPE_FD_READ 3 -#define CLOUDABI_EVENTTYPE_FD_WRITE 4 -#define CLOUDABI_EVENTTYPE_LOCK_RDLOCK 5 -#define CLOUDABI_EVENTTYPE_LOCK_WRLOCK 6 +#define CLOUDABI_EVENTTYPE_CLOCK 1 +#define CLOUDABI_EVENTTYPE_CONDVAR 2 +#define CLOUDABI_EVENTTYPE_FD_READ 3 +#define CLOUDABI_EVENTTYPE_FD_WRITE 4 +#define CLOUDABI_EVENTTYPE_LOCK_RDLOCK 5 +#define CLOUDABI_EVENTTYPE_LOCK_WRLOCK 6 #define CLOUDABI_EVENTTYPE_PROC_TERMINATE 7 typedef uint32_t cloudabi_exitcode_t; typedef uint32_t cloudabi_fd_t; #define CLOUDABI_PROCESS_CHILD 0xffffffff -#define CLOUDABI_MAP_ANON_FD 0xffffffff +#define CLOUDABI_MAP_ANON_FD 0xffffffff typedef uint16_t cloudabi_fdflags_t; -#define CLOUDABI_FDFLAG_APPEND 0x0001 -#define CLOUDABI_FDFLAG_DSYNC 0x0002 +#define CLOUDABI_FDFLAG_APPEND 0x0001 +#define CLOUDABI_FDFLAG_DSYNC 0x0002 #define CLOUDABI_FDFLAG_NONBLOCK 0x0004 -#define CLOUDABI_FDFLAG_RSYNC 0x0008 -#define CLOUDABI_FDFLAG_SYNC 0x0010 +#define CLOUDABI_FDFLAG_RSYNC 0x0008 +#define CLOUDABI_FDFLAG_SYNC 0x0010 typedef uint16_t cloudabi_fdsflags_t; -#define CLOUDABI_FDSTAT_FLAGS 0x0001 +#define CLOUDABI_FDSTAT_FLAGS 0x0001 #define CLOUDABI_FDSTAT_RIGHTS 0x0002 typedef int64_t cloudabi_filedelta_t; @@ -187,155 +187,155 @@ typedef int64_t cloudabi_filedelta_t; typedef uint64_t cloudabi_filesize_t; typedef uint8_t cloudabi_filetype_t; -#define CLOUDABI_FILETYPE_UNKNOWN 0 -#define CLOUDABI_FILETYPE_BLOCK_DEVICE 16 -#define CLOUDABI_FILETYPE_CHARACTER_DEVICE 17 -#define CLOUDABI_FILETYPE_DIRECTORY 32 -#define CLOUDABI_FILETYPE_FIFO 48 -#define CLOUDABI_FILETYPE_POLL 64 -#define CLOUDABI_FILETYPE_PROCESS 80 -#define CLOUDABI_FILETYPE_REGULAR_FILE 96 -#define CLOUDABI_FILETYPE_SHARED_MEMORY 112 -#define CLOUDABI_FILETYPE_SOCKET_DGRAM 128 +#define CLOUDABI_FILETYPE_UNKNOWN 0 +#define CLOUDABI_FILETYPE_BLOCK_DEVICE 16 +#define CLOUDABI_FILETYPE_CHARACTER_DEVICE 17 +#define CLOUDABI_FILETYPE_DIRECTORY 32 +#define CLOUDABI_FILETYPE_FIFO 48 +#define CLOUDABI_FILETYPE_POLL 64 +#define CLOUDABI_FILETYPE_PROCESS 80 +#define CLOUDABI_FILETYPE_REGULAR_FILE 96 +#define CLOUDABI_FILETYPE_SHARED_MEMORY 112 +#define CLOUDABI_FILETYPE_SOCKET_DGRAM 128 #define CLOUDABI_FILETYPE_SOCKET_SEQPACKET 129 -#define CLOUDABI_FILETYPE_SOCKET_STREAM 130 -#define CLOUDABI_FILETYPE_SYMBOLIC_LINK 144 +#define CLOUDABI_FILETYPE_SOCKET_STREAM 130 +#define CLOUDABI_FILETYPE_SYMBOLIC_LINK 144 typedef uint16_t cloudabi_fsflags_t; -#define CLOUDABI_FILESTAT_ATIM 0x0001 +#define CLOUDABI_FILESTAT_ATIM 0x0001 #define CLOUDABI_FILESTAT_ATIM_NOW 0x0002 -#define CLOUDABI_FILESTAT_MTIM 0x0004 +#define CLOUDABI_FILESTAT_MTIM 0x0004 #define CLOUDABI_FILESTAT_MTIM_NOW 0x0008 -#define CLOUDABI_FILESTAT_SIZE 0x0010 +#define CLOUDABI_FILESTAT_SIZE 0x0010 typedef uint64_t cloudabi_inode_t; typedef uint32_t cloudabi_linkcount_t; typedef uint32_t cloudabi_lock_t; -#define CLOUDABI_LOCK_UNLOCKED 0x00000000 -#define CLOUDABI_LOCK_WRLOCKED 0x40000000 +#define CLOUDABI_LOCK_UNLOCKED 0x00000000 +#define CLOUDABI_LOCK_WRLOCKED 0x40000000 #define CLOUDABI_LOCK_KERNEL_MANAGED 0x80000000 -#define CLOUDABI_LOCK_BOGUS 0x80000000 +#define CLOUDABI_LOCK_BOGUS 0x80000000 typedef uint32_t cloudabi_lookupflags_t; #define CLOUDABI_LOOKUP_SYMLINK_FOLLOW 0x00000001 typedef uint8_t cloudabi_mflags_t; -#define CLOUDABI_MAP_ANON 0x01 -#define CLOUDABI_MAP_FIXED 0x02 +#define CLOUDABI_MAP_ANON 0x01 +#define CLOUDABI_MAP_FIXED 0x02 #define CLOUDABI_MAP_PRIVATE 0x04 -#define CLOUDABI_MAP_SHARED 0x08 +#define CLOUDABI_MAP_SHARED 0x08 typedef uint8_t cloudabi_mprot_t; -#define CLOUDABI_PROT_EXEC 0x01 +#define CLOUDABI_PROT_EXEC 0x01 #define CLOUDABI_PROT_WRITE 0x02 -#define CLOUDABI_PROT_READ 0x04 +#define CLOUDABI_PROT_READ 0x04 typedef uint8_t cloudabi_msflags_t; -#define CLOUDABI_MS_ASYNC 0x01 +#define CLOUDABI_MS_ASYNC 0x01 #define CLOUDABI_MS_INVALIDATE 0x02 -#define CLOUDABI_MS_SYNC 0x04 +#define CLOUDABI_MS_SYNC 0x04 typedef uint16_t cloudabi_msgflags_t; -#define CLOUDABI_MSG_CTRUNC 0x0001 -#define CLOUDABI_MSG_EOR 0x0002 -#define CLOUDABI_MSG_PEEK 0x0004 -#define CLOUDABI_MSG_TRUNC 0x0008 +#define CLOUDABI_MSG_CTRUNC 0x0001 +#define CLOUDABI_MSG_EOR 0x0002 +#define CLOUDABI_MSG_PEEK 0x0004 +#define CLOUDABI_MSG_TRUNC 0x0008 #define CLOUDABI_MSG_WAITALL 0x0010 typedef uint32_t cloudabi_nthreads_t; typedef uint16_t cloudabi_oflags_t; -#define CLOUDABI_O_CREAT 0x0001 +#define CLOUDABI_O_CREAT 0x0001 #define CLOUDABI_O_DIRECTORY 0x0002 -#define CLOUDABI_O_EXCL 0x0004 -#define CLOUDABI_O_TRUNC 0x0008 +#define CLOUDABI_O_EXCL 0x0004 +#define CLOUDABI_O_TRUNC 0x0008 typedef uint64_t cloudabi_rights_t; -#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001 -#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002 -#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004 -#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008 -#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010 -#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020 -#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040 -#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080 -#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100 -#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200 -#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400 -#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800 -#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000 -#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000 -#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000 -#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000 -#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000 -#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000 -#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000 -#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000 -#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000 -#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000 -#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000 -#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000 -#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000 -#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000 -#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000 -#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000 -#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000 -#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000 -#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000 -#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000 -#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000 -#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000 -#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY 0x0000000400000000 -#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET 0x0000000800000000 +#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001 +#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002 +#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004 +#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008 +#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010 +#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020 +#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040 +#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080 +#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100 +#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200 +#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400 +#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800 +#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000 +#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000 +#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000 +#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000 +#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000 +#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000 +#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000 +#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000 +#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000 +#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000 +#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000 +#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000 +#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000 +#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000 +#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000 +#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000 +#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000 +#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000 +#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000 +#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000 +#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000 +#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000 +#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY 0x0000000400000000 +#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET 0x0000000800000000 #define CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY 0x0000001000000000 -#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET 0x0000002000000000 -#define CLOUDABI_RIGHT_SOCK_LISTEN 0x0000004000000000 -#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000 -#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000 +#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET 0x0000002000000000 +#define CLOUDABI_RIGHT_SOCK_LISTEN 0x0000004000000000 +#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000 +#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000 typedef uint8_t cloudabi_sa_family_t; #define CLOUDABI_AF_UNSPEC 0 -#define CLOUDABI_AF_INET 1 -#define CLOUDABI_AF_INET6 2 -#define CLOUDABI_AF_UNIX 3 +#define CLOUDABI_AF_INET 1 +#define CLOUDABI_AF_INET6 2 +#define CLOUDABI_AF_UNIX 3 typedef uint8_t cloudabi_scope_t; #define CLOUDABI_SCOPE_PRIVATE 4 -#define CLOUDABI_SCOPE_SHARED 8 +#define CLOUDABI_SCOPE_SHARED 8 typedef uint8_t cloudabi_sdflags_t; #define CLOUDABI_SHUT_RD 0x01 #define CLOUDABI_SHUT_WR 0x02 typedef uint8_t cloudabi_signal_t; -#define CLOUDABI_SIGABRT 1 -#define CLOUDABI_SIGALRM 2 -#define CLOUDABI_SIGBUS 3 -#define CLOUDABI_SIGCHLD 4 -#define CLOUDABI_SIGCONT 5 -#define CLOUDABI_SIGFPE 6 -#define CLOUDABI_SIGHUP 7 -#define CLOUDABI_SIGILL 8 -#define CLOUDABI_SIGINT 9 -#define CLOUDABI_SIGKILL 10 -#define CLOUDABI_SIGPIPE 11 -#define CLOUDABI_SIGQUIT 12 -#define CLOUDABI_SIGSEGV 13 -#define CLOUDABI_SIGSTOP 14 -#define CLOUDABI_SIGSYS 15 -#define CLOUDABI_SIGTERM 16 -#define CLOUDABI_SIGTRAP 17 -#define CLOUDABI_SIGTSTP 18 -#define CLOUDABI_SIGTTIN 19 -#define CLOUDABI_SIGTTOU 20 -#define CLOUDABI_SIGURG 21 -#define CLOUDABI_SIGUSR1 22 -#define CLOUDABI_SIGUSR2 23 +#define CLOUDABI_SIGABRT 1 +#define CLOUDABI_SIGALRM 2 +#define CLOUDABI_SIGBUS 3 +#define CLOUDABI_SIGCHLD 4 +#define CLOUDABI_SIGCONT 5 +#define CLOUDABI_SIGFPE 6 +#define CLOUDABI_SIGHUP 7 +#define CLOUDABI_SIGILL 8 +#define CLOUDABI_SIGINT 9 +#define CLOUDABI_SIGKILL 10 +#define CLOUDABI_SIGPIPE 11 +#define CLOUDABI_SIGQUIT 12 +#define CLOUDABI_SIGSEGV 13 +#define CLOUDABI_SIGSTOP 14 +#define CLOUDABI_SIGSYS 15 +#define CLOUDABI_SIGTERM 16 +#define CLOUDABI_SIGTRAP 17 +#define CLOUDABI_SIGTSTP 18 +#define CLOUDABI_SIGTTIN 19 +#define CLOUDABI_SIGTTOU 20 +#define CLOUDABI_SIGURG 21 +#define CLOUDABI_SIGUSR1 22 +#define CLOUDABI_SIGUSR2 23 #define CLOUDABI_SIGVTALRM 24 -#define CLOUDABI_SIGXCPU 25 -#define CLOUDABI_SIGXFSZ 26 +#define CLOUDABI_SIGXCPU 25 +#define CLOUDABI_SIGXFSZ 26 typedef uint8_t cloudabi_ssflags_t; #define CLOUDABI_SOCKSTAT_CLEAR_ERROR 0x01 @@ -347,11 +347,11 @@ typedef uint16_t cloudabi_subclockflags_ #define CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME 0x0001 typedef uint16_t cloudabi_subflags_t; -#define CLOUDABI_SUBSCRIPTION_ADD 0x0001 -#define CLOUDABI_SUBSCRIPTION_CLEAR 0x0002 -#define CLOUDABI_SUBSCRIPTION_DELETE 0x0004 +#define CLOUDABI_SUBSCRIPTION_ADD 0x0001 +#define CLOUDABI_SUBSCRIPTION_CLEAR 0x0002 +#define CLOUDABI_SUBSCRIPTION_DELETE 0x0004 #define CLOUDABI_SUBSCRIPTION_DISABLE 0x0008 -#define CLOUDABI_SUBSCRIPTION_ENABLE 0x0010 +#define CLOUDABI_SUBSCRIPTION_ENABLE 0x0010 #define CLOUDABI_SUBSCRIPTION_ONESHOT 0x0020 typedef uint16_t cloudabi_subrwflags_t; @@ -390,13 +390,10 @@ typedef struct { _Alignas(8) cloudabi_rights_t fs_rights_base; _Alignas(8) cloudabi_rights_t fs_rights_inheriting; } cloudabi_fdstat_t; -_Static_assert(offsetof(cloudabi_fdstat_t, fs_filetype) == 0, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi_fdstat_t, fs_filetype) == 0, "Incorrect layout"); _Static_assert(offsetof(cloudabi_fdstat_t, fs_flags) == 2, "Incorrect layout"); -_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_base) == 8, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_inheriting) == 16, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_base) == 8, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_inheriting) == 16, "Incorrect layout"); _Static_assert(sizeof(cloudabi_fdstat_t) == 24, "Incorrect layout"); _Static_assert(_Alignof(cloudabi_fdstat_t) == 8, "Incorrect layout"); @@ -412,18 +409,12 @@ typedef struct { } cloudabi_filestat_t; _Static_assert(offsetof(cloudabi_filestat_t, st_dev) == 0, "Incorrect layout"); _Static_assert(offsetof(cloudabi_filestat_t, st_ino) == 8, "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_filetype) == 16, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_nlink) == 20, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_size) == 24, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_atim) == 32, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_mtim) == 40, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_filestat_t, st_ctim) == 48, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_filetype) == 16, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_nlink) == 20, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_size) == 24, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_atim) == 32, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_mtim) == 40, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_filestat_t, st_ctim) == 48, "Incorrect layout"); _Static_assert(sizeof(cloudabi_filestat_t) == 56, "Incorrect layout"); _Static_assert(_Alignof(cloudabi_filestat_t) == 8, "Incorrect layout"); @@ -449,16 +440,11 @@ typedef struct { } sa_inet6; }; } cloudabi_sockaddr_t; -_Static_assert(offsetof(cloudabi_sockaddr_t, sa_family) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.addr) == 2, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.port) == 6, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.addr) == 2, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.port) == 18, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockaddr_t, sa_family) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.addr) == 2, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.port) == 6, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.addr) == 2, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.port) == 18, "Incorrect layout"); _Static_assert(sizeof(cloudabi_sockaddr_t) == 20, "Incorrect layout"); _Static_assert(_Alignof(cloudabi_sockaddr_t) == 2, "Incorrect layout"); @@ -468,14 +454,10 @@ typedef struct { _Alignas(2) cloudabi_errno_t ss_error; _Alignas(4) cloudabi_sstate_t ss_state; } cloudabi_sockstat_t; -_Static_assert(offsetof(cloudabi_sockstat_t, ss_sockname) == 0, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockstat_t, ss_peername) == 20, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockstat_t, ss_error) == 40, - "Incorrect layout"); -_Static_assert(offsetof(cloudabi_sockstat_t, ss_state) == 44, - "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockstat_t, ss_sockname) == 0, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockstat_t, ss_peername) == 20, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockstat_t, ss_error) == 40, "Incorrect layout"); +_Static_assert(offsetof(cloudabi_sockstat_t, ss_state) == 44, "Incorrect layout"); _Static_assert(sizeof(cloudabi_sockstat_t) == 48, "Incorrect layout"); _Static_assert(_Alignof(cloudabi_sockstat_t) == 4, "Incorrect layout"); Modified: head/sys/contrib/cloudabi/syscalls32.master ============================================================================== --- head/sys/contrib/cloudabi/syscalls32.master Tue Jan 17 22:02:22 2017 (r312352) +++ head/sys/contrib/cloudabi/syscalls32.master Tue Jan 17 22:03:08 2017 (r312353) @@ -65,20 +65,20 @@ 8 AUE_NULL STD { size_t cloudabi32_sys_fd_pread( \ cloudabi_fd_t fd, \ - const cloudabi32_iovec_t *iov, \ - size_t iovcnt, \ + const cloudabi32_iovec_t *iovs, \ + size_t iovs_len, \ cloudabi_filesize_t offset); } 9 AUE_NULL STD { size_t cloudabi32_sys_fd_pwrite( \ cloudabi_fd_t fd, \ - const cloudabi32_ciovec_t *iov, \ - size_t iovcnt, \ + const cloudabi32_ciovec_t *iovs, \ + size_t iovs_len, \ cloudabi_filesize_t offset); } 10 AUE_NULL STD { size_t cloudabi32_sys_fd_read( \ cloudabi_fd_t fd, \ - const cloudabi32_iovec_t *iov, \ - size_t iovcnt); } + const cloudabi32_iovec_t *iovs, \ + size_t iovs_len); } 11 AUE_NULL STD { void cloudabi_sys_fd_replace( \ cloudabi_fd_t from, \ @@ -104,8 +104,8 @@ 16 AUE_NULL STD { size_t cloudabi32_sys_fd_write( \ cloudabi_fd_t fd, \ - const cloudabi32_ciovec_t *iov, \ - size_t iovcnt); } + const cloudabi32_ciovec_t *iovs, \ + size_t iovs_len); } 17 AUE_NULL STD { void cloudabi_sys_file_advise( \ cloudabi_fd_t fd, \ @@ -121,44 +121,44 @@ 19 AUE_NULL STD { void cloudabi_sys_file_create( \ cloudabi_fd_t fd, \ const char *path, \ - size_t pathlen, \ + size_t path_len, \ cloudabi_filetype_t type); } 20 AUE_NULL STD { void cloudabi_sys_file_link( \ cloudabi_lookup_t fd1, \ const char *path1, \ - size_t path1len, \ + size_t path1_len, \ cloudabi_fd_t fd2, \ const char *path2, \ - size_t path2len); } + size_t path2_len); } 21 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_file_open( \ cloudabi_lookup_t dirfd, \ const char *path, \ - size_t pathlen, \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jan 17 22:05:04 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 4995FCB462D; Tue, 17 Jan 2017 22:05:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E17C81012; Tue, 17 Jan 2017 22:05:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HM53Bx071453; Tue, 17 Jan 2017 22:05:03 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HM52XK071442; Tue, 17 Jan 2017 22:05:02 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201701172205.v0HM52XK071442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 17 Jan 2017 22:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312354 - in head/sys/compat: cloudabi32 cloudabi64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 22:05:04 -0000 Author: ed Date: Tue Jan 17 22:05:01 2017 New Revision: 312354 URL: https://svnweb.freebsd.org/changeset/base/312354 Log: Regenerate sources based on the system call tables. Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_syscall.h head/sys/compat/cloudabi32/cloudabi32_syscalls.c head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi32/cloudabi32_systrace_args.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/cloudabi64/cloudabi64_syscalls.c head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_proto.h Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi32/cloudabi32_proto.h Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI32_SYSPROTO_H_ @@ -63,20 +63,20 @@ struct cloudabi_sys_fd_dup_args { }; struct cloudabi32_sys_fd_pread_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iov; char iov_r_[PADR_(const cloudabi32_iovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iovs; char iovs_r_[PADR_(const cloudabi32_iovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi32_sys_fd_pwrite_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iov; char iov_r_[PADR_(const cloudabi32_ciovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iovs; char iovs_r_[PADR_(const cloudabi32_ciovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi32_sys_fd_read_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iov; char iov_r_[PADR_(const cloudabi32_iovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iovs; char iovs_r_[PADR_(const cloudabi32_iovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_fd_replace_args { char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)]; @@ -101,8 +101,8 @@ struct cloudabi_sys_fd_sync_args { }; struct cloudabi32_sys_fd_write_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iov; char iov_r_[PADR_(const cloudabi32_ciovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iovs; char iovs_r_[PADR_(const cloudabi32_ciovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_advise_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; @@ -118,44 +118,44 @@ struct cloudabi_sys_file_allocate_args { struct cloudabi_sys_file_create_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)]; }; struct cloudabi_sys_file_link_args { char fd1_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd1; char fd1_r_[PADR_(cloudabi_lookup_t)]; char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; - char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)]; char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; - char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_open_args { char dirfd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t dirfd; char dirfd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char oflags_l_[PADL_(cloudabi_oflags_t)]; cloudabi_oflags_t oflags; char oflags_r_[PADR_(cloudabi_oflags_t)]; char fds_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * fds; char fds_r_[PADR_(const cloudabi_fdstat_t *)]; }; struct cloudabi_sys_file_readdir_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; char cookie_l_[PADL_(cloudabi_dircookie_t)]; cloudabi_dircookie_t cookie; char cookie_r_[PADR_(cloudabi_dircookie_t)]; }; struct cloudabi_sys_file_readlink_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; - char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_rename_args { - char oldfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t oldfd; char oldfd_r_[PADR_(cloudabi_fd_t)]; - char old_l_[PADL_(const char *)]; const char * old; char old_r_[PADR_(const char *)]; - char oldlen_l_[PADL_(size_t)]; size_t oldlen; char oldlen_r_[PADR_(size_t)]; - char newfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t newfd; char newfd_r_[PADR_(cloudabi_fd_t)]; - char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)]; - char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; + char fd1_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd1; char fd1_r_[PADR_(cloudabi_fd_t)]; + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; + char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_stat_fget_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; @@ -169,27 +169,27 @@ struct cloudabi_sys_file_stat_fput_args struct cloudabi_sys_file_stat_get_args { char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)]; }; struct cloudabi_sys_file_stat_put_args { char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)]; char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)]; }; struct cloudabi_sys_file_symlink_args { char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; - char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; - char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_unlink_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char flags_l_[PADL_(cloudabi_ulflags_t)]; cloudabi_ulflags_t flags; char flags_r_[PADR_(cloudabi_ulflags_t)]; }; struct cloudabi_sys_lock_unlock_args { @@ -197,13 +197,13 @@ struct cloudabi_sys_lock_unlock_args { char scope_l_[PADL_(cloudabi_scope_t)]; cloudabi_scope_t scope; char scope_r_[PADR_(cloudabi_scope_t)]; }; struct cloudabi_sys_mem_advise_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)]; }; struct cloudabi_sys_mem_lock_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_mem_map_args { char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; @@ -214,22 +214,22 @@ struct cloudabi_sys_mem_map_args { char off_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t off; char off_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi_sys_mem_protect_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)]; }; struct cloudabi_sys_mem_sync_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char flags_l_[PADL_(cloudabi_msflags_t)]; cloudabi_msflags_t flags; char flags_r_[PADR_(cloudabi_msflags_t)]; }; struct cloudabi_sys_mem_unlock_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_mem_unmap_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi32_sys_poll_args { char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)]; @@ -239,17 +239,17 @@ struct cloudabi32_sys_poll_args { struct cloudabi32_sys_poll_fd_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)]; - char nin_l_[PADL_(size_t)]; size_t nin; char nin_r_[PADR_(size_t)]; + char in_len_l_[PADL_(size_t)]; size_t in_len; char in_len_r_[PADR_(size_t)]; char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)]; - char nout_l_[PADL_(size_t)]; size_t nout; char nout_r_[PADR_(size_t)]; + char out_len_l_[PADL_(size_t)]; size_t out_len; char out_len_r_[PADR_(size_t)]; char timeout_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * timeout; char timeout_r_[PADR_(const cloudabi32_subscription_t *)]; }; struct cloudabi_sys_proc_exec_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; - char datalen_l_[PADL_(size_t)]; size_t datalen; char datalen_r_[PADR_(size_t)]; + char data_len_l_[PADL_(size_t)]; size_t data_len; char data_len_r_[PADR_(size_t)]; char fds_l_[PADL_(const cloudabi_fd_t *)]; const cloudabi_fd_t * fds; char fds_r_[PADR_(const cloudabi_fd_t *)]; - char fdslen_l_[PADL_(size_t)]; size_t fdslen; char fdslen_r_[PADR_(size_t)]; + char fds_len_l_[PADL_(size_t)]; size_t fds_len; char fds_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_proc_exit_args { char rval_l_[PADL_(cloudabi_exitcode_t)]; cloudabi_exitcode_t rval; char rval_r_[PADR_(cloudabi_exitcode_t)]; @@ -262,7 +262,7 @@ struct cloudabi_sys_proc_raise_args { }; struct cloudabi_sys_random_get_args { char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_accept_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; @@ -272,13 +272,13 @@ struct cloudabi_sys_sock_bind_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_connect_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_listen_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscall.h Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi32/cloudabi32_syscall.h Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI32_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscalls.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi32_syscallnames[] = { Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sysent.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi32/cloudabi32_sysent.c Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/cloudabi32/cloudabi32_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Tue Jan 17 22:05:01 2017 (r312354) @@ -74,8 +74,8 @@ systrace_args(int sysnum, void *params, case 8: { struct cloudabi32_sys_fd_pread_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi32_iovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi32_iovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ iarg[3] = p->offset; /* cloudabi_filesize_t */ *n_args = 4; break; @@ -84,8 +84,8 @@ systrace_args(int sysnum, void *params, case 9: { struct cloudabi32_sys_fd_pwrite_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi32_ciovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi32_ciovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ iarg[3] = p->offset; /* cloudabi_filesize_t */ *n_args = 4; break; @@ -94,8 +94,8 @@ systrace_args(int sysnum, void *params, case 10: { struct cloudabi32_sys_fd_read_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi32_iovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi32_iovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ *n_args = 3; break; } @@ -144,8 +144,8 @@ systrace_args(int sysnum, void *params, case 16: { struct cloudabi32_sys_fd_write_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi32_ciovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi32_ciovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ *n_args = 3; break; } @@ -173,7 +173,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_create_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->type; /* cloudabi_filetype_t */ *n_args = 4; break; @@ -183,10 +183,10 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_link_args *p = params; iarg[0] = p->fd1; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path1; /* const char * */ - uarg[2] = p->path1len; /* size_t */ + uarg[2] = p->path1_len; /* size_t */ iarg[3] = p->fd2; /* cloudabi_fd_t */ uarg[4] = (intptr_t) p->path2; /* const char * */ - uarg[5] = p->path2len; /* size_t */ + uarg[5] = p->path2_len; /* size_t */ *n_args = 6; break; } @@ -195,7 +195,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_open_args *p = params; iarg[0] = p->dirfd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->oflags; /* cloudabi_oflags_t */ uarg[4] = (intptr_t) p->fds; /* const cloudabi_fdstat_t * */ *n_args = 5; @@ -206,7 +206,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_readdir_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->buf; /* void * */ - uarg[2] = p->nbyte; /* size_t */ + uarg[2] = p->buf_len; /* size_t */ iarg[3] = p->cookie; /* cloudabi_dircookie_t */ *n_args = 4; break; @@ -216,21 +216,21 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_readlink_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* char * */ - uarg[4] = p->bufsize; /* size_t */ + uarg[4] = p->buf_len; /* size_t */ *n_args = 5; break; } /* cloudabi_sys_file_rename */ case 24: { struct cloudabi_sys_file_rename_args *p = params; - iarg[0] = p->oldfd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->old; /* const char * */ - uarg[2] = p->oldlen; /* size_t */ - iarg[3] = p->newfd; /* cloudabi_fd_t */ - uarg[4] = (intptr_t) p->new; /* const char * */ - uarg[5] = p->newlen; /* size_t */ + iarg[0] = p->fd1; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->path1; /* const char * */ + uarg[2] = p->path1_len; /* size_t */ + iarg[3] = p->fd2; /* cloudabi_fd_t */ + uarg[4] = (intptr_t) p->path2; /* const char * */ + uarg[5] = p->path2_len; /* size_t */ *n_args = 6; break; } @@ -256,7 +256,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_stat_get_args *p = params; iarg[0] = p->fd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* cloudabi_filestat_t * */ *n_args = 4; break; @@ -266,7 +266,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_stat_put_args *p = params; iarg[0] = p->fd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */ iarg[4] = p->flags; /* cloudabi_fsflags_t */ *n_args = 5; @@ -276,10 +276,10 @@ systrace_args(int sysnum, void *params, case 29: { struct cloudabi_sys_file_symlink_args *p = params; uarg[0] = (intptr_t) p->path1; /* const char * */ - uarg[1] = p->path1len; /* size_t */ + uarg[1] = p->path1_len; /* size_t */ iarg[2] = p->fd; /* cloudabi_fd_t */ uarg[3] = (intptr_t) p->path2; /* const char * */ - uarg[4] = p->path2len; /* size_t */ + uarg[4] = p->path2_len; /* size_t */ *n_args = 5; break; } @@ -288,7 +288,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_unlink_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->flags; /* cloudabi_ulflags_t */ *n_args = 4; break; @@ -304,8 +304,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_advise */ case 32: { struct cloudabi_sys_mem_advise_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ iarg[2] = p->advice; /* cloudabi_advice_t */ *n_args = 3; break; @@ -313,8 +313,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_lock */ case 33: { struct cloudabi_sys_mem_lock_args *p = params; - uarg[0] = (intptr_t) p->addr; /* const void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* const void * */ + uarg[1] = p->mapping_len; /* size_t */ *n_args = 2; break; } @@ -333,8 +333,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_protect */ case 35: { struct cloudabi_sys_mem_protect_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ iarg[2] = p->prot; /* cloudabi_mprot_t */ *n_args = 3; break; @@ -342,8 +342,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_sync */ case 36: { struct cloudabi_sys_mem_sync_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ iarg[2] = p->flags; /* cloudabi_msflags_t */ *n_args = 3; break; @@ -351,16 +351,16 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_unlock */ case 37: { struct cloudabi_sys_mem_unlock_args *p = params; - uarg[0] = (intptr_t) p->addr; /* const void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* const void * */ + uarg[1] = p->mapping_len; /* size_t */ *n_args = 2; break; } /* cloudabi_sys_mem_unmap */ case 38: { struct cloudabi_sys_mem_unmap_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ *n_args = 2; break; } @@ -378,9 +378,9 @@ systrace_args(int sysnum, void *params, struct cloudabi32_sys_poll_fd_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi32_subscription_t * */ - uarg[2] = p->nin; /* size_t */ + uarg[2] = p->in_len; /* size_t */ uarg[3] = (intptr_t) p->out; /* cloudabi32_event_t * */ - uarg[4] = p->nout; /* size_t */ + uarg[4] = p->out_len; /* size_t */ uarg[5] = (intptr_t) p->timeout; /* const cloudabi32_subscription_t * */ *n_args = 6; break; @@ -390,9 +390,9 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_proc_exec_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->data; /* const void * */ - uarg[2] = p->datalen; /* size_t */ + uarg[2] = p->data_len; /* size_t */ uarg[3] = (intptr_t) p->fds; /* const cloudabi_fd_t * */ - uarg[4] = p->fdslen; /* size_t */ + uarg[4] = p->fds_len; /* size_t */ *n_args = 5; break; } @@ -419,7 +419,7 @@ systrace_args(int sysnum, void *params, case 45: { struct cloudabi_sys_random_get_args *p = params; uarg[0] = (intptr_t) p->buf; /* void * */ - uarg[1] = p->nbyte; /* size_t */ + uarg[1] = p->buf_len; /* size_t */ *n_args = 2; break; } @@ -437,7 +437,7 @@ systrace_args(int sysnum, void *params, iarg[0] = p->sock; /* cloudabi_fd_t */ iarg[1] = p->fd; /* cloudabi_fd_t */ uarg[2] = (intptr_t) p->path; /* const char * */ - uarg[3] = p->pathlen; /* size_t */ + uarg[3] = p->path_len; /* size_t */ *n_args = 4; break; } @@ -447,7 +447,7 @@ systrace_args(int sysnum, void *params, iarg[0] = p->sock; /* cloudabi_fd_t */ iarg[1] = p->fd; /* cloudabi_fd_t */ uarg[2] = (intptr_t) p->path; /* const char * */ - uarg[3] = p->pathlen; /* size_t */ + uarg[3] = p->path_len; /* size_t */ *n_args = 4; break; } Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_proto.h Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 304483 2016-08-19 17:53:37Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI64_SYSPROTO_H_ @@ -63,20 +63,20 @@ struct cloudabi_sys_fd_dup_args { }; struct cloudabi64_sys_fd_pread_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iov; char iov_r_[PADR_(const cloudabi64_iovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iovs; char iovs_r_[PADR_(const cloudabi64_iovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi64_sys_fd_pwrite_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iov; char iov_r_[PADR_(const cloudabi64_ciovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iovs; char iovs_r_[PADR_(const cloudabi64_ciovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi64_sys_fd_read_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iov; char iov_r_[PADR_(const cloudabi64_iovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iovs; char iovs_r_[PADR_(const cloudabi64_iovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_fd_replace_args { char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)]; @@ -101,8 +101,8 @@ struct cloudabi_sys_fd_sync_args { }; struct cloudabi64_sys_fd_write_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char iov_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iov; char iov_r_[PADR_(const cloudabi64_ciovec_t *)]; - char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)]; + char iovs_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iovs; char iovs_r_[PADR_(const cloudabi64_ciovec_t *)]; + char iovs_len_l_[PADL_(size_t)]; size_t iovs_len; char iovs_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_advise_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; @@ -118,44 +118,44 @@ struct cloudabi_sys_file_allocate_args { struct cloudabi_sys_file_create_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)]; }; struct cloudabi_sys_file_link_args { char fd1_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd1; char fd1_r_[PADR_(cloudabi_lookup_t)]; char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; - char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)]; char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; - char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_open_args { char dirfd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t dirfd; char dirfd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char oflags_l_[PADL_(cloudabi_oflags_t)]; cloudabi_oflags_t oflags; char oflags_r_[PADR_(cloudabi_oflags_t)]; char fds_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * fds; char fds_r_[PADR_(const cloudabi_fdstat_t *)]; }; struct cloudabi_sys_file_readdir_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; char cookie_l_[PADL_(cloudabi_dircookie_t)]; cloudabi_dircookie_t cookie; char cookie_r_[PADR_(cloudabi_dircookie_t)]; }; struct cloudabi_sys_file_readlink_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; - char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_rename_args { - char oldfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t oldfd; char oldfd_r_[PADR_(cloudabi_fd_t)]; - char old_l_[PADL_(const char *)]; const char * old; char old_r_[PADR_(const char *)]; - char oldlen_l_[PADL_(size_t)]; size_t oldlen; char oldlen_r_[PADR_(size_t)]; - char newfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t newfd; char newfd_r_[PADR_(cloudabi_fd_t)]; - char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)]; - char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; + char fd1_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd1; char fd1_r_[PADR_(cloudabi_fd_t)]; + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; + char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_stat_fget_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; @@ -169,27 +169,27 @@ struct cloudabi_sys_file_stat_fput_args struct cloudabi_sys_file_stat_get_args { char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)]; }; struct cloudabi_sys_file_stat_put_args { char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)]; char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)]; }; struct cloudabi_sys_file_symlink_args { char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; - char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char path1_len_l_[PADL_(size_t)]; size_t path1_len; char path1_len_r_[PADR_(size_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; - char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; + char path2_len_l_[PADL_(size_t)]; size_t path2_len; char path2_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_file_unlink_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; char flags_l_[PADL_(cloudabi_ulflags_t)]; cloudabi_ulflags_t flags; char flags_r_[PADR_(cloudabi_ulflags_t)]; }; struct cloudabi_sys_lock_unlock_args { @@ -197,13 +197,13 @@ struct cloudabi_sys_lock_unlock_args { char scope_l_[PADL_(cloudabi_scope_t)]; cloudabi_scope_t scope; char scope_r_[PADR_(cloudabi_scope_t)]; }; struct cloudabi_sys_mem_advise_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)]; }; struct cloudabi_sys_mem_lock_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_mem_map_args { char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; @@ -214,22 +214,22 @@ struct cloudabi_sys_mem_map_args { char off_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t off; char off_r_[PADR_(cloudabi_filesize_t)]; }; struct cloudabi_sys_mem_protect_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)]; }; struct cloudabi_sys_mem_sync_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; char flags_l_[PADL_(cloudabi_msflags_t)]; cloudabi_msflags_t flags; char flags_r_[PADR_(cloudabi_msflags_t)]; }; struct cloudabi_sys_mem_unlock_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_mem_unmap_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)]; + char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)]; }; struct cloudabi64_sys_poll_args { char in_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * in; char in_r_[PADR_(const cloudabi64_subscription_t *)]; @@ -239,17 +239,17 @@ struct cloudabi64_sys_poll_args { struct cloudabi64_sys_poll_fd_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char in_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * in; char in_r_[PADR_(const cloudabi64_subscription_t *)]; - char nin_l_[PADL_(size_t)]; size_t nin; char nin_r_[PADR_(size_t)]; + char in_len_l_[PADL_(size_t)]; size_t in_len; char in_len_r_[PADR_(size_t)]; char out_l_[PADL_(cloudabi64_event_t *)]; cloudabi64_event_t * out; char out_r_[PADR_(cloudabi64_event_t *)]; - char nout_l_[PADL_(size_t)]; size_t nout; char nout_r_[PADR_(size_t)]; + char out_len_l_[PADL_(size_t)]; size_t out_len; char out_len_r_[PADR_(size_t)]; char timeout_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * timeout; char timeout_r_[PADR_(const cloudabi64_subscription_t *)]; }; struct cloudabi_sys_proc_exec_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; - char datalen_l_[PADL_(size_t)]; size_t datalen; char datalen_r_[PADR_(size_t)]; + char data_len_l_[PADL_(size_t)]; size_t data_len; char data_len_r_[PADR_(size_t)]; char fds_l_[PADL_(const cloudabi_fd_t *)]; const cloudabi_fd_t * fds; char fds_r_[PADR_(const cloudabi_fd_t *)]; - char fdslen_l_[PADL_(size_t)]; size_t fdslen; char fdslen_r_[PADR_(size_t)]; + char fds_len_l_[PADL_(size_t)]; size_t fds_len; char fds_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_proc_exit_args { char rval_l_[PADL_(cloudabi_exitcode_t)]; cloudabi_exitcode_t rval; char rval_r_[PADR_(cloudabi_exitcode_t)]; @@ -262,7 +262,7 @@ struct cloudabi_sys_proc_raise_args { }; struct cloudabi_sys_random_get_args { char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char buf_len_l_[PADL_(size_t)]; size_t buf_len; char buf_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_accept_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; @@ -272,13 +272,13 @@ struct cloudabi_sys_sock_bind_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_connect_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)]; }; struct cloudabi_sys_sock_listen_args { char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)]; Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscall.h Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 304483 2016-08-19 17:53:37Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI64_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscalls.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 304483 2016-08-19 17:53:37Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi64_syscallnames[] = { Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sysent.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Tue Jan 17 22:05:01 2017 (r312354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 304483 2016-08-19 17:53:37Z ed + * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/cloudabi64/cloudabi64_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Tue Jan 17 22:03:08 2017 (r312353) +++ head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Tue Jan 17 22:05:01 2017 (r312354) @@ -74,8 +74,8 @@ systrace_args(int sysnum, void *params, case 8: { struct cloudabi64_sys_fd_pread_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi64_iovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi64_iovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ iarg[3] = p->offset; /* cloudabi_filesize_t */ *n_args = 4; break; @@ -84,8 +84,8 @@ systrace_args(int sysnum, void *params, case 9: { struct cloudabi64_sys_fd_pwrite_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi64_ciovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi64_ciovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ iarg[3] = p->offset; /* cloudabi_filesize_t */ *n_args = 4; break; @@ -94,8 +94,8 @@ systrace_args(int sysnum, void *params, case 10: { struct cloudabi64_sys_fd_read_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi64_iovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi64_iovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ *n_args = 3; break; } @@ -144,8 +144,8 @@ systrace_args(int sysnum, void *params, case 16: { struct cloudabi64_sys_fd_write_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->iov; /* const cloudabi64_ciovec_t * */ - uarg[2] = p->iovcnt; /* size_t */ + uarg[1] = (intptr_t) p->iovs; /* const cloudabi64_ciovec_t * */ + uarg[2] = p->iovs_len; /* size_t */ *n_args = 3; break; } @@ -173,7 +173,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_create_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->type; /* cloudabi_filetype_t */ *n_args = 4; break; @@ -183,10 +183,10 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_link_args *p = params; iarg[0] = p->fd1; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path1; /* const char * */ - uarg[2] = p->path1len; /* size_t */ + uarg[2] = p->path1_len; /* size_t */ iarg[3] = p->fd2; /* cloudabi_fd_t */ uarg[4] = (intptr_t) p->path2; /* const char * */ - uarg[5] = p->path2len; /* size_t */ + uarg[5] = p->path2_len; /* size_t */ *n_args = 6; break; } @@ -195,7 +195,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_open_args *p = params; iarg[0] = p->dirfd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->oflags; /* cloudabi_oflags_t */ uarg[4] = (intptr_t) p->fds; /* const cloudabi_fdstat_t * */ *n_args = 5; @@ -206,7 +206,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_readdir_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->buf; /* void * */ - uarg[2] = p->nbyte; /* size_t */ + uarg[2] = p->buf_len; /* size_t */ iarg[3] = p->cookie; /* cloudabi_dircookie_t */ *n_args = 4; break; @@ -216,21 +216,21 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_readlink_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* char * */ - uarg[4] = p->bufsize; /* size_t */ + uarg[4] = p->buf_len; /* size_t */ *n_args = 5; break; } /* cloudabi_sys_file_rename */ case 24: { struct cloudabi_sys_file_rename_args *p = params; - iarg[0] = p->oldfd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->old; /* const char * */ - uarg[2] = p->oldlen; /* size_t */ - iarg[3] = p->newfd; /* cloudabi_fd_t */ - uarg[4] = (intptr_t) p->new; /* const char * */ - uarg[5] = p->newlen; /* size_t */ + iarg[0] = p->fd1; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->path1; /* const char * */ + uarg[2] = p->path1_len; /* size_t */ + iarg[3] = p->fd2; /* cloudabi_fd_t */ + uarg[4] = (intptr_t) p->path2; /* const char * */ + uarg[5] = p->path2_len; /* size_t */ *n_args = 6; break; } @@ -256,7 +256,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_stat_get_args *p = params; iarg[0] = p->fd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* cloudabi_filestat_t * */ *n_args = 4; break; @@ -266,7 +266,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_stat_put_args *p = params; iarg[0] = p->fd; /* cloudabi_lookup_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ uarg[3] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */ iarg[4] = p->flags; /* cloudabi_fsflags_t */ *n_args = 5; @@ -276,10 +276,10 @@ systrace_args(int sysnum, void *params, case 29: { struct cloudabi_sys_file_symlink_args *p = params; uarg[0] = (intptr_t) p->path1; /* const char * */ - uarg[1] = p->path1len; /* size_t */ + uarg[1] = p->path1_len; /* size_t */ iarg[2] = p->fd; /* cloudabi_fd_t */ uarg[3] = (intptr_t) p->path2; /* const char * */ - uarg[4] = p->path2len; /* size_t */ + uarg[4] = p->path2_len; /* size_t */ *n_args = 5; break; } @@ -288,7 +288,7 @@ systrace_args(int sysnum, void *params, struct cloudabi_sys_file_unlink_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->path; /* const char * */ - uarg[2] = p->pathlen; /* size_t */ + uarg[2] = p->path_len; /* size_t */ iarg[3] = p->flags; /* cloudabi_ulflags_t */ *n_args = 4; break; @@ -304,8 +304,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_advise */ case 32: { struct cloudabi_sys_mem_advise_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ iarg[2] = p->advice; /* cloudabi_advice_t */ *n_args = 3; break; @@ -313,8 +313,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_lock */ case 33: { struct cloudabi_sys_mem_lock_args *p = params; - uarg[0] = (intptr_t) p->addr; /* const void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* const void * */ + uarg[1] = p->mapping_len; /* size_t */ *n_args = 2; break; } @@ -333,8 +333,8 @@ systrace_args(int sysnum, void *params, /* cloudabi_sys_mem_protect */ case 35: { struct cloudabi_sys_mem_protect_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ + uarg[0] = (intptr_t) p->mapping; /* void * */ + uarg[1] = p->mapping_len; /* size_t */ iarg[2] = p->prot; /* cloudabi_mprot_t */ *n_args = 3; break; @@ -342,8 +342,8 @@ systrace_args(int sysnum, void *params, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jan 17 22:05:55 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 2B741CB46D8; Tue, 17 Jan 2017 22:05:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDA2511FE; Tue, 17 Jan 2017 22:05:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HM5sVA071534; Tue, 17 Jan 2017 22:05:54 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HM5qA8071516; Tue, 17 Jan 2017 22:05:52 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201701172205.v0HM5qA8071516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 17 Jan 2017 22:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312355 - in head/sys: amd64/cloudabi32 amd64/cloudabi64 arm/cloudabi32 arm64/cloudabi64 compat/cloudabi compat/cloudabi32 compat/cloudabi64 i386/cloudabi32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 22:05:55 -0000 Author: ed Date: Tue Jan 17 22:05:52 2017 New Revision: 312355 URL: https://svnweb.freebsd.org/changeset/base/312355 Log: Catch up with changes to structure member names. Pointer/length pairs are now always named ${name} and ${name}_len. Modified: head/sys/amd64/cloudabi32/cloudabi32_sysvec.c head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/arm/cloudabi32/cloudabi32_sysvec.c head/sys/arm64/cloudabi64/cloudabi64_sysvec.c head/sys/compat/cloudabi/cloudabi_file.c head/sys/compat/cloudabi/cloudabi_mem.c head/sys/compat/cloudabi/cloudabi_proc.c head/sys/compat/cloudabi/cloudabi_random.c head/sys/compat/cloudabi/cloudabi_sock.c head/sys/compat/cloudabi32/cloudabi32_fd.c head/sys/compat/cloudabi32/cloudabi32_poll.c head/sys/compat/cloudabi32/cloudabi32_sock.c head/sys/compat/cloudabi32/cloudabi32_thread.c head/sys/compat/cloudabi64/cloudabi64_fd.c head/sys/compat/cloudabi64/cloudabi64_poll.c head/sys/compat/cloudabi64/cloudabi64_sock.c head/sys/compat/cloudabi64/cloudabi64_thread.c head/sys/i386/cloudabi32/cloudabi32_sysvec.c Modified: head/sys/amd64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/amd64/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:52 2017 (r312355) @@ -181,7 +181,7 @@ cloudabi32_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = TO_PTR(attr->stack); - stack.ss_size = attr->stack_size - sizeof(args); + stack.ss_size = attr->stack_len - sizeof(args); cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jan 17 22:05:52 2017 (r312355) @@ -164,7 +164,7 @@ cloudabi64_thread_setregs(struct thread * from the top of the stack to store a single element array, * containing a pointer to the TCB. %fs base will point to this. */ - tcbptr = rounddown(attr->stack + attr->stack_size - sizeof(tcbptr), + tcbptr = rounddown(attr->stack + attr->stack_len - sizeof(tcbptr), _Alignof(tcbptr)); error = copyout(&tcb, (void *)tcbptr, sizeof(tcb)); if (error != 0) Modified: head/sys/arm/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/arm/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/arm/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:52 2017 (r312355) @@ -148,7 +148,7 @@ cloudabi32_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = TO_PTR(attr->stack); - stack.ss_size = attr->stack_size; + stack.ss_size = attr->stack_len; cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* Modified: head/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jan 17 22:05:52 2017 (r312355) @@ -140,7 +140,7 @@ cloudabi64_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = TO_PTR(attr->stack); - stack.ss_size = attr->stack_size; + stack.ss_size = attr->stack_len; cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* Modified: head/sys/compat/cloudabi/cloudabi_file.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_file.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi/cloudabi_file.c Tue Jan 17 22:05:52 2017 (r312355) @@ -146,7 +146,7 @@ cloudabi_sys_file_create(struct thread * char *path; int error; - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error); @@ -177,10 +177,10 @@ cloudabi_sys_file_link(struct thread *td char *path1, *path2; int error; - error = copyin_path(uap->path1, uap->path1len, &path1); + error = copyin_path(uap->path1, uap->path1_len, &path1); if (error != 0) return (error); - error = copyin_path(uap->path2, uap->path2len, &path2); + error = copyin_path(uap->path2, uap->path2_len, &path2); if (error != 0) { cloudabi_freestr(path1); return (error); @@ -261,7 +261,7 @@ cloudabi_sys_file_open(struct thread *td fp->f_flag = fflags & FMASK; /* Open path. */ - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) { fdrop(fp, td); return (error); @@ -380,7 +380,7 @@ cloudabi_sys_file_readdir(struct thread { struct iovec iov = { .iov_base = uap->buf, - .iov_len = uap->nbyte + .iov_len = uap->buf_len }; struct uio uio = { .uio_iov = &iov, @@ -494,7 +494,7 @@ done: return (error); /* Return number of bytes copied to userspace. */ - td->td_retval[0] = uap->nbyte - uio.uio_resid; + td->td_retval[0] = uap->buf_len - uio.uio_resid; return (0); } @@ -505,12 +505,12 @@ cloudabi_sys_file_readlink(struct thread char *path; int error; - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error); error = kern_readlinkat(td, uap->fd, path, UIO_SYSSPACE, - uap->buf, UIO_USERSPACE, uap->bufsize); + uap->buf, UIO_USERSPACE, uap->buf_len); cloudabi_freestr(path); return (error); } @@ -522,16 +522,16 @@ cloudabi_sys_file_rename(struct thread * char *old, *new; int error; - error = copyin_path(uap->old, uap->oldlen, &old); + error = copyin_path(uap->path1, uap->path1_len, &old); if (error != 0) return (error); - error = copyin_path(uap->new, uap->newlen, &new); + error = copyin_path(uap->path2, uap->path2_len, &new); if (error != 0) { cloudabi_freestr(old); return (error); } - error = kern_renameat(td, uap->oldfd, old, uap->newfd, new, + error = kern_renameat(td, uap->fd1, old, uap->fd2, new, UIO_SYSSPACE); cloudabi_freestr(old); cloudabi_freestr(new); @@ -653,7 +653,7 @@ cloudabi_sys_file_stat_get(struct thread char *path; int error; - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error); @@ -707,7 +707,7 @@ cloudabi_sys_file_stat_put(struct thread error = copyin(uap->buf, &fs, sizeof(fs)); if (error != 0) return (error); - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error); @@ -726,10 +726,10 @@ cloudabi_sys_file_symlink(struct thread char *path1, *path2; int error; - error = copyin_path(uap->path1, uap->path1len, &path1); + error = copyin_path(uap->path1, uap->path1_len, &path1); if (error != 0) return (error); - error = copyin_path(uap->path2, uap->path2len, &path2); + error = copyin_path(uap->path2, uap->path2_len, &path2); if (error != 0) { cloudabi_freestr(path1); return (error); @@ -748,7 +748,7 @@ cloudabi_sys_file_unlink(struct thread * char *path; int error; - error = copyin_path(uap->path, uap->pathlen, &path); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error); Modified: head/sys/compat/cloudabi/cloudabi_mem.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_mem.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi/cloudabi_mem.c Tue Jan 17 22:05:52 2017 (r312355) @@ -63,8 +63,8 @@ cloudabi_sys_mem_advise(struct thread *t struct cloudabi_sys_mem_advise_args *uap) { struct madvise_args madvise_args = { - .addr = uap->addr, - .len = uap->len + .addr = uap->mapping, + .len = uap->mapping_len }; switch (uap->advice) { @@ -94,8 +94,8 @@ int cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap) { struct mlock_args mlock_args = { - .addr = uap->addr, - .len = uap->len + .addr = uap->mapping, + .len = uap->mapping_len }; return (sys_mlock(td, &mlock_args)); @@ -135,8 +135,8 @@ cloudabi_sys_mem_protect(struct thread * struct cloudabi_sys_mem_protect_args *uap) { struct mprotect_args mprotect_args = { - .addr = uap->addr, - .len = uap->len, + .addr = uap->mapping, + .len = uap->mapping_len, }; int error; @@ -152,8 +152,8 @@ int cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap) { struct msync_args msync_args = { - .addr = uap->addr, - .len = uap->len, + .addr = uap->mapping, + .len = uap->mapping_len, }; /* Convert flags. */ @@ -178,8 +178,8 @@ cloudabi_sys_mem_unlock(struct thread *t struct cloudabi_sys_mem_unlock_args *uap) { struct munlock_args munlock_args = { - .addr = uap->addr, - .len = uap->len + .addr = uap->mapping, + .len = uap->mapping_len }; return (sys_munlock(td, &munlock_args)); @@ -190,8 +190,8 @@ cloudabi_sys_mem_unmap(struct thread *td struct cloudabi_sys_mem_unmap_args *uap) { struct munmap_args munmap_args = { - .addr = uap->addr, - .len = uap->len + .addr = uap->mapping, + .len = uap->mapping_len }; return (sys_munmap(td, &munmap_args)); Modified: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_proc.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi/cloudabi_proc.c Tue Jan 17 22:05:52 2017 (r312355) @@ -53,8 +53,8 @@ cloudabi_sys_proc_exec(struct thread *td error = pre_execve(td, &oldvmspace); if (error != 0) return (error); - error = exec_copyin_data_fds(td, &args, uap->data, uap->datalen, - uap->fds, uap->fdslen); + error = exec_copyin_data_fds(td, &args, uap->data, uap->data_len, + uap->fds, uap->fds_len); if (error == 0) { args.fd = uap->fd; error = kern_execve(td, &args, NULL); Modified: head/sys/compat/cloudabi/cloudabi_random.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_random.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi/cloudabi_random.c Tue Jan 17 22:05:52 2017 (r312355) @@ -38,7 +38,7 @@ cloudabi_sys_random_get(struct thread *t { struct iovec iov = { .iov_base = uap->buf, - .iov_len = uap->nbyte + .iov_len = uap->buf_len }; struct uio uio = { .uio_iov = &iov, Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi/cloudabi_sock.c Tue Jan 17 22:05:52 2017 (r312355) @@ -141,7 +141,7 @@ cloudabi_sys_sock_bind(struct thread *td struct sockaddr_un sun; int error; - error = copyin_sockaddr_un(uap->path, uap->pathlen, &sun); + error = copyin_sockaddr_un(uap->path, uap->path_len, &sun); if (error != 0) return (error); return (kern_bindat(td, uap->fd, uap->sock, (struct sockaddr *)&sun)); @@ -154,7 +154,7 @@ cloudabi_sys_sock_connect(struct thread struct sockaddr_un sun; int error; - error = copyin_sockaddr_un(uap->path, uap->pathlen, &sun); + error = copyin_sockaddr_un(uap->path, uap->path_len, &sun); if (error != 0) return (error); return (kern_connectat(td, uap->fd, uap->sock, Modified: head/sys/compat/cloudabi32/cloudabi32_fd.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_fd.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi32/cloudabi32_fd.c Tue Jan 17 22:05:52 2017 (r312355) @@ -71,8 +71,8 @@ cloudabi32_copyinuio(const cloudabi32_io free(uio, M_IOV); return (error); } - iov[i].iov_base = TO_PTR(iovobj.iov_base); - iov[i].iov_len = iovobj.iov_len; + iov[i].iov_base = TO_PTR(iovobj.buf); + iov[i].iov_len = iovobj.buf_len; if (iov[i].iov_len > INT32_MAX - uio->uio_resid) { free(uio, M_IOV); return (EINVAL); @@ -91,7 +91,7 @@ cloudabi32_sys_fd_pread(struct thread *t struct uio *uio; int error; - error = cloudabi32_copyinuio(uap->iov, uap->iovcnt, &uio); + error = cloudabi32_copyinuio(uap->iovs, uap->iovs_len, &uio); if (error != 0) return (error); error = kern_preadv(td, uap->fd, uio, uap->offset); @@ -106,7 +106,7 @@ cloudabi32_sys_fd_pwrite(struct thread * struct uio *uio; int error; - error = cloudabi32_copyinuio(TO_PTR(uap->iov), uap->iovcnt, &uio); + error = cloudabi32_copyinuio(TO_PTR(uap->iovs), uap->iovs_len, &uio); if (error != 0) return (error); error = kern_pwritev(td, uap->fd, uio, uap->offset); @@ -121,7 +121,7 @@ cloudabi32_sys_fd_read(struct thread *td struct uio *uio; int error; - error = cloudabi32_copyinuio(uap->iov, uap->iovcnt, &uio); + error = cloudabi32_copyinuio(uap->iovs, uap->iovs_len, &uio); if (error != 0) return (error); error = kern_readv(td, uap->fd, uio); @@ -136,7 +136,7 @@ cloudabi32_sys_fd_write(struct thread *t struct uio *uio; int error; - error = cloudabi32_copyinuio(TO_PTR(uap->iov), uap->iovcnt, &uio); + error = cloudabi32_copyinuio(TO_PTR(uap->iovs), uap->iovs_len, &uio); if (error != 0) return (error); error = kern_writev(td, uap->fd, uio); Modified: head/sys/compat/cloudabi32/cloudabi32_poll.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_poll.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi32/cloudabi32_poll.c Tue Jan 17 22:05:52 2017 (r312355) @@ -398,11 +398,11 @@ cloudabi32_sys_poll_fd(struct thread *td return (EINVAL); timeout.tv_sec = subtimo.clock.timeout / 1000000000; timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->nin, uap->nout, ©ops, - &timeout)); + return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, + ©ops, &timeout)); } else { /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->nin, uap->nout, ©ops, - NULL)); + return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, + ©ops, NULL)); } } Modified: head/sys/compat/cloudabi32/cloudabi32_sock.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sock.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi32/cloudabi32_sock.c Tue Jan 17 22:05:52 2017 (r312355) @@ -62,9 +62,9 @@ cloudabi32_sys_sock_recv(struct thread * return (error); /* Convert results in cloudabi_recv_in_t to struct msghdr. */ - if (ri.ri_datalen > UIO_MAXIOV) + if (ri.ri_data_len > UIO_MAXIOV) return (EINVAL); - msghdr.msg_iovlen = ri.ri_datalen; + msghdr.msg_iovlen = ri.ri_data_len; msghdr.msg_iov = malloc(msghdr.msg_iovlen * sizeof(struct iovec), M_SOCKET, M_WAITOK); user_iov = TO_PTR(ri.ri_data); @@ -74,8 +74,8 @@ cloudabi32_sys_sock_recv(struct thread * free(msghdr.msg_iov, M_SOCKET); return (error); } - msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.iov_base); - msghdr.msg_iov[i].iov_len = iovobj.iov_len; + msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.buf); + msghdr.msg_iov[i].iov_len = iovobj.buf_len; } msghdr.msg_name = &ss; msghdr.msg_namelen = sizeof(ss); @@ -115,9 +115,9 @@ cloudabi32_sys_sock_send(struct thread * return (error); /* Convert results in cloudabi_send_in_t to struct msghdr. */ - if (si.si_datalen > UIO_MAXIOV) + if (si.si_data_len > UIO_MAXIOV) return (EINVAL); - msghdr.msg_iovlen = si.si_datalen; + msghdr.msg_iovlen = si.si_data_len; msghdr.msg_iov = malloc(msghdr.msg_iovlen * sizeof(struct iovec), M_SOCKET, M_WAITOK); user_iov = TO_PTR(si.si_data); @@ -127,8 +127,8 @@ cloudabi32_sys_sock_send(struct thread * free(msghdr.msg_iov, M_SOCKET); return (error); } - msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.iov_base); - msghdr.msg_iov[i].iov_len = iovobj.iov_len; + msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.buf); + msghdr.msg_iov[i].iov_len = iovobj.buf_len; } flags = MSG_NOSIGNAL; Modified: head/sys/compat/cloudabi32/cloudabi32_thread.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_thread.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi32/cloudabi32_thread.c Tue Jan 17 22:05:52 2017 (r312355) @@ -65,9 +65,9 @@ cloudabi32_sys_thread_create(struct thre return (error); /* Remove some space on the top of the stack for the TCB. */ - args.tcb = rounddown(args.attr.stack + args.attr.stack_size - + args.tcb = rounddown(args.attr.stack + args.attr.stack_len - sizeof(cloudabi32_tcb_t), _Alignof(cloudabi32_tcb_t)); - args.attr.stack_size = args.tcb - args.attr.stack; + args.attr.stack_len = args.tcb - args.attr.stack; error = thread_create(td, NULL, initialize_thread, &args); if (error != 0) Modified: head/sys/compat/cloudabi64/cloudabi64_fd.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_fd.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi64/cloudabi64_fd.c Tue Jan 17 22:05:52 2017 (r312355) @@ -71,8 +71,8 @@ cloudabi64_copyinuio(const cloudabi64_io free(uio, M_IOV); return (error); } - iov[i].iov_base = TO_PTR(iovobj.iov_base); - iov[i].iov_len = iovobj.iov_len; + iov[i].iov_base = TO_PTR(iovobj.buf); + iov[i].iov_len = iovobj.buf_len; if (iov[i].iov_len > INT64_MAX - uio->uio_resid) { free(uio, M_IOV); return (EINVAL); @@ -91,7 +91,7 @@ cloudabi64_sys_fd_pread(struct thread *t struct uio *uio; int error; - error = cloudabi64_copyinuio(uap->iov, uap->iovcnt, &uio); + error = cloudabi64_copyinuio(uap->iovs, uap->iovs_len, &uio); if (error != 0) return (error); error = kern_preadv(td, uap->fd, uio, uap->offset); @@ -106,7 +106,7 @@ cloudabi64_sys_fd_pwrite(struct thread * struct uio *uio; int error; - error = cloudabi64_copyinuio(TO_PTR(uap->iov), uap->iovcnt, &uio); + error = cloudabi64_copyinuio(TO_PTR(uap->iovs), uap->iovs_len, &uio); if (error != 0) return (error); error = kern_pwritev(td, uap->fd, uio, uap->offset); @@ -121,7 +121,7 @@ cloudabi64_sys_fd_read(struct thread *td struct uio *uio; int error; - error = cloudabi64_copyinuio(uap->iov, uap->iovcnt, &uio); + error = cloudabi64_copyinuio(uap->iovs, uap->iovs_len, &uio); if (error != 0) return (error); error = kern_readv(td, uap->fd, uio); @@ -136,7 +136,7 @@ cloudabi64_sys_fd_write(struct thread *t struct uio *uio; int error; - error = cloudabi64_copyinuio(TO_PTR(uap->iov), uap->iovcnt, &uio); + error = cloudabi64_copyinuio(TO_PTR(uap->iovs), uap->iovs_len, &uio); if (error != 0) return (error); error = kern_writev(td, uap->fd, uio); Modified: head/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_poll.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Tue Jan 17 22:05:52 2017 (r312355) @@ -398,11 +398,11 @@ cloudabi64_sys_poll_fd(struct thread *td return (EINVAL); timeout.tv_sec = subtimo.clock.timeout / 1000000000; timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->nin, uap->nout, ©ops, - &timeout)); + return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, + ©ops, &timeout)); } else { /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->nin, uap->nout, ©ops, - NULL)); + return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, + ©ops, NULL)); } } Modified: head/sys/compat/cloudabi64/cloudabi64_sock.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sock.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi64/cloudabi64_sock.c Tue Jan 17 22:05:52 2017 (r312355) @@ -62,9 +62,9 @@ cloudabi64_sys_sock_recv(struct thread * return (error); /* Convert results in cloudabi_recv_in_t to struct msghdr. */ - if (ri.ri_datalen > UIO_MAXIOV) + if (ri.ri_data_len > UIO_MAXIOV) return (EINVAL); - msghdr.msg_iovlen = ri.ri_datalen; + msghdr.msg_iovlen = ri.ri_data_len; msghdr.msg_iov = malloc(msghdr.msg_iovlen * sizeof(struct iovec), M_SOCKET, M_WAITOK); user_iov = TO_PTR(ri.ri_data); @@ -74,8 +74,8 @@ cloudabi64_sys_sock_recv(struct thread * free(msghdr.msg_iov, M_SOCKET); return (error); } - msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.iov_base); - msghdr.msg_iov[i].iov_len = iovobj.iov_len; + msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.buf); + msghdr.msg_iov[i].iov_len = iovobj.buf_len; } msghdr.msg_name = &ss; msghdr.msg_namelen = sizeof(ss); @@ -115,9 +115,9 @@ cloudabi64_sys_sock_send(struct thread * return (error); /* Convert results in cloudabi_send_in_t to struct msghdr. */ - if (si.si_datalen > UIO_MAXIOV) + if (si.si_data_len > UIO_MAXIOV) return (EINVAL); - msghdr.msg_iovlen = si.si_datalen; + msghdr.msg_iovlen = si.si_data_len; msghdr.msg_iov = malloc(msghdr.msg_iovlen * sizeof(struct iovec), M_SOCKET, M_WAITOK); user_iov = TO_PTR(si.si_data); @@ -127,8 +127,8 @@ cloudabi64_sys_sock_send(struct thread * free(msghdr.msg_iov, M_SOCKET); return (error); } - msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.iov_base); - msghdr.msg_iov[i].iov_len = iovobj.iov_len; + msghdr.msg_iov[i].iov_base = TO_PTR(iovobj.buf); + msghdr.msg_iov[i].iov_len = iovobj.buf_len; } flags = MSG_NOSIGNAL; Modified: head/sys/compat/cloudabi64/cloudabi64_thread.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_thread.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/compat/cloudabi64/cloudabi64_thread.c Tue Jan 17 22:05:52 2017 (r312355) @@ -65,9 +65,9 @@ cloudabi64_sys_thread_create(struct thre return (error); /* Remove some space on the top of the stack for the TCB. */ - args.tcb = rounddown(args.attr.stack + args.attr.stack_size - + args.tcb = rounddown(args.attr.stack + args.attr.stack_len - sizeof(cloudabi64_tcb_t), _Alignof(cloudabi64_tcb_t)); - args.attr.stack_size = args.tcb - args.attr.stack; + args.attr.stack_len = args.tcb - args.attr.stack; error = thread_create(td, NULL, initialize_thread, &args); if (error != 0) Modified: head/sys/i386/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/i386/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:01 2017 (r312354) +++ head/sys/i386/cloudabi32/cloudabi32_sysvec.c Tue Jan 17 22:05:52 2017 (r312355) @@ -156,7 +156,7 @@ cloudabi32_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = TO_PTR(attr->stack); - stack.ss_size = attr->stack_size - sizeof(args); + stack.ss_size = attr->stack_len - sizeof(args); cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* From owner-svn-src-head@freebsd.org Tue Jan 17 23:21:21 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 B39E9CB55F1; Tue, 17 Jan 2017 23:21:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) (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 50E4C17C6; Tue, 17 Jan 2017 23:21:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f54.google.com with SMTP id c85so221928646wmi.1; Tue, 17 Jan 2017 15:21:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=DOGI3p3DSfSm6K3d5h9gx6IJmAjShAu/m1BUFfJLIoE=; b=XaMNXtY+dMcFc5el/soAho+UPNwUNVoBkACZ6lkhGo9suSRQwPZxVny7aq+te9+YBA fJR5OtV74/yVu9aUL/Uukn6Qdfpaav1jFsNWANHfr2uxT7O7lZF/vv3ocnh/XB/d6OOR 4bkY9Py4EhlH8iQnljSC7ZzFCo23EGcj7sFq67y2/XC+2cSPwxEnr8+2SHnLbNoTBMfK xKDXdlMk/yb7xmS1LDvMtfhRRROU14otWb9R/jJ4cnyKgncuMVLbDSVxiVAZt3rV8RkY W+e6PaFDMgYTXYngsqX9VEPrGY5VohyWn1j2ukuY3safVGcjlH6sW6P8ingEwhFXYgXz biNA== X-Gm-Message-State: AIkVDXIlHjPRtOzolHW2W2PLTvcdpoJItdI75EkH5elc9Y8uNDXRyA576FIjb/yxXinukg== X-Received: by 10.223.134.151 with SMTP id 23mr159011wrx.0.1484695279036; Tue, 17 Jan 2017 15:21:19 -0800 (PST) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id 204sm40555516wmj.7.2017.01.17.15.21.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 15:21:18 -0800 (PST) Received: by mail-wm0-f44.google.com with SMTP id r144so247567754wme.1; Tue, 17 Jan 2017 15:21:18 -0800 (PST) X-Received: by 10.223.174.183 with SMTP id y52mr144595wrc.112.1484695278766; Tue, 17 Jan 2017 15:21:18 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Tue, 17 Jan 2017 15:21:18 -0800 (PST) In-Reply-To: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> From: Conrad Meyer Date: Tue, 17 Jan 2017 15:21:18 -0800 X-Gmail-Original-Message-ID: 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 , 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: Tue, 17 Jan 2017 23:21:21 -0000 Ian's potential objection has been met by Ben Kaduk and Eric van Gyzen's responses. It seems like an enum is just fine. And I agree with Gleb that it is preferable. Conrad On Tue, Jan 17, 2017 at 1:34 PM, Maxim Sobolev wrote: > Well as other pointed out there are some concerns with using enums from C++ > and ABI prospective. So it looks to me that there is no general consensus on > that direction. > > -Max > > On Tue, Jan 17, 2017 at 1:27 PM, Gleb Smirnoff wrote: >> >> On Tue, Jan 17, 2017 at 08:40:50AM -0800, Maxim Sobolev wrote: >> M> That being said, is there any other socket option value in there >> M> implemented as enum? I don't see anything obvious, so that I am curious >> if >> M> it would stick out as an odd one in there. What do you think? >> >> Simply because 30 years ago the language didn't allow that, and later >> additions mimiced the older sockopts. We need to break this loop :) >> >> -- >> Totus tuus, Glebius. >> > From owner-svn-src-head@freebsd.org Tue Jan 17 23:52:37 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 23BCCCB56FD for ; Tue, 17 Jan 2017 23:52:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAD351FEF for ; Tue, 17 Jan 2017 23:52:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 04a44090-dd10-11e6-9357-bffcd86bd944 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 04a44090-dd10-11e6-9357-bffcd86bd944; Tue, 17 Jan 2017 23:52:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0HNqPxi018516; Tue, 17 Jan 2017 16:52:25 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1484697145.86335.183.camel@freebsd.org> 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 From: Ian Lepore To: cem@freebsd.org, Maxim Sobolev Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 17 Jan 2017 16:52:25 -0700 In-Reply-To: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Tue, 17 Jan 2017 23:52:37 -0000 I actually don't agree that it's all good, but I also don't have the time to prove it's not (or prove myself wrong, which could certainly be the case). -- Ian On Tue, 2017-01-17 at 15:21 -0800, Conrad Meyer wrote: > Ian's potential objection has been met by Ben Kaduk and Eric van > Gyzen's responses.  It seems like an enum is just fine.  And I agree > with Gleb that it is preferable. > > Conrad > > On Tue, Jan 17, 2017 at 1:34 PM, Maxim Sobolev > wrote: > > > > Well as other pointed out there are some concerns with using enums > > from C++ > > and ABI prospective. So it looks to me that there is no general > > consensus on > > that direction. > > > > -Max > > > > On Tue, Jan 17, 2017 at 1:27 PM, Gleb Smirnoff > > wrote: > > > > > > > > > On Tue, Jan 17, 2017 at 08:40:50AM -0800, Maxim Sobolev wrote: > > > M> That being said, is there any other socket option value in > > > there > > > M> implemented as enum? I don't see anything obvious, so that I > > > am curious > > > if > > > M> it would stick out as an odd one in there. What do you think? > > > > > > Simply because 30 years ago the language didn't allow that, and > > > later > > > additions mimiced the older sockopts. We need to break this loop > > > :) > > > > > > -- > > > Totus tuus, Glebius. > > > From owner-svn-src-head@freebsd.org Wed Jan 18 01:28:22 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 0BE8ACB4DB6 for ; Wed, 18 Jan 2017 01:28:22 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::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 B4BE71AE8 for ; Wed, 18 Jan 2017 01:28:21 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x230.google.com with SMTP id l66so1133128ioi.1 for ; Tue, 17 Jan 2017 17:28:21 -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=Y5x1as6yfqyhECSZEjdXx6nBJkv3EJi49p5JUv9xM/E=; b=JWmepxHIaURYFZsujZ08zV/ol4izuvcHF2KlbelULwFFAjXY8Wpx8Bl0aaKZHm7KMb SiOfJQgGc0iYLLD7gATJe+fWONuG0kDQFIIo54KcpUPHbtvVYOvfDSy+r1Z3zEGhOgQs lZnTdQtpRfK5LOILrWOdcKzGztmaKXv8zy2dgFET4BMsfXKwVcEZd0aIm7cDhdgWJ1ba EXGWs8hJbzcIjbPbCgS3I5GzaGi0dqHevx5YL8zDb3lp8seHbGOnPwTv7p71ThYT0EGn CuVPZqzs1khWTJYuSE8QfPBFbZFjktGLPA473Jeu/B5JIgOWV7wdg7NEnoKflmwTkLQ6 +dlw== 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=Y5x1as6yfqyhECSZEjdXx6nBJkv3EJi49p5JUv9xM/E=; b=iZWdjxtEbNh/i1U6t79g9bE2FwYaEqOJBBJBllDAXhEzOFVtZsFLYfFEYofWejyLQ9 j/OsBdlWTkj4kajpPXVcHEWOEBhwmzqf+iXTfb9DTA/g3yEa2hFg4AU9rGDOhSFbAb+A 9FUWtVZio5Bo2uzh3wi/2pcxoJ32PeAArTJfc7odsQGO8iBAeQ29wi7llg1F22R0FtxG 5wOUeVeiP2oEWcmR0119vzWs25hbGR+jR4IWf0LL2l4VEfh35FfNJzxW2QPB68bAki/z Whq7UQbQbUSbVMeZUDYzr47NpdQiNKWx7iobHnX/VOdXoXhLELN32wIjVqKstUOZybnq 7+eg== X-Gm-Message-State: AIkVDXKDoe80yc730WwJVfag3oCTR/3JndweXeu8Rdebn5echFi6AK2w9RuemPBvHkujc2We1EqvEAp1O8Yq4Dbi X-Received: by 10.107.18.230 with SMTP id 99mr1170735ios.45.1484702900866; Tue, 17 Jan 2017 17:28:20 -0800 (PST) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.160.66 with HTTP; Tue, 17 Jan 2017 17:28:20 -0800 (PST) In-Reply-To: <1484697145.86335.183.camel@freebsd.org> References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> <1484697145.86335.183.camel@freebsd.org> From: Maxim Sobolev Date: Tue, 17 Jan 2017 17:28:20 -0800 X-Google-Sender-Auth: EPK6A-3fVOgkvQZV19A5kOTsWrM 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: Ian Lepore Cc: "Conrad E. Meyer" , src-committers , 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-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: Wed, 18 Jan 2017 01:28:22 -0000 OK, guys, with all due respect I think I've heard enough to say that if somebody feels like this has to be enum feel free to jump in and tweak it out. As far as I understand there should be no user-visible differences either way, so it's not like we are going to be locked with this way forever. It's never too late to revise it (and it's FreeBSD-specific interface as well). Requesting me to implement something that it is at least a bit controversial and also something completely orthogonal to the original functionality and which I have no idea how to do/test properly on top of what's been done already is a bit overboard I would say. In my view, if we are to convert set/getsockopt(2) to enums it has to do in one shot and tested against large set of third-party software to make sure it won't bring out some corner cases (i.e. some unhandled values in switch() statements and the likes, C++ breakage, weird compilers, #ifdef blocks etc). If some developer(s) feel #define is an old way no longer relevant in 2017 the onus has to be on those to come up with a patch and go though the heat of defending it against other set of developers who don't share that opinion. Pushing me, who is largely ambivalent to either way, to do it is not fair. It's like asking mechanic who works on fixing your brakes to also paint your calipers for aesthetic reasons for the same price. Not even to mention that the change in question has been on reviews and received positive feedback from other developers working in the same area (e.g. gnn) and none of the enum guys paid any attention until it hit the tree. Also there is at least one thing that makes enum less desirable from the point of view of application developer. Particularly it makes it impossible to use preprocessor to do a conditional compilation, which is especially important for the FreeBSD-specific options. With the "old" way, I can easily have something like: #if defined(SO_TS_CLOCK) ... setsockopt(SO_TS_CLOCK, ...); #else [do something else] #endif This does not work with enums for obvious reasons, one would need to resort to using some kind of autoconfigure mechanism to figure out if the enum in question is defined. -Max On Tue, Jan 17, 2017 at 3:52 PM, Ian Lepore wrote: > I actually don't agree that it's all good, but I also don't have the > time to prove it's not (or prove myself wrong, which could certainly be > the case). > > -- Ian > > On Tue, 2017-01-17 at 15:21 -0800, Conrad Meyer wrote: > > Ian's potential objection has been met by Ben Kaduk and Eric van > > Gyzen's responses. It seems like an enum is just fine. And I agree > > with Gleb that it is preferable. > > > > Conrad > > > > On Tue, Jan 17, 2017 at 1:34 PM, Maxim Sobolev > > wrote: > > > > > > Well as other pointed out there are some concerns with using enums > > > from C++ > > > and ABI prospective. So it looks to me that there is no general > > > consensus on > > > that direction. > > > > > > -Max > > > > > > On Tue, Jan 17, 2017 at 1:27 PM, Gleb Smirnoff > > > wrote: > > > > > > > > > > > > On Tue, Jan 17, 2017 at 08:40:50AM -0800, Maxim Sobolev wrote: > > > > M> That being said, is there any other socket option value in > > > > there > > > > M> implemented as enum? I don't see anything obvious, so that I > > > > am curious > > > > if > > > > M> it would stick out as an odd one in there. What do you think? > > > > > > > > Simply because 30 years ago the language didn't allow that, and > > > > later > > > > additions mimiced the older sockopts. We need to break this loop > > > > :) > > > > > > > > -- > > > > Totus tuus, Glebius. > > > > > > From owner-svn-src-head@freebsd.org Wed Jan 18 01:43:59 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 1EBB9CB41FD; Wed, 18 Jan 2017 01:43:59 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.netplex.net", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5F90153F; Wed, 18 Jan 2017 01:43:58 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.15.1/8.15.1/NETPLEX) with ESMTP id v0I1gHXs011242; Tue, 17 Jan 2017 20:42:17 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.4.3 (mail.netplex.net [204.213.176.9]); Tue, 17 Jan 2017 20:42:17 -0500 (EST) Date: Tue, 17 Jan 2017 20:42:17 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net Reply-To: Daniel Eischen To: Maxim Sobolev cc: Ian Lepore , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org 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 In-Reply-To: Message-ID: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> <1484697145.86335.183.camel@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Wed, 18 Jan 2017 01:43:59 -0000 On Tue, 17 Jan 2017, Maxim Sobolev wrote: > Also there is at least one thing that makes enum less desirable from the > point of view of application developer. Particularly it makes it impossible > to use preprocessor to do a conditional compilation, which is especially > important for the FreeBSD-specific options. With the "old" way, I can > easily have something like: > > #if defined(SO_TS_CLOCK) > ... > setsockopt(SO_TS_CLOCK, ...); > #else > [do something else] > #endif > > This does not work with enums for obvious reasons, one would need to resort > to using some kind of autoconfigure mechanism to figure out if the enum in > question is defined. Great point, we (at $JOB) have code that this, and would break if changed to enums. -- DE From owner-svn-src-head@freebsd.org Wed Jan 18 01:55:39 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 4C993CB45A6; Wed, 18 Jan 2017 01:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (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 1367C1D0D; Wed, 18 Jan 2017 01:55:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id t6so5264509pgt.1; Tue, 17 Jan 2017 17:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=whOTlZJGwByI5faJoSHqOQgsH70SQ5GVK/xNHUBS9q8=; b=F6V4l+Pa9hUITqzXcsoMkLhhU7vSR+NBXzfvjNuilSm9uT6r170CiCPhfu2aez/aet A9YUofYyyZzNYd6aOxaSGTWUOuAIOV6O4n93hVrZGKA/C5J0OuGukvYjuor+Sdm1RVRT oWUiAhemAQDcmPpF5Vm3RsbWkhnK8PqLS5gfMYWrAwjvVme1Ui3vbUf9C09JfdnhtQDQ lf3IRGEm3CZqSYKTT2nw/VTnk+Z/6JLGJETTmDKZ2qJBl3j/AFlukpVdhi7PcCYZUf1N OwwkaNGGbQUFpLDvkh+1wzOlID9UNcIAfVmwp9QLN83Ra6ebhHevl4bahsoEMwt86Rrq i6hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=whOTlZJGwByI5faJoSHqOQgsH70SQ5GVK/xNHUBS9q8=; b=T1FDRAUDpQyyjXI/H09wtUSz1sW4O5VvgmYlRnY1LpJCEsvRvkrPR7PaLUKoUOAXxC +X4D3/NvGQH7My0Ji16fG5zyjUVa3948r8/F/ES4k0X45C7VUdUS2cvCsYBU+59BnLTM vUxY0sbvJw8hU8roDUMueYpC5QR68xZc5NxK2/7ruzwbbh7SknVVbhG9UP7Cfz6wPgJX Aea/rpTxjpdYPO0UL4E95sEUYMwGxtADIo5mvvx9J0H61v5Inp2mIzIOaIdmexBaEs5X zhGCJGw80pkf/bOoJEWfxwpmU8fpaJIUGozoWBeDHVWqaItb6GEVEPURWWbxFuHzuEVx ZBWA== X-Gm-Message-State: AIkVDXK27oEWQdueGkHov8cwc2QDX0VoryVcZJCNNUcdtvULGRPOg7LFECtjAGgXqcP5wA== X-Received: by 10.99.174.75 with SMTP id e11mr937351pgp.89.1484704538448; Tue, 17 Jan 2017 17:55:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p25sm58650402pfd.0.2017.01.17.17.55.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 17:55:38 -0800 (PST) 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 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EA543583-7822-402D-B929-224972642460"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 17 Jan 2017 17:55:36 -0800 Cc: Maxim Sobolev , Ian Lepore , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701161746.v0GHkcPX071529@repo.freebsd.org> <20170117065231.GW2611@FreeBSD.org> <20170117212713.GZ2611@FreeBSD.org> <1484697145.86335.183.camel@freebsd.org> To: Daniel Eischen X-Mailer: Apple Mail (2.3124) 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: Wed, 18 Jan 2017 01:55:39 -0000 --Apple-Mail=_EA543583-7822-402D-B929-224972642460 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2017, at 17:42, Daniel Eischen = wrote: >=20 > On Tue, 17 Jan 2017, Maxim Sobolev wrote: >=20 >> Also there is at least one thing that makes enum less desirable from = the >> point of view of application developer. Particularly it makes it = impossible >> to use preprocessor to do a conditional compilation, which is = especially >> important for the FreeBSD-specific options. With the "old" way, I can >> easily have something like: >>=20 >> #if defined(SO_TS_CLOCK) >> ... >> setsockopt(SO_TS_CLOCK, ...); >> #else >> [do something else] >> #endif >>=20 >> This does not work with enums for obvious reasons, one would need to = resort >> to using some kind of autoconfigure mechanism to figure out if the = enum in >> question is defined. >=20 > Great point, we (at $JOB) have code that this, and would break > if changed to enums. I=E2=80=99m not saying enums would be a bad idea, but it would = require more work on the autoconf end as well, and would make testing = for these symbols' support a little less straightforward. Maybe a combination of #define=E2=80=99s for determining whether = or not the support is present, i.e. for simple #ifdef folks (I would = probably only use one though), and having a sample for testing for = support in autoconf in some products would be beneficial? Thanks, -Ngie --Apple-Mail=_EA543583-7822-402D-B929-224972642460 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYfssZAAoJEPWDqSZpMIYVlL4QAMkoAZAYzDcO/Y184l/kMxSb zUmCzTl39l/3ORffMP+YBv0LzWMgsXUyc+H8H4TAB6gIk1wd8SwBtvqLAcReL/jo jtrwkSeQ41XntmX5bp/+t3/76TE7y/j+GFThoRuwIpqZynzLz1xfn5Dgx7BwtVTm ofvRy0k5DCWoGdJh0N1mvywUiYfE4CEyq6NXFSZB/U/cMKFuhCsktMyBoeCOoyeh 3BJTfrbhj2URus9CqAKvoB+bnhGj/l48tEhEOQvi6Uh6wyVdL6/XidKC89ia6MSI oTF4UGxBqYYtDXNOZgwdPKwp1DHYA7ufIjoTYM/uJHv+2Qj9nK2tK0qIJOGhS/f6 H9wlzMCn6diV9Q0yAIvYVe1XQVfg7f8VUn/fkmTlbAyKwVaL+RWCOwhbInufE8en kkXNfpEqNI1wxiCI41JzTnMfrV3lgcllG5ZtBhaCb9D1fCb7INi6wMtnAQbKVQ+y UO8xPhpvazyr77IvNVyosZq2lNm5PdOCdHXfxLfZ1azGNKrUN056T8TDLoEa9ngD FjD+GRKC/n0oeFtzJg6yUf4IwZneUgtH2ypbSBhG+VjvS6fIESHFA8PPori/hm/O 23kk1ETA0NF7gmYYzelWCrpQMBjrNxY3oNvp2R/pfnX8JkFBO4GmgDfJWy66NUwX KtaFhIHu7eeoSBN5k+H8 =zPmc -----END PGP SIGNATURE----- --Apple-Mail=_EA543583-7822-402D-B929-224972642460-- From owner-svn-src-head@freebsd.org Wed Jan 18 03:35:43 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 58FBDCB4461; Wed, 18 Jan 2017 03:35:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28B4B18C5; Wed, 18 Jan 2017 03:35:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0I3ZgTR005244; Wed, 18 Jan 2017 03:35:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0I3ZgCZ005243; Wed, 18 Jan 2017 03:35:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701180335.v0I3ZgCZ005243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 18 Jan 2017 03:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312368 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 03:35:43 -0000 Author: np Date: Wed Jan 18 03:35:42 2017 New Revision: 312368 URL: https://svnweb.freebsd.org/changeset/base/312368 Log: cxgbe/tom: Fix a case where do_pass_accept_req wasn't properly restoring the VNET. This should have been in r311949. MFC after: 2 days Modified: head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 18 02:57:22 2017 (r312367) +++ head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 18 03:35:42 2017 (r312368) @@ -1418,6 +1418,7 @@ found: if (!(synqe->flags & TPF_SYNQE_EXPANDED)) send_reset_synqe(tod, synqe); INP_WUNLOCK(inp); + CURVNET_RESTORE(); release_synqe(synqe); /* extra hold */ return (__LINE__); From owner-svn-src-head@freebsd.org Wed Jan 18 03:42:22 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 DD9A2CB477B; Wed, 18 Jan 2017 03:42:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3E841D07; Wed, 18 Jan 2017 03:42:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0I3gLZO009199; Wed, 18 Jan 2017 03:42:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0I3gL7T009198; Wed, 18 Jan 2017 03:42:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701180342.v0I3gL7T009198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 18 Jan 2017 03:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312369 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 03:42:23 -0000 Author: jhibbits Date: Wed Jan 18 03:42:21 2017 New Revision: 312369 URL: https://svnweb.freebsd.org/changeset/base/312369 Log: Use the explicit expanded form of cmp. Clang apparently requires the explicit form of this instruction, and rejects uses which ignore the optional cmpD register. This was the only use of the shorthand form of the instruction, so just fix it up to match the others. PR: kern/215681 Submitted by: Mark Millard Reported by: Mark Millard MFC after: 2 weeks Modified: head/sys/powerpc/aim/trap_subr32.S Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Wed Jan 18 03:35:42 2017 (r312368) +++ head/sys/powerpc/aim/trap_subr32.S Wed Jan 18 03:42:21 2017 (r312369) @@ -406,7 +406,7 @@ im0: mtctr %r1 /* load counter */ im1: lwzu %r1, 8(%r2) /* get next pte */ - cmp 0, %r1, %r3 /* see if found pte */ + cmp 0, 0, %r1, %r3 /* see if found pte */ bdnzf 2, im1 /* dec count br if cmp ne and if * count not zero */ bne instr_sec_hash /* if not found set up second hash From owner-svn-src-head@freebsd.org Wed Jan 18 08:18:09 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 62785CB4637; Wed, 18 Jan 2017 08:18:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D008128D; Wed, 18 Jan 2017 08:18:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0I8I8pZ017831; Wed, 18 Jan 2017 08:18:08 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0I8I82b017827; Wed, 18 Jan 2017 08:18:08 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201701180818.v0I8I82b017827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 18 Jan 2017 08:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312374 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 08:18:09 -0000 Author: tsoome Date: Wed Jan 18 08:18:07 2017 New Revision: 312374 URL: https://svnweb.freebsd.org/changeset/base/312374 Log: loader: efi devpath api usage should be more aware of NULL pointers As the efi_devpath_last_node() and efi_devpath_trim() can return NULL pointers, the consumers of this API should check the the NULL pointers. Same for efinet_dev_init() using calloc(). Reported by: Robert Mustacchi Reviewed by: jhb, allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9203 Modified: head/sys/boot/efi/libefi/devpath.c head/sys/boot/efi/libefi/efinet.c head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Wed Jan 18 08:11:18 2017 (r312373) +++ head/sys/boot/efi/libefi/devpath.c Wed Jan 18 08:18:07 2017 (r312374) @@ -106,15 +106,18 @@ efi_devpath_trim(EFI_DEVICE_PATH *devpat EFI_DEVICE_PATH *node, *copy; size_t prefix, len; - node = efi_devpath_last_node(devpath); + if ((node = efi_devpath_last_node(devpath)) == NULL) + return (NULL); prefix = (UINT8 *)node - (UINT8 *)devpath; if (prefix == 0) return (NULL); len = prefix + DevicePathNodeLength(NextDevicePathNode(node)); copy = malloc(len); - memcpy(copy, devpath, prefix); - node = (EFI_DEVICE_PATH *)((UINT8 *)copy + prefix); - SetDevicePathEndNode(node); + if (copy != NULL) { + memcpy(copy, devpath, prefix); + node = (EFI_DEVICE_PATH *)((UINT8 *)copy + prefix); + SetDevicePathEndNode(node); + } return (copy); } Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Wed Jan 18 08:11:18 2017 (r312373) +++ head/sys/boot/efi/libefi/efinet.c Wed Jan 18 08:18:07 2017 (r312374) @@ -291,12 +291,18 @@ efinet_dev_init() if (EFI_ERROR(status)) return (efi_status_to_errno(status)); handles2 = (EFI_HANDLE *)malloc(sz); + if (handles2 == NULL) { + free(handles); + return (ENOMEM); + } nifs = 0; for (i = 0; i < sz / sizeof(EFI_HANDLE); i++) { devpath = efi_lookup_devpath(handles[i]); if (devpath == NULL) continue; - node = efi_devpath_last_node(devpath); + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; + if (DevicePathType(node) != MESSAGING_DEVICE_PATH || DevicePathSubType(node) != MSG_MAC_ADDR_DP) continue; @@ -318,20 +324,24 @@ efinet_dev_init() } free(handles); if (nifs == 0) { - free(handles2); - return (ENOENT); + err = ENOENT; + goto done; } err = efi_register_handles(&efinet_dev, handles2, NULL, nifs); - if (err != 0) { - free(handles2); - return (err); - } + if (err != 0) + goto done; - efinetif.netif_nifs = nifs; efinetif.netif_ifs = calloc(nifs, sizeof(struct netif_dif)); - stats = calloc(nifs, sizeof(struct netif_stats)); + if (efinetif.netif_ifs == NULL || stats == NULL) { + free(efinetif.netif_ifs); + free(stats); + efinetif.netif_ifs = NULL; + err = ENOMEM; + goto done; + } + efinetif.netif_nifs = nifs; for (i = 0; i < nifs; i++) { @@ -341,9 +351,9 @@ efinet_dev_init() dif->dif_stats = &stats[i]; dif->dif_private = handles2[i]; } +done: free(handles2); - - return (0); + return (err); } static int Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Wed Jan 18 08:11:18 2017 (r312373) +++ head/sys/boot/efi/libefi/efipart.c Wed Jan 18 08:18:07 2017 (r312374) @@ -130,10 +130,13 @@ efipart_init(void) * we try to find the parent device and add that instead as * that will be the CD filesystem. */ - node = efi_devpath_last_node(devpath); + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_CDROM_DP) { devpathcpy = efi_devpath_trim(devpath); + if (devpathcpy == NULL) + continue; tmpdevpath = devpathcpy; status = BS->LocateDevicePath(&blkio_guid, &tmpdevpath, &handle); From owner-svn-src-head@freebsd.org Wed Jan 18 13:27:25 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 BF3DFCB6D52; Wed, 18 Jan 2017 13:27:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8264C1A7C; Wed, 18 Jan 2017 13:27:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IDROtk045478; Wed, 18 Jan 2017 13:27:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IDROqV045477; Wed, 18 Jan 2017 13:27:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201701181327.v0IDROqV045477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 18 Jan 2017 13:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312378 - head/sys/cddl/dev/fbt/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 13:27:25 -0000 Author: andrew Date: Wed Jan 18 13:27:24 2017 New Revision: 312378 URL: https://svnweb.freebsd.org/changeset/base/312378 Log: Use the kernel stack in the ARM FBT DTrace provider. This is used to find the fifth argument to functions being traced, however there was an error where the userspace stack was being used. This may be invalid leading to a kernel panic if this address is unmapped. Submitted by: Graeme Jenkinson MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9229 Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Wed Jan 18 10:21:06 2017 (r312377) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Wed Jan 18 13:27:24 2017 (r312378) @@ -61,7 +61,7 @@ fbt_invop(uintptr_t addr, struct trapfra /* Get 5th parameter from stack */ DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - fifthparam = *(register_t *)frame->tf_usr_sp; + fifthparam = *(register_t *)frame->tf_svc_sp; DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); dtrace_probe(fbt->fbtp_id, frame->tf_r0, From owner-svn-src-head@freebsd.org Wed Jan 18 13:31:20 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 9113ACB6076; Wed, 18 Jan 2017 13:31:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5940C1DA7; Wed, 18 Jan 2017 13:31:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IDVJSW048451; Wed, 18 Jan 2017 13:31:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IDVHWf048428; Wed, 18 Jan 2017 13:31:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701181331.v0IDVHWf048428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Jan 2017 13:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312379 - in head: lib/libc/sys sbin/ifconfig sys/conf sys/kern sys/modules/if_lagg sys/modules/if_vlan sys/net sys/netinet sys/netinet6 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 13:31:20 -0000 Author: hselasky Date: Wed Jan 18 13:31:17 2017 New Revision: 312379 URL: https://svnweb.freebsd.org/changeset/base/312379 Log: Implement kernel support for hardware rate limited sockets. - Add RATELIMIT kernel configuration keyword which must be set to enable the new functionality. - Add support for hardware driven, Receive Side Scaling, RSS aware, rate limited sendqueues and expose the functionality through the already established SO_MAX_PACING_RATE setsockopt(). The API support rates in the range from 1 to 4Gbytes/s which are suitable for regular TCP and UDP streams. The setsockopt(2) manual page has been updated. - Add rate limit function callback API to "struct ifnet" which supports the following operations: if_snd_tag_alloc(), if_snd_tag_modify(), if_snd_tag_query() and if_snd_tag_free(). - Add support to ifconfig to view, set and clear the IFCAP_TXRTLMT flag, which tells if a network driver supports rate limiting or not. - This patch also adds support for rate limiting through VLAN and LAGG intermediate network devices. - How rate limiting works: 1) The userspace application calls setsockopt() after accepting or making a new connection to set the rate which is then stored in the socket structure in the kernel. Later on when packets are transmitted a check is made in the transmit path for rate changes. A rate change implies a non-blocking ifp->if_snd_tag_alloc() call will be made to the destination network interface, which then sets up a custom sendqueue with the given rate limitation parameter. A "struct m_snd_tag" pointer is returned which serves as a "snd_tag" hint in the m_pkthdr for the subsequently transmitted mbufs. 2) When the network driver sees the "m->m_pkthdr.snd_tag" different from NULL, it will move the packets into a designated rate limited sendqueue given by the snd_tag pointer. It is up to the individual drivers how the rate limited traffic will be rate limited. 3) Route changes are detected by the NIC drivers in the ifp->if_transmit() routine when the ifnet pointer in the incoming snd_tag mismatches the one of the network interface. The network adapter frees the mbuf and returns EAGAIN which causes the ip_output() to release and clear the send tag. Upon next ip_output() a new "snd_tag" will be tried allocated. 4) When the PCB is detached the custom sendqueue will be released by a non-blocking ifp->if_snd_tag_free() call to the currently bound network interface. Reviewed by: wblock (manpages), adrian, gallatin, scottl (network) Differential Revision: https://reviews.freebsd.org/D3687 Sponsored by: Mellanox Technologies MFC after: 3 months Modified: head/lib/libc/sys/getsockopt.2 head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c head/sys/conf/NOTES head/sys/conf/config.mk head/sys/conf/kern.opts.mk head/sys/conf/options head/sys/kern/uipc_socket.c head/sys/modules/if_lagg/Makefile head/sys/modules/if_vlan/Makefile head/sys/net/ieee8023ad_lacp.c head/sys/net/ieee8023ad_lacp.h head/sys/net/if.h head/sys/net/if_dead.c head/sys/net/if_lagg.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c head/sys/sys/mbuf.h head/sys/sys/socket.h head/sys/sys/socketvar.h Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Wed Jan 18 13:27:24 2017 (r312378) +++ head/lib/libc/sys/getsockopt.2 Wed Jan 18 13:31:17 2017 (r312379) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd April 5, 2013 +.Dd January 18, 2017 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -188,6 +188,7 @@ The following options are recognized in .It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)" .It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)" .It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP" +.It Dv SO_MAX_PACING_RATE "set the maximum transmit rate in bytes per second for the socket" .El .Pp .Dv SO_DEBUG @@ -515,6 +516,10 @@ returns the maximal number of queued con returns the number of unaccepted complete connections. .Dv SO_LISTENINCQLEN returns the number of unaccepted incomplete connections. +.Pp +.Dv SO_MAX_PACING_RATE +instruct the socket and underlying network adapter layers to limit the +transfer rate to the given unsigned 32-bit value in bytes per second. .Sh RETURN VALUES .Rv -std .Sh ERRORS Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Wed Jan 18 13:27:24 2017 (r312378) +++ head/sbin/ifconfig/ifconfig.8 Wed Jan 18 13:31:17 2017 (r312379) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd September 17, 2016 +.Dd January 18, 2017 .Dt IFCONFIG 8 .Os .Sh NAME @@ -460,6 +460,8 @@ this directive is used to select between and 802.11g .Pq Cm 11g operating modes. +.It Cm txrtlmt +Set if the driver supports TX rate limiting. .It Cm inst Ar minst , Cm instance Ar minst Set the media instance to .Ar minst . Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sbin/ifconfig/ifconfig.c Wed Jan 18 13:31:17 2017 (r312379) @@ -1145,7 +1145,7 @@ unsetifdescr(const char *val, int value, "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26RXCSUM_IPV6\27TXCSUM_IPV6" +"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT" /* * Print the status of the interface. If an address family was @@ -1453,6 +1453,8 @@ static struct cmd basic_cmds[] = { DEF_CMD("-wol_mcast", -IFCAP_WOL_MCAST, setifcap), DEF_CMD("wol_magic", IFCAP_WOL_MAGIC, setifcap), DEF_CMD("-wol_magic", -IFCAP_WOL_MAGIC, setifcap), + DEF_CMD("txrtlmt", IFCAP_TXRTLMT, setifcap), + DEF_CMD("-txrtlmt", -IFCAP_TXRTLMT, setifcap), DEF_CMD("normal", -IFF_LINK0, setifflags), DEF_CMD("compress", IFF_LINK0, setifflags), DEF_CMD("noicmp", IFF_LINK1, setifflags), Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/conf/NOTES Wed Jan 18 13:31:17 2017 (r312379) @@ -619,6 +619,8 @@ options HWPMC_HOOKS # Other necessary options INET #Internet communications protocols options INET6 #IPv6 communications protocols +options RATELIMIT # TX rate limiting support + options ROUTETABLES=2 # allocated fibs up to 65536. default is 1. # but that would be a bad idea as they are large. Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/conf/config.mk Wed Jan 18 13:31:17 2017 (r312379) @@ -19,6 +19,10 @@ opt_inet.h: opt_inet6.h: @echo "#define INET6 1" > ${.TARGET} .endif +.if ${MK_RATELIMIT} != "no" +opt_ratelimit.h: + @echo "#define RATELIMIT 1" > ${.TARGET} +.endif .if ${MK_EISA} != "no" opt_eisa.h: @echo "#define DEV_EISA 1" > ${.TARGET} Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/conf/kern.opts.mk Wed Jan 18 13:31:17 2017 (r312379) @@ -48,6 +48,7 @@ __DEFAULT_NO_OPTIONS = \ EXTRA_TCP_STACKS \ NAND \ OFED \ + RATELIMIT \ REPRODUCIBLE_BUILD # Some options are totally broken on some architectures. We disable Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/conf/options Wed Jan 18 13:31:17 2017 (r312379) @@ -412,6 +412,7 @@ BOOTP_NFSV3 opt_bootp.h BOOTP_WIRED_TO opt_bootp.h DEVICE_POLLING DUMMYNET opt_ipdn.h +RATELIMIT opt_ratelimit.h INET opt_inet.h INET6 opt_inet6.h IPDIVERT Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/kern/uipc_socket.c Wed Jan 18 13:31:17 2017 (r312379) @@ -2699,6 +2699,14 @@ sosetopt(struct socket *so, struct socko so->so_ts_clock = optval; break; + case SO_MAX_PACING_RATE: + error = sooptcopyin(sopt, &val32, sizeof(val32), + sizeof(val32)); + if (error) + goto bad; + so->so_max_pacing_rate = val32; + break; + default: if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) error = hhook_run_socket(so, sopt, @@ -2890,6 +2898,10 @@ integer: optval = so->so_ts_clock; goto integer; + case SO_MAX_PACING_RATE: + optval = so->so_max_pacing_rate; + goto integer; + default: if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) error = hhook_run_socket(so, sopt, Modified: head/sys/modules/if_lagg/Makefile ============================================================================== --- head/sys/modules/if_lagg/Makefile Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/modules/if_lagg/Makefile Wed Jan 18 13:31:17 2017 (r312379) @@ -2,6 +2,6 @@ .PATH: ${.CURDIR}/../../net KMOD= if_lagg -SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h +SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h opt_ratelimit.h .include Modified: head/sys/modules/if_vlan/Makefile ============================================================================== --- head/sys/modules/if_vlan/Makefile Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/modules/if_vlan/Makefile Wed Jan 18 13:31:17 2017 (r312379) @@ -4,6 +4,6 @@ KMOD= if_vlan SRCS= if_vlan.c -SRCS+= opt_inet.h opt_vlan.h +SRCS+= opt_inet.h opt_vlan.h opt_ratelimit.h .include Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/ieee8023ad_lacp.c Wed Jan 18 13:31:17 2017 (r312379) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ratelimit.h" + #include #include #include @@ -853,6 +855,35 @@ lacp_select_tx_port(struct lagg_softc *s return (lp->lp_lagg); } + +#ifdef RATELIMIT +struct lagg_port * +lacp_select_tx_port_by_hash(struct lagg_softc *sc, uint32_t flowid) +{ + struct lacp_softc *lsc = LACP_SOFTC(sc); + struct lacp_portmap *pm; + struct lacp_port *lp; + uint32_t hash; + + if (__predict_false(lsc->lsc_suppress_distributing)) { + LACP_DPRINTF((NULL, "%s: waiting transit\n", __func__)); + return (NULL); + } + + pm = &lsc->lsc_pmap[lsc->lsc_activemap]; + if (pm->pm_count == 0) { + LACP_DPRINTF((NULL, "%s: no active aggregator\n", __func__)); + return (NULL); + } + + hash = flowid >> sc->flowid_shift; + hash %= pm->pm_count; + lp = pm->pm_map[hash]; + + return (lp->lp_lagg); +} +#endif + /* * lacp_suppress_distributing: drop transmit packets for a while * to preserve packet ordering. Modified: head/sys/net/ieee8023ad_lacp.h ============================================================================== --- head/sys/net/ieee8023ad_lacp.h Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/ieee8023ad_lacp.h Wed Jan 18 13:31:17 2017 (r312379) @@ -284,6 +284,9 @@ struct lacp_softc { struct mbuf *lacp_input(struct lagg_port *, struct mbuf *); struct lagg_port *lacp_select_tx_port(struct lagg_softc *, struct mbuf *); +#ifdef RATELIMIT +struct lagg_port *lacp_select_tx_port_by_hash(struct lagg_softc *, uint32_t); +#endif void lacp_attach(struct lagg_softc *); void lacp_detach(void *); void lacp_init(struct lagg_softc *); Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/if.h Wed Jan 18 13:31:17 2017 (r312379) @@ -239,6 +239,7 @@ struct if_data { #define IFCAP_RXCSUM_IPV6 0x200000 /* can offload checksum on IPv6 RX */ #define IFCAP_TXCSUM_IPV6 0x400000 /* can offload checksum on IPv6 TX */ #define IFCAP_HWSTATS 0x800000 /* manages counters internally */ +#define IFCAP_TXRTLMT 0x1000000 /* hardware supports TX rate limiting */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) Modified: head/sys/net/if_dead.c ============================================================================== --- head/sys/net/if_dead.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/if_dead.c Wed Jan 18 13:31:17 2017 (r312379) @@ -100,6 +100,30 @@ ifdead_get_counter(struct ifnet *ifp, if return (0); } +static int +ifdead_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + return (EOPNOTSUPP); +} + +static int +ifdead_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) +{ + return (EOPNOTSUPP); +} + +static int +ifdead_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params) +{ + return (EOPNOTSUPP); +} + +static void +ifdead_snd_tag_free(struct m_snd_tag *pmt) +{ +} + void if_dead(struct ifnet *ifp) { @@ -112,4 +136,8 @@ if_dead(struct ifnet *ifp) ifp->if_qflush = ifdead_qflush; ifp->if_transmit = ifdead_transmit; ifp->if_get_counter = ifdead_get_counter; + ifp->if_snd_tag_alloc = ifdead_snd_tag_alloc; + ifp->if_snd_tag_modify = ifdead_snd_tag_modify; + ifp->if_snd_tag_query = ifdead_snd_tag_query; + ifp->if_snd_tag_free = ifdead_snd_tag_free; } Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/if_lagg.c Wed Jan 18 13:31:17 2017 (r312379) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_ratelimit.h" #include #include @@ -118,6 +119,11 @@ static void lagg_port2req(struct lagg_po static void lagg_init(void *); static void lagg_stop(struct lagg_softc *); static int lagg_ioctl(struct ifnet *, u_long, caddr_t); +#ifdef RATELIMIT +static int lagg_snd_tag_alloc(struct ifnet *, + union if_snd_tag_alloc_params *, + struct m_snd_tag **); +#endif static int lagg_ether_setmulti(struct lagg_softc *); static int lagg_ether_cmdmulti(struct lagg_port *, int); static int lagg_setflag(struct lagg_port *, int, int, @@ -503,7 +509,12 @@ lagg_clone_create(struct if_clone *ifc, ifp->if_ioctl = lagg_ioctl; ifp->if_get_counter = lagg_get_counter; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; +#ifdef RATELIMIT + ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; + ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS | IFCAP_TXRTLMT; +#else ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; +#endif /* * Attach as an ordinary ethernet device, children will be attached @@ -1549,6 +1560,52 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd return (error); } +#ifdef RATELIMIT +static int +lagg_snd_tag_alloc(struct ifnet *ifp, + union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; + struct lagg_port *lp; + struct lagg_lb *lb; + uint32_t p; + + switch (sc->sc_proto) { + case LAGG_PROTO_FAILOVER: + lp = lagg_link_active(sc, sc->sc_primary); + break; + case LAGG_PROTO_LOADBALANCE: + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || + params->hdr.flowtype == M_HASHTYPE_NONE) + return (EOPNOTSUPP); + p = params->hdr.flowid >> sc->flowid_shift; + p %= sc->sc_count; + lb = (struct lagg_lb *)sc->sc_psc; + lp = lb->lb_ports[p]; + lp = lagg_link_active(sc, lp); + break; + case LAGG_PROTO_LACP: + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || + params->hdr.flowtype == M_HASHTYPE_NONE) + return (EOPNOTSUPP); + lp = lacp_select_tx_port_by_hash(sc, params->hdr.flowid); + break; + default: + return (EOPNOTSUPP); + } + if (lp == NULL) + return (EOPNOTSUPP); + ifp = lp->lp_ifp; + if (ifp == NULL || ifp->if_snd_tag_alloc == NULL || + (ifp->if_capenable & IFCAP_TXRTLMT) == 0) + return (EOPNOTSUPP); + + /* forward allocation request */ + return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); +} +#endif + static int lagg_ether_setmulti(struct lagg_softc *sc) { Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/if_var.h Wed Jan 18 13:31:17 2017 (r312379) @@ -175,6 +175,49 @@ struct if_encap_req { #define IFENCAP_FLAG_BROADCAST 0x02 /* Destination is broadcast */ +/* + * Network interface send tag support. The storage of "struct + * m_snd_tag" comes from the network driver and it is free to allocate + * as much additional space as it wants for its own use. + */ +struct m_snd_tag; + +#define IF_SND_TAG_TYPE_RATE_LIMIT 0 +#define IF_SND_TAG_TYPE_MAX 1 + +struct if_snd_tag_alloc_header { + uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ + uint32_t flowid; /* mbuf hash value */ + uint32_t flowtype; /* mbuf hash type */ +}; + +struct if_snd_tag_alloc_rate_limit { + struct if_snd_tag_alloc_header hdr; + uint64_t max_rate; /* in bytes/s */ +}; + +struct if_snd_tag_rate_limit_params { + uint64_t max_rate; /* in bytes/s */ +}; + +union if_snd_tag_alloc_params { + struct if_snd_tag_alloc_header hdr; + struct if_snd_tag_alloc_rate_limit rate_limit; +}; + +union if_snd_tag_modify_params { + struct if_snd_tag_rate_limit_params rate_limit; +}; + +union if_snd_tag_query_params { + struct if_snd_tag_rate_limit_params rate_limit; +}; + +typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, + struct m_snd_tag **); +typedef int (if_snd_tag_modify_t)(struct m_snd_tag *, union if_snd_tag_modify_params *); +typedef int (if_snd_tag_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); +typedef void (if_snd_tag_free_t)(struct m_snd_tag *); /* * Structure defining a network interface. @@ -304,12 +347,19 @@ struct ifnet { u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ /* + * Network adapter send tag support: + */ + if_snd_tag_alloc_t *if_snd_tag_alloc; + if_snd_tag_modify_t *if_snd_tag_modify; + if_snd_tag_query_t *if_snd_tag_query; + if_snd_tag_free_t *if_snd_tag_free; + + /* * Spare fields to be added before branching a stable branch, so * that structure can be enhanced without changing the kernel * binary interface. */ - void *if_pspare[4]; /* packet pacing / general use */ - int if_ispare[4]; /* packet pacing / general use */ + int if_ispare[4]; /* general use */ }; /* for compatibility with other BSDs */ Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/net/if_vlan.c Wed Jan 18 13:31:17 2017 (r312379) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_vlan.h" +#include "opt_ratelimit.h" #include #include @@ -212,6 +213,10 @@ static void trunk_destroy(struct ifvlant static void vlan_init(void *foo); static void vlan_input(struct ifnet *ifp, struct mbuf *m); static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); +#ifdef RATELIMIT +static int vlan_snd_tag_alloc(struct ifnet *, + union if_snd_tag_alloc_params *, struct m_snd_tag **); +#endif static void vlan_qflush(struct ifnet *ifp); static int vlan_setflag(struct ifnet *ifp, int flag, int status, int (*func)(struct ifnet *, int)); @@ -971,6 +976,9 @@ vlan_clone_create(struct if_clone *ifc, ifp->if_transmit = vlan_transmit; ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; +#ifdef RATELIMIT + ifp->if_snd_tag_alloc = vlan_snd_tag_alloc; +#endif ifp->if_flags = VLAN_IFFLAGS; ether_ifattach(ifp, eaddr); /* Now undo some of the damage... */ @@ -1591,6 +1599,15 @@ vlan_capabilities(struct ifvlan *ifv) TOEDEV(ifp) = TOEDEV(p); ifp->if_capenable |= p->if_capenable & IFCAP_TOE; } + +#ifdef RATELIMIT + /* + * If the parent interface supports ratelimiting, so does the + * VLAN interface. + */ + ifp->if_capabilities |= (p->if_capabilities & IFCAP_TXRTLMT); + ifp->if_capenable |= (p->if_capenable & IFCAP_TXRTLMT); +#endif } static void @@ -1801,3 +1818,19 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd return (error); } + +#ifdef RATELIMIT +static int +vlan_snd_tag_alloc(struct ifnet *ifp, + union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + + /* get trunk device */ + ifp = vlan_trunkdev(ifp); + if (ifp == NULL || (ifp->if_capenable & IFCAP_TXRTLMT) == 0) + return (EOPNOTSUPP); + /* forward allocation request */ + return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); +} +#endif Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/netinet/in_pcb.c Wed Jan 18 13:31:17 2017 (r312379) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipsec.h" #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_ratelimit.h" #include "opt_pcbgroup.h" #include "opt_rss.h" @@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1140,6 +1142,10 @@ in_pcbdetach(struct inpcb *inp) KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); +#ifdef RATELIMIT + if (inp->inp_snd_tag != NULL) + in_pcbdetach_txrtlmt(inp); +#endif inp->inp_socket->so_pcb = NULL; inp->inp_socket = NULL; } @@ -2677,3 +2683,253 @@ DB_SHOW_COMMAND(inpcb, db_show_inpcb) db_print_inpcb(inp, "inpcb", 0); } #endif /* DDB */ + +#ifdef RATELIMIT +/* + * Modify TX rate limit based on the existing "inp->inp_snd_tag", + * if any. + */ +int +in_pcbmodify_txrtlmt(struct inpcb *inp, uint32_t max_pacing_rate) +{ + union if_snd_tag_modify_params params = { + .rate_limit.max_rate = max_pacing_rate, + }; + struct m_snd_tag *mst; + struct ifnet *ifp; + int error; + + mst = inp->inp_snd_tag; + if (mst == NULL) + return (EINVAL); + + ifp = mst->ifp; + if (ifp == NULL) + return (EINVAL); + + if (ifp->if_snd_tag_modify == NULL) { + error = EOPNOTSUPP; + } else { + error = ifp->if_snd_tag_modify(mst, ¶ms); + } + return (error); +} + +/* + * Query existing TX rate limit based on the existing + * "inp->inp_snd_tag", if any. + */ +int +in_pcbquery_txrtlmt(struct inpcb *inp, uint32_t *p_max_pacing_rate) +{ + union if_snd_tag_query_params params = { }; + struct m_snd_tag *mst; + struct ifnet *ifp; + int error; + + mst = inp->inp_snd_tag; + if (mst == NULL) + return (EINVAL); + + ifp = mst->ifp; + if (ifp == NULL) + return (EINVAL); + + if (ifp->if_snd_tag_query == NULL) { + error = EOPNOTSUPP; + } else { + error = ifp->if_snd_tag_query(mst, ¶ms); + if (error == 0 && p_max_pacing_rate != NULL) + *p_max_pacing_rate = params.rate_limit.max_rate; + } + return (error); +} + +/* + * Allocate a new TX rate limit send tag from the network interface + * given by the "ifp" argument and save it in "inp->inp_snd_tag": + */ +int +in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet *ifp, + uint32_t flowtype, uint32_t flowid, uint32_t max_pacing_rate) +{ + union if_snd_tag_alloc_params params = { + .rate_limit.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT, + .rate_limit.hdr.flowid = flowid, + .rate_limit.hdr.flowtype = flowtype, + .rate_limit.max_rate = max_pacing_rate, + }; + int error; + + INP_WLOCK_ASSERT(inp); + + if (inp->inp_snd_tag != NULL) + return (EINVAL); + + if (ifp->if_snd_tag_alloc == NULL) { + error = EOPNOTSUPP; + } else { + error = ifp->if_snd_tag_alloc(ifp, ¶ms, &inp->inp_snd_tag); + + /* + * At success increment the refcount on + * the send tag's network interface: + */ + if (error == 0) + if_ref(inp->inp_snd_tag->ifp); + } + return (error); +} + +/* + * Free an existing TX rate limit tag based on the "inp->inp_snd_tag", + * if any: + */ +void +in_pcbdetach_txrtlmt(struct inpcb *inp) +{ + struct m_snd_tag *mst; + struct ifnet *ifp; + + INP_WLOCK_ASSERT(inp); + + mst = inp->inp_snd_tag; + inp->inp_snd_tag = NULL; + + if (mst == NULL) + return; + + ifp = mst->ifp; + if (ifp == NULL) + return; + + /* + * If the device was detached while we still had reference(s) + * on the ifp, we assume if_snd_tag_free() was replaced with + * stubs. + */ + ifp->if_snd_tag_free(mst); + + /* release reference count on network interface */ + if_rele(ifp); +} + +/* + * This function should be called when the INP_RATE_LIMIT_CHANGED flag + * is set in the fast path and will attach/detach/modify the TX rate + * limit send tag based on the socket's so_max_pacing_rate value. + */ +void +in_pcboutput_txrtlmt(struct inpcb *inp, struct ifnet *ifp, struct mbuf *mb) +{ + struct socket *socket; + uint32_t max_pacing_rate; + bool did_upgrade; + int error; + + if (inp == NULL) + return; + + socket = inp->inp_socket; + if (socket == NULL) + return; + + if (!INP_WLOCKED(inp)) { + /* + * NOTE: If the write locking fails, we need to bail + * out and use the non-ratelimited ring for the + * transmit until there is a new chance to get the + * write lock. + */ + if (!INP_TRY_UPGRADE(inp)) + return; + did_upgrade = 1; + } else { + did_upgrade = 0; + } + + /* + * NOTE: The so_max_pacing_rate value is read unlocked, + * because atomic updates are not required since the variable + * is checked at every mbuf we send. It is assumed that the + * variable read itself will be atomic. + */ + max_pacing_rate = socket->so_max_pacing_rate; + + /* + * NOTE: When attaching to a network interface a reference is + * made to ensure the network interface doesn't go away until + * all ratelimit connections are gone. The network interface + * pointers compared below represent valid network interfaces, + * except when comparing towards NULL. + */ + if (max_pacing_rate == 0 && inp->inp_snd_tag == NULL) { + error = 0; + } else if (!(ifp->if_capenable & IFCAP_TXRTLMT)) { + if (inp->inp_snd_tag != NULL) + in_pcbdetach_txrtlmt(inp); + error = 0; + } else if (inp->inp_snd_tag == NULL) { + /* + * In order to utilize packet pacing with RSS, we need + * to wait until there is a valid RSS hash before we + * can proceed: + */ + if (M_HASHTYPE_GET(mb) == M_HASHTYPE_NONE) { + error = EAGAIN; + } else { + error = in_pcbattach_txrtlmt(inp, ifp, M_HASHTYPE_GET(mb), + mb->m_pkthdr.flowid, max_pacing_rate); + } + } else { + error = in_pcbmodify_txrtlmt(inp, max_pacing_rate); + } + if (error == 0 || error == EOPNOTSUPP) + inp->inp_flags2 &= ~INP_RATE_LIMIT_CHANGED; + if (did_upgrade) + INP_DOWNGRADE(inp); +} + +/* + * Track route changes for TX rate limiting. + */ +void +in_pcboutput_eagain(struct inpcb *inp) +{ + struct socket *socket; + bool did_upgrade; + + if (inp == NULL) + return; + + socket = inp->inp_socket; + if (socket == NULL) + return; + + if (inp->inp_snd_tag == NULL) + return; + + if (!INP_WLOCKED(inp)) { + /* + * NOTE: If the write locking fails, we need to bail + * out and use the non-ratelimited ring for the + * transmit until there is a new chance to get the + * write lock. + */ + if (!INP_TRY_UPGRADE(inp)) + return; + did_upgrade = 1; + } else { + did_upgrade = 0; + } + + /* detach rate limiting */ + in_pcbdetach_txrtlmt(inp); + + /* make sure new mbuf send tag allocation is made */ + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; + + if (did_upgrade) + INP_DOWNGRADE(inp); +} +#endif /* RATELIMIT */ Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/netinet/in_pcb.h Wed Jan 18 13:31:17 2017 (r312379) @@ -181,6 +181,7 @@ struct icmp6_filter; * read-lock usage during modification, this model can be applied to other * protocols (especially SCTP). */ +struct m_snd_tag; struct inpcb { LIST_ENTRY(inpcb) inp_hash; /* (h/i) hash list */ LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */ @@ -202,11 +203,11 @@ struct inpcb { u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ - void *inp_pspare[5]; /* (x) packet pacing / general use */ + struct m_snd_tag *inp_snd_tag; /* (i) send tag for outgoing mbufs */ + void *inp_pspare[4]; /* (x) general use */ uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ uint32_t inp_rss_listen_bucket; /* (x) overridden RSS listen bucket */ - u_int inp_ispare[4]; /* (x) packet pacing / user cookie / - * general use */ + u_int inp_ispare[4]; /* (x) user cookie / general use */ /* Local and foreign ports, local and foreign addr. */ struct in_conninfo inp_inc; /* (i) list for PCB's local port */ @@ -616,6 +617,7 @@ short inp_so_options(const struct inpcb #define INP_RSS_BUCKET_SET 0x00000080 /* IP_RSS_LISTEN_BUCKET is set */ #define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */ #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ +#define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ /* * Flags passed to in_pcblookup*() functions. @@ -736,6 +738,14 @@ int in_getsockaddr(struct socket *so, st struct sockaddr * in_sockaddr(in_port_t port, struct in_addr *addr); void in_pcbsosetlabel(struct socket *so); +#ifdef RATELIMIT +int in_pcbattach_txrtlmt(struct inpcb *, struct ifnet *, uint32_t, uint32_t, uint32_t); +void in_pcbdetach_txrtlmt(struct inpcb *); +int in_pcbmodify_txrtlmt(struct inpcb *, uint32_t); +int in_pcbquery_txrtlmt(struct inpcb *, uint32_t *); +void in_pcboutput_txrtlmt(struct inpcb *, struct ifnet *, struct mbuf *); +void in_pcboutput_eagain(struct inpcb *); +#endif #endif /* _KERNEL */ #endif /* !_NETINET_IN_PCB_H_ */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/netinet/ip_output.c Wed Jan 18 13:31:17 2017 (r312379) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_ratelimit.h" #include "opt_ipsec.h" #include "opt_mbuf_stress_test.h" #include "opt_mpath.h" @@ -661,8 +662,23 @@ sendit: */ m_clrprotoflags(m); IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); +#ifdef RATELIMIT + if (inp != NULL) { + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) + in_pcboutput_txrtlmt(inp, ifp, m); + /* stamp send tag on mbuf */ + m->m_pkthdr.snd_tag = inp->inp_snd_tag; + } else { + m->m_pkthdr.snd_tag = NULL; + } +#endif error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); +#ifdef RATELIMIT + /* check for route change */ + if (error == EAGAIN) + in_pcboutput_eagain(inp); +#endif goto done; } @@ -698,8 +714,23 @@ sendit: IP_PROBE(send, NULL, NULL, mtod(m, struct ip *), ifp, mtod(m, struct ip *), NULL); +#ifdef RATELIMIT + if (inp != NULL) { + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) + in_pcboutput_txrtlmt(inp, ifp, m); + /* stamp send tag on mbuf */ + m->m_pkthdr.snd_tag = inp->inp_snd_tag; + } else { + m->m_pkthdr.snd_tag = NULL; + } +#endif error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); +#ifdef RATELIMIT + /* check for route change */ + if (error == EAGAIN) + in_pcboutput_eagain(inp); +#endif } else m_freem(m); } @@ -974,6 +1005,16 @@ ip_ctloutput(struct socket *so, struct s INP_WUNLOCK(inp); error = 0; break; + case SO_MAX_PACING_RATE: +#ifdef RATELIMIT + INP_WLOCK(inp); + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; + INP_WUNLOCK(inp); + error = 0; +#else + error = EOPNOTSUPP; +#endif + break; default: break; } Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/netinet6/ip6_output.c Wed Jan 18 13:31:17 2017 (r312379) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_ratelimit.h" #include "opt_ipsec.h" #include "opt_sctp.h" #include "opt_route.h" @@ -954,8 +955,23 @@ passout: m->m_pkthdr.len); ifa_free(&ia6->ia_ifa); } +#ifdef RATELIMIT + if (inp != NULL) { + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) + in_pcboutput_txrtlmt(inp, ifp, m); + /* stamp send tag on mbuf */ + m->m_pkthdr.snd_tag = inp->inp_snd_tag; + } else { + m->m_pkthdr.snd_tag = NULL; + } +#endif error = nd6_output_ifp(ifp, origifp, m, dst, (struct route *)ro); +#ifdef RATELIMIT + /* check for route change */ + if (error == EAGAIN) + in_pcboutput_eagain(inp); +#endif goto done; } @@ -1054,8 +1070,23 @@ sendorfree: counter_u64_add(ia->ia_ifa.ifa_obytes, m->m_pkthdr.len); } +#ifdef RATELIMIT + if (inp != NULL) { + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) + in_pcboutput_txrtlmt(inp, ifp, m); + /* stamp send tag on mbuf */ + m->m_pkthdr.snd_tag = inp->inp_snd_tag; + } else { + m->m_pkthdr.snd_tag = NULL; + } +#endif error = nd6_output_ifp(ifp, origifp, m, dst, (struct route *)ro); +#ifdef RATELIMIT + /* check for route change */ + if (error == EAGAIN) + in_pcboutput_eagain(inp); +#endif } else m_freem(m); } @@ -1441,6 +1472,16 @@ ip6_ctloutput(struct socket *so, struct INP_WUNLOCK(in6p); error = 0; break; + case SO_MAX_PACING_RATE: +#ifdef RATELIMIT + INP_WLOCK(in6p); + in6p->inp_flags2 |= INP_RATE_LIMIT_CHANGED; + INP_WUNLOCK(in6p); + error = 0; +#else + error = EOPNOTSUPP; +#endif + break; default: break; } Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Jan 18 13:27:24 2017 (r312378) +++ head/sys/sys/mbuf.h Wed Jan 18 13:31:17 2017 (r312379) @@ -130,6 +130,14 @@ struct m_tag { }; /* + * Static network interface owned tag. + * Allocated through ifp->if_snd_tag_alloc(). + */ +struct m_snd_tag { + struct ifnet *ifp; /* network interface tag belongs to */ +}; + +/* * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. * Size ILP32: 48 * LP64: 56 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jan 18 13:57:30 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 EA2CACB65D0; Wed, 18 Jan 2017 13:57:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9BD31D02; Wed, 18 Jan 2017 13:57:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IDvTM5057953; Wed, 18 Jan 2017 13:57:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IDvTTh057952; Wed, 18 Jan 2017 13:57:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701181357.v0IDvTTh057952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 18 Jan 2017 13:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312380 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 13:57:31 -0000 Author: sbruno Date: Wed Jan 18 13:57:29 2017 New Revision: 312380 URL: https://svnweb.freebsd.org/changeset/base/312380 Log: Change device type to unbreak drm-next testing and builds. Submitted by: Matt Macy Modified: head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Jan 18 13:31:17 2017 (r312379) +++ head/sys/dev/e1000/if_em.h Wed Jan 18 13:57:29 2017 (r312380) @@ -436,7 +436,7 @@ struct adapter { #define intr_type shared->isc_intr /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; - struct device *dev; + device_t *dev; struct cdev *led_dev; struct em_tx_queue *tx_queues; From owner-svn-src-head@freebsd.org Wed Jan 18 14:15:17 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 71B32CB6CDA; Wed, 18 Jan 2017 14:15:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 1A5221197; Wed, 18 Jan 2017 14:15:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id c85so4417729wmi.1; Wed, 18 Jan 2017 06:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wn3ZtrJBFksGXz+lHnx1HFHiYHRDAtXVil+RuCrkEQU=; b=GX9oKHH/BlLL1yK4eieAsFSLkoKd6L3w6cKecZo1RnGVMiiFWFncyb7iVm7+KhPrH0 jk1SsMgwlUDzdYTcXwEYAHc1Nz6gH0wlWUBOKIbkr3etrAjWiMidE8pbENwupVXevJLn hZmSpFylvFcI/y5WX4BbnGL2Vkcu9PdgIMOySoyDm1xd9qv6XD4dn4CT4QHD5WkK7nwA WQYwQ2U4sEMmSj+yna2pVACEgLvF5OYSPzfxPWmCWmN51Q1phMIZNTXehVWcxm0HEBpG iljPTkdwHc1ZrxHGDtr5BB4+ammCjCG4lAiG/uobau85U4rJXYue4/AFCeBLVHqiIjuY uOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wn3ZtrJBFksGXz+lHnx1HFHiYHRDAtXVil+RuCrkEQU=; b=XUP+Mq1EJ+ruu1ONPr94t3/4AHmvOYPWsSqu40/AcB3xqR/+FgHyjSmjCO5efaIkV7 o+RKdxY47pH0HT2pZp7w0pXDmMNUBTRIbESi/ykr7Byj9iz2UxkQPEDsecaeb7hePjF3 1+WfWPj0hzsxvQeTtQfC4XM0FAuhjXrXew2Nn4u/jeJIoWvD05DU0yDlGUEoh0n9WaCp 3+iNiN0BcCtvh9jFZsWUtVhjqGxuOGI65Ov2vkYUkc3EBUPYvOr9Wf3yz7MzAWIt0Tbb 2KLuV3/CSUoNyCqyeRZwCI8byMHu0tSY4RkmoYytQ75FqolZ9dpBI9Q+uo07SGVVZ1nA vhNQ== X-Gm-Message-State: AIkVDXLfObGHstvhXn++7uJSU0GZuvT6IXjo9+h+MLzSE9cuzZOwI8S3g0cYfYm2VBpmug== X-Received: by 10.28.140.140 with SMTP id o134mr21374868wmd.87.1484748915325; Wed, 18 Jan 2017 06:15:15 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id m78sm5211346wmd.8.2017.01.18.06.15.13 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 18 Jan 2017 06:15:14 -0800 (PST) Date: Wed, 18 Jan 2017 15:15:11 +0100 From: Mateusz Guzik To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312380 - head/sys/dev/e1000 Message-ID: <20170118141511.GB4813@dft-labs.eu> References: <201701181357.v0IDvTTh057952@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201701181357.v0IDvTTh057952@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Wed, 18 Jan 2017 14:15:17 -0000 On Wed, Jan 18, 2017 at 01:57:29PM +0000, Sean Bruno wrote: > Author: sbruno > Date: Wed Jan 18 13:57:29 2017 > New Revision: 312380 > URL: https://svnweb.freebsd.org/changeset/base/312380 > > Log: > Change device type to unbreak drm-next testing and builds. > > Submitted by: Matt Macy > > Modified: > head/sys/dev/e1000/if_em.h > > Modified: head/sys/dev/e1000/if_em.h > ============================================================================== > --- head/sys/dev/e1000/if_em.h Wed Jan 18 13:31:17 2017 (r312379) > +++ head/sys/dev/e1000/if_em.h Wed Jan 18 13:57:29 2017 (r312380) > @@ -436,7 +436,7 @@ struct adapter { > #define intr_type shared->isc_intr > /* FreeBSD operating-system-specific structures. */ > struct e1000_osdep osdep; > - struct device *dev; > + device_t *dev; this should be 'device_t dev'; > struct cdev *led_dev; > > struct em_tx_queue *tx_queues; > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Mateusz Guzik From owner-svn-src-head@freebsd.org Wed Jan 18 14:23:44 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 DF9A0CB52E0; Wed, 18 Jan 2017 14:23:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF3AA1D2F; Wed, 18 Jan 2017 14:23:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IENh6S071230; Wed, 18 Jan 2017 14:23:43 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IENhFM071229; Wed, 18 Jan 2017 14:23:43 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701181423.v0IENhFM071229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 18 Jan 2017 14:23:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312383 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 14:23:45 -0000 Author: sbruno Date: Wed Jan 18 14:23:43 2017 New Revision: 312383 URL: https://svnweb.freebsd.org/changeset/base/312383 Log: ugh, device_t not device_t * Reported by: hps Modified: head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Jan 18 14:14:00 2017 (r312382) +++ head/sys/dev/e1000/if_em.h Wed Jan 18 14:23:43 2017 (r312383) @@ -436,7 +436,7 @@ struct adapter { #define intr_type shared->isc_intr /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; - device_t *dev; + device_t dev; struct cdev *led_dev; struct em_tx_queue *tx_queues; From owner-svn-src-head@freebsd.org Wed Jan 18 14:42:01 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 744B7CB5A85; Wed, 18 Jan 2017 14:42:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C1D187A; Wed, 18 Jan 2017 14:42:00 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IEg0rk078591; Wed, 18 Jan 2017 14:42:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IEfx12078583; Wed, 18 Jan 2017 14:41:59 GMT (envelope-from br@FreeBSD.org) Message-Id: <201701181441.v0IEfx12078583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 18 Jan 2017 14:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312384 - head/sys/boot/fdt/dts/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 14:42:01 -0000 Author: br Date: Wed Jan 18 14:41:59 2017 New Revision: 312384 URL: https://svnweb.freebsd.org/changeset/base/312384 Log: Remove empty ranges property so beri_simplebus can be attached again. Sponsored by: DARPA, AFRL Modified: head/sys/boot/fdt/dts/mips/beri-netfpga.dts head/sys/boot/fdt/dts/mips/beri-sim.dts head/sys/boot/fdt/dts/mips/beripad-de4.dts head/sys/boot/fdt/dts/mips/beripad-sockit.dts Modified: head/sys/boot/fdt/dts/mips/beri-netfpga.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beri-netfpga.dts Wed Jan 18 14:23:43 2017 (r312383) +++ head/sys/boot/fdt/dts/mips/beri-netfpga.dts Wed Jan 18 14:41:59 2017 (r312384) @@ -97,7 +97,6 @@ * we use mips4k coprocessor 0 interrupt management directly. */ compatible = "simple-bus", "mips,mips4k"; - ranges = <>; beripic: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; Modified: head/sys/boot/fdt/dts/mips/beri-sim.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beri-sim.dts Wed Jan 18 14:23:43 2017 (r312383) +++ head/sys/boot/fdt/dts/mips/beri-sim.dts Wed Jan 18 14:41:59 2017 (r312384) @@ -95,7 +95,6 @@ * we use mips4k coprocessor 0 interrupt management directly. */ compatible = "simple-bus", "mips,mips4k"; - ranges = <>; beripic0: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; Modified: head/sys/boot/fdt/dts/mips/beripad-de4.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beripad-de4.dts Wed Jan 18 14:23:43 2017 (r312383) +++ head/sys/boot/fdt/dts/mips/beripad-de4.dts Wed Jan 18 14:41:59 2017 (r312384) @@ -95,7 +95,6 @@ * we use mips4k coprocessor 0 interrupt management directly. */ compatible = "simple-bus", "mips,mips4k"; - ranges = <>; beripic0: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; Modified: head/sys/boot/fdt/dts/mips/beripad-sockit.dts ============================================================================== --- head/sys/boot/fdt/dts/mips/beripad-sockit.dts Wed Jan 18 14:23:43 2017 (r312383) +++ head/sys/boot/fdt/dts/mips/beripad-sockit.dts Wed Jan 18 14:41:59 2017 (r312384) @@ -93,7 +93,6 @@ * we use mips4k coprocessor 0 interrupt management directly. */ compatible = "simple-bus", "mips,mips4k"; - /* ranges = <>; */ beripic0: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; From owner-svn-src-head@freebsd.org Wed Jan 18 17:09:23 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 B8950CB69FC; Wed, 18 Jan 2017 17:09:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8839010BD; Wed, 18 Jan 2017 17:09:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IH9Mog038973; Wed, 18 Jan 2017 17:09:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IH9M5M038972; Wed, 18 Jan 2017 17:09:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701181709.v0IH9M5M038972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 18 Jan 2017 17:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312387 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 17:09:23 -0000 Author: glebius Date: Wed Jan 18 17:09:22 2017 New Revision: 312387 URL: https://svnweb.freebsd.org/changeset/base/312387 Log: Fix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME lead to delayed send of data sent with sendto(MSG_NOSIGNAL). Submitted by: rrs Modified: head/sys/sys/socket.h Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Wed Jan 18 15:23:40 2017 (r312386) +++ head/sys/sys/socket.h Wed Jan 18 17:09:22 2017 (r312387) @@ -446,7 +446,7 @@ struct msghdr { #endif #ifdef _KERNEL #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ -#define MSG_MORETOCOME 0x20000 /* additional data pending */ +#define MSG_MORETOCOME 0x100000 /* additional data pending */ #endif /* From owner-svn-src-head@freebsd.org Wed Jan 18 17:21:29 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 7DC20CB6E59; Wed, 18 Jan 2017 17:21:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5EA1A46; Wed, 18 Jan 2017 17:21:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IHLSKs044176; Wed, 18 Jan 2017 17:21:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IHLSYW044175; Wed, 18 Jan 2017 17:21:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701181721.v0IHLSYW044175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 18 Jan 2017 17:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312388 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 17:21:29 -0000 Author: glebius Date: Wed Jan 18 17:21:28 2017 New Revision: 312388 URL: https://svnweb.freebsd.org/changeset/base/312388 Log: Format and sort MSG_* flags, to prevent misedits in future. There is no functional change. Modified: head/sys/sys/socket.h Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Wed Jan 18 17:09:22 2017 (r312387) +++ head/sys/sys/socket.h Wed Jan 18 17:21:28 2017 (r312388) @@ -425,28 +425,36 @@ struct msghdr { int msg_flags; /* flags on received message */ }; -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ -#define MSG_EOR 0x8 /* data completes record */ -#define MSG_TRUNC 0x10 /* data discarded before delivery */ -#define MSG_CTRUNC 0x20 /* control data lost before delivery */ -#define MSG_WAITALL 0x40 /* wait for full request or error */ +#define MSG_OOB 0x00000001 /* process out-of-band data */ +#define MSG_PEEK 0x00000002 /* peek at incoming message */ +#define MSG_DONTROUTE 0x00000004 /* send without using routing tables */ +#define MSG_EOR 0x00000008 /* data completes record */ +#define MSG_TRUNC 0x00000010 /* data discarded before delivery */ +#define MSG_CTRUNC 0x00000020 /* control data lost before delivery */ +#define MSG_WAITALL 0x00000040 /* wait for full request or error */ +#if __BSD_VISIBLE +#define MSG_DONTWAIT 0x00000080 /* this message should be nonblocking */ +#define MSG_EOF 0x00000100 /* data completes connection */ +/* 0x00000200 unused */ +/* 0x00000400 unused */ +/* 0x00000800 unused */ +/* 0x00001000 unused */ +#define MSG_NOTIFICATION 0x00002000 /* SCTP notification */ +#define MSG_NBIO 0x00004000 /* FIONBIO mode, used by fifofs */ +#define MSG_COMPAT 0x00008000 /* used in sendit() */ +#endif +#ifdef _KERNEL +#define MSG_SOCALLBCK 0x00010000 /* for use by socket callbacks - soreceive (TCP) */ +#endif #if __POSIX_VISIBLE >= 200809 -#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ +#define MSG_NOSIGNAL 0x00020000 /* do not generate SIGPIPE on EOF */ #endif #if __BSD_VISIBLE -#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ -#define MSG_EOF 0x100 /* data completes connection */ -#define MSG_NOTIFICATION 0x2000 /* SCTP notification */ -#define MSG_NBIO 0x4000 /* FIONBIO mode, used by fifofs */ -#define MSG_COMPAT 0x8000 /* used in sendit() */ -#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */ -#define MSG_WAITFORONE 0x80000 /* for recvmmsg() */ +#define MSG_CMSG_CLOEXEC 0x00040000 /* make received fds close-on-exec */ +#define MSG_WAITFORONE 0x00080000 /* for recvmmsg() */ #endif #ifdef _KERNEL -#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ -#define MSG_MORETOCOME 0x100000 /* additional data pending */ +#define MSG_MORETOCOME 0x00100000 /* additional data pending */ #endif /* From owner-svn-src-head@freebsd.org Wed Jan 18 17:31:40 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 68E50CB6442; Wed, 18 Jan 2017 17:31:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 52C3212EF; Wed, 18 Jan 2017 17:31:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0IHVW6Y058752 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 18 Jan 2017 09:31:32 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0IHVWmZ058751; Wed, 18 Jan 2017 09:31:32 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 18 Jan 2017 09:31:32 -0800 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312379 - in head: lib/libc/sys sbin/ifconfig sys/conf sys/kern sys/modules/if_lagg sys/modules/if_vlan sys/net sys/netinet sys/netinet6 sys/sys Message-ID: <20170118173132.GD2611@FreeBSD.org> References: <201701181331.v0IDVHWf048428@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701181331.v0IDVHWf048428@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Wed, 18 Jan 2017 17:31:40 -0000 Hi! I'm quite disappointed by this checkin. This is an interesting experimental feature, but to my knowledge, there were no production testing of the feature, that will prove that the idea actually works. To my knowledge the code isn't used anywhere right now, it was just tested to work as a concept. At the same time it introduces yet another socket to interface layering violation, bloats the ifnet structure and other intrusive things. Please correct me if I am wrong. On Wed, Jan 18, 2017 at 01:31:17PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Wed Jan 18 13:31:17 2017 H> New Revision: 312379 H> URL: https://svnweb.freebsd.org/changeset/base/312379 H> H> Log: H> Implement kernel support for hardware rate limited sockets. H> H> - Add RATELIMIT kernel configuration keyword which must be set to H> enable the new functionality. H> H> - Add support for hardware driven, Receive Side Scaling, RSS aware, rate H> limited sendqueues and expose the functionality through the already H> established SO_MAX_PACING_RATE setsockopt(). The API support rates in H> the range from 1 to 4Gbytes/s which are suitable for regular TCP and H> UDP streams. The setsockopt(2) manual page has been updated. H> H> - Add rate limit function callback API to "struct ifnet" which supports H> the following operations: if_snd_tag_alloc(), if_snd_tag_modify(), H> if_snd_tag_query() and if_snd_tag_free(). H> H> - Add support to ifconfig to view, set and clear the IFCAP_TXRTLMT H> flag, which tells if a network driver supports rate limiting or not. H> H> - This patch also adds support for rate limiting through VLAN and LAGG H> intermediate network devices. H> H> - How rate limiting works: H> H> 1) The userspace application calls setsockopt() after accepting or H> making a new connection to set the rate which is then stored in the H> socket structure in the kernel. Later on when packets are transmitted H> a check is made in the transmit path for rate changes. A rate change H> implies a non-blocking ifp->if_snd_tag_alloc() call will be made to the H> destination network interface, which then sets up a custom sendqueue H> with the given rate limitation parameter. A "struct m_snd_tag" pointer is H> returned which serves as a "snd_tag" hint in the m_pkthdr for the H> subsequently transmitted mbufs. H> H> 2) When the network driver sees the "m->m_pkthdr.snd_tag" different H> from NULL, it will move the packets into a designated rate limited sendqueue H> given by the snd_tag pointer. It is up to the individual drivers how the rate H> limited traffic will be rate limited. H> H> 3) Route changes are detected by the NIC drivers in the ifp->if_transmit() H> routine when the ifnet pointer in the incoming snd_tag mismatches the H> one of the network interface. The network adapter frees the mbuf and H> returns EAGAIN which causes the ip_output() to release and clear the send H> tag. Upon next ip_output() a new "snd_tag" will be tried allocated. H> H> 4) When the PCB is detached the custom sendqueue will be released by a H> non-blocking ifp->if_snd_tag_free() call to the currently bound network H> interface. H> H> Reviewed by: wblock (manpages), adrian, gallatin, scottl (network) H> Differential Revision: https://reviews.freebsd.org/D3687 H> Sponsored by: Mellanox Technologies H> MFC after: 3 months H> H> Modified: H> head/lib/libc/sys/getsockopt.2 H> head/sbin/ifconfig/ifconfig.8 H> head/sbin/ifconfig/ifconfig.c H> head/sys/conf/NOTES H> head/sys/conf/config.mk H> head/sys/conf/kern.opts.mk H> head/sys/conf/options H> head/sys/kern/uipc_socket.c H> head/sys/modules/if_lagg/Makefile H> head/sys/modules/if_vlan/Makefile H> head/sys/net/ieee8023ad_lacp.c H> head/sys/net/ieee8023ad_lacp.h H> head/sys/net/if.h H> head/sys/net/if_dead.c H> head/sys/net/if_lagg.c H> head/sys/net/if_var.h H> head/sys/net/if_vlan.c H> head/sys/netinet/in_pcb.c H> head/sys/netinet/in_pcb.h H> head/sys/netinet/ip_output.c H> head/sys/netinet6/ip6_output.c H> head/sys/sys/mbuf.h H> head/sys/sys/socket.h H> head/sys/sys/socketvar.h H> H> Modified: head/lib/libc/sys/getsockopt.2 H> ============================================================================== H> --- head/lib/libc/sys/getsockopt.2 Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/lib/libc/sys/getsockopt.2 Wed Jan 18 13:31:17 2017 (r312379) H> @@ -28,7 +28,7 @@ H> .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 H> .\" $FreeBSD$ H> .\" H> -.Dd April 5, 2013 H> +.Dd January 18, 2017 H> .Dt GETSOCKOPT 2 H> .Os H> .Sh NAME H> @@ -188,6 +188,7 @@ The following options are recognized in H> .It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)" H> .It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)" H> .It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP" H> +.It Dv SO_MAX_PACING_RATE "set the maximum transmit rate in bytes per second for the socket" H> .El H> .Pp H> .Dv SO_DEBUG H> @@ -515,6 +516,10 @@ returns the maximal number of queued con H> returns the number of unaccepted complete connections. H> .Dv SO_LISTENINCQLEN H> returns the number of unaccepted incomplete connections. H> +.Pp H> +.Dv SO_MAX_PACING_RATE H> +instruct the socket and underlying network adapter layers to limit the H> +transfer rate to the given unsigned 32-bit value in bytes per second. H> .Sh RETURN VALUES H> .Rv -std H> .Sh ERRORS H> H> Modified: head/sbin/ifconfig/ifconfig.8 H> ============================================================================== H> --- head/sbin/ifconfig/ifconfig.8 Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sbin/ifconfig/ifconfig.8 Wed Jan 18 13:31:17 2017 (r312379) H> @@ -28,7 +28,7 @@ H> .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 H> .\" $FreeBSD$ H> .\" H> -.Dd September 17, 2016 H> +.Dd January 18, 2017 H> .Dt IFCONFIG 8 H> .Os H> .Sh NAME H> @@ -460,6 +460,8 @@ this directive is used to select between H> and 802.11g H> .Pq Cm 11g H> operating modes. H> +.It Cm txrtlmt H> +Set if the driver supports TX rate limiting. H> .It Cm inst Ar minst , Cm instance Ar minst H> Set the media instance to H> .Ar minst . H> H> Modified: head/sbin/ifconfig/ifconfig.c H> ============================================================================== H> --- head/sbin/ifconfig/ifconfig.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sbin/ifconfig/ifconfig.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -1145,7 +1145,7 @@ unsetifdescr(const char *val, int value, H> "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ H> "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ H> "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ H> -"\26RXCSUM_IPV6\27TXCSUM_IPV6" H> +"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT" H> H> /* H> * Print the status of the interface. If an address family was H> @@ -1453,6 +1453,8 @@ static struct cmd basic_cmds[] = { H> DEF_CMD("-wol_mcast", -IFCAP_WOL_MCAST, setifcap), H> DEF_CMD("wol_magic", IFCAP_WOL_MAGIC, setifcap), H> DEF_CMD("-wol_magic", -IFCAP_WOL_MAGIC, setifcap), H> + DEF_CMD("txrtlmt", IFCAP_TXRTLMT, setifcap), H> + DEF_CMD("-txrtlmt", -IFCAP_TXRTLMT, setifcap), H> DEF_CMD("normal", -IFF_LINK0, setifflags), H> DEF_CMD("compress", IFF_LINK0, setifflags), H> DEF_CMD("noicmp", IFF_LINK1, setifflags), H> H> Modified: head/sys/conf/NOTES H> ============================================================================== H> --- head/sys/conf/NOTES Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/conf/NOTES Wed Jan 18 13:31:17 2017 (r312379) H> @@ -619,6 +619,8 @@ options HWPMC_HOOKS # Other necessary H> options INET #Internet communications protocols H> options INET6 #IPv6 communications protocols H> H> +options RATELIMIT # TX rate limiting support H> + H> options ROUTETABLES=2 # allocated fibs up to 65536. default is 1. H> # but that would be a bad idea as they are large. H> H> H> Modified: head/sys/conf/config.mk H> ============================================================================== H> --- head/sys/conf/config.mk Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/conf/config.mk Wed Jan 18 13:31:17 2017 (r312379) H> @@ -19,6 +19,10 @@ opt_inet.h: H> opt_inet6.h: H> @echo "#define INET6 1" > ${.TARGET} H> .endif H> +.if ${MK_RATELIMIT} != "no" H> +opt_ratelimit.h: H> + @echo "#define RATELIMIT 1" > ${.TARGET} H> +.endif H> .if ${MK_EISA} != "no" H> opt_eisa.h: H> @echo "#define DEV_EISA 1" > ${.TARGET} H> H> Modified: head/sys/conf/kern.opts.mk H> ============================================================================== H> --- head/sys/conf/kern.opts.mk Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/conf/kern.opts.mk Wed Jan 18 13:31:17 2017 (r312379) H> @@ -48,6 +48,7 @@ __DEFAULT_NO_OPTIONS = \ H> EXTRA_TCP_STACKS \ H> NAND \ H> OFED \ H> + RATELIMIT \ H> REPRODUCIBLE_BUILD H> H> # Some options are totally broken on some architectures. We disable H> H> Modified: head/sys/conf/options H> ============================================================================== H> --- head/sys/conf/options Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/conf/options Wed Jan 18 13:31:17 2017 (r312379) H> @@ -412,6 +412,7 @@ BOOTP_NFSV3 opt_bootp.h H> BOOTP_WIRED_TO opt_bootp.h H> DEVICE_POLLING H> DUMMYNET opt_ipdn.h H> +RATELIMIT opt_ratelimit.h H> INET opt_inet.h H> INET6 opt_inet6.h H> IPDIVERT H> H> Modified: head/sys/kern/uipc_socket.c H> ============================================================================== H> --- head/sys/kern/uipc_socket.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/kern/uipc_socket.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -2699,6 +2699,14 @@ sosetopt(struct socket *so, struct socko H> so->so_ts_clock = optval; H> break; H> H> + case SO_MAX_PACING_RATE: H> + error = sooptcopyin(sopt, &val32, sizeof(val32), H> + sizeof(val32)); H> + if (error) H> + goto bad; H> + so->so_max_pacing_rate = val32; H> + break; H> + H> default: H> if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) H> error = hhook_run_socket(so, sopt, H> @@ -2890,6 +2898,10 @@ integer: H> optval = so->so_ts_clock; H> goto integer; H> H> + case SO_MAX_PACING_RATE: H> + optval = so->so_max_pacing_rate; H> + goto integer; H> + H> default: H> if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) H> error = hhook_run_socket(so, sopt, H> H> Modified: head/sys/modules/if_lagg/Makefile H> ============================================================================== H> --- head/sys/modules/if_lagg/Makefile Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/modules/if_lagg/Makefile Wed Jan 18 13:31:17 2017 (r312379) H> @@ -2,6 +2,6 @@ H> H> .PATH: ${.CURDIR}/../../net H> KMOD= if_lagg H> -SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h H> +SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h opt_ratelimit.h H> H> .include H> H> Modified: head/sys/modules/if_vlan/Makefile H> ============================================================================== H> --- head/sys/modules/if_vlan/Makefile Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/modules/if_vlan/Makefile Wed Jan 18 13:31:17 2017 (r312379) H> @@ -4,6 +4,6 @@ H> H> KMOD= if_vlan H> SRCS= if_vlan.c H> -SRCS+= opt_inet.h opt_vlan.h H> +SRCS+= opt_inet.h opt_vlan.h opt_ratelimit.h H> H> .include H> H> Modified: head/sys/net/ieee8023ad_lacp.c H> ============================================================================== H> --- head/sys/net/ieee8023ad_lacp.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/ieee8023ad_lacp.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -30,6 +30,8 @@ H> #include H> __FBSDID("$FreeBSD$"); H> H> +#include "opt_ratelimit.h" H> + H> #include H> #include H> #include H> @@ -853,6 +855,35 @@ lacp_select_tx_port(struct lagg_softc *s H> H> return (lp->lp_lagg); H> } H> + H> +#ifdef RATELIMIT H> +struct lagg_port * H> +lacp_select_tx_port_by_hash(struct lagg_softc *sc, uint32_t flowid) H> +{ H> + struct lacp_softc *lsc = LACP_SOFTC(sc); H> + struct lacp_portmap *pm; H> + struct lacp_port *lp; H> + uint32_t hash; H> + H> + if (__predict_false(lsc->lsc_suppress_distributing)) { H> + LACP_DPRINTF((NULL, "%s: waiting transit\n", __func__)); H> + return (NULL); H> + } H> + H> + pm = &lsc->lsc_pmap[lsc->lsc_activemap]; H> + if (pm->pm_count == 0) { H> + LACP_DPRINTF((NULL, "%s: no active aggregator\n", __func__)); H> + return (NULL); H> + } H> + H> + hash = flowid >> sc->flowid_shift; H> + hash %= pm->pm_count; H> + lp = pm->pm_map[hash]; H> + H> + return (lp->lp_lagg); H> +} H> +#endif H> + H> /* H> * lacp_suppress_distributing: drop transmit packets for a while H> * to preserve packet ordering. H> H> Modified: head/sys/net/ieee8023ad_lacp.h H> ============================================================================== H> --- head/sys/net/ieee8023ad_lacp.h Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/ieee8023ad_lacp.h Wed Jan 18 13:31:17 2017 (r312379) H> @@ -284,6 +284,9 @@ struct lacp_softc { H> H> struct mbuf *lacp_input(struct lagg_port *, struct mbuf *); H> struct lagg_port *lacp_select_tx_port(struct lagg_softc *, struct mbuf *); H> +#ifdef RATELIMIT H> +struct lagg_port *lacp_select_tx_port_by_hash(struct lagg_softc *, uint32_t); H> +#endif H> void lacp_attach(struct lagg_softc *); H> void lacp_detach(void *); H> void lacp_init(struct lagg_softc *); H> H> Modified: head/sys/net/if.h H> ============================================================================== H> --- head/sys/net/if.h Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/if.h Wed Jan 18 13:31:17 2017 (r312379) H> @@ -239,6 +239,7 @@ struct if_data { H> #define IFCAP_RXCSUM_IPV6 0x200000 /* can offload checksum on IPv6 RX */ H> #define IFCAP_TXCSUM_IPV6 0x400000 /* can offload checksum on IPv6 TX */ H> #define IFCAP_HWSTATS 0x800000 /* manages counters internally */ H> +#define IFCAP_TXRTLMT 0x1000000 /* hardware supports TX rate limiting */ H> H> #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) H> H> H> Modified: head/sys/net/if_dead.c H> ============================================================================== H> --- head/sys/net/if_dead.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/if_dead.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -100,6 +100,30 @@ ifdead_get_counter(struct ifnet *ifp, if H> return (0); H> } H> H> +static int H> +ifdead_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, H> + struct m_snd_tag **ppmt) H> +{ H> + return (EOPNOTSUPP); H> +} H> + H> +static int H> +ifdead_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) H> +{ H> + return (EOPNOTSUPP); H> +} H> + H> +static int H> +ifdead_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params) H> +{ H> + return (EOPNOTSUPP); H> +} H> + H> +static void H> +ifdead_snd_tag_free(struct m_snd_tag *pmt) H> +{ H> +} H> + H> void H> if_dead(struct ifnet *ifp) H> { H> @@ -112,4 +136,8 @@ if_dead(struct ifnet *ifp) H> ifp->if_qflush = ifdead_qflush; H> ifp->if_transmit = ifdead_transmit; H> ifp->if_get_counter = ifdead_get_counter; H> + ifp->if_snd_tag_alloc = ifdead_snd_tag_alloc; H> + ifp->if_snd_tag_modify = ifdead_snd_tag_modify; H> + ifp->if_snd_tag_query = ifdead_snd_tag_query; H> + ifp->if_snd_tag_free = ifdead_snd_tag_free; H> } H> H> Modified: head/sys/net/if_lagg.c H> ============================================================================== H> --- head/sys/net/if_lagg.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/if_lagg.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); H> H> #include "opt_inet.h" H> #include "opt_inet6.h" H> +#include "opt_ratelimit.h" H> H> #include H> #include H> @@ -118,6 +119,11 @@ static void lagg_port2req(struct lagg_po H> static void lagg_init(void *); H> static void lagg_stop(struct lagg_softc *); H> static int lagg_ioctl(struct ifnet *, u_long, caddr_t); H> +#ifdef RATELIMIT H> +static int lagg_snd_tag_alloc(struct ifnet *, H> + union if_snd_tag_alloc_params *, H> + struct m_snd_tag **); H> +#endif H> static int lagg_ether_setmulti(struct lagg_softc *); H> static int lagg_ether_cmdmulti(struct lagg_port *, int); H> static int lagg_setflag(struct lagg_port *, int, int, H> @@ -503,7 +509,12 @@ lagg_clone_create(struct if_clone *ifc, H> ifp->if_ioctl = lagg_ioctl; H> ifp->if_get_counter = lagg_get_counter; H> ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; H> +#ifdef RATELIMIT H> + ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; H> + ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS | IFCAP_TXRTLMT; H> +#else H> ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; H> +#endif H> H> /* H> * Attach as an ordinary ethernet device, children will be attached H> @@ -1549,6 +1560,52 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd H> return (error); H> } H> H> +#ifdef RATELIMIT H> +static int H> +lagg_snd_tag_alloc(struct ifnet *ifp, H> + union if_snd_tag_alloc_params *params, H> + struct m_snd_tag **ppmt) H> +{ H> + struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; H> + struct lagg_port *lp; H> + struct lagg_lb *lb; H> + uint32_t p; H> + H> + switch (sc->sc_proto) { H> + case LAGG_PROTO_FAILOVER: H> + lp = lagg_link_active(sc, sc->sc_primary); H> + break; H> + case LAGG_PROTO_LOADBALANCE: H> + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || H> + params->hdr.flowtype == M_HASHTYPE_NONE) H> + return (EOPNOTSUPP); H> + p = params->hdr.flowid >> sc->flowid_shift; H> + p %= sc->sc_count; H> + lb = (struct lagg_lb *)sc->sc_psc; H> + lp = lb->lb_ports[p]; H> + lp = lagg_link_active(sc, lp); H> + break; H> + case LAGG_PROTO_LACP: H> + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) == 0 || H> + params->hdr.flowtype == M_HASHTYPE_NONE) H> + return (EOPNOTSUPP); H> + lp = lacp_select_tx_port_by_hash(sc, params->hdr.flowid); H> + break; H> + default: H> + return (EOPNOTSUPP); H> + } H> + if (lp == NULL) H> + return (EOPNOTSUPP); H> + ifp = lp->lp_ifp; H> + if (ifp == NULL || ifp->if_snd_tag_alloc == NULL || H> + (ifp->if_capenable & IFCAP_TXRTLMT) == 0) H> + return (EOPNOTSUPP); H> + H> + /* forward allocation request */ H> + return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); H> +} H> +#endif H> + H> static int H> lagg_ether_setmulti(struct lagg_softc *sc) H> { H> H> Modified: head/sys/net/if_var.h H> ============================================================================== H> --- head/sys/net/if_var.h Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/if_var.h Wed Jan 18 13:31:17 2017 (r312379) H> @@ -175,6 +175,49 @@ struct if_encap_req { H> H> #define IFENCAP_FLAG_BROADCAST 0x02 /* Destination is broadcast */ H> H> +/* H> + * Network interface send tag support. The storage of "struct H> + * m_snd_tag" comes from the network driver and it is free to allocate H> + * as much additional space as it wants for its own use. H> + */ H> +struct m_snd_tag; H> + H> +#define IF_SND_TAG_TYPE_RATE_LIMIT 0 H> +#define IF_SND_TAG_TYPE_MAX 1 H> + H> +struct if_snd_tag_alloc_header { H> + uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ H> + uint32_t flowid; /* mbuf hash value */ H> + uint32_t flowtype; /* mbuf hash type */ H> +}; H> + H> +struct if_snd_tag_alloc_rate_limit { H> + struct if_snd_tag_alloc_header hdr; H> + uint64_t max_rate; /* in bytes/s */ H> +}; H> + H> +struct if_snd_tag_rate_limit_params { H> + uint64_t max_rate; /* in bytes/s */ H> +}; H> + H> +union if_snd_tag_alloc_params { H> + struct if_snd_tag_alloc_header hdr; H> + struct if_snd_tag_alloc_rate_limit rate_limit; H> +}; H> + H> +union if_snd_tag_modify_params { H> + struct if_snd_tag_rate_limit_params rate_limit; H> +}; H> + H> +union if_snd_tag_query_params { H> + struct if_snd_tag_rate_limit_params rate_limit; H> +}; H> + H> +typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, H> + struct m_snd_tag **); H> +typedef int (if_snd_tag_modify_t)(struct m_snd_tag *, union if_snd_tag_modify_params *); H> +typedef int (if_snd_tag_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); H> +typedef void (if_snd_tag_free_t)(struct m_snd_tag *); H> H> /* H> * Structure defining a network interface. H> @@ -304,12 +347,19 @@ struct ifnet { H> u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ H> H> /* H> + * Network adapter send tag support: H> + */ H> + if_snd_tag_alloc_t *if_snd_tag_alloc; H> + if_snd_tag_modify_t *if_snd_tag_modify; H> + if_snd_tag_query_t *if_snd_tag_query; H> + if_snd_tag_free_t *if_snd_tag_free; H> + H> + /* H> * Spare fields to be added before branching a stable branch, so H> * that structure can be enhanced without changing the kernel H> * binary interface. H> */ H> - void *if_pspare[4]; /* packet pacing / general use */ H> - int if_ispare[4]; /* packet pacing / general use */ H> + int if_ispare[4]; /* general use */ H> }; H> H> /* for compatibility with other BSDs */ H> H> Modified: head/sys/net/if_vlan.c H> ============================================================================== H> --- head/sys/net/if_vlan.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/net/if_vlan.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); H> H> #include "opt_inet.h" H> #include "opt_vlan.h" H> +#include "opt_ratelimit.h" H> H> #include H> #include H> @@ -212,6 +213,10 @@ static void trunk_destroy(struct ifvlant H> static void vlan_init(void *foo); H> static void vlan_input(struct ifnet *ifp, struct mbuf *m); H> static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); H> +#ifdef RATELIMIT H> +static int vlan_snd_tag_alloc(struct ifnet *, H> + union if_snd_tag_alloc_params *, struct m_snd_tag **); H> +#endif H> static void vlan_qflush(struct ifnet *ifp); H> static int vlan_setflag(struct ifnet *ifp, int flag, int status, H> int (*func)(struct ifnet *, int)); H> @@ -971,6 +976,9 @@ vlan_clone_create(struct if_clone *ifc, H> ifp->if_transmit = vlan_transmit; H> ifp->if_qflush = vlan_qflush; H> ifp->if_ioctl = vlan_ioctl; H> +#ifdef RATELIMIT H> + ifp->if_snd_tag_alloc = vlan_snd_tag_alloc; H> +#endif H> ifp->if_flags = VLAN_IFFLAGS; H> ether_ifattach(ifp, eaddr); H> /* Now undo some of the damage... */ H> @@ -1591,6 +1599,15 @@ vlan_capabilities(struct ifvlan *ifv) H> TOEDEV(ifp) = TOEDEV(p); H> ifp->if_capenable |= p->if_capenable & IFCAP_TOE; H> } H> + H> +#ifdef RATELIMIT H> + /* H> + * If the parent interface supports ratelimiting, so does the H> + * VLAN interface. H> + */ H> + ifp->if_capabilities |= (p->if_capabilities & IFCAP_TXRTLMT); H> + ifp->if_capenable |= (p->if_capenable & IFCAP_TXRTLMT); H> +#endif H> } H> H> static void H> @@ -1801,3 +1818,19 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd H> H> return (error); H> } H> + H> +#ifdef RATELIMIT H> +static int H> +vlan_snd_tag_alloc(struct ifnet *ifp, H> + union if_snd_tag_alloc_params *params, H> + struct m_snd_tag **ppmt) H> +{ H> + H> + /* get trunk device */ H> + ifp = vlan_trunkdev(ifp); H> + if (ifp == NULL || (ifp->if_capenable & IFCAP_TXRTLMT) == 0) H> + return (EOPNOTSUPP); H> + /* forward allocation request */ H> + return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); H> +} H> +#endif H> H> Modified: head/sys/netinet/in_pcb.c H> ============================================================================== H> --- head/sys/netinet/in_pcb.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/netinet/in_pcb.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); H> #include "opt_ipsec.h" H> #include "opt_inet.h" H> #include "opt_inet6.h" H> +#include "opt_ratelimit.h" H> #include "opt_pcbgroup.h" H> #include "opt_rss.h" H> H> @@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$"); H> #include H> #include H> #include H> +#include H> #include H> #include H> #include H> @@ -1140,6 +1142,10 @@ in_pcbdetach(struct inpcb *inp) H> H> KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); H> H> +#ifdef RATELIMIT H> + if (inp->inp_snd_tag != NULL) H> + in_pcbdetach_txrtlmt(inp); H> +#endif H> inp->inp_socket->so_pcb = NULL; H> inp->inp_socket = NULL; H> } H> @@ -2677,3 +2683,253 @@ DB_SHOW_COMMAND(inpcb, db_show_inpcb) H> db_print_inpcb(inp, "inpcb", 0); H> } H> #endif /* DDB */ H> + H> +#ifdef RATELIMIT H> +/* H> + * Modify TX rate limit based on the existing "inp->inp_snd_tag", H> + * if any. H> + */ H> +int H> +in_pcbmodify_txrtlmt(struct inpcb *inp, uint32_t max_pacing_rate) H> +{ H> + union if_snd_tag_modify_params params = { H> + .rate_limit.max_rate = max_pacing_rate, H> + }; H> + struct m_snd_tag *mst; H> + struct ifnet *ifp; H> + int error; H> + H> + mst = inp->inp_snd_tag; H> + if (mst == NULL) H> + return (EINVAL); H> + H> + ifp = mst->ifp; H> + if (ifp == NULL) H> + return (EINVAL); H> + H> + if (ifp->if_snd_tag_modify == NULL) { H> + error = EOPNOTSUPP; H> + } else { H> + error = ifp->if_snd_tag_modify(mst, ¶ms); H> + } H> + return (error); H> +} H> + H> +/* H> + * Query existing TX rate limit based on the existing H> + * "inp->inp_snd_tag", if any. H> + */ H> +int H> +in_pcbquery_txrtlmt(struct inpcb *inp, uint32_t *p_max_pacing_rate) H> +{ H> + union if_snd_tag_query_params params = { }; H> + struct m_snd_tag *mst; H> + struct ifnet *ifp; H> + int error; H> + H> + mst = inp->inp_snd_tag; H> + if (mst == NULL) H> + return (EINVAL); H> + H> + ifp = mst->ifp; H> + if (ifp == NULL) H> + return (EINVAL); H> + H> + if (ifp->if_snd_tag_query == NULL) { H> + error = EOPNOTSUPP; H> + } else { H> + error = ifp->if_snd_tag_query(mst, ¶ms); H> + if (error == 0 && p_max_pacing_rate != NULL) H> + *p_max_pacing_rate = params.rate_limit.max_rate; H> + } H> + return (error); H> +} H> + H> +/* H> + * Allocate a new TX rate limit send tag from the network interface H> + * given by the "ifp" argument and save it in "inp->inp_snd_tag": H> + */ H> +int H> +in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet *ifp, H> + uint32_t flowtype, uint32_t flowid, uint32_t max_pacing_rate) H> +{ H> + union if_snd_tag_alloc_params params = { H> + .rate_limit.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT, H> + .rate_limit.hdr.flowid = flowid, H> + .rate_limit.hdr.flowtype = flowtype, H> + .rate_limit.max_rate = max_pacing_rate, H> + }; H> + int error; H> + H> + INP_WLOCK_ASSERT(inp); H> + H> + if (inp->inp_snd_tag != NULL) H> + return (EINVAL); H> + H> + if (ifp->if_snd_tag_alloc == NULL) { H> + error = EOPNOTSUPP; H> + } else { H> + error = ifp->if_snd_tag_alloc(ifp, ¶ms, &inp->inp_snd_tag); H> + H> + /* H> + * At success increment the refcount on H> + * the send tag's network interface: H> + */ H> + if (error == 0) H> + if_ref(inp->inp_snd_tag->ifp); H> + } H> + return (error); H> +} H> + H> +/* H> + * Free an existing TX rate limit tag based on the "inp->inp_snd_tag", H> + * if any: H> + */ H> +void H> +in_pcbdetach_txrtlmt(struct inpcb *inp) H> +{ H> + struct m_snd_tag *mst; H> + struct ifnet *ifp; H> + H> + INP_WLOCK_ASSERT(inp); H> + H> + mst = inp->inp_snd_tag; H> + inp->inp_snd_tag = NULL; H> + H> + if (mst == NULL) H> + return; H> + H> + ifp = mst->ifp; H> + if (ifp == NULL) H> + return; H> + H> + /* H> + * If the device was detached while we still had reference(s) H> + * on the ifp, we assume if_snd_tag_free() was replaced with H> + * stubs. H> + */ H> + ifp->if_snd_tag_free(mst); H> + H> + /* release reference count on network interface */ H> + if_rele(ifp); H> +} H> + H> +/* H> + * This function should be called when the INP_RATE_LIMIT_CHANGED flag H> + * is set in the fast path and will attach/detach/modify the TX rate H> + * limit send tag based on the socket's so_max_pacing_rate value. H> + */ H> +void H> +in_pcboutput_txrtlmt(struct inpcb *inp, struct ifnet *ifp, struct mbuf *mb) H> +{ H> + struct socket *socket; H> + uint32_t max_pacing_rate; H> + bool did_upgrade; H> + int error; H> + H> + if (inp == NULL) H> + return; H> + H> + socket = inp->inp_socket; H> + if (socket == NULL) H> + return; H> + H> + if (!INP_WLOCKED(inp)) { H> + /* H> + * NOTE: If the write locking fails, we need to bail H> + * out and use the non-ratelimited ring for the H> + * transmit until there is a new chance to get the H> + * write lock. H> + */ H> + if (!INP_TRY_UPGRADE(inp)) H> + return; H> + did_upgrade = 1; H> + } else { H> + did_upgrade = 0; H> + } H> + H> + /* H> + * NOTE: The so_max_pacing_rate value is read unlocked, H> + * because atomic updates are not required since the variable H> + * is checked at every mbuf we send. It is assumed that the H> + * variable read itself will be atomic. H> + */ H> + max_pacing_rate = socket->so_max_pacing_rate; H> + H> + /* H> + * NOTE: When attaching to a network interface a reference is H> + * made to ensure the network interface doesn't go away until H> + * all ratelimit connections are gone. The network interface H> + * pointers compared below represent valid network interfaces, H> + * except when comparing towards NULL. H> + */ H> + if (max_pacing_rate == 0 && inp->inp_snd_tag == NULL) { H> + error = 0; H> + } else if (!(ifp->if_capenable & IFCAP_TXRTLMT)) { H> + if (inp->inp_snd_tag != NULL) H> + in_pcbdetach_txrtlmt(inp); H> + error = 0; H> + } else if (inp->inp_snd_tag == NULL) { H> + /* H> + * In order to utilize packet pacing with RSS, we need H> + * to wait until there is a valid RSS hash before we H> + * can proceed: H> + */ H> + if (M_HASHTYPE_GET(mb) == M_HASHTYPE_NONE) { H> + error = EAGAIN; H> + } else { H> + error = in_pcbattach_txrtlmt(inp, ifp, M_HASHTYPE_GET(mb), H> + mb->m_pkthdr.flowid, max_pacing_rate); H> + } H> + } else { H> + error = in_pcbmodify_txrtlmt(inp, max_pacing_rate); H> + } H> + if (error == 0 || error == EOPNOTSUPP) H> + inp->inp_flags2 &= ~INP_RATE_LIMIT_CHANGED; H> + if (did_upgrade) H> + INP_DOWNGRADE(inp); H> +} H> + H> +/* H> + * Track route changes for TX rate limiting. H> + */ H> +void H> +in_pcboutput_eagain(struct inpcb *inp) H> +{ H> + struct socket *socket; H> + bool did_upgrade; H> + H> + if (inp == NULL) H> + return; H> + H> + socket = inp->inp_socket; H> + if (socket == NULL) H> + return; H> + H> + if (inp->inp_snd_tag == NULL) H> + return; H> + H> + if (!INP_WLOCKED(inp)) { H> + /* H> + * NOTE: If the write locking fails, we need to bail H> + * out and use the non-ratelimited ring for the H> + * transmit until there is a new chance to get the H> + * write lock. H> + */ H> + if (!INP_TRY_UPGRADE(inp)) H> + return; H> + did_upgrade = 1; H> + } else { H> + did_upgrade = 0; H> + } H> + H> + /* detach rate limiting */ H> + in_pcbdetach_txrtlmt(inp); H> + H> + /* make sure new mbuf send tag allocation is made */ H> + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; H> + H> + if (did_upgrade) H> + INP_DOWNGRADE(inp); H> +} H> +#endif /* RATELIMIT */ H> H> Modified: head/sys/netinet/in_pcb.h H> ============================================================================== H> --- head/sys/netinet/in_pcb.h Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/netinet/in_pcb.h Wed Jan 18 13:31:17 2017 (r312379) H> @@ -181,6 +181,7 @@ struct icmp6_filter; H> * read-lock usage during modification, this model can be applied to other H> * protocols (especially SCTP). H> */ H> +struct m_snd_tag; H> struct inpcb { H> LIST_ENTRY(inpcb) inp_hash; /* (h/i) hash list */ H> LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */ H> @@ -202,11 +203,11 @@ struct inpcb { H> u_char inp_ip_minttl; /* (i) minimum TTL or drop */ H> uint32_t inp_flowid; /* (x) flow id / queue id */ H> u_int inp_refcount; /* (i) refcount */ H> - void *inp_pspare[5]; /* (x) packet pacing / general use */ H> + struct m_snd_tag *inp_snd_tag; /* (i) send tag for outgoing mbufs */ H> + void *inp_pspare[4]; /* (x) general use */ H> uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ H> uint32_t inp_rss_listen_bucket; /* (x) overridden RSS listen bucket */ H> - u_int inp_ispare[4]; /* (x) packet pacing / user cookie / H> - * general use */ H> + u_int inp_ispare[4]; /* (x) user cookie / general use */ H> H> /* Local and foreign ports, local and foreign addr. */ H> struct in_conninfo inp_inc; /* (i) list for PCB's local port */ H> @@ -616,6 +617,7 @@ short inp_so_options(const struct inpcb H> #define INP_RSS_BUCKET_SET 0x00000080 /* IP_RSS_LISTEN_BUCKET is set */ H> #define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */ H> #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ H> +#define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ H> H> /* H> * Flags passed to in_pcblookup*() functions. H> @@ -736,6 +738,14 @@ int in_getsockaddr(struct socket *so, st H> struct sockaddr * H> in_sockaddr(in_port_t port, struct in_addr *addr); H> void in_pcbsosetlabel(struct socket *so); H> +#ifdef RATELIMIT H> +int in_pcbattach_txrtlmt(struct inpcb *, struct ifnet *, uint32_t, uint32_t, uint32_t); H> +void in_pcbdetach_txrtlmt(struct inpcb *); H> +int in_pcbmodify_txrtlmt(struct inpcb *, uint32_t); H> +int in_pcbquery_txrtlmt(struct inpcb *, uint32_t *); H> +void in_pcboutput_txrtlmt(struct inpcb *, struct ifnet *, struct mbuf *); H> +void in_pcboutput_eagain(struct inpcb *); H> +#endif H> #endif /* _KERNEL */ H> H> #endif /* !_NETINET_IN_PCB_H_ */ H> H> Modified: head/sys/netinet/ip_output.c H> ============================================================================== H> --- head/sys/netinet/ip_output.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/netinet/ip_output.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -33,6 +33,7 @@ H> __FBSDID("$FreeBSD$"); H> H> #include "opt_inet.h" H> +#include "opt_ratelimit.h" H> #include "opt_ipsec.h" H> #include "opt_mbuf_stress_test.h" H> #include "opt_mpath.h" H> @@ -661,8 +662,23 @@ sendit: H> */ H> m_clrprotoflags(m); H> IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); H> +#ifdef RATELIMIT H> + if (inp != NULL) { H> + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) H> + in_pcboutput_txrtlmt(inp, ifp, m); H> + /* stamp send tag on mbuf */ H> + m->m_pkthdr.snd_tag = inp->inp_snd_tag; H> + } else { H> + m->m_pkthdr.snd_tag = NULL; H> + } H> +#endif H> error = (*ifp->if_output)(ifp, m, H> (const struct sockaddr *)gw, ro); H> +#ifdef RATELIMIT H> + /* check for route change */ H> + if (error == EAGAIN) H> + in_pcboutput_eagain(inp); H> +#endif H> goto done; H> } H> H> @@ -698,8 +714,23 @@ sendit: H> H> IP_PROBE(send, NULL, NULL, mtod(m, struct ip *), ifp, H> mtod(m, struct ip *), NULL); H> +#ifdef RATELIMIT H> + if (inp != NULL) { H> + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) H> + in_pcboutput_txrtlmt(inp, ifp, m); H> + /* stamp send tag on mbuf */ H> + m->m_pkthdr.snd_tag = inp->inp_snd_tag; H> + } else { H> + m->m_pkthdr.snd_tag = NULL; H> + } H> +#endif H> error = (*ifp->if_output)(ifp, m, H> (const struct sockaddr *)gw, ro); H> +#ifdef RATELIMIT H> + /* check for route change */ H> + if (error == EAGAIN) H> + in_pcboutput_eagain(inp); H> +#endif H> } else H> m_freem(m); H> } H> @@ -974,6 +1005,16 @@ ip_ctloutput(struct socket *so, struct s H> INP_WUNLOCK(inp); H> error = 0; H> break; H> + case SO_MAX_PACING_RATE: H> +#ifdef RATELIMIT H> + INP_WLOCK(inp); H> + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; H> + INP_WUNLOCK(inp); H> + error = 0; H> +#else H> + error = EOPNOTSUPP; H> +#endif H> + break; H> default: H> break; H> } H> H> Modified: head/sys/netinet6/ip6_output.c H> ============================================================================== H> --- head/sys/netinet6/ip6_output.c Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/netinet6/ip6_output.c Wed Jan 18 13:31:17 2017 (r312379) H> @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); H> H> #include "opt_inet.h" H> #include "opt_inet6.h" H> +#include "opt_ratelimit.h" H> #include "opt_ipsec.h" H> #include "opt_sctp.h" H> #include "opt_route.h" H> @@ -954,8 +955,23 @@ passout: H> m->m_pkthdr.len); H> ifa_free(&ia6->ia_ifa); H> } H> +#ifdef RATELIMIT H> + if (inp != NULL) { H> + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) H> + in_pcboutput_txrtlmt(inp, ifp, m); H> + /* stamp send tag on mbuf */ H> + m->m_pkthdr.snd_tag = inp->inp_snd_tag; H> + } else { H> + m->m_pkthdr.snd_tag = NULL; H> + } H> +#endif H> error = nd6_output_ifp(ifp, origifp, m, dst, H> (struct route *)ro); H> +#ifdef RATELIMIT H> + /* check for route change */ H> + if (error == EAGAIN) H> + in_pcboutput_eagain(inp); H> +#endif H> goto done; H> } H> H> @@ -1054,8 +1070,23 @@ sendorfree: H> counter_u64_add(ia->ia_ifa.ifa_obytes, H> m->m_pkthdr.len); H> } H> +#ifdef RATELIMIT H> + if (inp != NULL) { H> + if (inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) H> + in_pcboutput_txrtlmt(inp, ifp, m); H> + /* stamp send tag on mbuf */ H> + m->m_pkthdr.snd_tag = inp->inp_snd_tag; H> + } else { H> + m->m_pkthdr.snd_tag = NULL; H> + } H> +#endif H> error = nd6_output_ifp(ifp, origifp, m, dst, H> (struct route *)ro); H> +#ifdef RATELIMIT H> + /* check for route change */ H> + if (error == EAGAIN) H> + in_pcboutput_eagain(inp); H> +#endif H> } else H> m_freem(m); H> } H> @@ -1441,6 +1472,16 @@ ip6_ctloutput(struct socket *so, struct H> INP_WUNLOCK(in6p); H> error = 0; H> break; H> + case SO_MAX_PACING_RATE: H> +#ifdef RATELIMIT H> + INP_WLOCK(in6p); H> + in6p->inp_flags2 |= INP_RATE_LIMIT_CHANGED; H> + INP_WUNLOCK(in6p); H> + error = 0; H> +#else H> + error = EOPNOTSUPP; H> +#endif H> + break; H> default: H> break; H> } H> H> Modified: head/sys/sys/mbuf.h H> ============================================================================== H> --- head/sys/sys/mbuf.h Wed Jan 18 13:27:24 2017 (r312378) H> +++ head/sys/sys/mbuf.h Wed Jan 18 13:31:17 2017 (r312379) H> @@ -130,6 +130,14 @@ struct m_tag { H> }; H> H> /* H> + * Static network interface owned tag. H> + * Allocated through ifp->if_snd_tag_alloc(). H> + */ H> +struct m_snd_tag { H> + struct ifnet *ifp; /* network interface tag belongs to */ H> +}; H> + H> +/* H> * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. H> * Size ILP32: 48 H> * LP64: 56 H> H> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** H> -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Jan 18 17:53:58 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 EF17ACB6F8F; Wed, 18 Jan 2017 17:53:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B18BB1A7E; Wed, 18 Jan 2017 17:53:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IHrvWA059591; Wed, 18 Jan 2017 17:53:57 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IHrvvC059589; Wed, 18 Jan 2017 17:53:57 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701181753.v0IHrvvC059589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 18 Jan 2017 17:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312389 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 17:53:59 -0000 Author: mjg Date: Wed Jan 18 17:53:57 2017 New Revision: 312389 URL: https://svnweb.freebsd.org/changeset/base/312389 Log: rwlock: reduce lock accesses similarly to r311172 Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Wed Jan 18 17:21:28 2017 (r312388) +++ head/sys/kern/kern_rwlock.c Wed Jan 18 17:53:57 2017 (r312389) @@ -132,9 +132,12 @@ LOCK_DELAY_SYSINIT(rw_delay_sysinit); * Return a pointer to the owning thread if the lock is write-locked or * NULL if the lock is unlocked or read-locked. */ -#define rw_wowner(rw) \ - ((rw)->rw_lock & RW_LOCK_READ ? NULL : \ - (struct thread *)RW_OWNER((rw)->rw_lock)) + +#define lv_rw_wowner(v) \ + ((v) & RW_LOCK_READ ? NULL : \ + (struct thread *)RW_OWNER((v))) + +#define rw_wowner(rw) lv_rw_wowner(RW_READ_VALUE(rw)) /* * Returns if a write owner is recursed. Write ownership is not assured @@ -415,7 +418,10 @@ __rw_rlock(volatile uintptr_t *c, const #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&rw->lock_object); - state = rw->rw_lock; +#endif + v = RW_READ_VALUE(rw); +#ifdef KDTRACE_HOOKS + state = v; #endif for (;;) { /* @@ -428,7 +434,6 @@ __rw_rlock(volatile uintptr_t *c, const * completely unlocked rwlock since such a lock is encoded * as a read lock with no waiters. */ - v = rw->rw_lock; if (RW_CAN_READ(v)) { /* * The RW_LOCK_READ_WAITERS flag should only be set @@ -444,6 +449,7 @@ __rw_rlock(volatile uintptr_t *c, const (void *)(v + RW_ONE_READER)); break; } + v = RW_READ_VALUE(rw); continue; } #ifdef KDTRACE_HOOKS @@ -471,9 +477,11 @@ __rw_rlock(volatile uintptr_t *c, const KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); - while ((struct thread*)RW_OWNER(rw->rw_lock) == - owner && TD_IS_RUNNING(owner)) + do { lock_delay(&lda); + v = RW_READ_VALUE(rw); + owner = lv_rw_wowner(v); + } while (owner != NULL && TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); continue; @@ -484,11 +492,12 @@ __rw_rlock(volatile uintptr_t *c, const "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { - v = rw->rw_lock; + v = RW_READ_VALUE(rw); if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } + v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS lda.spin_cnt += rowner_loops - i; #endif @@ -511,7 +520,7 @@ __rw_rlock(volatile uintptr_t *c, const * The lock might have been released while we spun, so * recheck its state and restart the loop if needed. */ - v = rw->rw_lock; + v = RW_READ_VALUE(rw); if (RW_CAN_READ(v)) { turnstile_cancel(ts); continue; @@ -549,6 +558,7 @@ __rw_rlock(volatile uintptr_t *c, const if (!atomic_cmpset_ptr(&rw->rw_lock, v, v | RW_LOCK_READ_WAITERS)) { turnstile_cancel(ts); + v = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -574,6 +584,7 @@ __rw_rlock(volatile uintptr_t *c, const if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p resuming from turnstile", __func__, rw); + v = RW_READ_VALUE(rw); } #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&rw->lock_object); @@ -657,13 +668,12 @@ _rw_runlock_cookie(volatile uintptr_t *c LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); /* TODO: drop "owner of record" here. */ - + x = RW_READ_VALUE(rw); for (;;) { /* * See if there is more than one read lock held. If so, * just drop one and return. */ - x = rw->rw_lock; if (RW_READERS(x) > 1) { if (atomic_cmpset_rel_ptr(&rw->rw_lock, x, x - RW_ONE_READER)) { @@ -674,6 +684,7 @@ _rw_runlock_cookie(volatile uintptr_t *c (void *)(x - RW_ONE_READER)); break; } + x = RW_READ_VALUE(rw); continue; } /* @@ -690,6 +701,7 @@ _rw_runlock_cookie(volatile uintptr_t *c __func__, rw); break; } + x = RW_READ_VALUE(rw); continue; } /* @@ -725,6 +737,7 @@ _rw_runlock_cookie(volatile uintptr_t *c if (!atomic_cmpset_rel_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, x)) { turnstile_chain_unlock(&rw->lock_object); + x = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -790,8 +803,9 @@ __rw_wlock_hard(volatile uintptr_t *c, u lock_delay_arg_init(&lda, NULL); #endif rw = rwlock2rw(c); + v = RW_READ_VALUE(rw); - if (rw_wlocked(rw)) { + if (__predict_false(lv_rw_wowner(v) == (struct thread *)tid)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, ("%s: recursing but non-recursive rw %s @ %s:%d\n", __func__, rw->lock_object.lo_name, file, line)); @@ -807,11 +821,15 @@ __rw_wlock_hard(volatile uintptr_t *c, u #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&rw->lock_object); - state = rw->rw_lock; + state = v; #endif for (;;) { - if (rw->rw_lock == RW_UNLOCKED && _rw_write_lock(rw, tid)) - break; + if (v == RW_UNLOCKED) { + if (_rw_write_lock(rw, tid)) + break; + v = RW_READ_VALUE(rw); + continue; + } #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -826,8 +844,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ - v = rw->rw_lock; - owner = (struct thread *)RW_OWNER(v); + owner = lv_rw_wowner(v); if (!(v & RW_LOCK_READ) && TD_IS_RUNNING(owner)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", @@ -835,9 +852,11 @@ __rw_wlock_hard(volatile uintptr_t *c, u KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); - while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && - TD_IS_RUNNING(owner)) + do { lock_delay(&lda); + v = RW_READ_VALUE(rw); + owner = lv_rw_wowner(v); + } while (owner != NULL && TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); continue; @@ -847,6 +866,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (!(v & RW_LOCK_WRITE_SPINNER)) { if (!atomic_cmpset_ptr(&rw->rw_lock, v, v | RW_LOCK_WRITE_SPINNER)) { + v = RW_READ_VALUE(rw); continue; } } @@ -861,6 +881,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u } KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); + v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS lda.spin_cnt += rowner_loops - i; #endif @@ -869,7 +890,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u } #endif ts = turnstile_trywait(&rw->lock_object); - v = rw->rw_lock; + v = RW_READ_VALUE(rw); #ifdef ADAPTIVE_RWLOCKS /* @@ -905,6 +926,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u break; } turnstile_cancel(ts); + v = RW_READ_VALUE(rw); continue; } /* @@ -916,6 +938,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (!atomic_cmpset_ptr(&rw->rw_lock, v, v | RW_LOCK_WRITE_WAITERS)) { turnstile_cancel(ts); + v = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -943,6 +966,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u #ifdef ADAPTIVE_RWLOCKS spintries = 0; #endif + v = RW_READ_VALUE(rw); } #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&rw->lock_object); Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Wed Jan 18 17:21:28 2017 (r312388) +++ head/sys/sys/rwlock.h Wed Jan 18 17:53:57 2017 (r312389) @@ -76,6 +76,8 @@ #define rw_recurse lock_object.lo_data +#define RW_READ_VALUE(x) ((x)->rw_lock) + /* Very simple operations on rw_lock. */ /* Try to obtain a write lock once. */ From owner-svn-src-head@freebsd.org Wed Jan 18 17:55:09 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 E6428CB6009; Wed, 18 Jan 2017 17:55:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8C6B1C21; Wed, 18 Jan 2017 17:55:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IHt8K1059715; Wed, 18 Jan 2017 17:55:08 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IHt87l059713; Wed, 18 Jan 2017 17:55:08 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701181755.v0IHt87l059713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 18 Jan 2017 17:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312390 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 17:55:10 -0000 Author: mjg Date: Wed Jan 18 17:55:08 2017 New Revision: 312390 URL: https://svnweb.freebsd.org/changeset/base/312390 Log: sx: reduce lock accesses similarly to r311172 Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Jan 18 17:53:57 2017 (r312389) +++ head/sys/kern/kern_sx.c Wed Jan 18 17:55:08 2017 (r312390) @@ -563,8 +563,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t lock_delay_arg_init(&lda, NULL); #endif + x = SX_READ_VALUE(sx); + /* If we already hold an exclusive lock, then recurse. */ - if (sx_xlocked(sx)) { + if (__predict_false(lv_sx_owner(x) == (struct thread *)tid)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, ("_sx_xlock_hard: recursed on non-recursive sx %s @ %s:%d\n", sx->lock_object.lo_name, file, line)); @@ -581,12 +583,15 @@ _sx_xlock_hard(struct sx *sx, uintptr_t #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&sx->lock_object); - state = sx->sx_lock; + state = x; #endif for (;;) { - if (sx->sx_lock == SX_LOCK_UNLOCKED && - atomic_cmpset_acq_ptr(&sx->sx_lock, SX_LOCK_UNLOCKED, tid)) - break; + if (x == SX_LOCK_UNLOCKED) { + if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, tid)) + break; + x = SX_READ_VALUE(sx); + continue; + } #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -601,11 +606,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ - x = sx->sx_lock; if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { if ((x & SX_LOCK_SHARED) == 0) { - x = SX_OWNER(x); - owner = (struct thread *)x; + owner = lv_sx_owner(x); if (TD_IS_RUNNING(owner)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR3(KTR_LOCK, @@ -616,9 +619,12 @@ _sx_xlock_hard(struct sx *sx, uintptr_t "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); - while (SX_OWNER(sx->sx_lock) == x && - TD_IS_RUNNING(owner)) + do { lock_delay(&lda); + x = SX_READ_VALUE(sx); + owner = lv_sx_owner(x); + } while (owner != NULL && + TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); continue; @@ -645,6 +651,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t } KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); + x = SX_READ_VALUE(sx); if (i != asx_loops) continue; } @@ -652,7 +659,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t #endif sleepq_lock(&sx->lock_object); - x = sx->sx_lock; + x = SX_READ_VALUE(sx); /* * If the lock was released while spinning on the @@ -701,6 +708,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t break; } sleepq_release(&sx->lock_object); + x = SX_READ_VALUE(sx); continue; } @@ -712,6 +720,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t if (!atomic_cmpset_ptr(&sx->sx_lock, x, x | SX_LOCK_EXCLUSIVE_WAITERS)) { sleepq_release(&sx->lock_object); + x = SX_READ_VALUE(sx); continue; } if (LOCK_LOG_TEST(&sx->lock_object, 0)) @@ -753,6 +762,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p resuming from sleep queue", __func__, sx); + x = SX_READ_VALUE(sx); } #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&sx->lock_object); @@ -872,20 +882,18 @@ _sx_slock_hard(struct sx *sx, int opts, lock_delay_arg_init(&lda, NULL); #endif #ifdef KDTRACE_HOOKS - state = sx->sx_lock; all_time -= lockstat_nsecs(&sx->lock_object); #endif + x = SX_READ_VALUE(sx); +#ifdef KDTRACE_HOOKS + state = x; +#endif /* * As with rwlocks, we don't make any attempt to try to block * shared locks once there is an exclusive waiter. */ for (;;) { -#ifdef KDTRACE_HOOKS - lda.spin_cnt++; -#endif - x = sx->sx_lock; - /* * If no other thread has an exclusive lock then try to bump up * the count of sharers. Since we have to preserve the state @@ -903,8 +911,13 @@ _sx_slock_hard(struct sx *sx, int opts, (void *)(x + SX_ONE_SHARER)); break; } + x = SX_READ_VALUE(sx); continue; } +#ifdef KDTRACE_HOOKS + lda.spin_cnt++; +#endif + #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); #endif @@ -918,8 +931,7 @@ _sx_slock_hard(struct sx *sx, int opts, * changes. */ if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { - x = SX_OWNER(x); - owner = (struct thread *)x; + owner = lv_sx_owner(x); if (TD_IS_RUNNING(owner)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR3(KTR_LOCK, @@ -929,9 +941,11 @@ _sx_slock_hard(struct sx *sx, int opts, sched_tdname(curthread), "spinning", "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); - while (SX_OWNER(sx->sx_lock) == x && - TD_IS_RUNNING(owner)) + do { lock_delay(&lda); + x = SX_READ_VALUE(sx); + owner = lv_sx_owner(x); + } while (owner != NULL && TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); continue; @@ -944,7 +958,7 @@ _sx_slock_hard(struct sx *sx, int opts, * start the process of blocking. */ sleepq_lock(&sx->lock_object); - x = sx->sx_lock; + x = SX_READ_VALUE(sx); /* * The lock could have been released while we spun. @@ -966,6 +980,7 @@ _sx_slock_hard(struct sx *sx, int opts, owner = (struct thread *)SX_OWNER(x); if (TD_IS_RUNNING(owner)) { sleepq_release(&sx->lock_object); + x = SX_READ_VALUE(sx); continue; } } @@ -980,6 +995,7 @@ _sx_slock_hard(struct sx *sx, int opts, if (!atomic_cmpset_ptr(&sx->sx_lock, x, x | SX_LOCK_SHARED_WAITERS)) { sleepq_release(&sx->lock_object); + x = SX_READ_VALUE(sx); continue; } if (LOCK_LOG_TEST(&sx->lock_object, 0)) @@ -1020,6 +1036,7 @@ _sx_slock_hard(struct sx *sx, int opts, if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p resuming from sleep queue", __func__, sx); + x = SX_READ_VALUE(sx); } #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&sx->lock_object); @@ -1054,9 +1071,8 @@ _sx_sunlock_hard(struct sx *sx, const ch if (SCHEDULER_STOPPED()) return; + x = SX_READ_VALUE(sx); for (;;) { - x = sx->sx_lock; - /* * We should never have sharers while at least one thread * holds a shared lock. @@ -1078,6 +1094,8 @@ _sx_sunlock_hard(struct sx *sx, const ch (void *)(x - SX_ONE_SHARER)); break; } + + x = SX_READ_VALUE(sx); continue; } @@ -1094,6 +1112,7 @@ _sx_sunlock_hard(struct sx *sx, const ch __func__, sx); break; } + x = SX_READ_VALUE(sx); continue; } @@ -1115,6 +1134,7 @@ _sx_sunlock_hard(struct sx *sx, const ch SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS, SX_LOCK_UNLOCKED)) { sleepq_release(&sx->lock_object); + x = SX_READ_VALUE(sx); continue; } if (LOCK_LOG_TEST(&sx->lock_object, 0)) Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Wed Jan 18 17:53:57 2017 (r312389) +++ head/sys/sys/sx.h Wed Jan 18 17:55:08 2017 (r312390) @@ -88,6 +88,11 @@ #define sx_recurse lock_object.lo_data +#define SX_READ_VALUE(sx) ((sx)->sx_lock) + +#define lv_sx_owner(v) \ + ((v & SX_LOCK_SHARED) ? NULL : (struct thread *)SX_OWNER(v)) + /* * Function prototipes. Routines that start with an underscore are not part * of the public interface and are wrappered with a macro. From owner-svn-src-head@freebsd.org Wed Jan 18 17:55:50 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 775E3CB6127; Wed, 18 Jan 2017 17:55:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 520171EDC; Wed, 18 Jan 2017 17:55:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IHtnHi059785; Wed, 18 Jan 2017 17:55:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IHtnNX059783; Wed, 18 Jan 2017 17:55:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701181755.v0IHtnNX059783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 18 Jan 2017 17:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312391 - in head: share/man/man5 sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 17:55:50 -0000 Author: cem Date: Wed Jan 18 17:55:49 2017 New Revision: 312391 URL: https://svnweb.freebsd.org/changeset/base/312391 Log: ufs/extattr.h: Fix documentation of ea_name termination The ea_name string is not nul-terminated. Correct the documentation. Because the subsequent field is padded to 8 bytes, and the padding is zeroed, the ea_name string will appear to be nul-terminated whenever the length isn't exactly one (mod eight). This was introduced in r167010 (2007). Additionally, mark the length fields as unsigned. This particularly matters for the single byte ea_namelength field, which can represent extended attribute names up to 255 bytes long. No functional change. PR: 216127 Reported by: dewayne at heuristicsystems.com.au Reviewed by: kib@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9206 Modified: head/share/man/man5/fs.5 head/sys/ufs/ufs/extattr.h Modified: head/share/man/man5/fs.5 ============================================================================== --- head/share/man/man5/fs.5 Wed Jan 18 17:55:08 2017 (r312390) +++ head/share/man/man5/fs.5 Wed Jan 18 17:55:49 2017 (r312391) @@ -28,7 +28,7 @@ .\" @(#)fs.5 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 23, 2016 +.Dd January 16, 2017 .Dt FS 5 .Os .Sh NAME @@ -388,18 +388,19 @@ For further information, see the include The format of an external attribute is defined by the extattr structure: .Bd -literal struct extattr { - int32_t ea_length; /* length of this attribute */ - int8_t ea_namespace; /* name space of this attribute */ - int8_t ea_contentpadlen; /* padding at end of attribute */ - int8_t ea_namelength; /* length of attribute name */ - char ea_name[1]; /* null-terminated attribute name */ + uint32_t ea_length; /* length of this attribute */ + uint8_t ea_namespace; /* name space of this attribute */ + uint8_t ea_contentpadlen; /* bytes of padding at end of attribute */ + uint8_t ea_namelength; /* length of attribute name */ + char ea_name[1]; /* attribute name (NOT nul-terminated) */ + /* padding, if any, to align attribute content to 8 byte boundary */ /* extended attribute content follows */ }; .Ed .Pp Several macros are defined to manipulate these structures. Each macro takes a pointer to an extattr structure. -.Bl -tag -width ".Dv EXTATTR_SET_LENGTHS(eap, size)" +.Bl -tag -width ".Dv EXTATTR_CONTENT_SIZE(eap)" .It Dv EXTATTR_NEXT(eap) Returns a pointer to the next extended attribute following .Fa eap . @@ -409,35 +410,19 @@ Returns a pointer to the extended attrib .It Dv EXTATTR_CONTENT_SIZE(eap) Returns the size of the extended attribute content referenced by .Fa eap . -.It Dv EXTATTR_SET_LENGTHS(eap, size) -Called with the size of the attribute content after initializing -the attribute name to calculate and set the -.Fa ea_length , -.Fa ea_namelength , -and -.Fa ea_contentpadlen -fields of the extended attribute structure. .El .Pp The following code identifies an ACL: .Bd -literal if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_ACCESS_EXTATTR_NAME) { + eap->ea_namelength == sizeof(POSIX1E_ACL_ACCESS_EXTATTR_NAME) - 1 && + strncmp(eap->ea_name, POSIX1E_ACL_ACCESS_EXTATTR_NAME, + sizeof(POSIX1E_ACL_ACCESS_EXTATTR_NAME) - 1) == 0) { aclp = EXTATTR_CONTENT(eap); acllen = EXTATTR_CONTENT_SIZE(eap); ... } .Ed -.Pp -The following code creates an extended attribute -containing a copy of a structure -.Fa mygif : -.Bd -literal - eap->ea_namespace = EXTATTR_NAMESPACE_USER; - strcpy(eap->ea_name, "filepic.gif"); - EXTATTR_SET_LENGTHS(eap, sizeof(struct mygif)); - memcpy(EXTATTR_CONTENT(eap), &mygif, sizeof(struct mygif)); -.Ed .Sh HISTORY A super-block structure named filsys appeared in .At v6 . Modified: head/sys/ufs/ufs/extattr.h ============================================================================== --- head/sys/ufs/ufs/extattr.h Wed Jan 18 17:55:08 2017 (r312390) +++ head/sys/ufs/ufs/extattr.h Wed Jan 18 17:55:49 2017 (r312391) @@ -73,11 +73,12 @@ struct ufs_extattr_header { * This structure defines the required fields of an extended-attribute header. */ struct extattr { - int32_t ea_length; /* length of this attribute */ - int8_t ea_namespace; /* name space of this attribute */ - int8_t ea_contentpadlen; /* bytes of padding at end of attribute */ - int8_t ea_namelength; /* length of attribute name */ - char ea_name[1]; /* null-terminated attribute name */ + uint32_t ea_length; /* length of this attribute */ + uint8_t ea_namespace; /* name space of this attribute */ + uint8_t ea_contentpadlen; /* bytes of padding at end of attribute */ + uint8_t ea_namelength; /* length of attribute name */ + char ea_name[1]; /* attribute name (NOT nul-terminated) */ + /* padding, if any, to align attribute content to 8 byte boundary */ /* extended attribute content follows */ }; @@ -90,9 +91,6 @@ struct extattr { * content referenced by eap. * EXTATTR_CONTENT_SIZE(eap) returns the size of the extended attribute * content referenced by eap. - * EXTATTR_SET_LENGTHS(eap, contentsize) called after initializing the - * attribute name to calculate and set the ea_length, ea_namelength, - * and ea_contentpadlen fields of the extended attribute structure. */ #define EXTATTR_NEXT(eap) \ ((struct extattr *)(((void *)(eap)) + (eap)->ea_length)) @@ -101,15 +99,6 @@ struct extattr { ((eap)->ea_length - EXTATTR_BASE_LENGTH(eap) - (eap)->ea_contentpadlen) #define EXTATTR_BASE_LENGTH(eap) \ ((sizeof(struct extattr) + (eap)->ea_namelength + 7) & ~7) -#define EXTATTR_SET_LENGTHS(eap, contentsize) do { \ - KASSERT(((eap)->ea_name[0] != 0), \ - ("Must initialize name before setting lengths")); \ - (eap)->ea_namelength = strlen((eap)->ea_name); \ - (eap)->ea_contentpadlen = ((contentsize) % 8) ? \ - 8 - ((contentsize) % 8) : 0; \ - (eap)->ea_length = EXTATTR_BASE_LENGTH(eap) + \ - (contentsize) + (eap)->ea_contentpadlen; \ -} while (0) #ifdef _KERNEL @@ -149,13 +138,6 @@ int ufs_deleteextattr(struct vop_deletee int ufs_setextattr(struct vop_setextattr_args *ap); void ufs_extattr_vnode_inactive(struct vnode *vp, struct thread *td); -#else - -/* User-level definition of KASSERT for macros above */ -#define KASSERT(cond, str) do { \ - if (!(cond)) { printf("panic: "); printf(str); printf("\n"); exit(1); }\ -} while (0) - #endif /* !_KERNEL */ #endif /* !_UFS_UFS_EXTATTR_H_ */ From owner-svn-src-head@freebsd.org Wed Jan 18 18:04:42 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 AE4EECB65EF; Wed, 18 Jan 2017 18:04:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744F0184B; Wed, 18 Jan 2017 18:04:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C12361FE025; Wed, 18 Jan 2017 19:04:22 +0100 (CET) Subject: Re: svn commit: r312379 - in head: lib/libc/sys sbin/ifconfig sys/conf sys/kern sys/modules/if_lagg sys/modules/if_vlan sys/net sys/netinet sys/netinet6 sys/sys To: Gleb Smirnoff References: <201701181331.v0IDVHWf048428@repo.freebsd.org> <20170118173132.GD2611@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Meny Yossefi , Navdeep Parhar From: Hans Petter Selasky Message-ID: Date: Wed, 18 Jan 2017 19:04:05 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170118173132.GD2611@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 18 Jan 2017 18:04:42 -0000 On 01/18/17 18:31, Gleb Smirnoff wrote: > there were no production testing of the feature, > that will prove that the idea actually works. Hi Gleb, This feature has been tested small scale in production environments and it for sure saves CPU versus doing rate limiting all in software. Mellanox plans to checkin support for the mlx5en driver which starts using this feature soon and I believe np@ has similar plans for cxgbe. I'll reply to your other questions tomorrow. --HPS From owner-svn-src-head@freebsd.org Wed Jan 18 18:14:08 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 B919ECB6CE0; Wed, 18 Jan 2017 18:14:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (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 6FEAC11D3; Wed, 18 Jan 2017 18:14:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f53.google.com with SMTP id c85so255680008wmi.1; Wed, 18 Jan 2017 10:14:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=Lx0CFUzqvsRlgCJQ3MJ5zjceL5ucYw//KzjDFvoM8xI=; b=UHf6oA5jpkmC0Wr+LQz454W/tLs5B8iSNZm5aUtz4MKRQ5sKXGzl1SYjxO7tVoGQkn eRH7hDjsrULx13qDy97lVog9uJRf2iaLnpZYCjYwXQcx/o7ZTbiYFHLFFd6QAFIWlT0V /yoaZSKeS6sbS8uswp2ltvBPBb4G6IGm4l7t3NK9/smgcMBeyusDy1iVNGEuNLk3uUMw 5+QAWwFJL8eLzjL5qHZS/uplCipXEGlDnTJZ/i6zba4GNajThq1I/3tKR0NxfjbvEe7q Hi4ngZr4RTaeCaVTL+s5cNGjnmdTIYvc6Lm+EQDpJkvBeI+KmpHgo74S0Vr8ui4lxvTm L0sg== X-Gm-Message-State: AIkVDXIyiTrw6GRjoRK9mDImciVh1Vnt8Ga8qXJ9NCC9aqonyMut2ospZFnsi1ZPmPP/eA== X-Received: by 10.223.136.85 with SMTP id e21mr3907999wre.28.1484763240869; Wed, 18 Jan 2017 10:14:00 -0800 (PST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com. [74.125.82.41]) by smtp.gmail.com with ESMTPSA id y97sm6458758wmh.24.2017.01.18.10.14.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 10:14:00 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id r144so38438579wme.1; Wed, 18 Jan 2017 10:14:00 -0800 (PST) X-Received: by 10.28.100.70 with SMTP id y67mr20659156wmb.45.1484763240630; Wed, 18 Jan 2017 10:14:00 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Wed, 18 Jan 2017 10:14:00 -0800 (PST) In-Reply-To: <201701181755.v0IHtnNX059783@repo.freebsd.org> References: <201701181755.v0IHtnNX059783@repo.freebsd.org> From: Conrad Meyer Date: Wed, 18 Jan 2017 10:14:00 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r312391 - in head: share/man/man5 sys/ufs/ufs To: svn-src-head@freebsd.org Cc: src-committers , svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Wed, 18 Jan 2017 18:14:08 -0000 On Wed, Jan 18, 2017 at 9:55 AM, Conrad E. Meyer wrote: > Author: cem > Date: Wed Jan 18 17:55:49 2017 > New Revision: 312391 > URL: https://svnweb.freebsd.org/changeset/base/312391 > > Log: > ufs/extattr.h: Fix documentation of ea_name termination > > The ea_name string is not nul-terminated. Correct the documentation. > > Because the subsequent field is padded to 8 bytes, and the padding is > zeroed, the ea_name string will appear to be nul-terminated whenever th= e > length isn't exactly one (mod eight). > > This was introduced in r167010 (2007). > > Additionally, mark the length fields as unsigned. This particularly > matters for the single byte ea_namelength field, which can represent > extended attribute names up to 255 bytes long. > > No functional change. Whoops =E2=80=94 very minor functional change =E2=80=94 restore(8) can now = handle some dumps with extended attribute names longer than 127 characters that it couldn't before, due to the unsigned type change called out above. Best, Conrad From owner-svn-src-head@freebsd.org Wed Jan 18 18:14:51 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 DF4CACB6D6A; Wed, 18 Jan 2017 18:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC4BA13BD; Wed, 18 Jan 2017 18:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IIEoXx067792; Wed, 18 Jan 2017 18:14:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IIEoHr067791; Wed, 18 Jan 2017 18:14:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701181814.v0IIEoHr067791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 18 Jan 2017 18:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312392 - head/lib/libwrap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 18:14:52 -0000 Author: ngie Date: Wed Jan 18 18:14:50 2017 New Revision: 312392 URL: https://svnweb.freebsd.org/changeset/base/312392 Log: Use SRCTOP instead of .CURDIR-relative path in .PATH directive MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libwrap/Makefile Modified: head/lib/libwrap/Makefile ============================================================================== --- head/lib/libwrap/Makefile Wed Jan 18 17:55:49 2017 (r312391) +++ head/lib/libwrap/Makefile Wed Jan 18 18:14:50 2017 (r312392) @@ -15,7 +15,7 @@ MLINKS= hosts_access.3 hosts_ctl.3 \ hosts_access.3 request_set.3 \ hosts_options.5 hosts.allow.5 -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \ -DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" -DPROCESS_OPTIONS \ From owner-svn-src-head@freebsd.org Wed Jan 18 18:16:51 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 69A52CB6E4B; Wed, 18 Jan 2017 18:16:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 512DD15EB; Wed, 18 Jan 2017 18:16:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0IIGnYE059081 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 18 Jan 2017 10:16:49 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0IIGnrb059080; Wed, 18 Jan 2017 10:16:49 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 18 Jan 2017 10:16:49 -0800 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Meny Yossefi , Navdeep Parhar Subject: Re: svn commit: r312379 - in head: lib/libc/sys sbin/ifconfig sys/conf sys/kern sys/modules/if_lagg sys/modules/if_vlan sys/net sys/netinet sys/netinet6 sys/sys Message-ID: <20170118181649.GE2611@FreeBSD.org> References: <201701181331.v0IDVHWf048428@repo.freebsd.org> <20170118173132.GD2611@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) 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: Wed, 18 Jan 2017 18:16:51 -0000 On Wed, Jan 18, 2017 at 07:04:05PM +0100, Hans Petter Selasky wrote: H> > there were no production testing of the feature, H> > that will prove that the idea actually works. H> H> Hi Gleb, H> H> This feature has been tested small scale in production environments and H> it for sure saves CPU versus doing rate limiting all in software. H> H> Mellanox plans to checkin support for the mlx5en driver which starts H> using this feature soon and I believe np@ has similar plans for cxgbe. H> H> I'll reply to your other questions tomorrow. The pacing in general (either software or hardware) haven't yet been used in production anywhere, to my knowledge. So, let's decide is FreeBSD an academical experimental OS, where we throw bare fresh ideas in, or is it a mature production ready OS, which we recommend to install to end users, who aren't hackers theirselves? -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Jan 18 18:16:58 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 ECEF1CB6EBC; Wed, 18 Jan 2017 18:16:58 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C50711640; Wed, 18 Jan 2017 18:16:58 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IIGvVF067927; Wed, 18 Jan 2017 18:16:57 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IIGvfW067921; Wed, 18 Jan 2017 18:16:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701181816.v0IIGvfW067921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 18 Jan 2017 18:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312393 - in head: sbin/restore sys/sys sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 18:16:59 -0000 Author: cem Date: Wed Jan 18 18:16:57 2017 New Revision: 312393 URL: https://svnweb.freebsd.org/changeset/base/312393 Log: restore(8): Handle extended attribute names correctly UFS2 extended attribute names are not NUL-terminated. Handle appropriately. Correct the EXTATTR_BASE_LENGTH() macro, which handled ea_namelength == one (mod eight) extended attributes incorrectly. PR: 216127 Reported by: dewayne at heuristicsystems.com.au Reviewed by: kib@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9208 Modified: head/sbin/restore/dirs.c head/sbin/restore/extern.h head/sbin/restore/tape.c head/sys/sys/extattr.h head/sys/ufs/ufs/extattr.h Modified: head/sbin/restore/dirs.c ============================================================================== --- head/sbin/restore/dirs.c Wed Jan 18 18:14:50 2017 (r312392) +++ head/sbin/restore/dirs.c Wed Jan 18 18:16:57 2017 (r312393) @@ -645,7 +645,7 @@ setdirmodes(int flags) if (!Nflag) { if (node.extsize > 0) { if (bufsize >= node.extsize) { - set_extattr_file(cp, buf, node.extsize); + set_extattr(-1, cp, buf, node.extsize, SXA_FILE); } else { fprintf(stderr, "Cannot restore %s%s\n", "extended attributes for ", cp); Modified: head/sbin/restore/extern.h ============================================================================== --- head/sbin/restore/extern.h Wed Jan 18 18:14:50 2017 (r312392) +++ head/sbin/restore/extern.h Wed Jan 18 18:16:57 2017 (r312393) @@ -87,7 +87,12 @@ struct direct *rst_readdir(RST_DIR *); void rst_closedir(void *); void runcmdshell(void); char *savename(char *); -void set_extattr_file(char *, void *, int); +enum set_extattr_mode { + SXA_FILE, + SXA_LINK, + SXA_FD, +}; +void set_extattr(int, char *, void *, int, enum set_extattr_mode); void setdirmodes(int); void setinput(char *, int); void setup(void); Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Wed Jan 18 18:14:50 2017 (r312392) +++ head/sbin/restore/tape.c Wed Jan 18 18:16:57 2017 (r312393) @@ -105,8 +105,6 @@ static void findinode(struct s_spcl *); static void findtapeblksize(void); static char *setupextattr(int); static void xtrattr(char *, size_t); -static void set_extattr_link(char *, void *, int); -static void set_extattr_fd(int, char *, void *, int); static void skiphole(void (*)(char *, size_t), size_t *); static int gethead(struct s_spcl *); static void readtape(char *); @@ -627,7 +625,7 @@ extractfile(char *name) } if (linkit(lnkbuf, name, SYMLINK) == GOOD) { if (extsize > 0) - set_extattr_link(name, buf, extsize); + set_extattr(-1, name, buf, extsize, SXA_LINK); (void) lchown(name, uid, gid); (void) lchmod(name, mode); (void) utimensat(AT_FDCWD, name, ctimep, @@ -658,7 +656,7 @@ extractfile(char *name) } else { buf = setupextattr(extsize); getfile(xtrnull, xtrattr, xtrnull); - set_extattr_file(name, buf, extsize); + set_extattr(-1, name, buf, extsize, SXA_FILE); } (void) chown(name, uid, gid); (void) chmod(name, mode); @@ -688,7 +686,7 @@ extractfile(char *name) } else { buf = setupextattr(extsize); getfile(xtrnull, xtrattr, xtrnull); - set_extattr_file(name, buf, extsize); + set_extattr(-1, name, buf, extsize, SXA_FILE); } (void) chown(name, uid, gid); (void) chmod(name, mode); @@ -715,7 +713,7 @@ extractfile(char *name) buf = setupextattr(extsize); getfile(xtrfile, xtrattr, xtrskip); if (extsize > 0) - set_extattr_fd(ofile, name, buf, extsize); + set_extattr(ofile, name, buf, extsize, SXA_FD); (void) fchown(ofile, uid, gid); (void) fchmod(ofile, mode); (void) futimens(ofile, ctimep); @@ -728,12 +726,16 @@ extractfile(char *name) } /* - * Set attributes for a file. + * Set attributes on a file descriptor, link, or file. */ void -set_extattr_file(char *name, void *buf, int size) +set_extattr(int fd, char *name, void *buf, int size, enum set_extattr_mode mode) { struct extattr *eap, *eaend; + const char *method; + ssize_t res; + int error; + char eaname[EXTATTR_MAXNAMELEN + 1]; vprintf(stdout, "Set attributes for %s:", name); eaend = buf + size; @@ -748,77 +750,34 @@ set_extattr_file(char *name, void *buf, } if (eap->ea_namespace == EXTATTR_NAMESPACE_EMPTY) continue; - vprintf(stdout, "\n\t%s, (%d bytes), %*s", + snprintf(eaname, sizeof(eaname), "%.*s", + (int)eap->ea_namelength, eap->ea_name); + vprintf(stdout, "\n\t%s, (%d bytes), %s", namespace_names[eap->ea_namespace], eap->ea_length, - eap->ea_namelength, eap->ea_name); + eaname); /* * First we try the general attribute setting interface. * However, some attributes can only be set by root or * by using special interfaces (for example, ACLs). */ - if (extattr_set_file(name, eap->ea_namespace, eap->ea_name, - EXTATTR_CONTENT(eap), EXTATTR_CONTENT_SIZE(eap)) != -1) { - dprintf(stdout, " (set using extattr_set_file)"); - continue; - } - /* - * If the general interface refuses to set the attribute, - * then we try all the specialized interfaces that we - * know about. - */ - if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_ACCESS_EXTATTR_NAME)) { - if (acl_set_file(name, ACL_TYPE_ACCESS, - EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_file)"); - continue; - } - } - if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_DEFAULT_EXTATTR_NAME)) { - if (acl_set_file(name, ACL_TYPE_DEFAULT, - EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_file)"); - continue; - } - } - vprintf(stdout, " (unable to set)"); - } - vprintf(stdout, "\n"); -} - -/* - * Set attributes for a symbolic link. - */ -static void -set_extattr_link(char *name, void *buf, int size) -{ - struct extattr *eap, *eaend; - - vprintf(stdout, "Set attributes for %s:", name); - eaend = buf + size; - for (eap = buf; eap < eaend; eap = EXTATTR_NEXT(eap)) { - /* - * Make sure this entry is complete. - */ - if (EXTATTR_NEXT(eap) > eaend || eap->ea_length <= 0) { - dprintf(stdout, "\n\t%scorrupted", - eap == buf ? "" : "remainder "); - break; + if (mode == SXA_FD) { + res = extattr_set_fd(fd, eap->ea_namespace, + eaname, EXTATTR_CONTENT(eap), + EXTATTR_CONTENT_SIZE(eap)); + method = "extattr_set_fd"; + } else if (mode == SXA_LINK) { + res = extattr_set_link(name, eap->ea_namespace, + eaname, EXTATTR_CONTENT(eap), + EXTATTR_CONTENT_SIZE(eap)); + method = "extattr_set_link"; + } else if (mode == SXA_FILE) { + res = extattr_set_file(name, eap->ea_namespace, + eaname, EXTATTR_CONTENT(eap), + EXTATTR_CONTENT_SIZE(eap)); + method = "extattr_set_file"; } - if (eap->ea_namespace == EXTATTR_NAMESPACE_EMPTY) - continue; - vprintf(stdout, "\n\t%s, (%d bytes), %*s", - namespace_names[eap->ea_namespace], eap->ea_length, - eap->ea_namelength, eap->ea_name); - /* - * First we try the general attribute setting interface. - * However, some attributes can only be set by root or - * by using special interfaces (for example, ACLs). - */ - if (extattr_set_link(name, eap->ea_namespace, eap->ea_name, - EXTATTR_CONTENT(eap), EXTATTR_CONTENT_SIZE(eap)) != -1) { - dprintf(stdout, " (set using extattr_set_link)"); + if (res != -1) { + dprintf(stdout, " (set using %s)", method); continue; } /* @@ -827,77 +786,37 @@ set_extattr_link(char *name, void *buf, * know about. */ if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_ACCESS_EXTATTR_NAME)) { - if (acl_set_link_np(name, ACL_TYPE_ACCESS, - EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_link_np)"); - continue; + strcmp(eaname, POSIX1E_ACL_ACCESS_EXTATTR_NAME) == 0) { + if (mode == SXA_FD) { + error = acl_set_fd(fd, EXTATTR_CONTENT(eap)); + method = "acl_set_fd"; + } else if (mode == SXA_LINK) { + error = acl_set_link_np(name, ACL_TYPE_ACCESS, + EXTATTR_CONTENT(eap)); + method = "acl_set_link_np"; + } else if (mode == SXA_FILE) { + error = acl_set_file(name, ACL_TYPE_ACCESS, + EXTATTR_CONTENT(eap)); + method = "acl_set_file"; } - } - if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_DEFAULT_EXTATTR_NAME)) { - if (acl_set_link_np(name, ACL_TYPE_DEFAULT, - EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_link_np)"); + if (error != -1) { + dprintf(stdout, " (set using %s)", method); continue; } } - vprintf(stdout, " (unable to set)"); - } - vprintf(stdout, "\n"); -} - -/* - * Set attributes on a file descriptor. - */ -static void -set_extattr_fd(int fd, char *name, void *buf, int size) -{ - struct extattr *eap, *eaend; - - vprintf(stdout, "Set attributes for %s:", name); - eaend = buf + size; - for (eap = buf; eap < eaend; eap = EXTATTR_NEXT(eap)) { - /* - * Make sure this entry is complete. - */ - if (EXTATTR_NEXT(eap) > eaend || eap->ea_length <= 0) { - dprintf(stdout, "\n\t%scorrupted", - eap == buf ? "" : "remainder "); - break; - } - if (eap->ea_namespace == EXTATTR_NAMESPACE_EMPTY) - continue; - vprintf(stdout, "\n\t%s, (%d bytes), %*s", - namespace_names[eap->ea_namespace], eap->ea_length, - eap->ea_namelength, eap->ea_name); - /* - * First we try the general attribute setting interface. - * However, some attributes can only be set by root or - * by using special interfaces (for example, ACLs). - */ - if (extattr_set_fd(fd, eap->ea_namespace, eap->ea_name, - EXTATTR_CONTENT(eap), EXTATTR_CONTENT_SIZE(eap)) != -1) { - dprintf(stdout, " (set using extattr_set_fd)"); - continue; - } - /* - * If the general interface refuses to set the attribute, - * then we try all the specialized interfaces that we - * know about. - */ if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_ACCESS_EXTATTR_NAME)) { - if (acl_set_fd(fd, EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_fd)"); - continue; + strcmp(eaname, POSIX1E_ACL_DEFAULT_EXTATTR_NAME) == 0) { + if (mode == SXA_LINK) { + error = acl_set_link_np(name, ACL_TYPE_DEFAULT, + EXTATTR_CONTENT(eap)); + method = "acl_set_link_np"; + } else { + error = acl_set_file(name, ACL_TYPE_DEFAULT, + EXTATTR_CONTENT(eap)); + method = "acl_set_file"; } - } - if (eap->ea_namespace == EXTATTR_NAMESPACE_SYSTEM && - !strcmp(eap->ea_name, POSIX1E_ACL_DEFAULT_EXTATTR_NAME)) { - if (acl_set_file(name, ACL_TYPE_DEFAULT, - EXTATTR_CONTENT(eap)) != -1) { - dprintf(stdout, " (set using acl_set_file)"); + if (error != -1) { + dprintf(stdout, " (set using %s)", method); continue; } } Modified: head/sys/sys/extattr.h ============================================================================== --- head/sys/sys/extattr.h Wed Jan 18 18:14:50 2017 (r312392) +++ head/sys/sys/extattr.h Wed Jan 18 18:16:57 2017 (r312393) @@ -57,10 +57,11 @@ EXTATTR_NAMESPACE_USER_STRING, \ EXTATTR_NAMESPACE_SYSTEM_STRING } +#define EXTATTR_MAXNAMELEN NAME_MAX + #ifdef _KERNEL #include -#define EXTATTR_MAXNAMELEN NAME_MAX struct thread; struct ucred; struct vnode; Modified: head/sys/ufs/ufs/extattr.h ============================================================================== --- head/sys/ufs/ufs/extattr.h Wed Jan 18 18:14:50 2017 (r312392) +++ head/sys/ufs/ufs/extattr.h Wed Jan 18 18:16:57 2017 (r312393) @@ -93,12 +93,14 @@ struct extattr { * content referenced by eap. */ #define EXTATTR_NEXT(eap) \ - ((struct extattr *)(((void *)(eap)) + (eap)->ea_length)) -#define EXTATTR_CONTENT(eap) (((void *)(eap)) + EXTATTR_BASE_LENGTH(eap)) + ((struct extattr *)(((u_char *)(eap)) + (eap)->ea_length)) +#define EXTATTR_CONTENT(eap) \ + (void *)(((u_char *)(eap)) + EXTATTR_BASE_LENGTH(eap)) #define EXTATTR_CONTENT_SIZE(eap) \ ((eap)->ea_length - EXTATTR_BASE_LENGTH(eap) - (eap)->ea_contentpadlen) +/* -1 below compensates for ea_name[1] */ #define EXTATTR_BASE_LENGTH(eap) \ - ((sizeof(struct extattr) + (eap)->ea_namelength + 7) & ~7) + roundup2((sizeof(struct extattr) - 1 + (eap)->ea_namelength), 8) #ifdef _KERNEL From owner-svn-src-head@freebsd.org Wed Jan 18 18:30:55 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 D6A89CB55CB; Wed, 18 Jan 2017 18:30:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 B5EF81191; Wed, 18 Jan 2017 18:30:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 20F3710A7DB; Wed, 18 Jan 2017 13:30:54 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312387 - head/sys/sys Date: Wed, 18 Jan 2017 10:27:09 -0800 Message-ID: <2007305.gnFnN0nUgT@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701181709.v0IH9M5M038972@repo.freebsd.org> References: <201701181709.v0IH9M5M038972@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 18 Jan 2017 13:30:54 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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: Wed, 18 Jan 2017 18:30:55 -0000 On Wednesday, January 18, 2017 05:09:22 PM Gleb Smirnoff wrote: > Author: glebius > Date: Wed Jan 18 17:09:22 2017 > New Revision: 312387 > URL: https://svnweb.freebsd.org/changeset/base/312387 > > Log: > Fix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME > lead to delayed send of data sent with sendto(MSG_NOSIGNAL). > > Submitted by: rrs Ouch, thanks for fixing. Hopefully this fixes the freerdp report. :( -- John Baldwin From owner-svn-src-head@freebsd.org Wed Jan 18 19:44: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 0FFFACB6245; Wed, 18 Jan 2017 19:44:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 9870810FC; Wed, 18 Jan 2017 19:44:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id c85so259035264wmi.1; Wed, 18 Jan 2017 11:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6PrXeFcOFbIe7qBuLc+IhbTM3Z0bLoybpDT3F9cKm5s=; b=ZQJxZDqKWIrVM3gcpU1MsAJzVp0JKNAKb+NqC6dmh/LzzTkvCmvUWk1mXgQbfsht38 icg2e/wBeL/mu1z753Q22zbtL3ZY76iUQoXqlQ7S8szzAQTry/56mYghL1i1gN6Kcxbl rcHbap4sVPv++XP9n0MqCcFoN83LBA9mD/+2fqKoTEYChqH+GLC/peGKZte5BAmJVN1J 1H0JsLfnkeAic2uOMzq0DN19zKhjTxz6eZcrKy0yyaLrFuRhOUPXMdNSfo1RQpfT36dV LUuE61o+GKWAWAVkYyJ87M8nqpQa10lwDSLlVonZz57nZHvmTKCTtkBAk9YqX2mNeYQl H0ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6PrXeFcOFbIe7qBuLc+IhbTM3Z0bLoybpDT3F9cKm5s=; b=emEEMVAPZI7wYiI06HwEnjvu0owItypi4/yTyv3yKRJd9OYvpVK4RqPryWmdJ4iuQ+ 7CZgt3Kig4El3P7DcVOC99FA1Us7ys8clD8MfHx73KG05cyBdOd9NiYxmUr/WKaoT8Lp tCXIr9hclxi4YrTgY3/eNW0PtAbFgZPYk6f4BSqoz6VB5nuxu5Wkv3cz7j/SpMy2+Zud jgahAH1ubWGf1Zf5F59uejRN5s6EMoervblHTdvmjTLczgE9jEHU5GlYj6jFEfVUH0Fc SbtHyKJvEJqniacJINC34SzAPpB2KCA9SofoN+u5tGW6kQV8YqUd5vZKLUHnexP/nuDl IG/A== X-Gm-Message-State: AIkVDXK5+lPhK8Rei7MgErX02jKnI3eMg+FNrP9+/q6/CJ6YcJa1wBfVv9bo8D7GVQ49U/8A2Q8qQJmooW1IVw== X-Received: by 10.223.169.112 with SMTP id u103mr4208454wrc.166.1484768682255; Wed, 18 Jan 2017 11:44:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Wed, 18 Jan 2017 11:44:40 -0800 (PST) In-Reply-To: <20170118181649.GE2611@FreeBSD.org> References: <201701181331.v0IDVHWf048428@repo.freebsd.org> <20170118173132.GD2611@FreeBSD.org> <20170118181649.GE2611@FreeBSD.org> From: Adrian Chadd Date: Wed, 18 Jan 2017 11:44:40 -0800 Message-ID: Subject: Re: svn commit: r312379 - in head: lib/libc/sys sbin/ifconfig sys/conf sys/kern sys/modules/if_lagg sys/modules/if_vlan sys/net sys/netinet sys/netinet6 sys/sys To: Gleb Smirnoff Cc: Hans Petter Selasky , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Meny Yossefi , Navdeep Parhar 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: Wed, 18 Jan 2017 19:44:45 -0000 It depends, is this -HEAD or is this -stable? If this thing doesn't pan out with the chelsio/mellanox hardware socket rate limiting then we can either evolve it or remove it. -adrian From owner-svn-src-head@freebsd.org Wed Jan 18 20:24:38 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 D873BCB6E3B; Wed, 18 Jan 2017 20:24:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1BA1C0D; Wed, 18 Jan 2017 20:24:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IKObID021451; Wed, 18 Jan 2017 20:24:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IKObaC021450; Wed, 18 Jan 2017 20:24:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701182024.v0IKObaC021450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 18 Jan 2017 20:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312395 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 20:24:39 -0000 Author: asomers Date: Wed Jan 18 20:24:37 2017 New Revision: 312395 URL: https://svnweb.freebsd.org/changeset/base/312395 Log: Fix several Coverity CIDs in devd CID 1362055, 1362054: File descriptor leaks during shutdown CID 1362013: Potential null-termination fail with long network device names CID 1362097: Uncaught exception during memory pressure CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior if two devd instances start at the same time. CID 1362015: Unchecked error that will probably never fail Reported by: Coverity CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed Jan 18 19:38:53 2017 (r312394) +++ head/sbin/devd/devd.cc Wed Jan 18 20:24:37 2017 (r312395) @@ -372,7 +372,7 @@ media::do_match(config &c) s = socket(PF_INET, SOCK_DGRAM, 0); if (s >= 0) { memset(&ifmr, 0, sizeof(ifmr)); - strncpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name)); + strlcpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name)); if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0 && ifmr.ifm_status & IFM_AVALID) { @@ -871,8 +871,10 @@ create_socket(const char *name, int sock if (::bind(fd, (struct sockaddr *) & sun, slen) < 0) err(1, "bind"); listen(fd, 4); - chown(name, 0, 0); /* XXX - root.wheel */ - chmod(name, 0666); + if (chown(name, 0, 0)) /* XXX - root.wheel */ + err(1, "chown"); + if (chmod(name, 0666)) + err(1, "chmod"); return (fd); } @@ -1058,7 +1060,13 @@ event_loop(void) buffer[rv] = '\0'; while (buffer[--rv] == '\n') buffer[rv] = '\0'; - process_event(buffer); + try { + process_event(buffer); + } + catch (std::length_error e) { + devdlog(LOG_ERR, "Dropping event %s " + "due to low memory", buffer); + } } else if (rv < 0) { if (errno != EINTR) break; @@ -1076,6 +1084,8 @@ event_loop(void) if (FD_ISSET(seqpacket_fd, &fds)) new_client(seqpacket_fd, SOCK_SEQPACKET); } + close(seqpacket_fd); + close(stream_fd); close(fd); } @@ -1218,7 +1228,8 @@ check_devd_enabled() if (val == 0) { warnx("Setting " SYSCTL " to 1000"); val = 1000; - sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); + if (sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val))) + err(1, "sysctlbyname"); } } From owner-svn-src-head@freebsd.org Wed Jan 18 22:03:24 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 7EA3BCB61DA; Wed, 18 Jan 2017 22:03:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::243]) (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 4EFDB1644; Wed, 18 Jan 2017 22:03:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x243.google.com with SMTP id 123so1100402ybe.0; Wed, 18 Jan 2017 14:03:24 -0800 (PST) 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=vPPg4l+exwR3HKT17hWmLGbKDmLRbmBsaeLhB4D8oLw=; b=FnV6QlmswxLY1QWxWRmPBSEjA/TiEZQ+fRSLALp3fMnG2reUSZvaP3UOasp0lzQ9o3 QWmikGy+HL0dfYgzy3QTQfjsUk20RDqoLfJEnwjejixdU5Jx2x3lmlXI/LSjpQJBIlBv EeqU68aNVRHLkO56K7M9JUkmEic+shonBhdXVcKDWq0167d/wOJGxP4T4HYKmZ+9c9h7 UY2gwvRSyYt/cApID9w6/kY50YLy0Li9EhdJajcjlq4g8/YHYPe8UvFo27XclBiI90iq 2zTZFRC/YUIVH3NIWibGKTqI3mUvvOJprn/VNaiDYKV04Pmn5O/sOyYWN/G8ObEFJWN9 sRnA== 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=vPPg4l+exwR3HKT17hWmLGbKDmLRbmBsaeLhB4D8oLw=; b=E7bJzVPqfQMZgrbKQApFiEZUP+Tv7zPPB22nBRGZEsA6yk2aEyD3iQlmoBtXTVPdrn UXci25eqEyr8a/OSXHLGtZJngMpCy6UmQIPGt6U66b9IUywJ4X5NEUFcvJ64Y4sEDbQ8 Q79UPJ5N4zzsbFQKuDY/o0J308LASdp0dl8aWzfI5499qS2DVduKScouTXicLcHIWkOo KRVuNCZKR3vk+tmETngrbYyX5pnBQcRoHC6NslAnljh05XZ3JPO1vYrAo5eVGGczTs7E UCCDOWyXeUELb6xu7rDI4p0k0IIlrO7aSMbVje4JZ1Egie3cp4eCMgECVI2X5Y9d9/uN NsCQ== X-Gm-Message-State: AIkVDXKBrFNx+J4QBSp5nYIhWARmajSBr7Ov84n1h8H++eATM8fHTTOCpmwW1LrZ+VR6eiVy8jBHcBrcy9wUGg== X-Received: by 10.37.32.194 with SMTP id g185mr4216026ybg.167.1484777002784; Wed, 18 Jan 2017 14:03:22 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.38.133 with HTTP; Wed, 18 Jan 2017 14:03:22 -0800 (PST) In-Reply-To: <201508122021.t7CKL5wk016750@repo.freebsd.org> References: <201508122021.t7CKL5wk016750@repo.freebsd.org> From: Alan Somers Date: Wed, 18 Jan 2017 15:03:22 -0700 X-Google-Sender-Auth: dwjPJZd-jf0ztOJB0YjxAPUNzE4 Message-ID: Subject: Re: svn commit: r286700 - in head: sbin/ifconfig sys/net To: Hiren Panchasara 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: Wed, 18 Jan 2017 22:03:24 -0000 Is the change to lacp_port_create correct? The comment indicates that fast is configurable, but it's actually constant. Later on, there's some dead code that depends on the value of fast (it was dead before this commit, too). CID: 1305734 CID: 1305692 -Alan On Wed, Aug 12, 2015 at 2:21 PM, Hiren Panchasara wrote: > Author: hiren > Date: Wed Aug 12 20:21:04 2015 > New Revision: 286700 > URL: https://svnweb.freebsd.org/changeset/base/286700 > > Log: > Make LAG LACP fast timeout tunable through IOCTL. > > Differential Revision: D3300 > Submitted by: LN Sundararajan > Reviewed by: wblock, smh, gnn, hiren, rpokala at panasas > MFC after: 2 weeks > Sponsored by: Panasas > > Modified: > head/sbin/ifconfig/ifconfig.8 > head/sbin/ifconfig/iflagg.c > head/sys/net/ieee8023ad_lacp.c > head/sys/net/ieee8023ad_lacp.h > head/sys/net/if_lagg.c > head/sys/net/if_lagg.h > > Modified: head/sbin/ifconfig/ifconfig.8 > ============================================================================== > --- head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:21:04 2015 (r286700) > @@ -28,7 +28,7 @@ > .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 > .\" $FreeBSD$ > .\" > -.Dd May 15, 2015 > +.Dd Aug 12, 2015 > .Dt IFCONFIG 8 > .Os > .Sh NAME > @@ -2396,6 +2396,10 @@ Disable local hash computation for RSS h > Set a shift parameter for RSS local hash computation. > Hash is calculated by using flowid bits in a packet header mbuf > which are shifted by the number of this parameter. > +.It Cm lacp_fast_timeout > +Enable lacp fast-timeout on the interface. > +.It Cm -lacp_fast_timeout > +Disable lacp fast-timeout on the interface. > .El > .Pp > The following parameters are specific to IP tunnel interfaces, > > Modified: head/sbin/ifconfig/iflagg.c > ============================================================================== > --- head/sbin/ifconfig/iflagg.c Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sbin/ifconfig/iflagg.c Wed Aug 12 20:21:04 2015 (r286700) > @@ -115,6 +115,8 @@ setlaggsetopt(const char *val, int d, in > case -LAGG_OPT_LACP_TXTEST: > case LAGG_OPT_LACP_RXTEST: > case -LAGG_OPT_LACP_RXTEST: > + case LAGG_OPT_LACP_TIMEOUT: > + case -LAGG_OPT_LACP_TIMEOUT: > break; > default: > err(1, "Invalid lagg option"); > @@ -293,6 +295,8 @@ static struct cmd lagg_cmds[] = { > DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), > DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), > DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), > + DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), > + DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), > DEF_CMD_ARG("flowid_shift", setlaggflowidshift), > }; > static struct afswtch af_lagg = { > > Modified: head/sys/net/ieee8023ad_lacp.c > ============================================================================== > --- head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:21:04 2015 (r286700) > @@ -522,7 +522,7 @@ lacp_port_create(struct lagg_port *lgp) > int error; > > boolean_t active = TRUE; /* XXX should be configurable */ > - boolean_t fast = FALSE; /* XXX should be configurable */ > + boolean_t fast = FALSE; /* Configurable via ioctl */ > > link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); > sdl.sdl_alen = ETHER_ADDR_LEN; > > Modified: head/sys/net/ieee8023ad_lacp.h > ============================================================================== > --- head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:21:04 2015 (r286700) > @@ -251,6 +251,7 @@ struct lacp_softc { > u_int32_t lsc_tx_test; > } lsc_debug; > u_int32_t lsc_strict_mode; > + boolean_t lsc_fast_timeout; /* if set, fast timeout */ > }; > > #define LACP_TYPE_ACTORINFO 1 > > Modified: head/sys/net/if_lagg.c > ============================================================================== > --- head/sys/net/if_lagg.c Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sys/net/if_lagg.c Wed Aug 12 20:21:04 2015 (r286700) > @@ -1257,6 +1257,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > ro->ro_opts |= LAGG_OPT_LACP_RXTEST; > if (lsc->lsc_strict_mode != 0) > ro->ro_opts |= LAGG_OPT_LACP_STRICT; > + if (lsc->lsc_fast_timeout != 0) > + ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT; > > ro->ro_active = sc->sc_active; > } else { > @@ -1292,6 +1294,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > case -LAGG_OPT_LACP_RXTEST: > case LAGG_OPT_LACP_STRICT: > case -LAGG_OPT_LACP_STRICT: > + case LAGG_OPT_LACP_TIMEOUT: > + case -LAGG_OPT_LACP_TIMEOUT: > valid = lacp = 1; > break; > default: > @@ -1320,6 +1324,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > sc->sc_opts &= ~ro->ro_opts; > } else { > struct lacp_softc *lsc; > + struct lacp_port *lp; > > lsc = (struct lacp_softc *)sc->sc_psc; > > @@ -1342,6 +1347,20 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > case -LAGG_OPT_LACP_STRICT: > lsc->lsc_strict_mode = 0; > break; > + case LAGG_OPT_LACP_TIMEOUT: > + LACP_LOCK(lsc); > + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) > + lp->lp_state |= LACP_STATE_TIMEOUT; > + LACP_UNLOCK(lsc); > + lsc->lsc_fast_timeout = 1; > + break; > + case -LAGG_OPT_LACP_TIMEOUT: > + LACP_LOCK(lsc); > + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) > + lp->lp_state &= ~LACP_STATE_TIMEOUT; > + LACP_UNLOCK(lsc); > + lsc->lsc_fast_timeout = 0; > + break; > } > } > LAGG_WUNLOCK(sc); > > Modified: head/sys/net/if_lagg.h > ============================================================================== > --- head/sys/net/if_lagg.h Wed Aug 12 20:16:13 2015 (r286699) > +++ head/sys/net/if_lagg.h Wed Aug 12 20:21:04 2015 (r286700) > @@ -150,6 +150,7 @@ struct lagg_reqopts { > #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ > #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ > #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ > +#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ > u_int ro_count; /* number of ports */ > u_int ro_active; /* active port count */ > u_int ro_flapping; /* number of flapping */ > From owner-svn-src-head@freebsd.org Wed Jan 18 22:10:20 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 1AB1FCB6394; Wed, 18 Jan 2017 22:10:20 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB6F918F3; Wed, 18 Jan 2017 22:10:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0IMAJtl062939; Wed, 18 Jan 2017 22:10:19 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0IMAIh2062938; Wed, 18 Jan 2017 22:10:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701182210.v0IMAIh2062938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 18 Jan 2017 22:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312396 - head/cddl/usr.sbin/zfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 18 Jan 2017 22:10:20 -0000 Author: asomers Date: Wed Jan 18 22:10:18 2017 New Revision: 312396 URL: https://svnweb.freebsd.org/changeset/base/312396 Log: Fix an unchecked return value in zfsd It's pretty unlikely to actually hit this, but good to check it anyway Reported by: Coverity CID: 1362018 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/cddl/usr.sbin/zfsd/case_file.cc Modified: head/cddl/usr.sbin/zfsd/case_file.cc ============================================================================== --- head/cddl/usr.sbin/zfsd/case_file.cc Wed Jan 18 20:24:37 2017 (r312395) +++ head/cddl/usr.sbin/zfsd/case_file.cc Wed Jan 18 22:10:18 2017 (r312396) @@ -656,8 +656,11 @@ CaseFile::DeSerializeFile(const char *fi uint64_t vdevGUID; nvlist_t *vdevConf; - sscanf(fileName, "pool_%" PRIu64 "_vdev_%" PRIu64 ".case", - &poolGUID, &vdevGUID); + if (sscanf(fileName, "pool_%" PRIu64 "_vdev_%" PRIu64 ".case", + &poolGUID, &vdevGUID) != 2) { + throw ZfsdException("CaseFile::DeSerialize: " + "Unintelligible CaseFile filename %s.\n", fileName); + } existingCaseFile = Find(Guid(poolGUID), Guid(vdevGUID)); if (existingCaseFile != NULL) { /* From owner-svn-src-head@freebsd.org Wed Jan 18 22:38:37 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 A78D7CB6CF5; Wed, 18 Jan 2017 22:38:37 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8FCDA1939; Wed, 18 Jan 2017 22:38:34 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id A684017386; Wed, 18 Jan 2017 14:38:27 -0800 (PST) Date: Wed, 18 Jan 2017 14:38:27 -0800 From: Hiren Panchasara To: Alan Somers , lakshmi.n@msystechnologies.com, rpokala@FreeBSD.org, smh@FreeBSD.org Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r286700 - in head: sbin/ifconfig sys/net Message-ID: <20170118223827.GJ86256@strugglingcoder.info> References: <201508122021.t7CKL5wk016750@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EVh9lyqKgK19OcEf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Wed, 18 Jan 2017 22:38:37 -0000 --EVh9lyqKgK19OcEf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Adding the submitter and other reviewers for their comments. On 01/18/17 at 03:03P, Alan Somers wrote: > Is the change to lacp_port_create correct? The comment indicates that > fast is configurable, but it's actually constant. Later on, there's > some dead code that depends on the value of fast (it was dead before > this commit, too). >=20 > CID: 1305734 > CID: 1305692 >=20 > -Alan >=20 > On Wed, Aug 12, 2015 at 2:21 PM, Hiren Panchasara wro= te: > > Author: hiren > > Date: Wed Aug 12 20:21:04 2015 > > New Revision: 286700 > > URL: https://svnweb.freebsd.org/changeset/base/286700 > > > > Log: > > Make LAG LACP fast timeout tunable through IOCTL. > > > > Differential Revision: D3300 > > Submitted by: LN Sundararajan > > Reviewed by: wblock, smh, gnn, hiren, rpokala at panasas > > MFC after: 2 weeks > > Sponsored by: Panasas > > > > Modified: > > head/sbin/ifconfig/ifconfig.8 > > head/sbin/ifconfig/iflagg.c > > head/sys/net/ieee8023ad_lacp.c > > head/sys/net/ieee8023ad_lacp.h > > head/sys/net/if_lagg.c > > head/sys/net/if_lagg.h > > > > Modified: head/sbin/ifconfig/ifconfig.8 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:16:13 2015 = (r286699) > > +++ head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:21:04 2015 = (r286700) > > @@ -28,7 +28,7 @@ > > .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 > > .\" $FreeBSD$ > > .\" > > -.Dd May 15, 2015 > > +.Dd Aug 12, 2015 > > .Dt IFCONFIG 8 > > .Os > > .Sh NAME > > @@ -2396,6 +2396,10 @@ Disable local hash computation for RSS h > > Set a shift parameter for RSS local hash computation. > > Hash is calculated by using flowid bits in a packet header mbuf > > which are shifted by the number of this parameter. > > +.It Cm lacp_fast_timeout > > +Enable lacp fast-timeout on the interface. > > +.It Cm -lacp_fast_timeout > > +Disable lacp fast-timeout on the interface. > > .El > > .Pp > > The following parameters are specific to IP tunnel interfaces, > > > > Modified: head/sbin/ifconfig/iflagg.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sbin/ifconfig/iflagg.c Wed Aug 12 20:16:13 2015 (r28669= 9) > > +++ head/sbin/ifconfig/iflagg.c Wed Aug 12 20:21:04 2015 (r28670= 0) > > @@ -115,6 +115,8 @@ setlaggsetopt(const char *val, int d, in > > case -LAGG_OPT_LACP_TXTEST: > > case LAGG_OPT_LACP_RXTEST: > > case -LAGG_OPT_LACP_RXTEST: > > + case LAGG_OPT_LACP_TIMEOUT: > > + case -LAGG_OPT_LACP_TIMEOUT: > > break; > > default: > > err(1, "Invalid lagg option"); > > @@ -293,6 +295,8 @@ static struct cmd lagg_cmds[] =3D { > > DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), > > DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), > > DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), > > + DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlagg= setopt), > > + DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlagg= setopt), > > DEF_CMD_ARG("flowid_shift", setlaggflowidshift), > > }; > > static struct afswtch af_lagg =3D { > > > > Modified: head/sys/net/ieee8023ad_lacp.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:16:13 2015 = (r286699) > > +++ head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:21:04 2015 = (r286700) > > @@ -522,7 +522,7 @@ lacp_port_create(struct lagg_port *lgp) > > int error; > > > > boolean_t active =3D TRUE; /* XXX should be configurable */ > > - boolean_t fast =3D FALSE; /* XXX should be configurable */ > > + boolean_t fast =3D FALSE; /* Configurable via ioctl */ > > > > link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); > > sdl.sdl_alen =3D ETHER_ADDR_LEN; > > > > Modified: head/sys/net/ieee8023ad_lacp.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:16:13 2015 = (r286699) > > +++ head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:21:04 2015 = (r286700) > > @@ -251,6 +251,7 @@ struct lacp_softc { > > u_int32_t lsc_tx_test; > > } lsc_debug; > > u_int32_t lsc_strict_mode; > > + boolean_t lsc_fast_timeout; /* if set, fast timeo= ut */ > > }; > > > > #define LACP_TYPE_ACTORINFO 1 > > > > Modified: head/sys/net/if_lagg.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/net/if_lagg.c Wed Aug 12 20:16:13 2015 (r28669= 9) > > +++ head/sys/net/if_lagg.c Wed Aug 12 20:21:04 2015 (r28670= 0) > > @@ -1257,6 +1257,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > > ro->ro_opts |=3D LAGG_OPT_LACP_RXTEST; > > if (lsc->lsc_strict_mode !=3D 0) > > ro->ro_opts |=3D LAGG_OPT_LACP_STRICT; > > + if (lsc->lsc_fast_timeout !=3D 0) > > + ro->ro_opts |=3D LAGG_OPT_LACP_TIMEOUT; > > > > ro->ro_active =3D sc->sc_active; > > } else { > > @@ -1292,6 +1294,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > > case -LAGG_OPT_LACP_RXTEST: > > case LAGG_OPT_LACP_STRICT: > > case -LAGG_OPT_LACP_STRICT: > > + case LAGG_OPT_LACP_TIMEOUT: > > + case -LAGG_OPT_LACP_TIMEOUT: > > valid =3D lacp =3D 1; > > break; > > default: > > @@ -1320,6 +1324,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > > sc->sc_opts &=3D ~ro->ro_opts; > > } else { > > struct lacp_softc *lsc; > > + struct lacp_port *lp; > > > > lsc =3D (struct lacp_softc *)sc->sc_psc; > > > > @@ -1342,6 +1347,20 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd > > case -LAGG_OPT_LACP_STRICT: > > lsc->lsc_strict_mode =3D 0; > > break; > > + case LAGG_OPT_LACP_TIMEOUT: > > + LACP_LOCK(lsc); > > + LIST_FOREACH(lp, &lsc->lsc_ports, lp_ne= xt) > > + lp->lp_state |=3D LACP_STATE_TI= MEOUT; > > + LACP_UNLOCK(lsc); > > + lsc->lsc_fast_timeout =3D 1; > > + break; > > + case -LAGG_OPT_LACP_TIMEOUT: > > + LACP_LOCK(lsc); > > + LIST_FOREACH(lp, &lsc->lsc_ports, lp_ne= xt) > > + lp->lp_state &=3D ~LACP_STATE_T= IMEOUT; > > + LACP_UNLOCK(lsc); > > + lsc->lsc_fast_timeout =3D 0; > > + break; > > } > > } > > LAGG_WUNLOCK(sc); > > > > Modified: head/sys/net/if_lagg.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/net/if_lagg.h Wed Aug 12 20:16:13 2015 (r28669= 9) > > +++ head/sys/net/if_lagg.h Wed Aug 12 20:21:04 2015 (r28670= 0) > > @@ -150,6 +150,7 @@ struct lagg_reqopts { > > #define LAGG_OPT_LACP_STRICT 0x10 /* LACP= strict mode */ > > #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP= debug: txtest */ > > #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP= debug: rxtest */ > > +#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP= timeout */ > > u_int ro_count; /* number of po= rts */ > > u_int ro_active; /* active port = count */ > > u_int ro_flapping; /* number of fl= apping */ > > >=20 --EVh9lyqKgK19OcEf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYf+5dXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lKAEH/3vpOnIjPuMagrPSCsYRx1oQ vQdpXEvWu8soXJTJuvs7k6v1mLoeUPSZkQotzKdLyuHpY/pGx+7/4lpf/BnGxq9F oHncnr7pL6cB3E8Sriyj91TeKIy0Qm6p9WB3nXvGY1oQuwQxB2Z/Md19VWmGLn0t 23jbBPBJeB81LpPqSFwZagy3lkW4TTZ69deboKoK6mLMegTknJa0p7lfXAbdVUOy Y232ZJk12G1rex0JQcDrQH5L0l3C+lUWA+QVL6aJsFNsVoKXIu88hEedixqtWoU+ br996on9xRrFWnAbnJOtTGFgXyrksbijVRizwarzyJGOh2mEUsjeQ8mEaOLkxSM= =mDTP -----END PGP SIGNATURE----- --EVh9lyqKgK19OcEf-- From owner-svn-src-head@freebsd.org Thu Jan 19 08:01:36 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 8E059CB7D3E; Thu, 19 Jan 2017 08:01:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B734186E; Thu, 19 Jan 2017 08:01:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0J81ZFJ008268; Thu, 19 Jan 2017 08:01:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0J81ZG9008267; Thu, 19 Jan 2017 08:01:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701190801.v0J81ZG9008267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 19 Jan 2017 08:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312404 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 08:01:36 -0000 Author: delphij Date: Thu Jan 19 08:01:35 2017 New Revision: 312404 URL: https://svnweb.freebsd.org/changeset/base/312404 Log: Use S_ISREG instead of manual & (also it's better to compare the result from & and the pattern instead of just assuming it's one bit value). Pointed out by Tianjie Mao . MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4827 Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Thu Jan 19 07:29:52 2017 (r312403) +++ head/usr.bin/sed/main.c Thu Jan 19 08:01:35 2017 (r312404) @@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (inplace != NULL) { if (lstat(fname, &sb) != 0) err(1, "%s", fname); - if (!(sb.st_mode & S_IFREG)) + if (!S_ISREG(sb.st_mode)) errx(1, "%s: %s %s", fname, "in-place editing only", "works for regular files"); From owner-svn-src-head@freebsd.org Thu Jan 19 09:24:50 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 0BE79CB7F72 for ; Thu, 19 Jan 2017 09:24:50 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from smtp.smtpout.orange.fr (smtp13.smtpout.orange.fr [80.12.242.135]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC6E1241 for ; Thu, 19 Jan 2017 09:24:48 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from mail-qt0-f175.google.com ([209.85.216.175]) by mwinf5d72 with ME id a9Qe1u00T3neHNR039Qf85; Thu, 19 Jan 2017 10:24:40 +0100 X-ME-Helo: mail-qt0-f175.google.com X-ME-Auth: Y29jaGFyZC1sYWJiZS5vbGl2aWVyQG9yYW5nZS5mcg== X-ME-Date: Thu, 19 Jan 2017 10:24:40 +0100 X-ME-IP: 209.85.216.175 Received: by mail-qt0-f175.google.com with SMTP id x49so57729434qtc.2; Thu, 19 Jan 2017 01:24:39 -0800 (PST) X-Gm-Message-State: AIkVDXLofN7kx0chEn21qksgTfVQ+x7A1xm54J9h17rY9fCpF5duY+R6NOwPbSVK33s/alJHyU/w+rlTF5VYng== X-Received: by 10.55.180.129 with SMTP id d123mr6794761qkf.158.1484817878289; Thu, 19 Jan 2017 01:24:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.49.99 with HTTP; Thu, 19 Jan 2017 01:24:17 -0800 (PST) In-Reply-To: <201701182024.v0IKObaC021450@repo.freebsd.org> References: <201701182024.v0IKObaC021450@repo.freebsd.org> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Thu, 19 Jan 2017 10:24:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r312395 - head/sbin/devd To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Thu, 19 Jan 2017 09:24:50 -0000 On Wed, Jan 18, 2017 at 9:24 PM, Alan Somers wrote: > Author: asomers > Date: Wed Jan 18 20:24:37 2017 > New Revision: 312395 > URL: https://svnweb.freebsd.org/changeset/base/312395 > > Log: > Fix several Coverity CIDs in devd > > =E2=80=8BHi, this break buildworld for mips arch: =E2=80=8B =E2=80=8B --- devd.o --- /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc: In function 'void event_loop()': /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: expected type-specifier /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: expected unqualified-id before 'e' /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: expected `)' before 'e' /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: expected `{' before 'e' /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: 'e' was not declared in this scope /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: error: expected `;' before ')' token --- all_subdir_sbin/hastd --- =E2=80=8B From owner-svn-src-head@freebsd.org Thu Jan 19 13:35:15 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 4E2C8CB7793; Thu, 19 Jan 2017 13:35:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF4A170E; Thu, 19 Jan 2017 13:35:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JDZE9K044294; Thu, 19 Jan 2017 13:35:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JDZEQG044293; Thu, 19 Jan 2017 13:35:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191335.v0JDZEQG044293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 13:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312407 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 13:35:15 -0000 Author: kib Date: Thu Jan 19 13:35:14 2017 New Revision: 312407 URL: https://svnweb.freebsd.org/changeset/base/312407 Log: Remove unused union member, fifos on tmpfs are implemented in common code. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 11:17:09 2017 (r312406) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 13:35:14 2017 (r312407) @@ -259,12 +259,6 @@ struct tmpfs_node { vm_object_t tn_aobj; }tn_reg; - - /* Valid when tn_type = VFIFO */ - struct tn_fifo { - fo_rdwr_t *tn_fo_read; - fo_rdwr_t *tn_fo_write; - }tn_fifo; }tn_spec; }; LIST_HEAD(tmpfs_node_list, tmpfs_node); From owner-svn-src-head@freebsd.org Thu Jan 19 14:05:51 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 5E6A1CB7243; Thu, 19 Jan 2017 14:05:51 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06A761C0D; Thu, 19 Jan 2017 14:05:50 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JE5oMm057834; Thu, 19 Jan 2017 14:05:50 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JE5o5b057833; Thu, 19 Jan 2017 14:05:50 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701191405.v0JE5o5b057833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 19 Jan 2017 14:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312408 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 14:05:51 -0000 Author: loos Date: Thu Jan 19 14:05:49 2017 New Revision: 312408 URL: https://svnweb.freebsd.org/changeset/base/312408 Log: The port number and the to_port_en flag are valid only on SOP descriptor. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 19 13:35:14 2017 (r312407) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 19 14:05:49 2017 (r312408) @@ -1800,13 +1800,8 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) struct cpsw_cpdma_bd bd; struct cpsw_slot *first_new_slot, *last, *last_old_slot, *next, *slot; struct mbuf *m0; - int error, flags, nsegs, seg, added = 0, padlen; + int error, nsegs, seg, added = 0, padlen; - flags = 0; - if (sc->swsc->dualemac) { - flags = CPDMA_BD_TO_PORT | - ((sc->unit + 1) & CPDMA_BD_PORT_MASK); - } /* Pull pending packets from IF queue and prep them for DMA. */ last = NULL; first_new_slot = NULL; @@ -1884,7 +1879,11 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.bufoff = 0; bd.buflen = segs[0].ds_len; bd.pktlen = m_length(slot->mbuf, NULL) + padlen; - bd.flags = CPDMA_BD_SOP | CPDMA_BD_OWNER | flags; + bd.flags = CPDMA_BD_SOP | CPDMA_BD_OWNER; + if (sc->swsc->dualemac) { + bd.flags |= CPDMA_BD_TO_PORT; + bd.flags |= ((sc->unit + 1) & CPDMA_BD_PORT_MASK); + } for (seg = 1; seg < nsegs; ++seg) { /* Save the previous buffer (which isn't EOP) */ cpsw_cpdma_write_bd(sc->swsc, slot, &bd); @@ -1902,7 +1901,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.bufoff = 0; bd.buflen = segs[seg].ds_len; bd.pktlen = 0; - bd.flags = CPDMA_BD_OWNER | flags; + bd.flags = CPDMA_BD_OWNER; } /* Save the final buffer. */ if (padlen <= 0) @@ -1924,7 +1923,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.bufoff = 0; bd.buflen = padlen; bd.pktlen = 0; - bd.flags = CPDMA_BD_EOP | CPDMA_BD_OWNER | flags; + bd.flags = CPDMA_BD_EOP | CPDMA_BD_OWNER; cpsw_cpdma_write_bd(sc->swsc, slot, &bd); ++nsegs; From owner-svn-src-head@freebsd.org Thu Jan 19 14:27:39 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 10A3DCB7C98; Thu, 19 Jan 2017 14:27:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2E41E40; Thu, 19 Jan 2017 14:27:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JERcqQ066665; Thu, 19 Jan 2017 14:27:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JERbbE066661; Thu, 19 Jan 2017 14:27:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191427.v0JERbbE066661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 14:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312409 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 14:27:39 -0000 Author: kib Date: Thu Jan 19 14:27:37 2017 New Revision: 312409 URL: https://svnweb.freebsd.org/changeset/base/312409 Log: Style fixes and comment updates. Edit comments which explain no longer relevant details, and add locking annotations to the struct tmpfs_node members. Tested by: pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 14:05:49 2017 (r312408) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 14:27:37 2017 (r312409) @@ -80,8 +80,10 @@ struct tmpfs_dirent { uint32_t td_hash; u_int td_namelen; - /* Pointer to the node this entry refers to. In case this field - * is NULL, the node is a whiteout. */ + /* + * Pointer to the node this entry refers to. In case this field + * is NULL, the node is a whiteout. + */ struct tmpfs_node * td_node; union { @@ -94,21 +96,24 @@ struct tmpfs_dirent { } ud; }; -/* A directory in tmpfs holds a list of directory entries, which in - * turn point to other files (which can be directories themselves). +/* + * A directory in tmpfs holds a collection of directory entries, which + * in turn point to other files (which can be directories themselves). * - * In tmpfs, this list is managed by a RB-Tree, whose head is defined by - * the struct tmpfs_dir type. + * In tmpfs, this collection is managed by a RB-Tree, whose head is + * defined by the struct tmpfs_dir type. * * It is important to notice that directories do not have entries for . and * .. as other file systems do. These can be generated when requested * based on information available by other means, such as the pointer to * the node itself in the former case or the pointer to the parent directory * in the latter case. This is done to simplify tmpfs's code and, more - * importantly, to remove redundancy. */ + * importantly, to remove redundancy. + */ RB_HEAD(tmpfs_dir, tmpfs_dirent); -/* Each entry in a directory has a cookie that identifies it. Cookies +/* + * Each entry in a directory has a cookie that identifies it. Cookies * supersede offsets within directories because, given how tmpfs stores * directories in memory, there is no such thing as an offset. * @@ -139,51 +144,65 @@ RB_HEAD(tmpfs_dir, tmpfs_dirent); * a particular type. The code must be careful to only access those * attributes that are actually allowed by the node's type. * - * * Below is the key of locks used to protected the fields in the following * structures. - * + * (v) vnode lock in exclusive mode + * (vi) vnode lock in exclusive mode, or vnode lock in shared vnode and + * tn_interlock + * (i) tn_interlock + * (m) tmpfs_mount allnode_lock + * (c) stable after creation */ struct tmpfs_node { - /* Doubly-linked list entry which links all existing nodes for a - * single file system. This is provided to ease the removal of - * all nodes during the unmount operation. */ - LIST_ENTRY(tmpfs_node) tn_entries; + /* + * Doubly-linked list entry which links all existing nodes for + * a single file system. This is provided to ease the removal + * of all nodes during the unmount operation, and to support + * the implementation of VOP_VNTOCNP(). + */ + LIST_ENTRY(tmpfs_node) tn_entries; /* (m) */ - /* The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', + /* + * The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', * 'VLNK', 'VREG' and 'VSOCK' is allowed. The usage of vnode * types instead of a custom enumeration is to make things simpler - * and faster, as we do not need to convert between two types. */ - enum vtype tn_type; + * and faster, as we do not need to convert between two types. + */ + enum vtype tn_type; /* (c) */ /* Node identifier. */ - ino_t tn_id; + ino_t tn_id; /* (c) */ - /* Node's internal status. This is used by several file system + /* + * Node's internal status. This is used by several file system * operations to do modifications to the node in a delayed - * fashion. */ - int tn_status; + * fashion. + */ + int tn_status; /* (vi) */ #define TMPFS_NODE_ACCESSED (1 << 1) #define TMPFS_NODE_MODIFIED (1 << 2) #define TMPFS_NODE_CHANGED (1 << 3) - /* The node size. It does not necessarily match the real amount - * of memory consumed by it. */ - off_t tn_size; + /* + * The node size. It does not necessarily match the real amount + * of memory consumed by it. + */ + off_t tn_size; /* (v) */ /* Generic node attributes. */ - uid_t tn_uid; - gid_t tn_gid; - mode_t tn_mode; - u_long tn_flags; - nlink_t tn_links; - struct timespec tn_atime; - struct timespec tn_mtime; - struct timespec tn_ctime; - struct timespec tn_birthtime; - unsigned long tn_gen; + uid_t tn_uid; /* (v) */ + gid_t tn_gid; /* (v) */ + mode_t tn_mode; /* (v) */ + u_long tn_flags; /* (v) */ + nlink_t tn_links; /* (v) */ + struct timespec tn_atime; /* (vi) */ + struct timespec tn_mtime; /* (vi) */ + struct timespec tn_ctime; /* (vi) */ + struct timespec tn_birthtime; /* (v) */ + unsigned long tn_gen; /* (c) */ - /* As there is a single vnode for each active file within the + /* + * As there is a single vnode for each active file within the * system, care has to be taken to avoid allocating more than one * vnode per file. In order to do this, a bidirectional association * is kept between vnodes and nodes. @@ -196,70 +215,81 @@ struct tmpfs_node { * tn_vnode. * * May be NULL when the node is unused (that is, no vnode has been - * allocated for it or it has been reclaimed). */ - struct vnode * tn_vnode; + * allocated for it or it has been reclaimed). + */ + struct vnode * tn_vnode; /* (i) */ - /* Interlock to protect tn_vpstate, and tn_status under shared + /* + * Interlock to protect tn_vpstate, and tn_status under shared * vnode lock. */ struct mtx tn_interlock; - /* Identify if current node has vnode assiocate with + /* + * Identify if current node has vnode assiocate with * or allocating vnode. */ - int tn_vpstate; + int tn_vpstate; /* (i) */ /* misc data field for different tn_type node */ union { /* Valid when tn_type == VBLK || tn_type == VCHR. */ - dev_t tn_rdev; + dev_t tn_rdev; /* (c) */ /* Valid when tn_type == VDIR. */ struct tn_dir { - /* Pointer to the parent directory. The root + /* + * Pointer to the parent directory. The root * directory has a pointer to itself in this field; - * this property identifies the root node. */ + * this property identifies the root node. + */ struct tmpfs_node * tn_parent; - /* Head of a tree that links the contents of - * the directory together. */ + /* + * Head of a tree that links the contents of + * the directory together. + */ struct tmpfs_dir tn_dirhead; - /* Head of a list the contains fake directory entries + /* + * Head of a list the contains fake directory entries * heads, i.e. entries with TMPFS_DIRCOOKIE_DUPHEAD - * flag. */ + * flag. + */ struct tmpfs_dir_duphead tn_dupindex; - /* Number and pointer of the first directory entry + /* + * Number and pointer of the first directory entry * returned by the readdir operation if it were * called again to continue reading data from the * same directory as before. This is used to speed * up reads of long directories, assuming that no * more than one read is in progress at a given time. - * Otherwise, these values are discarded. */ + * Otherwise, these values are discarded. + */ off_t tn_readdir_lastn; struct tmpfs_dirent * tn_readdir_lastp; } tn_dir; /* Valid when tn_type == VLNK. */ /* The link's target, allocated from a string pool. */ - char * tn_link; + char * tn_link; /* (c) */ /* Valid when tn_type == VREG. */ struct tn_reg { - /* The contents of regular files stored in a tmpfs - * file system are represented by a single anonymous - * memory object (aobj, for short). The aobj provides - * direct access to any position within the file, - * because its contents are always mapped in a - * contiguous region of virtual memory. It is a task - * of the memory management subsystem (see uvm(9)) to - * issue the required page ins or page outs whenever - * a position within the file is accessed. */ - vm_object_t tn_aobj; - - }tn_reg; - }tn_spec; + /* + * The contents of regular files stored in a + * tmpfs file system are represented by a + * single anonymous memory object (aobj, for + * short). The aobj provides direct access to + * any position within the file. It is a task + * of the memory management subsystem to issue + * the required page ins or page outs whenever + * a position within the file is accessed. + */ + vm_object_t tn_aobj; /* (c) */ + } tn_reg; + } tn_spec; /* (v) */ }; LIST_HEAD(tmpfs_node_list, tmpfs_node); @@ -303,26 +333,34 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); * Internal representation of a tmpfs mount point. */ struct tmpfs_mount { - /* Maximum number of memory pages available for use by the file + /* + * Maximum number of memory pages available for use by the file * system, set during mount time. This variable must never be * used directly as it may be bigger than the current amount of * free memory; in the extreme case, it will hold the ULONG_MAX - * value. */ + * value. + */ u_long tm_pages_max; /* Number of pages in use by the file system. */ u_long tm_pages_used; - /* Pointer to the node representing the root directory of this - * file system. */ + /* + * Pointer to the node representing the root directory of this + * file system. + */ struct tmpfs_node * tm_root; - /* Maximum number of possible nodes for this file system; set + struct mount * tm_mnt; + + /* + * Maximum number of possible nodes for this file system; set * during mount time. We need a hard limit on the maximum number * of nodes to avoid allocating too much of them; their objects * cannot be released until the file system is unmounted. * Otherwise, we could easily run out of memory by creating lots - * of empty files and then simply removing them. */ + * of empty files and then simply removing them. + */ ino_t tm_nodes_max; /* unrhdr used to allocate inode numbers */ @@ -334,27 +372,16 @@ struct tmpfs_mount { /* maximum representable file size */ u_int64_t tm_maxfilesize; - /* Nodes are organized in two different lists. The used list - * contains all nodes that are currently used by the file system; - * i.e., they refer to existing files. The available list contains - * all nodes that are currently available for use by new files. - * Nodes must be kept in this list (instead of deleting them) - * because we need to keep track of their generation number (tn_gen - * field). - * - * Note that nodes are lazily allocated: if the available list is - * empty and we have enough space to create more nodes, they will be - * created and inserted in the used list. Once these are released, - * they will go into the available list, remaining alive until the - * file system is unmounted. */ + /* + * The used list contains all nodes that are currently used by + * the file system; i.e., they refer to existing files. + */ struct tmpfs_node_list tm_nodes_used; - /* All node lock to protect the node list and tmp_pages_used */ + /* All node lock to protect the node list and tmp_pages_used. */ struct mtx allnode_lock; - /* Pools used to store file system meta data. These are not shared - * across several instances of tmpfs for the reasons described in - * tmpfs_pool.c. */ + /* Zones used to store file system meta data, per tmpfs mount. */ uma_zone_t tm_dirent_pool; uma_zone_t tm_node_pool; @@ -444,10 +471,6 @@ int tmpfs_truncate(struct vnode *, off_t } while (0) /* - * Memory management stuff. - */ - -/* * Amount of memory pages to reserve for the system (e.g., to not use by * tmpfs). */ @@ -464,37 +487,34 @@ size_t tmpfs_pages_used(struct tmpfs_mou * specific ones. */ -static inline -struct tmpfs_mount * +static inline struct tmpfs_mount * VFS_TO_TMPFS(struct mount *mp) { struct tmpfs_mount *tmp; - MPASS((mp) != NULL && (mp)->mnt_data != NULL); - tmp = (struct tmpfs_mount *)(mp)->mnt_data; - return tmp; + MPASS(mp != NULL && mp->mnt_data != NULL); + tmp = (struct tmpfs_mount *)mp->mnt_data; + return (tmp); } -static inline -struct tmpfs_node * +static inline struct tmpfs_node * VP_TO_TMPFS_NODE(struct vnode *vp) { struct tmpfs_node *node; - MPASS((vp) != NULL && (vp)->v_data != NULL); + MPASS(vp != NULL && vp->v_data != NULL); node = (struct tmpfs_node *)vp->v_data; - return node; + return (node); } -static inline -struct tmpfs_node * +static inline struct tmpfs_node * VP_TO_TMPFS_DIR(struct vnode *vp) { struct tmpfs_node *node; node = VP_TO_TMPFS_NODE(vp); TMPFS_VALIDATE_DIR(node); - return node; + return (node); } #endif /* _FS_TMPFS_TMPFS_H_ */ Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 14:05:49 2017 (r312408) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 14:27:37 2017 (r312409) @@ -198,8 +198,8 @@ tmpfs_alloc_node(struct mount *mp, struc return (EBUSY); } - nnode = (struct tmpfs_node *)uma_zalloc_arg( - tmp->tm_node_pool, tmp, M_WAITOK); + nnode = (struct tmpfs_node *)uma_zalloc_arg(tmp->tm_node_pool, tmp, + M_WAITOK); /* Generic initialization. */ nnode->tn_type = type; @@ -257,7 +257,8 @@ tmpfs_alloc_node(struct mount *mp, struc break; default: - panic("tmpfs_alloc_node: type %p %d", nnode, (int)nnode->tn_type); + panic("tmpfs_alloc_node: type %p %d", nnode, + (int)nnode->tn_type); } TMPFS_LOCK(tmp); @@ -266,25 +267,12 @@ tmpfs_alloc_node(struct mount *mp, struc TMPFS_UNLOCK(tmp); *node = nnode; - return 0; + return (0); } /* * Destroys the node pointed to by node from the file system 'tmp'. - * If the node does not belong to the given mount point, the results are - * unpredicted. - * - * If the node references a directory; no entries are allowed because - * their removal could need a recursive algorithm, something forbidden in - * kernel space. Furthermore, there is not need to provide such - * functionality (recursive removal) because the only primitives offered - * to the user are the removal of empty directories and the deletion of - * individual files. - * - * Note that nodes are not really deleted; in fact, when a node has been - * allocated, it cannot be deleted during the whole life of the file - * system. Instead, they are moved to the available list and remain there - * until reused. + * If the node references a directory, no entries are allowed. */ void tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node) @@ -609,7 +597,7 @@ loop1: VN_LOCK_ASHARE(vp); error = insmntque1(vp, mp, tmpfs_insmntque_dtr, NULL); - if (error) + if (error != 0) vp = NULL; unlock: @@ -638,7 +626,7 @@ out: } #endif - return error; + return (error); } /* @@ -706,8 +694,8 @@ tmpfs_alloc_file(struct vnode *dvp, stru /* Allocate a node that represents the new file. */ error = tmpfs_alloc_node(dvp->v_mount, tmp, vap->va_type, - cnp->cn_cred->cr_uid, - dnode->tn_gid, vap->va_mode, parent, target, vap->va_rdev, &node); + cnp->cn_cred->cr_uid, dnode->tn_gid, vap->va_mode, parent, + target, vap->va_rdev, &node); if (error != 0) return (error); @@ -1115,9 +1103,8 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod * Return ENOENT if the current node is already removed. */ TMPFS_ASSERT_LOCKED(node); - if (node->tn_dir.tn_parent == NULL) { + if (node->tn_dir.tn_parent == NULL) return (ENOENT); - } TMPFS_NODE_LOCK(node->tn_dir.tn_parent); dent.d_fileno = node->tn_dir.tn_parent->tn_id; Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 14:05:49 2017 (r312408) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 14:27:37 2017 (r312409) @@ -190,7 +190,7 @@ tmpfs_mount(struct mount *mp) /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ if (tmpfs_mem_avail() < TMPFS_PAGES_MINRESERVED) - return ENOSPC; + return (ENOSPC); /* Get the maximum number of memory pages this file system is * allowed to use, based on the maximum size the user passed in @@ -229,27 +229,23 @@ tmpfs_mount(struct mount *mp) tmp->tm_pages_used = 0; tmp->tm_ino_unr = new_unrhdr(2, INT_MAX, &tmp->allnode_lock); tmp->tm_dirent_pool = uma_zcreate("TMPFS dirent", - sizeof(struct tmpfs_dirent), - NULL, NULL, NULL, NULL, + sizeof(struct tmpfs_dirent), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); tmp->tm_node_pool = uma_zcreate("TMPFS node", - sizeof(struct tmpfs_node), - tmpfs_node_ctor, tmpfs_node_dtor, - tmpfs_node_init, tmpfs_node_fini, - UMA_ALIGN_PTR, 0); + sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, + tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; /* Allocate the root node. */ - error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, - root_gid, root_mode & ALLPERMS, NULL, NULL, - VNOVAL, &root); + error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid, + root_mode & ALLPERMS, NULL, NULL, VNOVAL, &root); if (error != 0 || root == NULL) { - uma_zdestroy(tmp->tm_node_pool); - uma_zdestroy(tmp->tm_dirent_pool); - delete_unrhdr(tmp->tm_ino_unr); - free(tmp, M_TMPFSMNT); - return error; + uma_zdestroy(tmp->tm_node_pool); + uma_zdestroy(tmp->tm_dirent_pool); + delete_unrhdr(tmp->tm_ino_unr); + free(tmp, M_TMPFSMNT); + return (error); } KASSERT(root->tn_id == 2, ("tmpfs root with invalid ino: %ju", (uintmax_t)root->tn_id)); @@ -340,12 +336,11 @@ static int tmpfs_root(struct mount *mp, int flags, struct vnode **vpp) { int error; - error = tmpfs_alloc_vp(mp, VFS_TO_TMPFS(mp)->tm_root, flags, vpp); - if (!error) + error = tmpfs_alloc_vp(mp, VFS_TO_TMPFS(mp)->tm_root, flags, vpp); + if (error == 0) (*vpp)->v_vflag |= VV_ROOT; - - return error; + return (error); } static int Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 14:05:49 2017 (r312408) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 14:27:37 2017 (r312409) @@ -117,10 +117,12 @@ tmpfs_lookup(struct vop_cachedlookup_arg if (de != NULL && de->td_node == NULL) cnp->cn_flags |= ISWHITEOUT; if (de == NULL || de->td_node == NULL) { - /* The entry was not found in the directory. + /* + * The entry was not found in the directory. * This is OK if we are creating or renaming an * entry and are working on the last component of - * the path name. */ + * the path name. + */ if ((cnp->cn_flags & ISLASTCN) && (cnp->cn_nameiop == CREATE || \ cnp->cn_nameiop == RENAME || @@ -132,8 +134,10 @@ tmpfs_lookup(struct vop_cachedlookup_arg if (error != 0) goto out; - /* Keep the component name in the buffer for - * future uses. */ + /* + * Keep the component name in the buffer for + * future uses. + */ cnp->cn_flags |= SAVENAME; error = EJUSTRETURN; @@ -142,14 +146,18 @@ tmpfs_lookup(struct vop_cachedlookup_arg } else { struct tmpfs_node *tnode; - /* The entry was found, so get its associated - * tmpfs_node. */ + /* + * The entry was found, so get its associated + * tmpfs_node. + */ tnode = de->td_node; - /* If we are not at the last path component and + /* + * If we are not at the last path component and * found a non-directory or non-link entry (which * may itself be pointing to a directory), raise - * an error. */ + * an error. + */ if ((tnode->tn_type != VDIR && tnode->tn_type != VLNK) && !(cnp->cn_flags & ISLASTCN)) { @@ -157,9 +165,11 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; } - /* If we are deleting or renaming the entry, keep + /* + * If we are deleting or renaming the entry, keep * track of its tmpfs_dirent so that it can be - * easily deleted later. */ + * easily deleted later. + */ if ((cnp->cn_flags & ISLASTCN) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) { @@ -175,8 +185,9 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; if ((dnode->tn_mode & S_ISTXT) && - VOP_ACCESS(dvp, VADMIN, cnp->cn_cred, cnp->cn_thread) && - VOP_ACCESS(*vpp, VADMIN, cnp->cn_cred, cnp->cn_thread)) { + VOP_ACCESS(dvp, VADMIN, cnp->cn_cred, + cnp->cn_thread) && VOP_ACCESS(*vpp, VADMIN, + cnp->cn_cred, cnp->cn_thread)) { error = EPERM; vput(*vpp); *vpp = NULL; @@ -192,18 +203,22 @@ tmpfs_lookup(struct vop_cachedlookup_arg } } - /* Store the result of this lookup in the cache. Avoid this if the + /* + * Store the result of this lookup in the cache. Avoid this if the * request was for creation, as it does not improve timings on - * emprical tests. */ + * emprical tests. + */ if ((cnp->cn_flags & MAKEENTRY) != 0) cache_enter(dvp, *vpp, cnp); out: - /* If there were no errors, *vpp cannot be null and it must be - * locked. */ + /* + * If there were no errors, *vpp cannot be null and it must be + * locked. + */ MPASS(IFF(error == 0, *vpp != NULLVP && VOP_ISLOCKED(*vpp))); - return error; + return (error); } static int @@ -1390,7 +1405,7 @@ tmpfs_whiteout(struct vop_whiteout_args } /* - * vnode operations vector used for files stored in a tmpfs file system. + * Vnode operations vector used for files stored in a tmpfs file system. */ struct vop_vector tmpfs_vnodeop_entries = { .vop_default = &default_vnodeops, From owner-svn-src-head@freebsd.org Thu Jan 19 14:49:57 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 2D354CB8426; Thu, 19 Jan 2017 14:49:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E314F1FF2; Thu, 19 Jan 2017 14:49:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JEnugf074953; Thu, 19 Jan 2017 14:49:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JEnton074950; Thu, 19 Jan 2017 14:49:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191449.v0JEnton074950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 14:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312410 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 14:49:57 -0000 Author: kib Date: Thu Jan 19 14:49:55 2017 New Revision: 312410 URL: https://svnweb.freebsd.org/changeset/base/312410 Log: Rework some tmpfs lock assertions. Remove TMPFS_ASSERT_ELOCKED(). Its claims are already stated by other asserts nearby and by VFS guarantees. Change TMPFS_ASSERT_LOCKED() and one inlined place to use ASSERT_VOP_(E)LOCKED() instead of hand-rolled imprecise asserts. Tested by: pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 14:27:37 2017 (r312409) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 14:49:55 2017 (r312410) @@ -309,19 +309,10 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); #define TMPFS_ASSERT_LOCKED(node) do { \ MPASS(node != NULL); \ MPASS(node->tn_vnode != NULL); \ - if (!VOP_ISLOCKED(node->tn_vnode) && \ - !mtx_owned(TMPFS_NODE_MTX(node))) \ - panic("tmpfs: node is not locked: %p", node); \ - } while (0) -#define TMPFS_ASSERT_ELOCKED(node) do { \ - MPASS((node) != NULL); \ - MPASS((node)->tn_vnode != NULL); \ - mtx_assert(TMPFS_NODE_MTX(node), MA_OWNED); \ - ASSERT_VOP_LOCKED((node)->tn_vnode, "tmpfs"); \ + ASSERT_VOP_LOCKED(node->tn_vnode, "tmpfs assert"); \ } while (0) #else #define TMPFS_ASSERT_LOCKED(node) (void)0 -#define TMPFS_ASSERT_ELOCKED(node) (void)0 #endif #define TMPFS_VNODE_ALLOCATING 1 Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 14:27:37 2017 (r312409) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 14:49:55 2017 (r312410) @@ -669,7 +669,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru struct tmpfs_node *node; struct tmpfs_node *parent; - MPASS(VOP_ISLOCKED(dvp)); + ASSERT_VOP_ELOCKED(dvp, "tmpfs_alloc_file"); MPASS(cnp->cn_flags & HASBUF); tmp = VFS_TO_TMPFS(dvp->v_mount); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 14:27:37 2017 (r312409) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 14:49:55 2017 (r312410) @@ -1111,7 +1111,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v) /* No vnode should be allocated for this entry from this point */ TMPFS_NODE_LOCK(node); - TMPFS_ASSERT_ELOCKED(node); node->tn_links--; node->tn_dir.tn_parent = NULL; node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | @@ -1120,7 +1119,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_UNLOCK(node); TMPFS_NODE_LOCK(dnode); - TMPFS_ASSERT_ELOCKED(dnode); dnode->tn_links--; dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED; @@ -1274,7 +1272,6 @@ tmpfs_reclaim(struct vop_reclaim_args *v cache_purge(vp); TMPFS_NODE_LOCK(node); - TMPFS_ASSERT_ELOCKED(node); tmpfs_free_vp(vp); /* If the node referenced by this vnode was deleted by the user, From owner-svn-src-head@freebsd.org Thu Jan 19 14:58:56 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 A3804CB868A; Thu, 19 Jan 2017 14:58:56 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5854C1A25; Thu, 19 Jan 2017 14:58:56 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JEwtZi078810; Thu, 19 Jan 2017 14:58:55 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JEwtoU078808; Thu, 19 Jan 2017 14:58:55 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701191458.v0JEwtoU078808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 19 Jan 2017 14:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312411 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 14:58:56 -0000 Author: loos Date: Thu Jan 19 14:58:55 2017 New Revision: 312411 URL: https://svnweb.freebsd.org/changeset/base/312411 Log: Handle the set capabilities ioctl, letting the hardware checksum be disabled (Hi netmap!). Only remove the CRC bytes from packets when the hardware tell us to do so. Fixes the 'discard frame w/o leading ethernet header' issues. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 19 14:49:55 2017 (r312410) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 19 14:58:55 2017 (r312411) @@ -1395,6 +1395,16 @@ cpswp_ioctl(struct ifnet *ifp, u_long co ifr = (struct ifreq *)data; switch (command) { + case SIOCSIFCAP: + changed = ifp->if_capenable ^ ifr->ifr_reqcap; + if (changed & IFCAP_HWCSUM) { + if ((ifr->ifr_reqcap & changed) & IFCAP_HWCSUM) + ifp->if_capenable |= IFCAP_HWCSUM; + else + ifp->if_capenable &= ~IFCAP_HWCSUM; + } + error = 0; + break; case SIOCSIFFLAGS: CPSW_PORT_LOCK(sc); if (ifp->if_flags & IFF_UP) { @@ -1632,15 +1642,22 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) /* TODO: track SOP/EOP bits to assemble a full mbuf out of received fragments. */ slot->mbuf->m_data += bd.bufoff; - slot->mbuf->m_len = bd.pktlen - 4; - slot->mbuf->m_pkthdr.len = bd.pktlen - 4; - slot->mbuf->m_flags |= M_PKTHDR; - slot->mbuf->m_pkthdr.rcvif = psc->ifp; + slot->mbuf->m_len = bd.buflen; + if (bd.flags & CPDMA_BD_SOP) { + slot->mbuf->m_pkthdr.len = bd.pktlen; + slot->mbuf->m_pkthdr.rcvif = psc->ifp; + slot->mbuf->m_flags |= M_PKTHDR; + } + slot->mbuf->m_next = NULL; slot->mbuf->m_nextpkt = NULL; + if (bd.flags & CPDMA_BD_PASS_CRC) + m_adj(slot->mbuf, -ETHER_CRC_LEN); if ((psc->ifp->if_capenable & IFCAP_RXCSUM) != 0) { /* check for valid CRC by looking into pkt_err[5:4] */ - if ((bd.flags & CPDMA_BD_PKT_ERR_MASK) == 0) { + if ((bd.flags & + (CPDMA_BD_SOP | CPDMA_BD_PKT_ERR_MASK)) == + CPDMA_BD_SOP) { slot->mbuf->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; slot->mbuf->m_pkthdr.csum_flags |= CSUM_IP_VALID; slot->mbuf->m_pkthdr.csum_data = 0xffff; Modified: head/sys/arm/ti/cpsw/if_cpswreg.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswreg.h Thu Jan 19 14:49:55 2017 (r312410) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Thu Jan 19 14:58:55 2017 (r312411) @@ -191,6 +191,7 @@ #define CPDMA_BD_OWNER (1 << 13) #define CPDMA_BD_EOQ (1 << 12) #define CPDMA_BD_TDOWNCMPLT (1 << 11) +#define CPDMA_BD_PASS_CRC (1 << 10) #define CPDMA_BD_PKT_ERR_MASK (3 << 4) #define CPDMA_BD_TO_PORT (1 << 4) #define CPDMA_BD_PORT_MASK 3 From owner-svn-src-head@freebsd.org Thu Jan 19 15:06:19 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 6EA79CB885A; Thu, 19 Jan 2017 15:06:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5931070; Thu, 19 Jan 2017 15:06:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JF6IdR082941; Thu, 19 Jan 2017 15:06:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JF6IvN082940; Thu, 19 Jan 2017 15:06:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191506.v0JF6IvN082940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 15:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312412 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 15:06:19 -0000 Author: kib Date: Thu Jan 19 15:06:18 2017 New Revision: 312412 URL: https://svnweb.freebsd.org/changeset/base/312412 Log: Protect macro argument. Requested by: hselasky Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 14:58:55 2017 (r312411) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 15:06:18 2017 (r312412) @@ -307,9 +307,9 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); #ifdef INVARIANTS #define TMPFS_ASSERT_LOCKED(node) do { \ - MPASS(node != NULL); \ - MPASS(node->tn_vnode != NULL); \ - ASSERT_VOP_LOCKED(node->tn_vnode, "tmpfs assert"); \ + MPASS((node) != NULL); \ + MPASS((node)->tn_vnode != NULL); \ + ASSERT_VOP_LOCKED((node)->tn_vnode, "tmpfs assert"); \ } while (0) #else #define TMPFS_ASSERT_LOCKED(node) (void)0 From owner-svn-src-head@freebsd.org Thu Jan 19 16:01:38 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 19500CB863F; Thu, 19 Jan 2017 16:01:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C75081453; Thu, 19 Jan 2017 16:01:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JG1ak6009745; Thu, 19 Jan 2017 16:01:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JG1aZX009743; Thu, 19 Jan 2017 16:01:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191601.v0JG1aZX009743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 16:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312414 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 16:01:38 -0000 Author: kib Date: Thu Jan 19 16:01:36 2017 New Revision: 312414 URL: https://svnweb.freebsd.org/changeset/base/312414 Log: Rename tmpfs_mount member allnode_lock to include namespace prefix. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 15:27:53 2017 (r312413) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 16:01:36 2017 (r312414) @@ -150,7 +150,7 @@ RB_HEAD(tmpfs_dir, tmpfs_dirent); * (vi) vnode lock in exclusive mode, or vnode lock in shared vnode and * tn_interlock * (i) tn_interlock - * (m) tmpfs_mount allnode_lock + * (m) tmpfs_mount tm_allnode_lock * (c) stable after creation */ struct tmpfs_node { @@ -370,7 +370,7 @@ struct tmpfs_mount { struct tmpfs_node_list tm_nodes_used; /* All node lock to protect the node list and tmp_pages_used. */ - struct mtx allnode_lock; + struct mtx tm_allnode_lock; /* Zones used to store file system meta data, per tmpfs mount. */ uma_zone_t tm_dirent_pool; @@ -379,8 +379,9 @@ struct tmpfs_mount { /* Read-only status. */ int tm_ronly; }; -#define TMPFS_LOCK(tm) mtx_lock(&(tm)->allnode_lock) -#define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->allnode_lock) +#define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock) +#define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock) +#define TMPFS_MP_ASSERT_LOCKED(tm) mtx_assert(&(tm)->tm_allnode_lock, MA_OWNED) /* * This structure maps a file identifier to a tmpfs node. Used by the Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 15:27:53 2017 (r312413) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 16:01:36 2017 (r312414) @@ -219,7 +219,7 @@ tmpfs_mount(struct mount *mp) tmp = (struct tmpfs_mount *)malloc(sizeof(struct tmpfs_mount), M_TMPFSMNT, M_WAITOK | M_ZERO); - mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); + mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; @@ -227,7 +227,7 @@ tmpfs_mount(struct mount *mp) tmp->tm_pages_max = pages; tmp->tm_pages_used = 0; - tmp->tm_ino_unr = new_unrhdr(2, INT_MAX, &tmp->allnode_lock); + tmp->tm_ino_unr = new_unrhdr(2, INT_MAX, &tmp->tm_allnode_lock); tmp->tm_dirent_pool = uma_zcreate("TMPFS dirent", sizeof(struct tmpfs_dirent), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -316,7 +316,7 @@ tmpfs_unmount(struct mount *mp, int mntf uma_zdestroy(tmp->tm_node_pool); delete_unrhdr(tmp->tm_ino_unr); - mtx_destroy(&tmp->allnode_lock); + mtx_destroy(&tmp->tm_allnode_lock); MPASS(tmp->tm_pages_used == 0); MPASS(tmp->tm_nodes_inuse == 0); From owner-svn-src-head@freebsd.org Thu Jan 19 16:17:47 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 8750ACB8A56; Thu, 19 Jan 2017 16:17:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6101D2C; Thu, 19 Jan 2017 16:17:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cUFP9-000DKc-Gz; Thu, 19 Jan 2017 19:17:39 +0300 Date: Thu, 19 Jan 2017 19:17:39 +0300 From: Slawa Olhovchenkov To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r307319 - in head/sys/netinet: . tcp_stacks Message-ID: <20170119161739.GF58505@zxy.spb.ru> References: <201610141457.u9EEvhT8039210@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610141457.u9EEvhT8039210@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false 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: Thu, 19 Jan 2017 16:17:47 -0000 On Fri, Oct 14, 2016 at 02:57:43PM +0000, Jonathan T. Looney wrote: > Author: jtl > Date: Fri Oct 14 14:57:43 2016 > New Revision: 307319 > URL: https://svnweb.freebsd.org/changeset/base/307319 > > Log: > The code currently resets the keepalive timer each time a packet is > received on a TCP session that has entered the ESTABLISHED state. This > results in a lot of calls to reset the keepalive timer. > > This patch changes the behavior so we set the keepalive timer for the > keepalive idle time (TP_KEEPIDLE). When the keepalive timer fires, it will > first check to see if the session has been idle for TP_KEEPIDLE ticks. If > not, it will reschedule the keepalive timer for the time the session will > have been idle for TP_KEEPIDLE ticks. > > For a session with regular communication, the keepalive timer should fire > approximately once every TP_KEEPIDLE ticks. For sessions with irregular > communication, the keepalive timer might fire more often. But, the > disruption from a periodic keepalive timer should be less than the regular > cost of resetting the keepalive timer on every packet. > > (FWIW, this change saved approximately 1.73% of the busy CPU cycles on a > particular test system with a heavy TCP output load. Of course, the > actual impact is very specific to the particular hardware and workload.) > > Reviewed by: gallatin, rrs > MFC after: 2 weeks > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D8243 Some issus exist? From owner-svn-src-head@freebsd.org Thu Jan 19 16:46:06 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 6DF2ACB852A; Thu, 19 Jan 2017 16:46:06 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4810B1252; Thu, 19 Jan 2017 16:46:06 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JGk59J028457; Thu, 19 Jan 2017 16:46:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JGk5p1028456; Thu, 19 Jan 2017 16:46:05 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701191646.v0JGk5p1028456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 19 Jan 2017 16:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312416 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 16:46:06 -0000 Author: cem Date: Thu Jan 19 16:46:05 2017 New Revision: 312416 URL: https://svnweb.freebsd.org/changeset/base/312416 Log: ffs_vnops: Simplify extattr access As suggested in r167010, use the structure type and macros to access and modify UFS2 extended attributes. Add assertions that pointers are aligned in places where we now access the data through a structure pointer, instead of character-by-character. PR: 216127 Reported by: dewayne at heuristicsystems.com.au Reviewed by: kib@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9225 Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Thu Jan 19 16:07:52 2017 (r312415) +++ head/sys/ufs/ffs/ffs_vnops.c Thu Jan 19 16:46:05 2017 (r312416) @@ -100,6 +100,9 @@ __FBSDID("$FreeBSD$"); #include "opt_directio.h" #include "opt_ffs.h" +#define ALIGNED_TO(ptr, s) \ + (((uintptr_t)(ptr) & (_Alignof(s) - 1)) == 0) + #ifdef DIRECTIO extern int ffs_rawread(struct vnode *vp, struct uio *uio, int *workdone); #endif @@ -1100,46 +1103,30 @@ ffs_extwrite(struct vnode *vp, struct ui * the length of the EA, and possibly the pointer to the entry and to the data. */ static int -ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name, u_char **eap, u_char **eac) +ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name, + struct extattr **eapp, u_char **eac) { - u_char *p, *pe, *pn, *p0; - int eapad1, eapad2, ealength, ealen, nlen; - uint32_t ul; + struct extattr *eap, *eaend; + size_t nlen; - pe = ptr + length; nlen = strlen(name); - - for (p = ptr; p < pe; p = pn) { - p0 = p; - bcopy(p, &ul, sizeof(ul)); - pn = p + ul; + KASSERT(ALIGNED_TO(ptr, struct extattr), ("unaligned")); + eap = (struct extattr *)ptr; + eaend = (struct extattr *)(ptr + length); + for (; eap < eaend; eap = EXTATTR_NEXT(eap)) { /* make sure this entry is complete */ - if (pn > pe) + if (EXTATTR_NEXT(eap) > eaend) break; - p += sizeof(uint32_t); - if (*p != nspace) - continue; - p++; - eapad2 = *p++; - if (*p != nlen) - continue; - p++; - if (bcmp(p, name, nlen)) + if (eap->ea_namespace != nspace || eap->ea_namelength != nlen + || memcmp(eap->ea_name, name, nlen) != 0) continue; - ealength = sizeof(uint32_t) + 3 + nlen; - eapad1 = 8 - (ealength % 8); - if (eapad1 == 8) - eapad1 = 0; - ealength += eapad1; - ealen = ul - ealength - eapad2; - p += nlen + eapad1; - if (eap != NULL) - *eap = p0; + if (eapp != NULL) + *eapp = eap; if (eac != NULL) - *eac = p; - return (ealen); + *eac = EXTATTR_CONTENT(eap); + return (EXTATTR_CONTENT_SIZE(eap)); } - return(-1); + return (-1); } static int @@ -1380,9 +1367,11 @@ vop_deleteextattr { { struct inode *ip; struct fs *fs; - uint32_t ealength, ul; - int ealen, olen, eapad1, eapad2, error, i, easize; - u_char *eae, *p; + struct extattr *eap; + uint32_t ul; + int olen, error, i, easize; + u_char *eae; + void *tmp; ip = VTOI(ap->a_vp); fs = ITOFS(ip); @@ -1413,39 +1402,30 @@ vop_deleteextattr { if (error) return (error); - ealength = eapad1 = ealen = eapad2 = 0; - + /* CEM: delete could be done in-place instead */ eae = malloc(ip->i_ea_len, M_TEMP, M_WAITOK); bcopy(ip->i_ea_area, eae, ip->i_ea_len); easize = ip->i_ea_len; olen = ffs_findextattr(eae, easize, ap->a_attrnamespace, ap->a_name, - &p, NULL); + &eap, NULL); if (olen == -1) { /* delete but nonexistent */ free(eae, M_TEMP); ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); - return(ENOATTR); + return (ENOATTR); } - bcopy(p, &ul, sizeof ul); - i = p - eae + ul; - if (ul != ealength) { - bcopy(p + ul, p + ealength, easize - i); - easize += (ealength - ul); - } - if (easize > NXADDR * fs->fs_bsize) { - free(eae, M_TEMP); - ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); - if (ip->i_ea_area != NULL && ip->i_ea_error == 0) - ip->i_ea_error = ENOSPC; - return(ENOSPC); - } - p = ip->i_ea_area; + ul = eap->ea_length; + i = (u_char *)EXTATTR_NEXT(eap) - eae; + bcopy(EXTATTR_NEXT(eap), eap, easize - i); + easize -= ul; + + tmp = ip->i_ea_area; ip->i_ea_area = eae; ip->i_ea_len = easize; - free(p, M_TEMP); + free(tmp, M_TEMP); error = ffs_close_ea(ap->a_vp, 1, ap->a_cred, ap->a_td); - return(error); + return (error); } /* @@ -1499,7 +1479,7 @@ vop_getextattr { error = ENOATTR; ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); - return(error); + return (error); } /* @@ -1519,9 +1499,7 @@ vop_listextattr { */ { struct inode *ip; - u_char *eae, *p, *pe, *pn; - unsigned easize; - uint32_t ul; + struct extattr *eap, *eaend; int error, ealen; ip = VTOI(ap->a_vp); @@ -1537,31 +1515,31 @@ vop_listextattr { error = ffs_open_ea(ap->a_vp, ap->a_cred, ap->a_td); if (error) return (error); - eae = ip->i_ea_area; - easize = ip->i_ea_len; error = 0; if (ap->a_size != NULL) *ap->a_size = 0; - pe = eae + easize; - for(p = eae; error == 0 && p < pe; p = pn) { - bcopy(p, &ul, sizeof(ul)); - pn = p + ul; - if (pn > pe) + + KASSERT(ALIGNED_TO(ip->i_ea_area, struct extattr), ("unaligned")); + eap = (struct extattr *)ip->i_ea_area; + eaend = (struct extattr *)(ip->i_ea_area + ip->i_ea_len); + for (; error == 0 && eap < eaend; eap = EXTATTR_NEXT(eap)) { + /* make sure this entry is complete */ + if (EXTATTR_NEXT(eap) > eaend) break; - p += sizeof(ul); - if (*p++ != ap->a_attrnamespace) + if (eap->ea_namespace != ap->a_attrnamespace) continue; - p++; /* pad2 */ - ealen = *p; - if (ap->a_size != NULL) { + + ealen = eap->ea_namelength; + if (ap->a_size != NULL) *ap->a_size += ealen + 1; - } else if (ap->a_uio != NULL) { - error = uiomove(p, ealen + 1, ap->a_uio); - } + else if (ap->a_uio != NULL) + error = uiomove(&eap->ea_namelength, ealen + 1, + ap->a_uio); } + ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); - return(error); + return (error); } /* @@ -1582,10 +1560,12 @@ vop_setextattr { { struct inode *ip; struct fs *fs; + struct extattr *eap; uint32_t ealength, ul; ssize_t ealen; int olen, eapad1, eapad2, error, i, easize; - u_char *eae, *p; + u_char *eae; + void *tmp; ip = VTOI(ap->a_vp); fs = ITOFS(ip); @@ -1625,29 +1605,33 @@ vop_setextattr { return (error); ealength = sizeof(uint32_t) + 3 + strlen(ap->a_name); - eapad1 = 8 - (ealength % 8); - if (eapad1 == 8) - eapad1 = 0; - eapad2 = 8 - (ealen % 8); - if (eapad2 == 8) - eapad2 = 0; + eapad1 = roundup2(ealength, 8) - ealength; + eapad2 = roundup2(ealen, 8) - ealen; ealength += eapad1 + ealen + eapad2; + /* + * CEM: rewrites of the same size or smaller could be done in-place + * instead. (We don't acquire any fine-grained locks in here either, + * so we could also do bigger writes in-place.) + */ eae = malloc(ip->i_ea_len + ealength, M_TEMP, M_WAITOK); bcopy(ip->i_ea_area, eae, ip->i_ea_len); easize = ip->i_ea_len; - olen = ffs_findextattr(eae, easize, - ap->a_attrnamespace, ap->a_name, &p, NULL); + olen = ffs_findextattr(eae, easize, ap->a_attrnamespace, ap->a_name, + &eap, NULL); if (olen == -1) { /* new, append at end */ - p = eae + easize; + KASSERT(ALIGNED_TO(eae + easize, struct extattr), + ("unaligned")); + eap = (struct extattr *)(eae + easize); easize += ealength; } else { - bcopy(p, &ul, sizeof ul); - i = p - eae + ul; + ul = eap->ea_length; + i = (u_char *)EXTATTR_NEXT(eap) - eae; if (ul != ealength) { - bcopy(p + ul, p + ealength, easize - i); + bcopy(EXTATTR_NEXT(eap), (u_char *)eap + ealength, + easize - i); easize += (ealength - ul); } } @@ -1656,34 +1640,30 @@ vop_setextattr { ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = ENOSPC; - return(ENOSPC); + return (ENOSPC); } - bcopy(&ealength, p, sizeof(ealength)); - p += sizeof(ealength); - *p++ = ap->a_attrnamespace; - *p++ = eapad2; - *p++ = strlen(ap->a_name); - strcpy(p, ap->a_name); - p += strlen(ap->a_name); - bzero(p, eapad1); - p += eapad1; - error = uiomove(p, ealen, ap->a_uio); + eap->ea_length = ealength; + eap->ea_namespace = ap->a_attrnamespace; + eap->ea_contentpadlen = eapad2; + eap->ea_namelength = strlen(ap->a_name); + memcpy(eap->ea_name, ap->a_name, strlen(ap->a_name)); + bzero(&eap->ea_name[strlen(ap->a_name)], eapad1); + error = uiomove(EXTATTR_CONTENT(eap), ealen, ap->a_uio); if (error) { free(eae, M_TEMP); ffs_close_ea(ap->a_vp, 0, ap->a_cred, ap->a_td); if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = error; - return(error); + return (error); } - p += ealen; - bzero(p, eapad2); + bzero((u_char *)EXTATTR_CONTENT(eap) + ealen, eapad2); - p = ip->i_ea_area; + tmp = ip->i_ea_area; ip->i_ea_area = eae; ip->i_ea_len = easize; - free(p, M_TEMP); + free(tmp, M_TEMP); error = ffs_close_ea(ap->a_vp, 1, ap->a_cred, ap->a_td); - return(error); + return (error); } /* From owner-svn-src-head@freebsd.org Thu Jan 19 16:59:57 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 40FDECB8A02; Thu, 19 Jan 2017 16:59:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10ABD1E12; Thu, 19 Jan 2017 16:59:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JGxuLG033190; Thu, 19 Jan 2017 16:59:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JGxuS8033189; Thu, 19 Jan 2017 16:59:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701191659.v0JGxuS8033189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 19 Jan 2017 16:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312417 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 16:59:57 -0000 Author: asomers Date: Thu Jan 19 16:59:55 2017 New Revision: 312417 URL: https://svnweb.freebsd.org/changeset/base/312417 Log: Fix build of devd with GCC 4.2 Reported by: olivier Pointy-hat-to: asomers MFC after: 27 days X-MFC-with: 312395 Sponsored by: Spectra Logic Corp Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Jan 19 16:46:05 2017 (r312416) +++ head/sbin/devd/devd.cc Thu Jan 19 16:59:55 2017 (r312417) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "devd.h" /* C compatible definitions */ From owner-svn-src-head@freebsd.org Thu Jan 19 17:01:02 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 5081FCB8DA5; Thu, 19 Jan 2017 17:01:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x244.google.com (mail-yw0-x244.google.com [IPv6:2607:f8b0:4002:c05::244]) (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 0E85B12AF; Thu, 19 Jan 2017 17:01:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x244.google.com with SMTP id 17so5118965ywk.2; Thu, 19 Jan 2017 09:01:02 -0800 (PST) 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:content-transfer-encoding; bh=mutaqToPTLhVghE9HJbBdK+4e8MD5rMkLdX1Zzku8Dc=; b=pSeffQIZs8I/AyYyUPC24jZ7V7iQflBmNbx3liG4dbV8B8GP7VZevKkrjQbK8KJrW1 LL5o7Ky4TRReQNeLqQk6DTUt8nJJ5jDbgvAzmFr6eECJRTlEv+/t6wkrJecaWdGomH74 vo55Af/C5VUkvZxV4KIYh5sgp4b17gAOT/vrr91aZmfTEEY802VQuI3oVU+TOo1EUPBS kg9h8g7ywLTEtN5MiyM9cNBxxqdMN4fmLVvfmXJFvwAxCtJLKEhpMOeJuP306eyFiwR1 LVBFHwHpYhUI8zrpWZtpR0RLAQw7InfKZGh+HHXDo7jmiGPvUmUTOWLOXW9k4CmVPeDF ngqw== 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:content-transfer-encoding; bh=mutaqToPTLhVghE9HJbBdK+4e8MD5rMkLdX1Zzku8Dc=; b=Nzd0bn35kyPrLTQGWpEgB/o5q77/9PRBWP2HOZCINj55oTsyIyh1rkZPMvVAoeHQLU ai0Pp6NptcgMYZIRbBORNi8XPvUCXJuYGh20Khd+eFAIJX4Pkwt5sz2DR6hM+9BPkKRR kOsz7dvq95ZX6Nd3zEqQvkPqOc6gyvUuRCSkU92v4ZgzzwjkuHggfua+2pSLf1fVWK2y Mcjfj5m9rBaVrdxFgOQU2VxPXZ+e+6pQkTkK2K3GEyi30XqqgiJvag+/AxYFFIINZPYK zbRwuMjUuyap6+1VtzXvM4tU9MwYmbMV6wyhokqsKDRlQCd1HXiUvUnmhgN02Quc8Geu 12sw== X-Gm-Message-State: AIkVDXL60c7KKh90Qcbqpr96z50cahbi35sdeqrnhtCo+u7Zp2JlG3i/HxWvtklB1feaZs4wSXTtuHYnD7KPaw== X-Received: by 10.129.154.194 with SMTP id r185mr7202021ywg.252.1484845259784; Thu, 19 Jan 2017 09:00:59 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.38.133 with HTTP; Thu, 19 Jan 2017 09:00:59 -0800 (PST) In-Reply-To: References: <201701182024.v0IKObaC021450@repo.freebsd.org> From: Alan Somers Date: Thu, 19 Jan 2017 10:00:59 -0700 X-Google-Sender-Auth: aXC_ERQNXsyRoHgTOfV4b7Hg_cs Message-ID: Subject: Re: svn commit: r312395 - head/sbin/devd To: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Thu, 19 Jan 2017 17:01:02 -0000 On Thu, Jan 19, 2017 at 2:24 AM, Olivier Cochard-Labb=C3=A9 wrote: > On Wed, Jan 18, 2017 at 9:24 PM, Alan Somers wrote: >> >> Author: asomers >> Date: Wed Jan 18 20:24:37 2017 >> New Revision: 312395 >> URL: https://svnweb.freebsd.org/changeset/base/312395 >> >> Log: >> Fix several Coverity CIDs in devd >> > > > Hi, > > this break buildworld for mips arch: > > > --- devd.o --- > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc: In > function 'void event_loop()': > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: expected type-specifier > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: expected unqualified-id before 'e' > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: expected `)' before 'e' > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: expected `{' before 'e' > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: 'e' was not declared in this scope > /usr/local/poudriere/jails/head-mips32/usr/src/sbin/devd/devd.cc:1066: > error: expected `;' before ')' token > --- all_subdir_sbin/hastd --- Sorry for the breakage. Should be fixed in r312417. -Alan From owner-svn-src-head@freebsd.org Thu Jan 19 17:03:47 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 38434CB50BA; Thu, 19 Jan 2017 17:03:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E380C1653; Thu, 19 Jan 2017 17:03:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JH3k8j036893; Thu, 19 Jan 2017 17:03:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JH3jnt036891; Thu, 19 Jan 2017 17:03:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701191703.v0JH3jnt036891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 19 Jan 2017 17:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312418 - head/lib/libc/x86/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 17:03:47 -0000 Author: ngie Date: Thu Jan 19 17:03:45 2017 New Revision: 312418 URL: https://svnweb.freebsd.org/changeset/base/312418 Log: Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV The effect at runtime is negligible as the hyperv timer isn't available except when hyperv is loaded. This is a prerequisite for conditionalizing the header build/install out of the build MFC after: 3 weeks Reviewed by: sephe Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9242 Modified: head/lib/libc/x86/sys/Makefile.inc head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/Makefile.inc ============================================================================== --- head/lib/libc/x86/sys/Makefile.inc Thu Jan 19 16:59:55 2017 (r312417) +++ head/lib/libc/x86/sys/Makefile.inc Thu Jan 19 17:03:45 2017 (r312418) @@ -4,3 +4,7 @@ SRCS+= \ __vdso_gettc.c + +.if ${MK_HYPERV} != "no" +CFLAGS+= -DWANT_HYPERV +.endif Modified: head/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/x86/sys/__vdso_gettc.c Thu Jan 19 16:59:55 2017 (r312417) +++ head/lib/libc/x86/sys/__vdso_gettc.c Thu Jan 19 17:03:45 2017 (r312418) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __amd64__ +#ifdef WANT_HYPERV #include #endif #include "libc_private.h" @@ -158,7 +158,7 @@ __vdso_init_hpet(uint32_t u) munmap((void *)new_map, PAGE_SIZE); } -#ifdef __amd64__ +#ifdef WANT_HYPERV #define HYPERV_REFTSC_DEVPATH "/dev/" HYPERV_REFTSC_DEVNAME @@ -217,7 +217,7 @@ __vdso_hyperv_tsc(struct hyperv_reftsc * return (ENOSYS); } -#endif /* __amd64__ */ +#endif /* WANT_HYPERV */ #pragma weak __vdso_gettc int @@ -246,7 +246,7 @@ __vdso_gettc(const struct vdso_timehands return (ENOSYS); *tc = *(volatile uint32_t *)(map + HPET_MAIN_COUNTER); return (0); -#ifdef __amd64__ +#ifdef WANT_HYPERV case VDSO_TH_ALGO_X86_HVTSC: if (hyperv_ref_tsc == NULL) __vdso_init_hyperv_tsc(); From owner-svn-src-head@freebsd.org Thu Jan 19 17:09:12 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 83A9DCB515E; Thu, 19 Jan 2017 17:09:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50E1418A7; Thu, 19 Jan 2017 17:09:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JH9BxA037124; Thu, 19 Jan 2017 17:09:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JH9BDd037121; Thu, 19 Jan 2017 17:09:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701191709.v0JH9BDd037121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 19 Jan 2017 17:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312419 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 17:09:12 -0000 Author: ngie Date: Thu Jan 19 17:09:11 2017 New Revision: 312419 URL: https://svnweb.freebsd.org/changeset/base/312419 Log: Add manpage for mlx4ib(4) This manpage isn't differentiated from mlx4en except where necessary, replacing eth/ETH with ib/IB. Eventually the manpages will be split and the common bits be placed in a manpage named "mlx4.4". MFC after: 3 weeks Reviewed by: hselasky Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9241 Added: head/share/man/man4/mlx4ib.4 - copied, changed from r312391, head/share/man/man4/mlx4en.4 Modified: head/share/man/man4/Makefile head/share/man/man4/mlx4en.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Jan 19 17:03:45 2017 (r312418) +++ head/share/man/man4/Makefile Thu Jan 19 17:09:11 2017 (r312419) @@ -889,6 +889,10 @@ MAN+= iscsi_initiator.4 MAN+= iser.4 .endif +.if ${MK_OFED} != "no" +MAN+= mlx4ib.4 +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc Modified: head/share/man/man4/mlx4en.4 ============================================================================== --- head/share/man/man4/mlx4en.4 Thu Jan 19 17:03:45 2017 (r312418) +++ head/share/man/man4/mlx4en.4 Thu Jan 19 17:09:11 2017 (r312419) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2016 +.Dd January 18, 2017 .Dt MLX4EN 4 .Os .Sh NAME @@ -81,6 +81,7 @@ If an issue is identified with this driv email all the specific information related to the issue to .Aq Mt freebsd-drivers@mellanox.com . .Sh SEE ALSO +.Xr mlx4ib 4 , .Xr ifconfig 8 .Sh HISTORY The Copied and modified: head/share/man/man4/mlx4ib.4 (from r312391, head/share/man/man4/mlx4en.4) ============================================================================== --- head/share/man/man4/mlx4en.4 Wed Jan 18 17:55:49 2017 (r312391, copy source) +++ head/share/man/man4/mlx4ib.4 Thu Jan 19 17:09:11 2017 (r312419) @@ -24,11 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2016 -.Dt MLX4EN 4 +.Dd January 18, 2017 +.Dt MLX4IB 4 .Os .Sh NAME -.Nm mlx4en +.Nm mlx4ib .Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, @@ -37,20 +37,20 @@ kernel configuration file: .Bd -ragged -offset indent .Cd "options COMPAT_LINUXKPI" .Cd "device mlx4" -.Cd "device mlx4en" +.Cd "device mlx4ib" .Ed .Pp To load the driver as a module at run-time, run the following command as root: .Bd -literal -offset indent -kldload mlx4en +kldload mlx4ib .Ed .Pp To load the driver as a module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent -mlx4en_load="YES" +mlx4ib_load="YES" .Ed .Sh DESCRIPTION Mellanox ConnectX adapter cards with Virtual Protocol Interconnect @@ -68,9 +68,9 @@ driver supports the following network ad .Pp .Bl -bullet -compact .It -Mellanox ConnectX-2 (ETH) +Mellanox ConnectX-2 (IB) .It -Mellanox ConnectX-3 (ETH) +Mellanox ConnectX-3 (IB) .El .Sh SUPPORT For general information and support, @@ -81,6 +81,7 @@ If an issue is identified with this driv email all the specific information related to the issue to .Aq Mt freebsd-drivers@mellanox.com . .Sh SEE ALSO +.Xr mlx4en 4 , .Xr ifconfig 8 .Sh HISTORY The From owner-svn-src-head@freebsd.org Thu Jan 19 18:07:25 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 AC3FDCB7842; Thu, 19 Jan 2017 18:07:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B8BA130E; Thu, 19 Jan 2017 18:07:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JI7Ofq061445; Thu, 19 Jan 2017 18:07:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JI7OBN061444; Thu, 19 Jan 2017 18:07:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701191807.v0JI7OBN061444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 19 Jan 2017 18:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312422 - head/lib/libc/x86/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:07:25 -0000 Author: ngie Date: Thu Jan 19 18:07:24 2017 New Revision: 312422 URL: https://svnweb.freebsd.org/changeset/base/312422 Log: Only conditionally add in hyperv support if we're building amd64 This unbreaks the build because the assembly is written for x64. MFC after: 3 weeks X-MFC with: r312418 Pointyhat to: ngie Reported by: Jenkins (i386 job) Sponsored by: Dell EMC Isilon Modified: head/lib/libc/x86/sys/Makefile.inc Modified: head/lib/libc/x86/sys/Makefile.inc ============================================================================== --- head/lib/libc/x86/sys/Makefile.inc Thu Jan 19 17:58:08 2017 (r312421) +++ head/lib/libc/x86/sys/Makefile.inc Thu Jan 19 18:07:24 2017 (r312422) @@ -5,6 +5,6 @@ SRCS+= \ __vdso_gettc.c -.if ${MK_HYPERV} != "no" +.if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" CFLAGS+= -DWANT_HYPERV .endif From owner-svn-src-head@freebsd.org Thu Jan 19 18:26:07 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 5DEFACB830D; Thu, 19 Jan 2017 18:26:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 381A5156B; Thu, 19 Jan 2017 18:26:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JIQ6ib069976; Thu, 19 Jan 2017 18:26:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JIQ6qO069975; Thu, 19 Jan 2017 18:26:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191826.v0JIQ6qO069975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 18:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312423 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:26:07 -0000 Author: kib Date: Thu Jan 19 18:26:06 2017 New Revision: 312423 URL: https://svnweb.freebsd.org/changeset/base/312423 Log: Refresh tmpfs(5) man page. Provide more useful explanation of features and quirks. Reviewed by: emaste, vangyzen Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D9211 Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Thu Jan 19 18:07:24 2017 (r312422) +++ head/share/man/man5/tmpfs.5 Thu Jan 19 18:26:06 2017 (r312423) @@ -1,7 +1,12 @@ .\"- .\" Copyright (c) 2007 Xin LI +.\" Copyright (c) 2017 The FreeBSD Foundation, Inc. .\" All rights reserved. .\" +.\" Part of this documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -49,12 +54,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 23, 2012 +.Dd January 17, 2017 .Dt TMPFS 5 .Os .Sh NAME .Nm tmpfs -.Nd "efficient memory file system" +.Nd "in-memory file system" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -72,17 +77,40 @@ tmpfs_load="YES" .Sh DESCRIPTION The .Nm -driver will permit the -.Fx -kernel to access +driver implements in-memory, or .Tn tmpfs -file systems. +file system. +The filesystem stores both file metadata and data in main memory. +This allows very fast and low latency accesses to the data. +The data is volatile. +An umount or system reboot invalidates it. +These properties make the filesystem's mounts suitable for fast +scratch storage, e.g. +.Pa /tmp . +.Pp +If the system becomes low on memory and swap is configured (see +.Xr swapon 8 ), +file data may be written to the swap space, freeing memory +for other needs. +The current implementation never swaps out metadata, including +the directory content. +Keep this in mind when planning the mount limits, especially when expecting +to place many small files on a tmpfs mount. +.Pp +When a file from a tmpfs mount is mmaped (see +.Xr mmap 2 ) +into the process address space, the swap VM object which manages the file +pages is used to implement mapping and to avoid double-copying of +the file data. +This quirk causes process inspection tools, like +.Xr procstat 1 , +to report anonymous memory mappings instead of file mappings. .Sh OPTIONS The following options are available when mounting .Nm file systems: -.Bl -tag -width indent +.Bl -tag -width "It Cm maxfilesize" .It Cm gid Specifies the group ID of the root inode of the file system. Defaults to the mount point's GID. @@ -114,11 +142,15 @@ memory file system: .Pp .Dl "mount -t tmpfs tmpfs /tmp" .Sh SEE ALSO +.Xr procstat 1 , .Xr nmount 2 , +.Xr mmap 2 , .Xr unmount 2 , .Xr fstab 5 , .Xr mdmfs 8 , -.Xr mount 8 +.Xr mount 8 , +.Xr swapinfo 8 , +.Xr swapon 8 .Sh HISTORY The .Nm @@ -130,7 +162,7 @@ The .Nm kernel implementation was written by .An Julio M. Merino Vidal Aq Mt jmmv@NetBSD.org -as a Google SoC project. +as a Google Summer of Code project. .Pp .An Rohit Jalan and others ported it from @@ -140,5 +172,3 @@ to .Pp This manual page was written by .An Xin LI Aq Mt delphij@FreeBSD.org . -.Sh BUGS -Some file system mount time options may not be well-supported. From owner-svn-src-head@freebsd.org Thu Jan 19 18:33:28 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 B6294CB8613; Thu, 19 Jan 2017 18:33:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90C751CC7; Thu, 19 Jan 2017 18:33:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JIXRos074189; Thu, 19 Jan 2017 18:33:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JIXRkh074186; Thu, 19 Jan 2017 18:33:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701191833.v0JIXRkh074186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Jan 2017 18:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312424 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:33:28 -0000 Author: hselasky Date: Thu Jan 19 18:33:27 2017 New Revision: 312424 URL: https://svnweb.freebsd.org/changeset/base/312424 Log: Fix problem with suspend and resume when using Skylake chipsets. Make sure the XHCI controller is reset after halting it. The problem is clearly a BIOS bug as the suspend and resume is failing without loading the XHCI driver. The same happens when using Linux and the XHCI driver is not loaded. Submitted by: Yanko Yankulov PR: 216261 MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Thu Jan 19 18:26:06 2017 (r312423) +++ head/sys/dev/usb/controller/xhci.c Thu Jan 19 18:33:27 2017 (r312424) @@ -347,6 +347,7 @@ xhci_start_controller(struct xhci_softc struct usb_page_search buf_res; struct xhci_hw_root *phwr; struct xhci_dev_ctx_addr *pdctxa; + usb_error_t err; uint64_t addr; uint32_t temp; uint16_t i; @@ -358,22 +359,9 @@ xhci_start_controller(struct xhci_softc sc->sc_command_ccs = 1; sc->sc_command_idx = 0; - /* Reset controller */ - XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); - - for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 100); - temp = (XREAD4(sc, oper, XHCI_USBCMD) & XHCI_CMD_HCRST) | - (XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_CNR); - if (!temp) - break; - } - - if (temp) { - device_printf(sc->sc_bus.parent, "Controller " - "reset timeout.\n"); - return (USB_ERR_IOERROR); - } + err = xhci_reset_controller(sc); + if (err) + return (err); /* set up number of device slots */ DPRINTF("CONFIG=0x%08x -> 0x%08x\n", @@ -521,6 +509,33 @@ xhci_halt_controller(struct xhci_softc * } usb_error_t +xhci_reset_controller(struct xhci_softc *sc) +{ + uint32_t temp = 0; + uint16_t i; + + DPRINTF("\n"); + + /* Reset controller */ + XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); + + for (i = 0; i != 100; i++) { + usb_pause_mtx(NULL, hz / 100); + temp = (XREAD4(sc, oper, XHCI_USBCMD) & XHCI_CMD_HCRST) | + (XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_CNR); + if (!temp) + break; + } + + if (temp) { + device_printf(sc->sc_bus.parent, "Controller " + "reset timeout.\n"); + return (USB_ERR_IOERROR); + } + return (0); +} + +usb_error_t xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) { uint32_t temp; @@ -671,10 +686,12 @@ xhci_set_hw_power_sleep(struct usb_bus * case USB_HW_POWER_SUSPEND: DPRINTF("Stopping the XHCI\n"); xhci_halt_controller(sc); + xhci_reset_controller(sc); break; case USB_HW_POWER_SHUTDOWN: DPRINTF("Stopping the XHCI\n"); xhci_halt_controller(sc); + xhci_reset_controller(sc); break; case USB_HW_POWER_RESUME: DPRINTF("Starting the XHCI\n"); Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Thu Jan 19 18:26:06 2017 (r312423) +++ head/sys/dev/usb/controller/xhci.h Thu Jan 19 18:33:27 2017 (r312424) @@ -525,6 +525,7 @@ struct xhci_softc { uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); +usb_error_t xhci_reset_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t, uint8_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Thu Jan 19 18:26:06 2017 (r312423) +++ head/sys/dev/usb/controller/xhci_pci.c Thu Jan 19 18:33:27 2017 (r312424) @@ -348,6 +348,7 @@ xhci_pci_detach(device_t self) usb_callout_drain(&sc->sc_callout); xhci_halt_controller(sc); + xhci_reset_controller(sc); pci_disable_busmaster(self); From owner-svn-src-head@freebsd.org Thu Jan 19 18:39:00 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 15848CB87EE; Thu, 19 Jan 2017 18:39:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B72E01FE0; Thu, 19 Jan 2017 18:38:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JIcwiT074434; Thu, 19 Jan 2017 18:38:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JIcwWL074432; Thu, 19 Jan 2017 18:38:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191838.v0JIcwWL074432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 18:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312425 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:39:00 -0000 Author: kib Date: Thu Jan 19 18:38:58 2017 New Revision: 312425 URL: https://svnweb.freebsd.org/changeset/base/312425 Log: Make tmpfs directory cursor available outside tmpfs_subr.c. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 18:33:27 2017 (r312424) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 18:38:58 2017 (r312425) @@ -394,6 +394,11 @@ struct tmpfs_fid { unsigned long tf_gen; }; +struct tmpfs_dir_cursor { + struct tmpfs_dirent *tdc_current; + struct tmpfs_dirent *tdc_tree; +}; + #ifdef _KERNEL /* * Prototypes for tmpfs_subr.c. @@ -438,6 +443,10 @@ void tmpfs_itimes(struct vnode *, const void tmpfs_set_status(struct tmpfs_node *node, int status); void tmpfs_update(struct vnode *); int tmpfs_truncate(struct vnode *, off_t); +struct tmpfs_dirent *tmpfs_dir_first(struct tmpfs_node *dnode, + struct tmpfs_dir_cursor *dc); +struct tmpfs_dirent *tmpfs_dir_next(struct tmpfs_node *dnode, + struct tmpfs_dir_cursor *dc); /* * Convenience macros to simplify some logical expressions. Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 18:33:27 2017 (r312424) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 18:38:58 2017 (r312425) @@ -62,11 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct tmpfs_dir_cursor { - struct tmpfs_dirent *tdc_current; - struct tmpfs_dirent *tdc_tree; -}; - SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system"); static long tmpfs_pages_reserved = TMPFS_PAGES_MINRESERVED; @@ -724,7 +719,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru return (0); } -static struct tmpfs_dirent * +struct tmpfs_dirent * tmpfs_dir_first(struct tmpfs_node *dnode, struct tmpfs_dir_cursor *dc) { struct tmpfs_dirent *de; @@ -738,7 +733,7 @@ tmpfs_dir_first(struct tmpfs_node *dnode return (dc->tdc_current); } -static struct tmpfs_dirent * +struct tmpfs_dirent * tmpfs_dir_next(struct tmpfs_node *dnode, struct tmpfs_dir_cursor *dc) { struct tmpfs_dirent *de; From owner-svn-src-head@freebsd.org Thu Jan 19 18:46:42 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 A9CFACB89E5; Thu, 19 Jan 2017 18:46:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6147E14EC; Thu, 19 Jan 2017 18:46:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JIkfod078269; Thu, 19 Jan 2017 18:46:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JIkfMI078267; Thu, 19 Jan 2017 18:46:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701191846.v0JIkfMI078267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Jan 2017 18:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312426 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:46:42 -0000 Author: avg Date: Thu Jan 19 18:46:41 2017 New Revision: 312426 URL: https://svnweb.freebsd.org/changeset/base/312426 Log: fix a thread preemption regression in schedulers introduced in r270423 Commit r270423 fixed a regression in sched_yield() that was introduced in earlier changes. Unfortunately, at the same time it introduced an new regression. The problem is that SWT_RELINQUISH (6), like all other SWT_* constants and unlike SW_* flags, is not a bit flag. So, (flags & SWT_RELINQUISH) is true in cases where that was not really indended, for example, with SWT_OWEPREEMPT (2) and SWT_REMOTEPREEMPT (11). A straight forward fix would be to use (flags & SW_TYPE_MASK) == SWT_RELINQUISH, but my impression is that the switch types are designed mostly for gathering statistics, not for influencing scheduling decisions. So, I decided that it would be better to check for SW_PREEMPT flag instead. That's also the same flag that was checked before r239157. I double-checked how that flag is used and I am confident that the flag is set only in the places where we really have the preemption: - critical_exit + td_owepreempt - sched_preempt in the ULE scheduler - sched_preempt in the 4BSD scheduler Reviewed by: kib, mav MFC after: 4 days Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D9230 Modified: head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Thu Jan 19 18:38:58 2017 (r312425) +++ head/sys/kern/sched_4bsd.c Thu Jan 19 18:46:41 2017 (r312426) @@ -968,8 +968,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !((td->td_flags & TDF_SLICEEND) || - (flags & SWT_RELINQUISH)); + preempted = (td->td_flags & TDF_SLICEEND) == 0 && + (flags & SW_PREEMPT) != 0; td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Jan 19 18:38:58 2017 (r312425) +++ head/sys/kern/sched_ule.c Thu Jan 19 18:46:41 2017 (r312426) @@ -1898,8 +1898,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !((td->td_flags & TDF_SLICEEND) || - (flags & SWT_RELINQUISH)); + preempted = (td->td_flags & TDF_SLICEEND) == 0 && + (flags & SW_PREEMPT) != 0; td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From owner-svn-src-head@freebsd.org Thu Jan 19 18:52:40 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 80775CB8C99; Thu, 19 Jan 2017 18:52:40 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0BA1AC3; Thu, 19 Jan 2017 18:52:40 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JIqdw1082006; Thu, 19 Jan 2017 18:52:39 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JIqckt082001; Thu, 19 Jan 2017 18:52:38 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201701191852.v0JIqckt082001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Thu, 19 Jan 2017 18:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312427 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 18:52:40 -0000 Author: erj Date: Thu Jan 19 18:52:38 2017 New Revision: 312427 URL: https://svnweb.freebsd.org/changeset/base/312427 Log: e1000: Add support for Kaby Lake generation i219 (4) and i219 (5) devices MFC after: 1 week Sponsored by: Intel Corporation Modified: head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Thu Jan 19 18:46:41 2017 (r312426) +++ head/sys/dev/e1000/e1000_82575.c Thu Jan 19 18:52:38 2017 (r312427) @@ -101,7 +101,6 @@ static s32 e1000_validate_nvm_checksum_w u16 offset); static s32 e1000_validate_nvm_checksum_i350(struct e1000_hw *hw); static s32 e1000_update_nvm_checksum_i350(struct e1000_hw *hw); -static void e1000_write_vfta_i350(struct e1000_hw *hw, u32 offset, u32 value); static void e1000_clear_vfta_i350(struct e1000_hw *hw); static void e1000_i2c_start(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Thu Jan 19 18:46:41 2017 (r312426) +++ head/sys/dev/e1000/e1000_82575.h Thu Jan 19 18:52:38 2017 (r312427) @@ -493,6 +493,7 @@ enum e1000_promisc_type { void e1000_vfta_set_vf(struct e1000_hw *, u16, bool); void e1000_rlpml_set_vf(struct e1000_hw *, u16); s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type); +void e1000_write_vfta_i350(struct e1000_hw *hw, u32 offset, u32 value); u16 e1000_rxpbs_adjust_82580(u32 data); s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data); s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M); Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Thu Jan 19 18:46:41 2017 (r312426) +++ head/sys/dev/e1000/e1000_defines.h Thu Jan 19 18:52:38 2017 (r312427) @@ -469,6 +469,8 @@ #define ETHERNET_FCS_SIZE 4 #define MAX_JUMBO_FRAME_SIZE 0x3F00 +/* The datasheet maximum supported RX size is 9.5KB (9728 bytes) */ +#define MAX_RX_JUMBO_FRAME_SIZE 0x2600 #define E1000_TX_PTR_GAP 0x1F /* Extended Configuration Control and Size */ Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Thu Jan 19 18:46:41 2017 (r312426) +++ head/sys/dev/e1000/e1000_ich8lan.c Thu Jan 19 18:52:38 2017 (r312427) @@ -243,8 +243,7 @@ static bool e1000_phy_is_accessible_pchl if (ret_val) return FALSE; out: - if ((hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) { + if (hw->mac.type >= e1000_pch_lpt) { /* Only unforce SMBus if ME is not active */ if (!(E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID)) { @@ -641,7 +640,7 @@ static s32 e1000_init_nvm_params_ich8lan nvm->type = e1000_nvm_flash_sw; - if (hw->mac.type == e1000_pch_spt) { + if (hw->mac.type >= e1000_pch_spt) { /* in SPT, gfpreg doesn't exist. NVM size is taken from the * STRAP register. This is because in SPT the GbE Flash region * is no longer accessed through the flash registers. Instead, @@ -701,7 +700,7 @@ static s32 e1000_init_nvm_params_ich8lan /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; - if (hw->mac.type == e1000_pch_spt) { + if (hw->mac.type >= e1000_pch_spt) { nvm->ops.read = e1000_read_nvm_spt; nvm->ops.update = e1000_update_nvm_checksum_spt; } else { @@ -815,8 +814,7 @@ static s32 e1000_init_mac_params_ich8lan break; } - if ((mac->type == e1000_pch_lpt) || - (mac->type == e1000_pch_spt)) { + if (mac->type >= e1000_pch_lpt) { mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES; mac->ops.rar_set = e1000_rar_set_pch_lpt; mac->ops.setup_physical_interface = e1000_setup_copper_link_pch_lpt; @@ -1576,9 +1574,7 @@ static s32 e1000_check_for_copper_link_i * aggressive resulting in many collisions. To avoid this, increase * the IPG and reduce Rx latency in the PHY. */ - if (((hw->mac.type == e1000_pch2lan) || - (hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) && link) { + if ((hw->mac.type >= e1000_pch2lan) && link) { u16 speed, duplex; e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex); @@ -1589,7 +1585,7 @@ static s32 e1000_check_for_copper_link_i tipg_reg |= 0xFF; /* Reduce Rx latency in analog PHY */ emi_val = 0; - } else if (hw->mac.type == e1000_pch_spt && + } else if (hw->mac.type >= e1000_pch_spt && duplex == FULL_DUPLEX && speed != SPEED_1000) { tipg_reg |= 0xC; emi_val = 1; @@ -1611,8 +1607,8 @@ static s32 e1000_check_for_copper_link_i emi_addr = I217_RX_CONFIG; ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val); - if (hw->mac.type == e1000_pch_lpt || - hw->mac.type == e1000_pch_spt) { + + if (hw->mac.type >= e1000_pch_lpt) { u16 phy_reg; hw->phy.ops.read_reg_locked(hw, I217_PLL_CLOCK_GATE_REG, @@ -1641,7 +1637,7 @@ static s32 e1000_check_for_copper_link_i if (ret_val) return ret_val; - if (hw->mac.type == e1000_pch_spt) { + if (hw->mac.type >= e1000_pch_spt) { u16 data; u16 ptr_gap; @@ -1690,8 +1686,7 @@ static s32 e1000_check_for_copper_link_i * on power up. * Set the Beacon Duration for I217 to 8 usec */ - if ((hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) { + if (hw->mac.type >= e1000_pch_lpt) { u32 mac_reg; mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4); @@ -1709,8 +1704,7 @@ static s32 e1000_check_for_copper_link_i if (ret_val) return ret_val; } - if ((hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) { + if (hw->mac.type >= e1000_pch_lpt) { /* Set platform power management values for * Latency Tolerance Reporting (LTR) * Optimized Buffer Flush/Fill (OBFF) @@ -1723,15 +1717,20 @@ static s32 e1000_check_for_copper_link_i /* Clear link partner's EEE ability */ hw->dev_spec.ich8lan.eee_lp_ability = 0; - /* FEXTNVM6 K1-off workaround */ - if (hw->mac.type == e1000_pch_spt) { - u32 pcieanacfg = E1000_READ_REG(hw, E1000_PCIEANACFG); + if (hw->mac.type >= e1000_pch_lpt) { u32 fextnvm6 = E1000_READ_REG(hw, E1000_FEXTNVM6); - if ((pcieanacfg & E1000_FEXTNVM6_K1_OFF_ENABLE) && - (hw->dev_spec.ich8lan.disable_k1_off == FALSE)) - fextnvm6 |= E1000_FEXTNVM6_K1_OFF_ENABLE; - else + if (hw->mac.type == e1000_pch_spt) { + /* FEXTNVM6 K1-off workaround - for SPT only */ + u32 pcieanacfg = E1000_READ_REG(hw, E1000_PCIEANACFG); + + if (pcieanacfg & E1000_FEXTNVM6_K1_OFF_ENABLE) + fextnvm6 |= E1000_FEXTNVM6_K1_OFF_ENABLE; + else + fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE; + } + + if (hw->dev_spec.ich8lan.disable_k1_off == TRUE) fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE; E1000_WRITE_REG(hw, E1000_FEXTNVM6, fextnvm6); @@ -3671,7 +3670,7 @@ static s32 e1000_flash_cycle_init_ich8la /* Clear FCERR and DAEL in hw status by writing 1 */ hsfsts.hsf_status.flcerr = 1; hsfsts.hsf_status.dael = 1; - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsfsts.regval & 0xFFFF); else @@ -3691,7 +3690,7 @@ static s32 e1000_flash_cycle_init_ich8la * Begin by setting Flash Cycle Done. */ hsfsts.hsf_status.flcdone = 1; - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsfsts.regval & 0xFFFF); else @@ -3718,7 +3717,7 @@ static s32 e1000_flash_cycle_init_ich8la * now set the Flash Cycle Done. */ hsfsts.hsf_status.flcdone = 1; - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsfsts.regval & 0xFFFF); else @@ -3748,13 +3747,13 @@ static s32 e1000_flash_cycle_ich8lan(str DEBUGFUNC("e1000_flash_cycle_ich8lan"); /* Start a cycle by writing 1 in Flash Cycle Go in Hw Flash Control */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) hsflctl.regval = E1000_READ_FLASH_REG(hw, ICH_FLASH_HSFSTS)>>16; else hsflctl.regval = E1000_READ_FLASH_REG16(hw, ICH_FLASH_HSFCTL); hsflctl.hsf_ctrl.flcgo = 1; - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsflctl.regval << 16); else @@ -3837,7 +3836,7 @@ static s32 e1000_read_flash_byte_ich8lan /* In SPT, only 32 bits access is supported, * so this function should not be called. */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) return -E1000_ERR_NVM; else ret_val = e1000_read_flash_data_ich8lan(hw, offset, 1, &word); @@ -3946,7 +3945,7 @@ static s32 e1000_read_flash_data32_ich8l DEBUGFUNC("e1000_read_flash_data_ich8lan"); if (offset > ICH_FLASH_LINEAR_ADDR_MASK || - hw->mac.type != e1000_pch_spt) + hw->mac.type < e1000_pch_spt) return -E1000_ERR_NVM; flash_linear_addr = ((ICH_FLASH_LINEAR_ADDR_MASK & offset) + hw->nvm.flash_base_addr); @@ -4434,7 +4433,7 @@ static s32 e1000_write_flash_data_ich8la DEBUGFUNC("e1000_write_ich8_data"); - if (hw->mac.type == e1000_pch_spt) { + if (hw->mac.type >= e1000_pch_spt) { if (size != 4 || offset > ICH_FLASH_LINEAR_ADDR_MASK) return -E1000_ERR_NVM; } else { @@ -4454,7 +4453,7 @@ static s32 e1000_write_flash_data_ich8la /* In SPT, This register is in Lan memory space, not * flash. Therefore, only 32 bit access is supported */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) hsflctl.regval = E1000_READ_FLASH_REG(hw, ICH_FLASH_HSFSTS)>>16; else @@ -4468,7 +4467,7 @@ static s32 e1000_write_flash_data_ich8la * not flash. Therefore, only 32 bit access is * supported */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsflctl.regval << 16); else @@ -4530,7 +4529,7 @@ static s32 e1000_write_flash_data32_ich8 DEBUGFUNC("e1000_write_flash_data32_ich8lan"); - if (hw->mac.type == e1000_pch_spt) { + if (hw->mac.type >= e1000_pch_spt) { if (offset > ICH_FLASH_LINEAR_ADDR_MASK) return -E1000_ERR_NVM; } @@ -4546,7 +4545,7 @@ static s32 e1000_write_flash_data32_ich8 /* In SPT, This register is in Lan memory space, not * flash. Therefore, only 32 bit access is supported */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) hsflctl.regval = E1000_READ_FLASH_REG(hw, ICH_FLASH_HSFSTS) >> 16; @@ -4561,7 +4560,7 @@ static s32 e1000_write_flash_data32_ich8 * not flash. Therefore, only 32 bit access is * supported */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsflctl.regval << 16); else @@ -4763,7 +4762,7 @@ static s32 e1000_erase_flash_bank_ich8la /* Write a value 11 (block Erase) in Flash * Cycle field in hw flash control */ - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) hsflctl.regval = E1000_READ_FLASH_REG(hw, ICH_FLASH_HSFSTS)>>16; @@ -4773,7 +4772,7 @@ static s32 e1000_erase_flash_bank_ich8la ICH_FLASH_HSFCTL); hsflctl.hsf_ctrl.flcycle = ICH_CYCLE_ERASE; - if (hw->mac.type == e1000_pch_spt) + if (hw->mac.type >= e1000_pch_spt) E1000_WRITE_FLASH_REG(hw, ICH_FLASH_HSFSTS, hsflctl.regval << 16); else @@ -5211,8 +5210,7 @@ static void e1000_initialize_hw_bits_ich E1000_WRITE_REG(hw, E1000_RFCTL, reg); /* Enable ECC on Lynxpoint */ - if ((hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) { + if (hw->mac.type >= e1000_pch_lpt) { reg = E1000_READ_REG(hw, E1000_PBECCSTS); reg |= E1000_PBECCSTS_ECC_ENABLE; E1000_WRITE_REG(hw, E1000_PBECCSTS, reg); @@ -5645,7 +5643,7 @@ void e1000_suspend_workarounds_ich8lan(s (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) || (device_id == E1000_DEV_ID_PCH_I218_LM3) || (device_id == E1000_DEV_ID_PCH_I218_V3) || - (hw->mac.type == e1000_pch_spt)) { + (hw->mac.type >= e1000_pch_spt)) { u32 fextnvm6 = E1000_READ_REG(hw, E1000_FEXTNVM6); E1000_WRITE_REG(hw, E1000_FEXTNVM6, Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jan 19 18:46:41 2017 (r312426) +++ head/sys/dev/e1000/if_em.c Thu Jan 19 18:52:38 2017 (r312427) @@ -159,6 +159,10 @@ static pci_vendor_info_t em_vendor_info_ PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V4, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V5, "Intel(R) PRO/1000 Network Connection"), /* required last entry */ PVID_END }; From owner-svn-src-head@freebsd.org Thu Jan 19 19:15:22 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 A1B2ECB8474; Thu, 19 Jan 2017 19:15:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C2521985; Thu, 19 Jan 2017 19:15:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JJFL1F090581; Thu, 19 Jan 2017 19:15:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JJFLEL090577; Thu, 19 Jan 2017 19:15:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191915.v0JJFLEL090577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 19:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312428 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 19:15:22 -0000 Author: kib Date: Thu Jan 19 19:15:21 2017 New Revision: 312428 URL: https://svnweb.freebsd.org/changeset/base/312428 Log: Refcount tmpfs nodes and mount structures. On dotdot lookup and fhtovp operations, it is possible for the file represented by tmpfs node to be removed after the thread calculated the pointer. In this case, tmpfs_alloc_vp() accesses freed memory. Introduce the reference count on the nodes. The allnodes list from tmpfs mount owns 1 reference, and threads performing unlocked operations on the node, add one transient reference. Similarly, since struct tmpfs_mount maintains the list where nodes are enlisted, refcount it by one reference from struct mount and one reference from each node on the list. Both nodes and tmpfs_mounts are removed when refcount goes to zero. Note that this means that nodes and tmpfs_mounts might survive some time after the node is deleted or tmpfs_unmount() finished. The tmpfs_alloc_vp() in these cases returns error either due to node removal (tn_nlinks == 0) or because of insmntque1(9) error. Tested by: pho (as part of larger patch) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 18:52:38 2017 (r312427) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 19:15:21 2017 (r312428) @@ -158,9 +158,11 @@ struct tmpfs_node { * Doubly-linked list entry which links all existing nodes for * a single file system. This is provided to ease the removal * of all nodes during the unmount operation, and to support - * the implementation of VOP_VNTOCNP(). + * the implementation of VOP_VNTOCNP(). tn_attached is false + * when the node is removed from list and unlocked. */ LIST_ENTRY(tmpfs_node) tn_entries; /* (m) */ + bool tn_attached; /* (m) */ /* * The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', @@ -231,6 +233,9 @@ struct tmpfs_node { */ int tn_vpstate; /* (i) */ + /* Transient refcounter on this node. */ + u_int tn_refcount; /* (m) + (i) */ + /* misc data field for different tn_type node */ union { /* Valid when tn_type == VBLK || tn_type == VCHR. */ @@ -360,6 +365,9 @@ struct tmpfs_mount { /* Number of nodes currently that are in use. */ ino_t tm_nodes_inuse; + /* Refcounter on this struct tmpfs_mount. */ + uint64_t tm_refcount; + /* maximum representable file size */ u_int64_t tm_maxfilesize; @@ -404,10 +412,14 @@ struct tmpfs_dir_cursor { * Prototypes for tmpfs_subr.c. */ +void tmpfs_ref_node(struct tmpfs_node *node); +void tmpfs_ref_node_locked(struct tmpfs_node *node); int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); +bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool); +void tmpfs_free_tmp(struct tmpfs_mount *); int tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *, const char *, u_int, struct tmpfs_dirent **); void tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *); Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 18:52:38 2017 (r312427) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 19:15:21 2017 (r312428) @@ -131,6 +131,26 @@ tmpfs_pages_check_avail(struct tmpfs_mou return (1); } +void +tmpfs_ref_node(struct tmpfs_node *node) +{ + + TMPFS_NODE_LOCK(node); + tmpfs_ref_node_locked(node); + TMPFS_NODE_UNLOCK(node); +} + +void +tmpfs_ref_node_locked(struct tmpfs_node *node) +{ + + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p zero refcount", node)); + KASSERT(node->tn_refcount < UINT_MAX, ("node %p refcount %u", node, + node->tn_refcount)); + node->tn_refcount++; +} + /* * Allocates a new node of type 'type' inside the 'tmp' mount point, with * its owner set to 'uid', its group to 'gid' and its mode set to 'mode', @@ -205,6 +225,7 @@ tmpfs_alloc_node(struct mount *mp, struc nnode->tn_gid = gid; nnode->tn_mode = mode; nnode->tn_id = alloc_unr(tmp->tm_ino_unr); + nnode->tn_refcount = 1; /* Type-specific initialization. */ switch (nnode->tn_type) { @@ -258,7 +279,9 @@ tmpfs_alloc_node(struct mount *mp, struc TMPFS_LOCK(tmp); LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries); + nnode->tn_attached = true; tmp->tm_nodes_inuse++; + tmp->tm_refcount++; TMPFS_UNLOCK(tmp); *node = nnode; @@ -272,18 +295,40 @@ tmpfs_alloc_node(struct mount *mp, struc void tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node) { + + TMPFS_LOCK(tmp); + TMPFS_NODE_LOCK(node); + if (!tmpfs_free_node_locked(tmp, node, false)) { + TMPFS_NODE_UNLOCK(node); + TMPFS_UNLOCK(tmp); + } +} + +bool +tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct tmpfs_node *node, + bool detach) +{ vm_object_t uobj; + TMPFS_MP_ASSERT_LOCKED(tmp); + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p refcount zero", node)); + + node->tn_refcount--; + if (node->tn_attached && (detach || node->tn_refcount == 0)) { + MPASS(tmp->tm_nodes_inuse > 0); + tmp->tm_nodes_inuse--; + LIST_REMOVE(node, tn_entries); + node->tn_attached = false; + } + if (node->tn_refcount > 0) + return (false); + #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); MPASS(node->tn_vnode == NULL); MPASS((node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0); - TMPFS_NODE_UNLOCK(node); #endif - - TMPFS_LOCK(tmp); - LIST_REMOVE(node, tn_entries); - tmp->tm_nodes_inuse--; + TMPFS_NODE_UNLOCK(node); TMPFS_UNLOCK(tmp); switch (node->tn_type) { @@ -323,6 +368,9 @@ tmpfs_free_node(struct tmpfs_mount *tmp, free_unr(tmp->tm_ino_unr, node->tn_id); uma_zfree(tmp->tm_node_pool, node); + TMPFS_LOCK(tmp); + tmpfs_free_tmp(tmp); + return (true); } static __inline uint32_t @@ -468,13 +516,16 @@ tmpfs_alloc_vp(struct mount *mp, struct struct vnode **vpp) { struct vnode *vp; + struct tmpfs_mount *tm; vm_object_t object; int error; error = 0; -loop: + tm = VFS_TO_TMPFS(mp); TMPFS_NODE_LOCK(node); -loop1: + tmpfs_ref_node_locked(node); +loop: + TMPFS_NODE_ASSERT_LOCKED(node); if ((vp = node->tn_vnode) != NULL) { MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); @@ -494,12 +545,14 @@ loop1: msleep(&node->tn_vnode, TMPFS_NODE_MTX(node), 0, "tmpfsE", 0); } - goto loop1; + goto loop; } TMPFS_NODE_UNLOCK(node); error = vget(vp, lkflag | LK_INTERLOCK, curthread); - if (error == ENOENT) + if (error == ENOENT) { + TMPFS_NODE_LOCK(node); goto loop; + } if (error != 0) { vp = NULL; goto out; @@ -511,6 +564,7 @@ loop1: */ if (node->tn_vnode == NULL || node->tn_vnode != vp) { vput(vp); + TMPFS_NODE_LOCK(node); goto loop; } @@ -532,11 +586,9 @@ loop1: if (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) { node->tn_vpstate |= TMPFS_VNODE_WANT; error = msleep((caddr_t) &node->tn_vpstate, - TMPFS_NODE_MTX(node), PDROP | PCATCH, - "tmpfs_alloc_vp", 0); - if (error) - return error; - + TMPFS_NODE_MTX(node), 0, "tmpfs_alloc_vp", 0); + if (error != 0) + goto out; goto loop; } else node->tn_vpstate |= TMPFS_VNODE_ALLOCATING; @@ -610,16 +662,17 @@ unlock: TMPFS_NODE_UNLOCK(node); out: - *vpp = vp; + if (error == 0) { + *vpp = vp; #ifdef INVARIANTS - if (error == 0) { MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); TMPFS_NODE_LOCK(node); MPASS(*vpp == node->tn_vnode); TMPFS_NODE_UNLOCK(node); - } #endif + } + tmpfs_free_node(tm, node); return (error); } Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 18:52:38 2017 (r312427) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 19:15:21 2017 (r312428) @@ -222,6 +222,7 @@ tmpfs_mount(struct mount *mp) mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; + tmp->tm_refcount = 1; tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); @@ -304,11 +305,35 @@ tmpfs_unmount(struct mount *mp, int mntf TMPFS_LOCK(tmp); while ((node = LIST_FIRST(&tmp->tm_nodes_used)) != NULL) { - TMPFS_UNLOCK(tmp); + TMPFS_NODE_LOCK(node); if (node->tn_type == VDIR) tmpfs_dir_destroy(tmp, node); - tmpfs_free_node(tmp, node); - TMPFS_LOCK(tmp); + if (tmpfs_free_node_locked(tmp, node, true)) + TMPFS_LOCK(tmp); + else + TMPFS_NODE_UNLOCK(node); + } + + mp->mnt_data = NULL; + tmpfs_free_tmp(tmp); + vfs_write_resume(mp, VR_START_WRITE); + + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_LOCAL; + MNT_IUNLOCK(mp); + + return (0); +} + +void +tmpfs_free_tmp(struct tmpfs_mount *tmp) +{ + + MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; + if (tmp->tm_refcount > 0) { + TMPFS_UNLOCK(tmp); + return; } TMPFS_UNLOCK(tmp); @@ -320,16 +345,7 @@ tmpfs_unmount(struct mount *mp, int mntf MPASS(tmp->tm_pages_used == 0); MPASS(tmp->tm_nodes_inuse == 0); - /* Throw away the tmpfs_mount structure. */ - free(mp->mnt_data, M_TMPFSMNT); - mp->mnt_data = NULL; - vfs_write_resume(mp, VR_START_WRITE); - - MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_LOCAL; - MNT_IUNLOCK(mp); - - return (0); + free(tmp, M_TMPFSMNT); } static int @@ -347,36 +363,36 @@ static int tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { - boolean_t found; struct tmpfs_fid *tfhp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + int error; tmp = VFS_TO_TMPFS(mp); tfhp = (struct tmpfs_fid *)fhp; if (tfhp->tf_len != sizeof(struct tmpfs_fid)) - return EINVAL; + return (EINVAL); if (tfhp->tf_id >= tmp->tm_nodes_max) - return EINVAL; - - found = FALSE; + return (EINVAL); TMPFS_LOCK(tmp); LIST_FOREACH(node, &tmp->tm_nodes_used, tn_entries) { if (node->tn_id == tfhp->tf_id && node->tn_gen == tfhp->tf_gen) { - found = TRUE; + tmpfs_ref_node(node); break; } } TMPFS_UNLOCK(tmp); - if (found) - return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp)); - - return (EINVAL); + if (node != NULL) { + error = tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp); + tmpfs_free_node(tmp, node); + } else + error = EINVAL; + return (error); } /* ARGSUSED2 */ Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 18:52:38 2017 (r312427) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 19:15:21 2017 (r312428) @@ -82,7 +82,8 @@ tmpfs_lookup(struct vop_cachedlookup_arg struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; - struct tmpfs_node *dnode; + struct tmpfs_node *dnode, *pnode; + struct tmpfs_mount *tm; int error; dnode = VP_TO_TMPFS_DIR(dvp); @@ -104,8 +105,12 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; } if (cnp->cn_flags & ISDOTDOT) { + tm = VFS_TO_TMPFS(dvp->v_mount); + pnode = dnode->tn_dir.tn_parent; + tmpfs_ref_node(pnode); error = vn_vget_ino_gen(dvp, tmpfs_vn_get_ino_alloc, - dnode->tn_dir.tn_parent, cnp->cn_lkflags, vpp); + pnode, cnp->cn_lkflags, vpp); + tmpfs_free_node(tm, pnode); if (error != 0) goto out; } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { From owner-svn-src-head@freebsd.org Thu Jan 19 19:25:43 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 AA00BCB889F; Thu, 19 Jan 2017 19:25:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7658D1244; Thu, 19 Jan 2017 19:25:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JJPg4q094610; Thu, 19 Jan 2017 19:25:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JJPgsQ094609; Thu, 19 Jan 2017 19:25:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191925.v0JJPgsQ094609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 19:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312429 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 19:25:43 -0000 Author: kib Date: Thu Jan 19 19:25:42 2017 New Revision: 312429 URL: https://svnweb.freebsd.org/changeset/base/312429 Log: VNON nodes cannot exist. Tested by: pho (as part of larger patch) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 19:15:21 2017 (r312428) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 19:25:42 2017 (r312429) @@ -332,11 +332,6 @@ tmpfs_free_node_locked(struct tmpfs_moun TMPFS_UNLOCK(tmp); switch (node->tn_type) { - case VNON: - /* Do not do anything. VNON is provided to let the - * allocation routine clean itself easily by avoiding - * duplicating code in it. */ - /* FALLTHROUGH */ case VBLK: /* FALLTHROUGH */ case VCHR: From owner-svn-src-head@freebsd.org Thu Jan 19 19:29:15 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 0F8B0CB8BD4; Thu, 19 Jan 2017 19:29:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC36E1EF7; Thu, 19 Jan 2017 19:29:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JJTDj6096053; Thu, 19 Jan 2017 19:29:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JJTDt1096052; Thu, 19 Jan 2017 19:29:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191929.v0JJTDt1096052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 19:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312430 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 19:29:15 -0000 Author: kib Date: Thu Jan 19 19:29:13 2017 New Revision: 312430 URL: https://svnweb.freebsd.org/changeset/base/312430 Log: Implement VOP_VPTOCNP() for tmpfs. For directories, node->tn_spec.tn_dir.tn_parent pointer to the parent is used. For non-directories, the implementation is naive, all directory nodes are scanned to find a dirent linking the specified node. This can be significantly improved by maintaining tn_parent for all nodes, later. Tested by: pho (as part of larger patch) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 19:25:42 2017 (r312429) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 19:29:13 2017 (r312430) @@ -1406,6 +1406,132 @@ tmpfs_whiteout(struct vop_whiteout_args } } +static int +tmpfs_vptocnp_dir(struct tmpfs_node *tn, struct tmpfs_node *tnp, + struct tmpfs_dirent **pde) +{ + struct tmpfs_dir_cursor dc; + struct tmpfs_dirent *de; + + for (de = tmpfs_dir_first(tnp, &dc); de != NULL; + de = tmpfs_dir_next(tnp, &dc)) { + if (de->td_node == tn) { + *pde = de; + return (0); + } + } + return (ENOENT); +} + +static int +tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn, + struct tmpfs_node *tnp, char *buf, int *buflen, struct vnode **dvp) +{ + struct tmpfs_dirent *de; + int error, i; + + error = vn_vget_ino_gen(vp, tmpfs_vn_get_ino_alloc, tnp, LK_SHARED, + dvp); + if (error != 0) + return (error); + error = tmpfs_vptocnp_dir(tn, tnp, &de); + if (error == 0) { + i = *buflen; + i -= de->td_namelen; + if (i < 0) { + error = ENOMEM; + } else { + bcopy(de->ud.td_name, buf + i, de->td_namelen); + *buflen = i; + } + } + if (error == 0) { + if (vp != *dvp) + VOP_UNLOCK(*dvp, 0); + } else { + if (vp != *dvp) + vput(*dvp); + else + vrele(vp); + } + return (error); +} + +static int +tmpfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp, **dvp; + struct tmpfs_node *tn, *tnp, *tnp1; + struct tmpfs_dirent *de; + struct tmpfs_mount *tm; + char *buf; + int *buflen; + int error; + + vp = ap->a_vp; + dvp = ap->a_vpp; + buf = ap->a_buf; + buflen = ap->a_buflen; + + tm = VFS_TO_TMPFS(vp->v_mount); + tn = VP_TO_TMPFS_NODE(vp); + if (tn->tn_type == VDIR) { + tnp = tn->tn_dir.tn_parent; + if (tnp == NULL) + return (ENOENT); + tmpfs_ref_node(tnp); + error = tmpfs_vptocnp_fill(vp, tn, tn->tn_dir.tn_parent, buf, + buflen, dvp); + tmpfs_free_node(tm, tnp); + return (error); + } +restart: + TMPFS_LOCK(tm); + LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) { + if (tnp->tn_type != VDIR) + continue; + TMPFS_NODE_LOCK(tnp); + tmpfs_ref_node_locked(tnp); + + /* + * tn_vnode cannot be instantiated while we hold the + * node lock, so the directory cannot be changed while + * we iterate over it. Do this to avoid instantiating + * vnode for directories which cannot point to our + * node. + */ + error = tnp->tn_vnode == NULL ? tmpfs_vptocnp_dir(tn, tnp, + &de) : 0; + + if (error == 0) { + TMPFS_NODE_UNLOCK(tnp); + TMPFS_UNLOCK(tm); + error = tmpfs_vptocnp_fill(vp, tn, tnp, buf, buflen, + dvp); + if (error == 0) { + tmpfs_free_node(tm, tnp); + return (0); + } + if ((vp->v_iflag & VI_DOOMED) != 0) { + tmpfs_free_node(tm, tnp); + return (ENOENT); + } + TMPFS_LOCK(tm); + TMPFS_NODE_LOCK(tnp); + } + if (tmpfs_free_node_locked(tm, tnp, false)) { + goto restart; + } else { + KASSERT(tnp->tn_refcount > 0, + ("node %p refcount zero", tnp)); + tnp1 = LIST_NEXT(tnp, tn_entries); + TMPFS_NODE_UNLOCK(tnp); + } + } + TMPFS_UNLOCK(tm); + return (ENOENT); +} + /* * Vnode operations vector used for files stored in a tmpfs file system. */ @@ -1438,5 +1564,6 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptofh = tmpfs_vptofh, .vop_whiteout = tmpfs_whiteout, .vop_bmap = VOP_EOPNOTSUPP, + .vop_vptocnp = tmpfs_vptocnp, }; From owner-svn-src-head@freebsd.org Thu Jan 19 19:46:50 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 B7982CB8290; Thu, 19 Jan 2017 19:46:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F9601D5B; Thu, 19 Jan 2017 19:46:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JJknJW005233; Thu, 19 Jan 2017 19:46:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JJkn2Y005228; Thu, 19 Jan 2017 19:46:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701191946.v0JJkn2Y005228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 19:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312432 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 19:46:50 -0000 Author: kib Date: Thu Jan 19 19:46:49 2017 New Revision: 312432 URL: https://svnweb.freebsd.org/changeset/base/312432 Log: Add mount option for tmpfs(5) to not use namecache. The option "nonc" disables using of namecache for the created mount, by default namecache is used. The rationale for the option is that namecache duplicates the information which is already kept in memory by tmpfs. Since it believed that namecache scales better than tmpfs, or will scale better, do not enable the option by default. On the other hand, smaller machines may benefit from lesser namecache pressure. Discussed with: mjg Tested by: pho (as part of larger patch) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 19:46:15 2017 (r312431) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 19:46:49 2017 (r312432) @@ -385,7 +385,9 @@ struct tmpfs_mount { uma_zone_t tm_node_pool; /* Read-only status. */ - int tm_ronly; + bool tm_ronly; + /* Do not use namecache. */ + bool tm_nonc; }; #define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock) #define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock) @@ -530,4 +532,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp) return (node); } +static inline bool +tmpfs_use_nc(struct vnode *vp) +{ + + return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc)); +} + #endif /* _FS_TMPFS_TMPFS_H_ */ Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 19:46:15 2017 (r312431) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jan 19 19:46:49 2017 (r312432) @@ -591,7 +591,8 @@ loop: TMPFS_NODE_UNLOCK(node); /* Get a new vnode and associate it with our node. */ - error = getnewvnode("tmpfs", mp, &tmpfs_vnodeop_entries, &vp); + error = getnewvnode("tmpfs", mp, VFS_TO_TMPFS(mp)->tm_nonc ? + &tmpfs_vnodeop_nonc_entries : &tmpfs_vnodeop_entries, &vp); if (error != 0) goto unlock; MPASS(vp != NULL); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 19:46:15 2017 (r312431) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Thu Jan 19 19:46:49 2017 (r312432) @@ -79,7 +79,7 @@ static void tmpfs_susp_clean(struct moun static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", - "union", NULL + "union", "nonc", NULL }; static const char *tmpfs_updateopts[] = { @@ -138,6 +138,7 @@ tmpfs_mount(struct mount *mp) struct tmpfs_node *root; struct thread *td = curthread; int error; + bool nonc; /* Size counters. */ u_quad_t pages; off_t nodes_max, size_max, maxfilesize; @@ -186,6 +187,7 @@ tmpfs_mount(struct mount *mp) size_max = 0; if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; + nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0; /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ @@ -236,6 +238,7 @@ tmpfs_mount(struct mount *mp) sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + tmp->tm_nonc = nonc; /* Allocate the root node. */ error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid, Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 19:46:15 2017 (r312431) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jan 19 19:46:49 2017 (r312432) @@ -76,11 +76,8 @@ tmpfs_vn_get_ino_alloc(struct mount *mp, } static int -tmpfs_lookup(struct vop_cachedlookup_args *v) +tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { - struct vnode *dvp = v->a_dvp; - struct vnode **vpp = v->a_vpp; - struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; struct tmpfs_node *dnode, *pnode; struct tmpfs_mount *tm; @@ -213,7 +210,7 @@ tmpfs_lookup(struct vop_cachedlookup_arg * request was for creation, as it does not improve timings on * emprical tests. */ - if ((cnp->cn_flags & MAKEENTRY) != 0) + if ((cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); out: @@ -227,6 +224,20 @@ out: } static int +tmpfs_cached_lookup(struct vop_cachedlookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int +tmpfs_lookup(struct vop_lookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int tmpfs_create(struct vop_create_args *v) { struct vnode *dvp = v->a_dvp; @@ -238,7 +249,7 @@ tmpfs_create(struct vop_create_args *v) MPASS(vap->va_type == VREG || vap->va_type == VSOCK); error = tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); - if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); return (error); } @@ -1013,10 +1024,12 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_dir_attach(tdvp, de); - cache_purge(fvp); - if (tvp != NULL) - cache_purge(tvp); - cache_purge_negative(tdvp); + if (tmpfs_use_nc(fvp)) { + cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); + cache_purge_negative(tdvp); + } error = 0; @@ -1129,8 +1142,10 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(dnode); - cache_purge(dvp); - cache_purge(vp); + if (tmpfs_use_nc(dvp)) { + cache_purge(dvp); + cache_purge(vp); + } /* Free the directory entry we just deleted. Note that the node * referred by it will not be removed until the vnode is really @@ -1274,7 +1289,8 @@ tmpfs_reclaim(struct vop_reclaim_args *v else vnode_destroy_vobject(vp); vp->v_object = NULL; - cache_purge(vp); + if (tmpfs_use_nc(vp)) + cache_purge(vp); TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); @@ -1538,7 +1554,7 @@ restart: struct vop_vector tmpfs_vnodeop_entries = { .vop_default = &default_vnodeops, .vop_lookup = vfs_cache_lookup, - .vop_cachedlookup = tmpfs_lookup, + .vop_cachedlookup = tmpfs_cached_lookup, .vop_create = tmpfs_create, .vop_mknod = tmpfs_mknod, .vop_open = tmpfs_open, @@ -1567,3 +1583,10 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptocnp = tmpfs_vptocnp, }; +/* + * Same vector for mounts which do not use namecache. + */ +struct vop_vector tmpfs_vnodeop_nonc_entries = { + .vop_default = &tmpfs_vnodeop_entries, + .vop_lookup = tmpfs_lookup, +}; Modified: head/sys/fs/tmpfs/tmpfs_vnops.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.h Thu Jan 19 19:46:15 2017 (r312431) +++ head/sys/fs/tmpfs/tmpfs_vnops.h Thu Jan 19 19:46:49 2017 (r312432) @@ -44,6 +44,7 @@ */ extern struct vop_vector tmpfs_vnodeop_entries; +extern struct vop_vector tmpfs_vnodeop_nonc_entries; vop_access_t tmpfs_access; vop_getattr_t tmpfs_getattr; From owner-svn-src-head@freebsd.org Thu Jan 19 19:58:10 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 5DDE8CB88C1; Thu, 19 Jan 2017 19:58:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13C11199B; Thu, 19 Jan 2017 19:58:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JJw9Do009582; Thu, 19 Jan 2017 19:58:09 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JJw98r009581; Thu, 19 Jan 2017 19:58:09 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701191958.v0JJw98r009581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 19 Jan 2017 19:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312434 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 19:58:10 -0000 Author: sbruno Date: Thu Jan 19 19:58:08 2017 New Revision: 312434 URL: https://svnweb.freebsd.org/changeset/base/312434 Log: Adjust gtaskqueue startup again so that we catch the !SMP case and users that choose not to use EARLY_AP_STARTUP. There is still an initialization issue/panic with !SMP and !EARLY_AP_STARTUP that we have yet to resolve. Submitted by: bde Modified: head/sys/sys/gtaskqueue.h Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Thu Jan 19 19:47:32 2017 (r312433) +++ head/sys/sys/gtaskqueue.h Thu Jan 19 19:58:08 2017 (r312434) @@ -81,7 +81,7 @@ int taskqgroup_adjust(struct taskqgroup extern struct taskqgroup *qgroup_##name -#ifdef EARLY_AP_STARTUP +#if (!defined(SMP) || defined(EARLY_AP_STARTUP)) #define TASKQGROUP_DEFINE(name, cnt, stride) \ \ struct taskqgroup *qgroup_##name; \ @@ -95,7 +95,7 @@ taskqgroup_define_##name(void *arg) \ SYSINIT(taskqgroup_##name, SI_SUB_INIT_IF, SI_ORDER_FIRST, \ taskqgroup_define_##name, NULL) -#else +#else /* SMP && !EARLY_AP_STARTUP */ #define TASKQGROUP_DEFINE(name, cnt, stride) \ \ struct taskqgroup *qgroup_##name; \ @@ -104,6 +104,15 @@ static void \ taskqgroup_define_##name(void *arg) \ { \ qgroup_##name = taskqgroup_create(#name); \ + /* Adjustment will be null unless smp_cpus == 1. */ \ + /* \ + * XXX this was intended to fix the smp_cpus == 1 case, but \ + * doesn't actually work for that. It gives thes same strange \ + * panic as adjustment at SI_SUB_INIT_IF:SI_ORDER_ANY for a \ + * device that works with a pure UP kernel. \ + */ \ + /* XXX this code is common now, so should not be ifdefed. */ \ + taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ } \ \ SYSINIT(taskqgroup_##name, SI_SUB_INIT_IF, SI_ORDER_FIRST, \ @@ -112,14 +121,18 @@ SYSINIT(taskqgroup_##name, SI_SUB_INIT_I static void \ taskqgroup_adjust_##name(void *arg) \ { \ + /* \ + * Adjustment when smp_cpus > 1 only works accidentally \ + * (when there is no device interrupt before adjustment). \ + */ \ taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ } \ \ -SYSINIT(taskqgroup_adj_##name, SI_SUB_INIT_IF, SI_ORDER_ANY, \ +SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \ taskqgroup_adjust_##name, NULL); \ - \ -struct __hack -#endif + +#endif /* !SMP || EARLY_AP_STARTUP */ + TASKQGROUP_DECLARE(net); #endif /* !_SYS_GTASKQUEUE_H_ */ From owner-svn-src-head@freebsd.org Thu Jan 19 20:03:27 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 639C3CB8C6E; Thu, 19 Jan 2017 20:03:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3362E111C; Thu, 19 Jan 2017 20:03:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JK3QPg013360; Thu, 19 Jan 2017 20:03:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JK3QhD013359; Thu, 19 Jan 2017 20:03:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701192003.v0JK3QhD013359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jan 2017 20:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312435 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 20:03:27 -0000 Author: kib Date: Thu Jan 19 20:03:26 2017 New Revision: 312435 URL: https://svnweb.freebsd.org/changeset/base/312435 Log: Remove mistakenly merged field. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 19:58:08 2017 (r312434) +++ head/sys/fs/tmpfs/tmpfs.h Thu Jan 19 20:03:26 2017 (r312435) @@ -347,8 +347,6 @@ struct tmpfs_mount { */ struct tmpfs_node * tm_root; - struct mount * tm_mnt; - /* * Maximum number of possible nodes for this file system; set * during mount time. We need a hard limit on the maximum number From owner-svn-src-head@freebsd.org Thu Jan 19 21:47:53 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 23080CA6CEB; Thu, 19 Jan 2017 21:47:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3DB01E26; Thu, 19 Jan 2017 21:47:52 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JLlpjG054897; Thu, 19 Jan 2017 21:47:51 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JLlpp3054889; Thu, 19 Jan 2017 21:47:51 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201701192147.v0JLlpp3054889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 19 Jan 2017 21:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312437 - in head/sys/dev: mpr mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 21:47:53 -0000 Author: scottl Date: Thu Jan 19 21:47:50 2017 New Revision: 312437 URL: https://svnweb.freebsd.org/changeset/base/312437 Log: Rework the debug print API. Event printing no longer gets special handling. All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired. Other than fixing some minor bugs, there are no user-visible changes from this change Sponsored by: Netflix, Inc. Differential Revision: D9238 Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mpr_table.c head/sys/dev/mpr/mpr_table.h head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_table.c head/sys/dev/mps/mps_table.h head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mpr/mpr_sas.c Thu Jan 19 21:47:50 2017 (r312437) @@ -349,7 +349,7 @@ mprsas_log_command(struct mpr_command *c sbuf_printf(&sb, "SMID %u ", cm->cm_desc.Default.SMID); sbuf_vprintf(&sb, fmt, ap); sbuf_finish(&sb); - mpr_dprint_field(cm->cm_sc, level, "%s", sbuf_data(&sb)); + mpr_print_field(cm->cm_sc, "%s", sbuf_data(&sb)); va_end(ap); } Modified: head/sys/dev/mpr/mpr_table.c ============================================================================== --- head/sys/dev/mpr/mpr_table.c Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mpr/mpr_table.c Thu Jan 19 21:47:50 2017 (r312437) @@ -197,27 +197,26 @@ mpr_describe_devinfo(uint32_t devinfo, c } void -mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +_mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { - MPR_PRINTFIELD_START(sc, "IOCFacts"); MPR_PRINTFIELD(sc, facts, MsgVersion, 0x%x); MPR_PRINTFIELD(sc, facts, HeaderVersion, 0x%x); MPR_PRINTFIELD(sc, facts, IOCNumber, %d); MPR_PRINTFIELD(sc, facts, IOCExceptions, 0x%x); MPR_PRINTFIELD(sc, facts, MaxChainDepth, %d); - mpr_dprint_field(sc, MPR_XINFO, "WhoInit: %s\n", + mpr_print_field(sc, "WhoInit: %s\n", mpr_describe_table(mpr_whoinit_names, facts->WhoInit)); MPR_PRINTFIELD(sc, facts, NumberOfPorts, %d); MPR_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); MPR_PRINTFIELD(sc, facts, RequestCredit, %d); MPR_PRINTFIELD(sc, facts, ProductID, 0x%x); - mpr_dprint_field(sc, MPR_XINFO, "IOCCapabilities: %b\n", + mpr_print_field(sc, "IOCCapabilities: %b\n", facts->IOCCapabilities, "\20" "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc"); - mpr_dprint_field(sc, MPR_XINFO, "FWVersion= %d-%d-%d-%d\n", + mpr_print_field(sc, "FWVersion= %d-%d-%d-%d\n", facts->FWVersion.Struct.Major, facts->FWVersion.Struct.Minor, facts->FWVersion.Struct.Unit, @@ -227,7 +226,7 @@ mpr_print_iocfacts(struct mpr_softc *sc, MPR_PRINTFIELD(sc, facts, MaxTargets, %d); MPR_PRINTFIELD(sc, facts, MaxSasExpanders, %d); MPR_PRINTFIELD(sc, facts, MaxEnclosures, %d); - mpr_dprint_field(sc, MPR_XINFO, "ProtocolFlags: %b\n", + mpr_print_field(sc, "ProtocolFlags: %b\n", facts->ProtocolFlags, "\20" "\1ScsiTarg" "\2ScsiInit"); MPR_PRINTFIELD(sc, facts, HighPriorityCredit, %d); MPR_PRINTFIELD(sc, facts, MaxReplyDescriptorPostQueueDepth, %d); @@ -238,7 +237,7 @@ mpr_print_iocfacts(struct mpr_softc *sc, } void -mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +_mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) { MPR_PRINTFIELD_START(sc, "PortFacts"); @@ -248,24 +247,24 @@ mpr_print_portfacts(struct mpr_softc *sc } void -mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +_mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - MPR_EVENTFIELD_START(sc, "EventReply"); - MPR_EVENTFIELD(sc, event, EventDataLength, %d); - MPR_EVENTFIELD(sc, event, AckRequired, %d); - mpr_dprint_field(sc, MPR_EVENT, "Event: %s (0x%x)\n", + MPR_PRINTFIELD_START(sc, "EventReply"); + MPR_PRINTFIELD(sc, event, EventDataLength, %d); + MPR_PRINTFIELD(sc, event, AckRequired, %d); + mpr_print_field(sc, "Event: %s (0x%x)\n", mpr_describe_table(mpr_event_names, event->Event), event->Event); - MPR_EVENTFIELD(sc, event, EventContext, 0x%x); + MPR_PRINTFIELD(sc, event, EventContext, 0x%x); } void -mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +_mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); MPR_PRINTFIELD(sc, buf, Slot, %d); MPR_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); - mpr_dprint_field(sc, MPR_XINFO, "SASAddress: 0x%jx\n", + mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&buf->SASAddress)); MPR_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, PhyNum, %d); @@ -273,7 +272,7 @@ mpr_print_sasdev0(struct mpr_softc *sc, MPR_PRINTFIELD(sc, buf, DevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); - mpr_dprint_field(sc, MPR_XINFO, "DeviceInfo: %b,%s\n", buf->DeviceInfo, + mpr_print_field(sc, "DeviceInfo: %b,%s\n", buf->DeviceInfo, "\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" "\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" "\15LsiDev" "\16AtapiDev" "\17SepDev", @@ -281,7 +280,7 @@ mpr_print_sasdev0(struct mpr_softc *sc, MPR_PRINTFIELD(sc, buf, Flags, 0x%x); MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, MaxPortConnections, %d); - mpr_dprint_field(sc, MPR_XINFO, "DeviceName: 0x%jx\n", + mpr_print_field(sc, "DeviceName: 0x%jx\n", mpr_to_u64(&buf->DeviceName)); MPR_PRINTFIELD(sc, buf, PortGroups, %d); MPR_PRINTFIELD(sc, buf, DmaGroup, %d); @@ -289,10 +288,10 @@ mpr_print_sasdev0(struct mpr_softc *sc, } void -mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +_mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - mpr_print_event(sc, event); + _mpr_print_event(sc, event); switch(event->Event) { case MPI2_EVENT_SAS_DISCOVERY: @@ -300,12 +299,12 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_DATA_SAS_DISCOVERY *data; data = (MPI2_EVENT_DATA_SAS_DISCOVERY *)&event->EventData; - mpr_dprint_field(sc, MPR_EVENT, "Flags: %b\n", data->Flags, + mpr_print_field(sc, "Flags: %b\n", data->Flags, "\20" "\1InProgress" "\2DeviceChange"); - mpr_dprint_field(sc, MPR_EVENT, "ReasonCode: %s\n", + mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sasdisc_reason, data->ReasonCode)); - MPR_EVENTFIELD(sc, data, PhysicalPort, %d); - mpr_dprint_field(sc, MPR_EVENT, "DiscoveryStatus: %b\n", + MPR_PRINTFIELD(sc, data, PhysicalPort, %d); + mpr_print_field(sc, "DiscoveryStatus: %b\n", data->DiscoveryStatus, "\20" "\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" "\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" @@ -324,26 +323,26 @@ mpr_print_evt_sas(struct mpr_softc *sc, data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) &event->EventData; - MPR_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); - MPR_EVENTFIELD(sc, data, ExpanderDevHandle, 0x%x); - MPR_EVENTFIELD(sc, data, NumPhys, %d); - MPR_EVENTFIELD(sc, data, NumEntries, %d); - MPR_EVENTFIELD(sc, data, StartPhyNum, %d); - mpr_dprint_field(sc, MPR_EVENT, "ExpStatus: %s (0x%x)\n", + MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + MPR_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); + MPR_PRINTFIELD(sc, data, NumPhys, %d); + MPR_PRINTFIELD(sc, data, NumEntries, %d); + MPR_PRINTFIELD(sc, data, StartPhyNum, %d); + mpr_print_field(sc, "ExpStatus: %s (0x%x)\n", mpr_describe_table(mpr_sastopo_exp, data->ExpStatus), data->ExpStatus); - MPR_EVENTFIELD(sc, data, PhysicalPort, %d); + MPR_PRINTFIELD(sc, data, PhysicalPort, %d); for (i = 0; i < data->NumEntries; i++) { phy = &data->PHY[i]; phynum = data->StartPhyNum + i; - mpr_dprint_field(sc, MPR_EVENT, + mpr_print_field(sc, "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, phy->AttachedDevHandle); - mpr_dprint_field(sc, MPR_EVENT, + mpr_print_field(sc, "PHY[%d].LinkRate: %s (0x%x)\n", phynum, mpr_describe_table(mpr_linkrate_names, (phy->LinkRate >> 4) & 0xf), phy->LinkRate); - mpr_dprint_field(sc,MPR_EVENT,"PHY[%d].PhyStatus: %s\n", + mpr_print_field(sc, "PHY[%d].PhyStatus: %s\n", phynum, mpr_describe_table(mpr_phystatus_names, phy->PhyStatus)); } @@ -355,13 +354,13 @@ mpr_print_evt_sas(struct mpr_softc *sc, data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) &event->EventData; - MPR_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); - mpr_dprint_field(sc, MPR_EVENT, "ReasonCode: %s\n", + MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sastopo_exp, data->ReasonCode)); - MPR_EVENTFIELD(sc, data, PhysicalPort, %d); - MPR_EVENTFIELD(sc, data, NumSlots, %d); - MPR_EVENTFIELD(sc, data, StartSlot, %d); - MPR_EVENTFIELD(sc, data, PhyBits, 0x%x); + MPR_PRINTFIELD(sc, data, PhysicalPort, %d); + MPR_PRINTFIELD(sc, data, NumSlots, %d); + MPR_PRINTFIELD(sc, data, StartSlot, %d); + MPR_PRINTFIELD(sc, data, PhyBits, 0x%x); break; } case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: @@ -370,13 +369,13 @@ mpr_print_evt_sas(struct mpr_softc *sc, data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) &event->EventData; - MPR_EVENTFIELD(sc, data, TaskTag, 0x%x); - mpr_dprint_field(sc, MPR_EVENT, "ReasonCode: %s\n", + MPR_PRINTFIELD(sc, data, TaskTag, 0x%x); + mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sasdev_reason, data->ReasonCode)); - MPR_EVENTFIELD(sc, data, ASC, 0x%x); - MPR_EVENTFIELD(sc, data, ASCQ, 0x%x); - MPR_EVENTFIELD(sc, data, DevHandle, 0x%x); - mpr_dprint_field(sc, MPR_EVENT, "SASAddress: 0x%jx\n", + MPR_PRINTFIELD(sc, data, ASC, 0x%x); + MPR_PRINTFIELD(sc, data, ASCQ, 0x%x); + MPR_PRINTFIELD(sc, data, DevHandle, 0x%x); + mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&data->SASAddress)); } default: @@ -385,24 +384,24 @@ mpr_print_evt_sas(struct mpr_softc *sc, } void -mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +_mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) { MPR_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, NumPhys, %d); MPR_PRINTFIELD(sc, buf, Phy, %d); MPR_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); - mpr_dprint_field(sc, MPR_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); - mpr_dprint_field(sc, MPR_XINFO, "HwLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); - mpr_dprint_field(sc, MPR_XINFO, "PhyInfo Reason: %s (0x%x)\n", + mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); - mpr_dprint_field(sc, MPR_XINFO, "AttachedDeviceInfo: %b,%s\n", + mpr_print_field(sc, "AttachedDeviceInfo: %b,%s\n", buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", @@ -410,14 +409,14 @@ mpr_print_expander1(struct mpr_softc *sc buf->AttachedDeviceInfo & 0x03)); MPR_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, ChangeCount, %d); - mpr_dprint_field(sc, MPR_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); MPR_PRINTFIELD(sc, buf, PhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); MPR_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); - mpr_dprint_field(sc, MPR_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", + mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); @@ -425,27 +424,27 @@ mpr_print_expander1(struct mpr_softc *sc } void -mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +_mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); MPR_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); - mpr_dprint_field(sc, MPR_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", + mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); - mpr_dprint_field(sc, MPR_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); - mpr_dprint_field(sc, MPR_XINFO, "HwLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); MPR_PRINTFIELD(sc, buf, ChangeCount, %d); MPR_PRINTFIELD(sc, buf, Flags, 0x%x); - mpr_dprint_field(sc, MPR_XINFO, "PhyInfo Reason: %s (0x%x)\n", + mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); - mpr_dprint_field(sc, MPR_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", + mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); } Modified: head/sys/dev/mpr/mpr_table.h ============================================================================== --- head/sys/dev/mpr/mpr_table.h Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mpr/mpr_table.h Thu Jan 19 21:47:50 2017 (r312437) @@ -41,13 +41,63 @@ extern struct mpr_table_lookup mpr_event extern struct mpr_table_lookup mpr_phystatus_names[]; extern struct mpr_table_lookup mpr_linkrate_names[]; -void mpr_print_iocfacts(struct mpr_softc *, MPI2_IOC_FACTS_REPLY *); -void mpr_print_portfacts(struct mpr_softc *, MPI2_PORT_FACTS_REPLY *); -void mpr_print_event(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void mpr_print_sasdev0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); -void mpr_print_evt_sas(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void mpr_print_expander1(struct mpr_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); -void mpr_print_sasphy0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); +void _mpr_print_iocfacts(struct mpr_softc *, MPI2_IOC_FACTS_REPLY *); +void _mpr_print_portfacts(struct mpr_softc *, MPI2_PORT_FACTS_REPLY *); +void _mpr_print_event(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void _mpr_print_sasdev0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); +void _mpr_print_evt_sas(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void _mpr_print_expander1(struct mpr_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); +void _mpr_print_sasphy0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); void mpr_print_sgl(struct mpr_softc *, struct mpr_command *, int); void mpr_print_scsiio_cmd(struct mpr_softc *, struct mpr_command *); + +static __inline void +mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +{ + if (sc->mpr_debug & MPR_XINFO) + _mpr_print_iocfacts(sc, facts); +} + +static __inline void +mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +{ + if (sc->mpr_debug & MPR_XINFO) + _mpr_print_portfacts(sc, facts); +} + +static __inline void +mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +{ + if (sc->mpr_debug & MPR_EVENT) + _mpr_print_event(sc, event); +} + +static __inline void +mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +{ + if (sc->mpr_debug & MPR_EVENT) + _mpr_print_evt_sas(sc, event); +} + +static __inline void +mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +{ + if (sc->mpr_debug & MPR_XINFO) + _mpr_print_sasdev0(sc, buf); +} + +static __inline void +mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +{ + if (sc->mpr_debug & MPR_XINFO) + _mpr_print_expander1(sc, buf); +} + +static __inline void +mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +{ + if (sc->mpr_debug & MPR_XINFO) + _mpr_print_sasphy0(sc, buf); +} + #endif Modified: head/sys/dev/mpr/mprvar.h ============================================================================== --- head/sys/dev/mpr/mprvar.h Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mpr/mprvar.h Thu Jan 19 21:47:50 2017 (r312437) @@ -584,6 +584,9 @@ mpr_unlock(struct mpr_softc *sc) #define mpr_printf(sc, args...) \ device_printf((sc)->mpr_dev, ##args) +#define mpr_print_field(sc, msg, args...) \ + printf("\t" msg, ##args) + #define mpr_vprintf(sc, args...) \ do { \ if (bootverbose) \ @@ -596,25 +599,13 @@ do { \ device_printf((sc)->mpr_dev, msg, ##args); \ } while (0) -#define mpr_dprint_field(sc, level, msg, args...) \ -do { \ - if ((sc)->mpr_debug & (level)) \ - printf("\t" msg, ##args); \ -} while (0) - #define MPR_PRINTFIELD_START(sc, tag...) \ - mpr_dprint((sc), MPR_INFO, ##tag); \ - mpr_dprint_field((sc), MPR_INFO, ":\n") + mpr_printf((sc), ##tag); \ + mpr_print_field((sc), ":\n") #define MPR_PRINTFIELD_END(sc, tag) \ - mpr_dprint((sc), MPR_INFO, tag "\n") + mpr_printf((sc), tag "\n") #define MPR_PRINTFIELD(sc, facts, attr, fmt) \ - mpr_dprint_field((sc), MPR_INFO, #attr ": " #fmt "\n", (facts)->attr) - -#define MPR_EVENTFIELD_START(sc, tag...) \ - mpr_dprint((sc), MPR_EVENT, ##tag); \ - mpr_dprint_field((sc), MPR_EVENT, ":\n") -#define MPR_EVENTFIELD(sc, facts, attr, fmt) \ - mpr_dprint_field((sc), MPR_EVENT, #attr ": " #fmt "\n", (facts)->attr) + mpr_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) static __inline void mpr_from_u64(uint64_t data, U64 *mpr) Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mps/mps_sas.c Thu Jan 19 21:47:50 2017 (r312437) @@ -347,7 +347,7 @@ mpssas_log_command(struct mps_command *c sbuf_printf(&sb, "SMID %u ", cm->cm_desc.Default.SMID); sbuf_vprintf(&sb, fmt, ap); sbuf_finish(&sb); - mps_dprint_field(cm->cm_sc, level, "%s", sbuf_data(&sb)); + mps_print_field(cm->cm_sc, "%s", sbuf_data(&sb)); va_end(ap); } Modified: head/sys/dev/mps/mps_table.c ============================================================================== --- head/sys/dev/mps/mps_table.c Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mps/mps_table.c Thu Jan 19 21:47:50 2017 (r312437) @@ -196,7 +196,7 @@ mps_describe_devinfo(uint32_t devinfo, c } void -mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +_mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPS_PRINTFIELD_START(sc, "IOCFacts"); @@ -205,18 +205,18 @@ mps_print_iocfacts(struct mps_softc *sc, MPS_PRINTFIELD(sc, facts, IOCNumber, %d); MPS_PRINTFIELD(sc, facts, IOCExceptions, 0x%x); MPS_PRINTFIELD(sc, facts, MaxChainDepth, %d); - mps_dprint_field(sc, MPS_XINFO, "WhoInit: %s\n", + mps_print_field(sc, "WhoInit: %s\n", mps_describe_table(mps_whoinit_names, facts->WhoInit)); MPS_PRINTFIELD(sc, facts, NumberOfPorts, %d); MPS_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); MPS_PRINTFIELD(sc, facts, RequestCredit, %d); MPS_PRINTFIELD(sc, facts, ProductID, 0x%x); - mps_dprint_field(sc, MPS_XINFO, "IOCCapabilities: %b\n", + mps_print_field(sc, "IOCCapabilities: %b\n", facts->IOCCapabilities, "\20" "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc"); - mps_dprint_field(sc, MPS_XINFO, "FWVersion= %d-%d-%d-%d\n", + mps_print_field(sc, "FWVersion= %d-%d-%d-%d\n", facts->FWVersion.Struct.Major, facts->FWVersion.Struct.Minor, facts->FWVersion.Struct.Unit, @@ -226,7 +226,7 @@ mps_print_iocfacts(struct mps_softc *sc, MPS_PRINTFIELD(sc, facts, MaxTargets, %d); MPS_PRINTFIELD(sc, facts, MaxSasExpanders, %d); MPS_PRINTFIELD(sc, facts, MaxEnclosures, %d); - mps_dprint_field(sc, MPS_XINFO, "ProtocolFlags: %b\n", + mps_print_field(sc, "ProtocolFlags: %b\n", facts->ProtocolFlags, "\20" "\1ScsiTarg" "\2ScsiInit"); MPS_PRINTFIELD(sc, facts, HighPriorityCredit, %d); MPS_PRINTFIELD(sc, facts, MaxReplyDescriptorPostQueueDepth, %d); @@ -237,7 +237,7 @@ mps_print_iocfacts(struct mps_softc *sc, } void -mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +_mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) { MPS_PRINTFIELD_START(sc, "PortFacts"); @@ -247,24 +247,24 @@ mps_print_portfacts(struct mps_softc *sc } void -mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +_mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - MPS_EVENTFIELD_START(sc, "EventReply"); - MPS_EVENTFIELD(sc, event, EventDataLength, %d); - MPS_EVENTFIELD(sc, event, AckRequired, %d); - mps_dprint_field(sc, MPS_EVENT, "Event: %s (0x%x)\n", + MPS_PRINTFIELD_START(sc, "EventReply"); + MPS_PRINTFIELD(sc, event, EventDataLength, %d); + MPS_PRINTFIELD(sc, event, AckRequired, %d); + mps_print_field(sc, "Event: %s (0x%x)\n", mps_describe_table(mps_event_names, event->Event), event->Event); - MPS_EVENTFIELD(sc, event, EventContext, 0x%x); + MPS_PRINTFIELD(sc, event, EventContext, 0x%x); } void -mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +_mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPS_PRINTFIELD_START(sc, "SAS Device Page 0"); MPS_PRINTFIELD(sc, buf, Slot, %d); MPS_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); - mps_dprint_field(sc, MPS_XINFO, "SASAddress: 0x%jx\n", + mps_print_field(sc, "SASAddress: 0x%jx\n", mps_to_u64(&buf->SASAddress)); MPS_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); MPS_PRINTFIELD(sc, buf, PhyNum, %d); @@ -272,7 +272,7 @@ mps_print_sasdev0(struct mps_softc *sc, MPS_PRINTFIELD(sc, buf, DevHandle, 0x%x); MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); - mps_dprint_field(sc, MPS_XINFO, "DeviceInfo: %b,%s\n", buf->DeviceInfo, + mps_print_field(sc, "DeviceInfo: %b,%s\n", buf->DeviceInfo, "\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" "\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" "\15LsiDev" "\16AtapiDev" "\17SepDev", @@ -280,7 +280,7 @@ mps_print_sasdev0(struct mps_softc *sc, MPS_PRINTFIELD(sc, buf, Flags, 0x%x); MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); MPS_PRINTFIELD(sc, buf, MaxPortConnections, %d); - mps_dprint_field(sc, MPS_XINFO, "DeviceName: 0x%jx\n", + mps_print_field(sc, "DeviceName: 0x%jx\n", mps_to_u64(&buf->DeviceName)); MPS_PRINTFIELD(sc, buf, PortGroups, %d); MPS_PRINTFIELD(sc, buf, DmaGroup, %d); @@ -288,10 +288,10 @@ mps_print_sasdev0(struct mps_softc *sc, } void -mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +_mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - mps_print_event(sc, event); + _mps_print_event(sc, event); switch(event->Event) { case MPI2_EVENT_SAS_DISCOVERY: @@ -299,12 +299,12 @@ mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_DATA_SAS_DISCOVERY *data; data = (MPI2_EVENT_DATA_SAS_DISCOVERY *)&event->EventData; - mps_dprint_field(sc, MPS_EVENT, "Flags: %b\n", data->Flags, + mps_print_field(sc, "Flags: %b\n", data->Flags, "\20" "\1InProgress" "\2DeviceChange"); - mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", + mps_print_field(sc, "ReasonCode: %s\n", mps_describe_table(mps_sasdisc_reason, data->ReasonCode)); - MPS_EVENTFIELD(sc, data, PhysicalPort, %d); - mps_dprint_field(sc, MPS_EVENT, "DiscoveryStatus: %b\n", + MPS_PRINTFIELD(sc, data, PhysicalPort, %d); + mps_print_field(sc, "DiscoveryStatus: %b\n", data->DiscoveryStatus, "\20" "\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" "\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" @@ -323,26 +323,26 @@ mps_print_evt_sas(struct mps_softc *sc, data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) &event->EventData; - MPS_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); - MPS_EVENTFIELD(sc, data, ExpanderDevHandle, 0x%x); - MPS_EVENTFIELD(sc, data, NumPhys, %d); - MPS_EVENTFIELD(sc, data, NumEntries, %d); - MPS_EVENTFIELD(sc, data, StartPhyNum, %d); - mps_dprint_field(sc, MPS_EVENT, "ExpStatus: %s (0x%x)\n", + MPS_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + MPS_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); + MPS_PRINTFIELD(sc, data, NumPhys, %d); + MPS_PRINTFIELD(sc, data, NumEntries, %d); + MPS_PRINTFIELD(sc, data, StartPhyNum, %d); + mps_print_field(sc, "ExpStatus: %s (0x%x)\n", mps_describe_table(mps_sastopo_exp, data->ExpStatus), data->ExpStatus); - MPS_EVENTFIELD(sc, data, PhysicalPort, %d); + MPS_PRINTFIELD(sc, data, PhysicalPort, %d); for (i = 0; i < data->NumEntries; i++) { phy = &data->PHY[i]; phynum = data->StartPhyNum + i; - mps_dprint_field(sc, MPS_EVENT, + mps_print_field(sc, "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, phy->AttachedDevHandle); - mps_dprint_field(sc, MPS_EVENT, + mps_print_field(sc, "PHY[%d].LinkRate: %s (0x%x)\n", phynum, mps_describe_table(mps_linkrate_names, (phy->LinkRate >> 4) & 0xf), phy->LinkRate); - mps_dprint_field(sc,MPS_EVENT,"PHY[%d].PhyStatus: %s\n", + mps_print_field(sc, "PHY[%d].PhyStatus: %s\n", phynum, mps_describe_table(mps_phystatus_names, phy->PhyStatus)); } @@ -354,13 +354,13 @@ mps_print_evt_sas(struct mps_softc *sc, data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) &event->EventData; - MPS_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); - mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", + MPS_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + mps_print_field(sc, "ReasonCode: %s\n", mps_describe_table(mps_sastopo_exp, data->ReasonCode)); - MPS_EVENTFIELD(sc, data, PhysicalPort, %d); - MPS_EVENTFIELD(sc, data, NumSlots, %d); - MPS_EVENTFIELD(sc, data, StartSlot, %d); - MPS_EVENTFIELD(sc, data, PhyBits, 0x%x); + MPS_PRINTFIELD(sc, data, PhysicalPort, %d); + MPS_PRINTFIELD(sc, data, NumSlots, %d); + MPS_PRINTFIELD(sc, data, StartSlot, %d); + MPS_PRINTFIELD(sc, data, PhyBits, 0x%x); break; } case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: @@ -369,13 +369,13 @@ mps_print_evt_sas(struct mps_softc *sc, data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) &event->EventData; - MPS_EVENTFIELD(sc, data, TaskTag, 0x%x); - mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", + MPS_PRINTFIELD(sc, data, TaskTag, 0x%x); + mps_print_field(sc, "ReasonCode: %s\n", mps_describe_table(mps_sasdev_reason, data->ReasonCode)); - MPS_EVENTFIELD(sc, data, ASC, 0x%x); - MPS_EVENTFIELD(sc, data, ASCQ, 0x%x); - MPS_EVENTFIELD(sc, data, DevHandle, 0x%x); - mps_dprint_field(sc, MPS_EVENT, "SASAddress: 0x%jx\n", + MPS_PRINTFIELD(sc, data, ASC, 0x%x); + MPS_PRINTFIELD(sc, data, ASCQ, 0x%x); + MPS_PRINTFIELD(sc, data, DevHandle, 0x%x); + mps_print_field(sc, "SASAddress: 0x%jx\n", mps_to_u64(&data->SASAddress)); } default: @@ -384,24 +384,24 @@ mps_print_evt_sas(struct mps_softc *sc, } void -mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +_mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) { MPS_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); MPS_PRINTFIELD(sc, buf, NumPhys, %d); MPS_PRINTFIELD(sc, buf, Phy, %d); MPS_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); - mps_dprint_field(sc, MPS_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", + mps_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); - mps_dprint_field(sc, MPS_XINFO, "HwLinkRate: %s (0x%x)\n", + mps_print_field(sc, "HwLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); - mps_dprint_field(sc, MPS_XINFO, "PhyInfo Reason: %s (0x%x)\n", + mps_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mps_describe_table(mps_phyinfo_reason_names, (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); - mps_dprint_field(sc, MPS_XINFO, "AttachedDeviceInfo: %b,%s\n", + mps_print_field(sc, "AttachedDeviceInfo: %b,%s\n", buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", @@ -409,14 +409,14 @@ mps_print_expander1(struct mps_softc *sc buf->AttachedDeviceInfo & 0x03)); MPS_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); MPS_PRINTFIELD(sc, buf, ChangeCount, %d); - mps_dprint_field(sc, MPS_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", + mps_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); MPS_PRINTFIELD(sc, buf, PhyIdentifier, %d); MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); MPS_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); MPS_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); - mps_dprint_field(sc, MPS_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", + mps_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mps_describe_table(mps_phyinfo_reason_names, buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); @@ -424,27 +424,27 @@ mps_print_expander1(struct mps_softc *sc } void -mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +_mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPS_PRINTFIELD_START(sc, "SAS PHY Page 0"); MPS_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); - mps_dprint_field(sc, MPS_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", + mps_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mps_describe_table(mps_phyinfo_reason_names, buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); - mps_dprint_field(sc, MPS_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", + mps_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); - mps_dprint_field(sc, MPS_XINFO, "HwLinkRate: %s (0x%x)\n", + mps_print_field(sc, "HwLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); MPS_PRINTFIELD(sc, buf, ChangeCount, %d); MPS_PRINTFIELD(sc, buf, Flags, 0x%x); - mps_dprint_field(sc, MPS_XINFO, "PhyInfo Reason: %s (0x%x)\n", + mps_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mps_describe_table(mps_phyinfo_reason_names, (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); - mps_dprint_field(sc, MPS_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", + mps_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mps_describe_table(mps_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); } Modified: head/sys/dev/mps/mps_table.h ============================================================================== --- head/sys/dev/mps/mps_table.h Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mps/mps_table.h Thu Jan 19 21:47:50 2017 (r312437) @@ -41,13 +41,63 @@ extern struct mps_table_lookup mps_event extern struct mps_table_lookup mps_phystatus_names[]; extern struct mps_table_lookup mps_linkrate_names[]; -void mps_print_iocfacts(struct mps_softc *, MPI2_IOC_FACTS_REPLY *); -void mps_print_portfacts(struct mps_softc *, MPI2_PORT_FACTS_REPLY *); -void mps_print_event(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void mps_print_sasdev0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); -void mps_print_evt_sas(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void mps_print_expander1(struct mps_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); -void mps_print_sasphy0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); +void _mps_print_iocfacts(struct mps_softc *, MPI2_IOC_FACTS_REPLY *); +void _mps_print_portfacts(struct mps_softc *, MPI2_PORT_FACTS_REPLY *); +void _mps_print_event(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void _mps_print_sasdev0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); +void _mps_print_evt_sas(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void _mps_print_expander1(struct mps_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); +void _mps_print_sasphy0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); void mps_print_sgl(struct mps_softc *, struct mps_command *, int); void mps_print_scsiio_cmd(struct mps_softc *, struct mps_command *); + +static __inline void +mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +{ + if (sc->mps_debug & MPS_XINFO) + _mps_print_iocfacts(sc, facts); +} + +static __inline void +mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +{ + if (sc->mps_debug & MPS_XINFO) + _mps_print_portfacts(sc, facts); +} + +static __inline void +mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +{ + if (sc->mps_debug & MPS_EVENT) + _mps_print_event(sc, event); +} + +static __inline void +mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +{ + if (sc->mps_debug & MPS_XINFO) + _mps_print_sasdev0(sc, buf); +} + +static __inline void +mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +{ + if (sc->mps_debug & MPS_EVENT) + _mps_print_evt_sas(sc, event); +} + +static __inline void +mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +{ + if (sc->mps_debug & MPS_XINFO) + _mps_print_expander1(sc, buf); +} + +static __inline void +mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +{ + if (sc->mps_debug & MPS_XINFO) + _mps_print_sasphy0(sc, buf); +} + #endif Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Thu Jan 19 20:44:29 2017 (r312436) +++ head/sys/dev/mps/mpsvar.h Thu Jan 19 21:47:50 2017 (r312437) @@ -609,6 +609,9 @@ mps_unlock(struct mps_softc *sc) #define mps_printf(sc, args...) \ device_printf((sc)->mps_dev, ##args) +#define mps_print_field(sc, msg, args...) \ + printf("\t" msg, ##args) + #define mps_vprintf(sc, args...) \ do { \ if (bootverbose) \ @@ -621,25 +624,13 @@ do { \ device_printf((sc)->mps_dev, msg, ##args); \ } while (0) -#define mps_dprint_field(sc, level, msg, args...) \ -do { \ - if ((sc)->mps_debug & (level)) \ - printf("\t" msg, ##args); \ -} while (0) - #define MPS_PRINTFIELD_START(sc, tag...) \ - mps_dprint((sc), MPS_XINFO, ##tag); \ - mps_dprint_field((sc), MPS_XINFO, ":\n") + mps_printf((sc), ##tag); \ + mps_print_field((sc), ":\n") #define MPS_PRINTFIELD_END(sc, tag) \ - mps_dprint((sc), MPS_XINFO, tag "\n") + mps_printf((sc), tag "\n") #define MPS_PRINTFIELD(sc, facts, attr, fmt) \ - mps_dprint_field((sc), MPS_XINFO, #attr ": " #fmt "\n", (facts)->attr) - -#define MPS_EVENTFIELD_START(sc, tag...) \ - mps_dprint((sc), MPS_EVENT, ##tag); \ - mps_dprint_field((sc), MPS_EVENT, ":\n") -#define MPS_EVENTFIELD(sc, facts, attr, fmt) \ - mps_dprint_field((sc), MPS_EVENT, #attr ": " #fmt "\n", (facts)->attr) + mps_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) #define MPS_FUNCTRACE(sc) \ mps_dprint((sc), MPS_TRACE, "%s\n", __func__) From owner-svn-src-head@freebsd.org Thu Jan 19 22:07:32 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 64866CB8661; Thu, 19 Jan 2017 22:07:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E651E26; Thu, 19 Jan 2017 22:07:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JM7VVD063108; Thu, 19 Jan 2017 22:07:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JM7LaP063016; Thu, 19 Jan 2017 22:07:21 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201701192207.v0JM7LaP063016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 19 Jan 2017 22:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312438 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/events components/executer components/hardware c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 19 Jan 2017 22:07:32 -0000 Author: jkim Date: Thu Jan 19 22:07:21 2017 New Revision: 312438 URL: https://svnweb.freebsd.org/changeset/base/312438 Log: Merge ACPICA 20170119. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/acgetline.c head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahids.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/common/cmfsize.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcstyle.y head/sys/contrib/dev/acpica/compiler/asldebug.c head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslfileio.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslhex.c head/sys/contrib/dev/acpica/compiler/aslkeywords.y head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/asllistsup.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmapenter.c head/sys/contrib/dev/acpica/compiler/aslmapoutput.c head/sys/contrib/dev/acpica/compiler/aslmaputils.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslnamesp.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslpld.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/aslprintf.c head/sys/contrib/dev/acpica/compiler/aslprune.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/aslsupport.y head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/asluuid.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/aslxrefout.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtexpress.c head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/dttable2.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prexpress.c head/sys/contrib/dev/acpica/compiler/prmacros.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbhistry.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbobject.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbtest.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/components/disassembler/dmutils.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evglock.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evgpeutil.c head/sys/contrib/dev/acpica/components/events/evhandler.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evsci.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/events/evxfregn.c head/sys/contrib/dev/acpica/components/executer/exconcat.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfield.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exmutex.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exoparg6.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/executer/exresnte.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exstoren.c head/sys/contrib/dev/acpica/components/executer/exstorob.c head/sys/contrib/dev/acpica/components/executer/exsystem.c head/sys/contrib/dev/acpica/components/executer/extrace.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwacpi.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwtimer.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/hardware/hwxface.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsarguments.c head/sys/contrib/dev/acpica/components/namespace/nsconvert.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nswalk.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psscope.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/parser/pswalk.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsio.c head/sys/contrib/dev/acpica/components/resources/rsirq.c head/sys/contrib/dev/acpica/components/resources/rslist.c head/sys/contrib/dev/acpica/components/resources/rsmemory.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utalloc.c head/sys/contrib/dev/acpica/components/utilities/utascii.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utcache.c head/sys/contrib/dev/acpica/components/utilities/utcopy.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/uterror.c head/sys/contrib/dev/acpica/components/utilities/uteval.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utlock.c head/sys/contrib/dev/acpica/components/utilities/utmath.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utnonansi.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/utstring.c head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utuuid.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acbuffer.h head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/acuuid.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acenvex.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/include/platform/acgccex.h head/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 19 22:07:21 2017 (r312438) @@ -1,4 +1,39 @@ ---------------------------------------- +19 January 2017. Summary of changes for version 20170119: + +This release is available at https://acpica.org/downloads + +1) General ACPICA software: + +Entire source code base: Added the 2017 copyright to all source code +legal/licensing module headers and utility/tool signons. This includes +the standard Linux dual-license header. This affects virtually every file +in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and +the ACPICA test suite. + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Removed/fixed an inadvertent remark when a method argument +containing a reference is used as a target operand within the method (and +never used as a simple argument), as in the example below. Jeffrey Hugo. + + dsdt.asl 1507: Store(0x1, Arg0) + Remark 2146 - ^ Method Argument is never used (Arg0) + +All tools: Removed the bit width of the compiler that generated the tool +from the common signon for all user space tools. This proved to be +confusing and unnecessary. This includes similar removal of HARDWARE_NAME +from the generic makefiles (Thomas Petazzoni). Example below. + + Old: + ASL+ Optimizing Compiler version 20170119-32 + ASL+ Optimizing Compiler version 20170119-64 + + New: + ASL+ Optimizing Compiler version 20170119 + +---------------------------------------- 22 December 2016. Summary of changes for version 20161222: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/acfileio.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/acgetline.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acgetline.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/acgetline.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/ahids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahids.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/ahids.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/cmfsize.c ============================================================================== --- head/sys/contrib/dev/acpica/common/cmfsize.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/cmfsize.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmtables.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslascii.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslascii.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslascii.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslbtypes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslbtypes.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslbtypes.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcstyle.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asldebug.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldebug.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asldebug.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +48,7 @@ /* * Compiler versions and names */ -#define ASL_COMPILER_NAME "ASL+ Optimizing Compiler" +#define ASL_COMPILER_NAME "ASL+ Optimizing Compiler/Disassembler" #define AML_DISASSEMBLER_NAME "AML/ASL+ Disassembler" #define ASL_INVOCATION_NAME "iasl" #define ASL_CREATOR_ID "INTL" Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfileio.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslfileio.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslfold.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelp.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslhelpers.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelpers.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslhex.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhex.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslhex.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslkeywords.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslkeywords.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslkeywords.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asllistsup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllistsup.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asllistsup.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmapenter.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapenter.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmapenter.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmapoutput.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmaputils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmaputils.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmaputils.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslnamesp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslnamesp.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslnamesp.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asloffset.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloffset.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asloffset.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslparser.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparser.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslparser.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslpld.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpld.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslpld.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslprepkg.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprepkg.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslprepkg.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslprimaries.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprimaries.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslprimaries.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslprintf.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprintf.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslprintf.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslprune.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprune.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslprune.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslresource.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslresources.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresources.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslresources.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1i.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1i.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1i.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2d.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2e.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2q.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2q.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2q.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2s.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2s.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2s.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2w.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslrules.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrules.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslrules.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asltokens.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltokens.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asltokens.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asltree.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/asltypes.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.y Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asltypes.y Thu Jan 19 22:07:21 2017 (r312438) @@ -6,7 +6,7 @@ NoEcho(' *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -381,8 +381,8 @@ UtDisplaySummary ( { /* Compiler name and version number */ - FlPrintFile (FileId, "%s version %X%s\n\n", - ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH); + FlPrintFile (FileId, "%s version %X\n\n", + ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION); } /* Summary of main input and output files */ Modified: head/sys/contrib/dev/acpica/compiler/asluuid.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asluuid.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/asluuid.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2016, Intel Corp. + * Copyright (C) 2000 - 2017, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslwalks.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslwalks.c Thu Jan 19 21:47:50 2017 (r312437) +++ head/sys/contrib/dev/acpica/compiler/aslwalks.c Thu Jan 19 22:07:21 2017 (r312438) @@ -5,7 +5,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 20 00:02:13 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 3F399CB8CAE; Fri, 20 Jan 2017 00:02:13 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 017CB1A94; Fri, 20 Jan 2017 00:02:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K02CVV011787; Fri, 20 Jan 2017 00:02:12 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K02BhI011784; Fri, 20 Jan 2017 00:02:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701200002.v0K02BhI011784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 20 Jan 2017 00:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312443 - in head/sys: conf netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 00:02:13 -0000 Author: pfg Date: Fri Jan 20 00:02:11 2017 New Revision: 312443 URL: https://svnweb.freebsd.org/changeset/base/312443 Log: mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. There were several places where reference to compression were left unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID which is not defined in the tree and therefore were sure to break with INVARIANTS: comment them out. Reported by: Eugene Grosbein PR: 216265 MFC after: 3 days Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/netgraph/ng_mppc.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Jan 19 23:44:05 2017 (r312442) +++ head/sys/conf/NOTES Fri Jan 20 00:02:11 2017 (r312443) @@ -774,8 +774,7 @@ options NETGRAPH_IPFW options NETGRAPH_KSOCKET options NETGRAPH_L2TP options NETGRAPH_LMI -# MPPC compression requires proprietary files (not included) -#options NETGRAPH_MPPC_COMPRESSION +options NETGRAPH_MPPC_COMPRESSION options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_NETFLOW options NETGRAPH_NAT Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jan 19 23:44:05 2017 (r312442) +++ head/sys/conf/options Fri Jan 20 00:02:11 2017 (r312443) @@ -517,7 +517,6 @@ NETGRAPH_IPFW opt_netgraph.h NETGRAPH_KSOCKET opt_netgraph.h NETGRAPH_L2TP opt_netgraph.h NETGRAPH_LMI opt_netgraph.h -# MPPC compression requires proprietary files (not included) NETGRAPH_MPPC_COMPRESSION opt_netgraph.h NETGRAPH_MPPC_ENCRYPTION opt_netgraph.h NETGRAPH_NAT opt_netgraph.h Modified: head/sys/netgraph/ng_mppc.c ============================================================================== --- head/sys/netgraph/ng_mppc.c Thu Jan 19 23:44:05 2017 (r312442) +++ head/sys/netgraph/ng_mppc.c Fri Jan 20 00:02:11 2017 (r312443) @@ -66,7 +66,7 @@ #if !defined(NETGRAPH_MPPC_COMPRESSION) && !defined(NETGRAPH_MPPC_ENCRYPTION) #ifdef KLD_MODULE -/* XXX NETGRAPH_MPPC_COMPRESSION isn't functional yet */ +#define NETGRAPH_MPPC_COMPRESSION #define NETGRAPH_MPPC_ENCRYPTION #else /* This case is indicative of an error in sys/conf files */ @@ -81,7 +81,6 @@ static MALLOC_DEFINE(M_NETGRAPH_MPPC, "n #endif #ifdef NETGRAPH_MPPC_COMPRESSION -/* XXX this file doesn't exist yet, but hopefully someday it will... */ #include #endif #ifdef NETGRAPH_MPPC_ENCRYPTION @@ -543,7 +542,7 @@ err1: &destCnt, d->history, flags, 0); /* Check return value */ - KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); + /* KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); */ if ((rtn & MPPC_EXPANDED) == 0 && (rtn & MPPC_COMP_OK) == MPPC_COMP_OK) { outlen -= destCnt; @@ -805,7 +804,7 @@ failed: &sourceCnt, &destCnt, d->history, flags); /* Check return value */ - KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); + /* KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); */ if ((rtn & MPPC_DEST_EXHAUSTED) != 0 || (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) { log(LOG_ERR, "%s: decomp returned 0x%x", From owner-svn-src-head@freebsd.org Fri Jan 20 00:11:40 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 535B1CB53BC; Fri, 20 Jan 2017 00:11:40 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13FD3147D; Fri, 20 Jan 2017 00:11:40 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cUMnp-00005c-66; Fri, 20 Jan 2017 03:11:37 +0300 Date: Fri, 20 Jan 2017 03:11:37 +0300 From: Slawa Olhovchenkov To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312437 - in head/sys/dev: mpr mps Message-ID: <20170120001136.GG58505@zxy.spb.ru> References: <201701192147.v0JLlpp3054889@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701192147.v0JLlpp3054889@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false 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: Fri, 20 Jan 2017 00:11:40 -0000 On Thu, Jan 19, 2017 at 09:47:51PM +0000, Scott Long wrote: > Author: scottl > Date: Thu Jan 19 21:47:50 2017 > New Revision: 312437 > URL: https://svnweb.freebsd.org/changeset/base/312437 > > Log: > Rework the debug print API. Event printing no longer gets special handling. > All of the printing from the tables file now has wrappers so that the > handling is cleaner and it's possible to print something out (say, during > development) without having to fight the global debug flags. This re-org > will also make it easier to have the tables be compiled out at build time > if desired. > > Other than fixing some minor bugs, there are no user-visible changes from > this change Can you also do "atomics" print? Now debugs interleave w/ other outputs and line can split multiple times. From owner-svn-src-head@freebsd.org Fri Jan 20 02:10:00 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 B7AB1CB75E3; Fri, 20 Jan 2017 02:10:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7902C1E37; Fri, 20 Jan 2017 02:10:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K29xjw060832; Fri, 20 Jan 2017 02:09:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K29xu4060831; Fri, 20 Jan 2017 02:09:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701200209.v0K29xu4060831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Jan 2017 02:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312446 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 02:10:00 -0000 Author: emaste Date: Fri Jan 20 02:09:59 2017 New Revision: 312446 URL: https://svnweb.freebsd.org/changeset/base/312446 Log: libc: remove reference to nonexistent lib/locale directory As far as I can tell this was introduced in r72406 and updated in several subsequent revisions, but the lib/locale directory it referenced never existed. Reviewed by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9252 Modified: head/lib/libc/stdtime/Makefile.inc Modified: head/lib/libc/stdtime/Makefile.inc ============================================================================== --- head/lib/libc/stdtime/Makefile.inc Fri Jan 20 00:17:53 2017 (r312445) +++ head/lib/libc/stdtime/Makefile.inc Fri Jan 20 02:09:59 2017 (r312446) @@ -1,8 +1,7 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../locale \ - ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime +.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ time32.c From owner-svn-src-head@freebsd.org Fri Jan 20 03:14:19 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 730F6CB7971; Fri, 20 Jan 2017 03:14:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42A151385; Fri, 20 Jan 2017 03:14:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3EII5090513; Fri, 20 Jan 2017 03:14:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3EISc090512; Fri, 20 Jan 2017 03:14:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701200314.v0K3EISc090512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Jan 2017 03:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312450 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:14:19 -0000 Author: emaste Date: Fri Jan 20 03:14:18 2017 New Revision: 312450 URL: https://svnweb.freebsd.org/changeset/base/312450 Log: Remove obsolete /usr/lib/debug/usr/lib/private dir Missed in r282420 Reported by: dim Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Fri Jan 20 02:50:24 2017 (r312449) +++ head/etc/mtree/BSD.debug.dist Fri Jan 20 03:14:18 2017 (r312450) @@ -40,8 +40,6 @@ .. i18n .. - private - .. .. libexec bsdinstall From owner-svn-src-head@freebsd.org Fri Jan 20 03:23:27 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 20B37CB7C22; Fri, 20 Jan 2017 03:23:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D48301980; Fri, 20 Jan 2017 03:23:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3NPK3094427; Fri, 20 Jan 2017 03:23:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3NOBA094412; Fri, 20 Jan 2017 03:23:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200323.v0K3NOBA094412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312451 - in head/lib/libc: . aarch64/string arm/aeabi capability gdtoa gen iconv md posix1e regex/grot resolv stdlib/jemalloc stdtime string sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:23:27 -0000 Author: ngie Date: Fri Jan 20 03:23:24 2017 New Revision: 312451 URL: https://svnweb.freebsd.org/changeset/base/312451 Log: Replace dot-dot relative pathing with SRCTOP-relative paths where possible This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg MFC after: 1 week Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9207 Modified: head/lib/libc/Makefile head/lib/libc/aarch64/string/Makefile.inc head/lib/libc/arm/aeabi/Makefile.inc head/lib/libc/capability/Makefile.inc head/lib/libc/gdtoa/Makefile.inc head/lib/libc/gen/Makefile.inc head/lib/libc/iconv/Makefile.inc head/lib/libc/md/Makefile.inc head/lib/libc/posix1e/Makefile.inc head/lib/libc/regex/grot/Makefile head/lib/libc/resolv/Makefile.inc head/lib/libc/stdlib/jemalloc/Makefile.inc head/lib/libc/stdtime/Makefile.inc head/lib/libc/string/Makefile.inc head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/Makefile Fri Jan 20 03:23:24 2017 (r312451) @@ -36,7 +36,7 @@ SHLIB_LDSCRIPT=libc_nossp.ldscript .endif SHLIB_LDSCRIPT_LINKS=libxnet.so WARNS?= 2 -CFLAGS+=-I${LIBC_SRCTOP}/include -I${LIBC_SRCTOP}/../../include +CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS Modified: head/lib/libc/aarch64/string/Makefile.inc ============================================================================== --- head/lib/libc/aarch64/string/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/aarch64/string/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -4,7 +4,7 @@ # https://git.linaro.org/toolchain/cortex-strings.git # -.PATH: ${LIBC_SRCTOP}/../../contrib/cortex-strings/src/aarch64 +.PATH: ${SRCTOP}/contrib/cortex-strings/src/aarch64 MDSRCS+=memchr.S \ memcmp.S \ Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/arm/aeabi/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -21,7 +21,7 @@ SRCS+= aeabi_vfp_double.S \ # libc. This causes issues when other parts of libc call these functions. # We work around this by including these functions in libc but mark them as # hidden so users of libc will not pick up these versions. -.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/builtins/arm +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm SRCS+= aeabi_memcmp.S \ aeabi_memcpy.S \ Modified: head/lib/libc/capability/Makefile.inc ============================================================================== --- head/lib/libc/capability/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/capability/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -1,7 +1,7 @@ # $FreeBSD$ # capability sources -.PATH: ${LIBC_SRCTOP}/../../sys/kern ${LIBC_SRCTOP}/capability +.PATH: ${SRCTOP}/sys/kern ${LIBC_SRCTOP}/capability SRCS+= subr_capability.c Modified: head/lib/libc/gdtoa/Makefile.inc ============================================================================== --- head/lib/libc/gdtoa/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/gdtoa/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -10,11 +10,11 @@ GDTOASRCS+=dmisc.c dtoa.c gdtoa.c gethex SYM_MAPS+=${LIBC_SRCTOP}/gdtoa/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/gdtoa +CFLAGS+=-I${SRCTOP}/contrib/gdtoa .for src in ${GDTOASRCS} MISRCS+=gdtoa_${src} CLEANFILES+=gdtoa_${src} -gdtoa_${src}: ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} .NOMETA +gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/gen/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -152,11 +152,11 @@ SRCS+= fts-compat.c \ unvis-compat.c .endif -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-pwcache +.PATH: ${SRCTOP}/contrib/libc-pwcache SRCS+= pwcache.c pwcache.h -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-vis -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/libc-vis +.PATH: ${SRCTOP}/contrib/libc-vis +CFLAGS+= -I${SRCTOP}/contrib/libc-vis SRCS+= unvis.c vis.c MISRCS+=modf.c Modified: head/lib/libc/iconv/Makefile.inc ============================================================================== --- head/lib/libc/iconv/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/iconv/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -22,5 +22,5 @@ SRCS+= iconv_compat.c SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map .if ${MK_ICONV} == yes -.include "${LIBC_SRCTOP}/../libc_nonshared/Makefile.iconv" +.include "${SRCTOP}/lib/libc_nonshared/Makefile.iconv" .endif Modified: head/lib/libc/md/Makefile.inc ============================================================================== --- head/lib/libc/md/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/md/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/../libmd +.PATH: ${SRCTOP}/lib/libmd SRCS+= md5c.c Modified: head/lib/libc/posix1e/Makefile.inc ============================================================================== --- head/lib/libc/posix1e/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/posix1e/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -5,7 +5,7 @@ CFLAGS+=-D_ACL_PRIVATE # Copy kern/subr_acl_nfs4.c to the libc object directory. -subr_acl_nfs4.c: ${LIBC_SRCTOP}/../../sys/kern/subr_acl_nfs4.c +subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c cat ${.ALLSRC} > ${.TARGET} SRCS+= acl_branding.c \ Modified: head/lib/libc/regex/grot/Makefile ============================================================================== --- head/lib/libc/regex/grot/Makefile Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/regex/grot/Makefile Fri Jan 20 03:23:24 2017 (r312451) @@ -5,7 +5,7 @@ # Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's # for my use in some special contexts). -PATHS= ${.CURDIR:H} ${.CURDIR:H:H}/locale ${SRCTOP}/include +PATHS= ${LIBC_SRCTOP}/regex ${LIBC_SRCTOP}/locale ${SRCTOP}/include .PATH: ${PATHS} CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) Modified: head/lib/libc/resolv/Makefile.inc ============================================================================== --- head/lib/libc/resolv/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/resolv/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -9,4 +9,4 @@ SRCS+= herror.c h_errno.c mtctxres.c res SYM_MAPS+= ${LIBC_SRCTOP}/resolv/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../libmd +CFLAGS+=-I${SRCTOP}/lib/libmd Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/jemalloc/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/stdlib/jemalloc/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -9,18 +9,18 @@ JEMALLOCSRCS:= jemalloc.c arena.c atomic SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/jemalloc/include +CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} CLEANFILES+=jemalloc_${src} -jemalloc_${src}: ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} .NOMETA +jemalloc_${src}: ${SRCTOP}/contrib/jemalloc/src/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor MAN+=jemalloc.3 CLEANFILES+=jemalloc.3 -jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 .NOMETA +jemalloc.3: ${SRCTOP}/contrib/jemalloc/doc/jemalloc.3 .NOMETA ln -sf ${.ALLSRC} ${.TARGET} MLINKS+= \ Modified: head/lib/libc/stdtime/Makefile.inc ============================================================================== --- head/lib/libc/stdtime/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/stdtime/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -1,14 +1,14 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime +.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode/stdtime SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ time32.c SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime +CFLAGS+= -I${SRCTOP}/contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime CFLAGS.localtime.c= -fwrapv Modified: head/lib/libc/string/Makefile.inc ============================================================================== --- head/lib/libc/string/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/string/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -2,7 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string -.PATH: ${LIBC_SRCTOP}/../../sys/libkern +.PATH: ${SRCTOP}/sys/libkern CFLAGS+= -I${LIBC_SRCTOP}/locale Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri Jan 20 03:14:18 2017 (r312450) +++ head/lib/libc/sys/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) @@ -6,7 +6,7 @@ # Include the generated makefile containing the *complete* list # of syscall names in MIASM. -.include "${LIBC_SRCTOP}/../../sys/sys/syscall.mk" +.include "${SRCTOP}/sys/sys/syscall.mk" # Include machine dependent definitions. # From owner-svn-src-head@freebsd.org Fri Jan 20 03:27:49 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 1897ECB7CAF; Fri, 20 Jan 2017 03:27:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B71171B93; Fri, 20 Jan 2017 03:27:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3Rlbt094612; Fri, 20 Jan 2017 03:27:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3RlxG094608; Fri, 20 Jan 2017 03:27:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200327.v0K3RlxG094608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312452 - in head/lib/libpam/modules: . pam_passwdqc pam_ssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:27:49 -0000 Author: ngie Date: Fri Jan 20 03:27:47 2017 New Revision: 312452 URL: https://svnweb.freebsd.org/changeset/base/312452 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libpam/modules/Makefile.inc head/lib/libpam/modules/pam_passwdqc/Makefile head/lib/libpam/modules/pam_ssh/Makefile Modified: head/lib/libpam/modules/Makefile.inc ============================================================================== --- head/lib/libpam/modules/Makefile.inc Fri Jan 20 03:23:24 2017 (r312451) +++ head/lib/libpam/modules/Makefile.inc Fri Jan 20 03:27:47 2017 (r312452) @@ -1,11 +1,11 @@ # $FreeBSD$ -PAMDIR= ${.CURDIR}/../../../../contrib/openpam +PAMDIR= ${SRCTOP}/contrib/openpam MK_INSTALLLIB= no MK_PROFILE= no -CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam +CFLAGS+= -I${PAMDIR}/include -I${SRCTOP}/lib/libpam SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} LIBADD+= pam Modified: head/lib/libpam/modules/pam_passwdqc/Makefile ============================================================================== --- head/lib/libpam/modules/pam_passwdqc/Makefile Fri Jan 20 03:23:24 2017 (r312451) +++ head/lib/libpam/modules/pam_passwdqc/Makefile Fri Jan 20 03:27:47 2017 (r312452) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../../../contrib/pam_modules/pam_passwdqc +SRCDIR= ${SRCTOP}/contrib/pam_modules/pam_passwdqc .PATH: ${SRCDIR} LIB= pam_passwdqc Modified: head/lib/libpam/modules/pam_ssh/Makefile ============================================================================== --- head/lib/libpam/modules/pam_ssh/Makefile Fri Jan 20 03:23:24 2017 (r312451) +++ head/lib/libpam/modules/pam_ssh/Makefile Fri Jan 20 03:27:47 2017 (r312452) @@ -1,7 +1,7 @@ # PAM module for SSH # $FreeBSD$ -SSHDIR= ${.CURDIR}/../../../../crypto/openssh +SSHDIR= ${SRCTOP}/crypto/openssh LIB= pam_ssh MAN= pam_ssh.8 From owner-svn-src-head@freebsd.org Fri Jan 20 03:31:52 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 1BC28CB80E0; Fri, 20 Jan 2017 03:31:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF6E3104E; Fri, 20 Jan 2017 03:31:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3VpSa098492; Fri, 20 Jan 2017 03:31:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3VoR3098490; Fri, 20 Jan 2017 03:31:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200331.v0K3VoR3098490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312453 - in head/lib/libpam: libpam static_libpam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:31:52 -0000 Author: ngie Date: Fri Jan 20 03:31:50 2017 New Revision: 312453 URL: https://svnweb.freebsd.org/changeset/base/312453 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libpam/libpam/Makefile head/lib/libpam/static_libpam/Makefile Modified: head/lib/libpam/libpam/Makefile ============================================================================== --- head/lib/libpam/libpam/Makefile Fri Jan 20 03:27:47 2017 (r312452) +++ head/lib/libpam/libpam/Makefile Fri Jan 20 03:31:50 2017 (r312453) @@ -36,7 +36,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -OPENPAM= ${.CURDIR}/../../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man # static_libpam will build libpam.a Modified: head/lib/libpam/static_libpam/Makefile ============================================================================== --- head/lib/libpam/static_libpam/Makefile Fri Jan 20 03:27:47 2017 (r312452) +++ head/lib/libpam/static_libpam/Makefile Fri Jan 20 03:31:50 2017 (r312453) @@ -35,7 +35,7 @@ # # $FreeBSD$ -.PATH: ${.CURDIR}/../libpam +.PATH: ${SRCTOP}/lib/libpam # Only build the static library. LIB= pam @@ -66,4 +66,4 @@ CLEANFILES+= openpam_static.o \ openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} ${CC} -nostdlib ${CFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC} -.include "${.CURDIR}/../libpam/Makefile" +.include "${.CURDIR:H}/libpam/Makefile" From owner-svn-src-head@freebsd.org Fri Jan 20 03:35:00 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 B02FFCB816E; Fri, 20 Jan 2017 03:35:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2691293; Fri, 20 Jan 2017 03:35:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3YxmT098677; Fri, 20 Jan 2017 03:34:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3YxtO098674; Fri, 20 Jan 2017 03:34:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200334.v0K3YxtO098674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312454 - in head/lib/libalias: libalias modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:35:00 -0000 Author: ngie Date: Fri Jan 20 03:34:59 2017 New Revision: 312454 URL: https://svnweb.freebsd.org/changeset/base/312454 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libalias/libalias/Makefile head/lib/libalias/modules/Makefile head/lib/libalias/modules/Makefile.inc Modified: head/lib/libalias/libalias/Makefile ============================================================================== --- head/lib/libalias/libalias/Makefile Fri Jan 20 03:31:50 2017 (r312453) +++ head/lib/libalias/libalias/Makefile Fri Jan 20 03:34:59 2017 (r312454) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias PACKAGE=lib${LIB} LIB= alias Modified: head/lib/libalias/modules/Makefile ============================================================================== --- head/lib/libalias/modules/Makefile Fri Jan 20 03:31:50 2017 (r312453) +++ head/lib/libalias/modules/Makefile Fri Jan 20 03:34:59 2017 (r312454) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../../../sys/modules/libalias/modules/modules.inc" +.include "${SRCTOP}/sys/modules/libalias/modules/modules.inc" SUBDIR= ${MODULES} Modified: head/lib/libalias/modules/Makefile.inc ============================================================================== --- head/lib/libalias/modules/Makefile.inc Fri Jan 20 03:31:50 2017 (r312453) +++ head/lib/libalias/modules/Makefile.inc Fri Jan 20 03:34:59 2017 (r312454) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias SHLIBDIR?= /lib LIB?= alias_${NAME} From owner-svn-src-head@freebsd.org Fri Jan 20 03:52:18 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 54E83CB8668; Fri, 20 Jan 2017 03:52:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6811C98; Fri, 20 Jan 2017 03:52:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3qH9i006094; Fri, 20 Jan 2017 03:52:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3qGlV006085; Fri, 20 Jan 2017 03:52:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200352.v0K3qGlV006085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312455 - in head/lib/csu: aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:52:18 -0000 Author: ngie Date: Fri Jan 20 03:52:16 2017 New Revision: 312455 URL: https://svnweb.freebsd.org/changeset/base/312455 Log: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/csu/aarch64/Makefile head/lib/csu/amd64/Makefile head/lib/csu/arm/Makefile head/lib/csu/i386/Makefile head/lib/csu/mips/Makefile head/lib/csu/powerpc/Makefile head/lib/csu/powerpc64/Makefile head/lib/csu/riscv/Makefile head/lib/csu/sparc64/Makefile Modified: head/lib/csu/aarch64/Makefile ============================================================================== --- head/lib/csu/aarch64/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/aarch64/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/amd64/Makefile ============================================================================== --- head/lib/csu/amd64/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/amd64/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include CFLAGS+= -fno-omit-frame-pointer FILES= ${OBJS} Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/arm/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include STATIC_CFLAGS+= -mlong-calls FILES= ${OBJS} Modified: head/lib/csu/i386/Makefile ============================================================================== --- head/lib/csu/i386/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/i386/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= gcrt1.o crt1.o Scrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/mips/Makefile ============================================================================== --- head/lib/csu/mips/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/mips/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/powerpc/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/powerpc64/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include \ +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include \ -mlongcall # XXX: See the log for r232932 as to why the above -mlongcall is needed. Since Modified: head/lib/csu/riscv/Makefile ============================================================================== --- head/lib/csu/riscv/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/riscv/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/sparc64/Makefile ============================================================================== --- head/lib/csu/sparc64/Makefile Fri Jan 20 03:34:59 2017 (r312454) +++ head/lib/csu/sparc64/Makefile Fri Jan 20 03:52:16 2017 (r312455) @@ -1,11 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} From owner-svn-src-head@freebsd.org Fri Jan 20 03:54:38 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 182D1CB8780; Fri, 20 Jan 2017 03:54:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBFBB1E92; Fri, 20 Jan 2017 03:54:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3saGr007058; Fri, 20 Jan 2017 03:54:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3saJA007057; Fri, 20 Jan 2017 03:54:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200354.v0K3saJA007057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312456 - head/lib/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:54:38 -0000 Author: ngie Date: Fri Jan 20 03:54:36 2017 New Revision: 312456 URL: https://svnweb.freebsd.org/changeset/base/312456 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Fri Jan 20 03:52:16 2017 (r312455) +++ head/lib/libarchive/Makefile Fri Jan 20 03:54:36 2017 (r312456) @@ -2,7 +2,7 @@ .include PACKAGE=lib${LIB} -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive LIB= archive From owner-svn-src-head@freebsd.org Fri Jan 20 03:55:22 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 75987CB885E; Fri, 20 Jan 2017 03:55:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 457231040; Fri, 20 Jan 2017 03:55:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3tLg9007169; Fri, 20 Jan 2017 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3tLEI007168; Fri, 20 Jan 2017 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200355.v0K3tLEI007168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312457 - head/lib/libauditd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:55:22 -0000 Author: ngie Date: Fri Jan 20 03:55:21 2017 New Revision: 312457 URL: https://svnweb.freebsd.org/changeset/base/312457 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libauditd/Makefile Modified: head/lib/libauditd/Makefile ============================================================================== --- head/lib/libauditd/Makefile Fri Jan 20 03:54:36 2017 (r312456) +++ head/lib/libauditd/Makefile Fri Jan 20 03:55:21 2017 (r312457) @@ -3,7 +3,7 @@ # PACKAGE=lib${LIB} -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm _LIBAUDITDDIR= ${OPENBSMDIR}/libauditd _LIBBSMDIR= ${OPENBSMDIR}/libbsm From owner-svn-src-head@freebsd.org Fri Jan 20 03:55:44 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 84B63CB88BE; Fri, 20 Jan 2017 03:55:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EFE511BB; Fri, 20 Jan 2017 03:55:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3th7e007239; Fri, 20 Jan 2017 03:55:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3thtv007238; Fri, 20 Jan 2017 03:55:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200355.v0K3thtv007238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312458 - head/lib/libbegemot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:55:44 -0000 Author: ngie Date: Fri Jan 20 03:55:43 2017 New Revision: 312458 URL: https://svnweb.freebsd.org/changeset/base/312458 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libbegemot/Makefile Modified: head/lib/libbegemot/Makefile ============================================================================== --- head/lib/libbegemot/Makefile Fri Jan 20 03:55:21 2017 (r312457) +++ head/lib/libbegemot/Makefile Fri Jan 20 03:55:43 2017 (r312458) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBBEGEMOT_DIR=${.CURDIR}/../../contrib/libbegemot +LIBBEGEMOT_DIR=${SRCTOP}/contrib/libbegemot PACKAGE=lib${LIB} .PATH: ${LIBBEGEMOT_DIR} From owner-svn-src-head@freebsd.org Fri Jan 20 03:56:11 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 A0921CB8931; Fri, 20 Jan 2017 03:56:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 705191341; Fri, 20 Jan 2017 03:56:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3uAmh007307; Fri, 20 Jan 2017 03:56:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3uAc7007306; Fri, 20 Jan 2017 03:56:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200356.v0K3uAc7007306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312459 - head/lib/libblocksruntime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:56:11 -0000 Author: ngie Date: Fri Jan 20 03:56:10 2017 New Revision: 312459 URL: https://svnweb.freebsd.org/changeset/base/312459 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libblocksruntime/Makefile Modified: head/lib/libblocksruntime/Makefile ============================================================================== --- head/lib/libblocksruntime/Makefile Fri Jan 20 03:55:43 2017 (r312458) +++ head/lib/libblocksruntime/Makefile Fri Jan 20 03:56:10 2017 (r312459) @@ -6,7 +6,7 @@ SHLIB_MAJOR=0 CFLAGS+=-I${.CURDIR} WARNS?= 2 -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/BlocksRuntime +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/BlocksRuntime INCS= Block.h Block_private.h SRCS= data.c runtime.c From owner-svn-src-head@freebsd.org Fri Jan 20 03:56:43 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 68004CB89AB; Fri, 20 Jan 2017 03:56:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37C45152C; Fri, 20 Jan 2017 03:56:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3ugOS007380; Fri, 20 Jan 2017 03:56:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3ugfs007379; Fri, 20 Jan 2017 03:56:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200356.v0K3ugfs007379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312460 - head/lib/libbluetooth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:56:43 -0000 Author: ngie Date: Fri Jan 20 03:56:42 2017 New Revision: 312460 URL: https://svnweb.freebsd.org/changeset/base/312460 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libbluetooth/Makefile Modified: head/lib/libbluetooth/Makefile ============================================================================== --- head/lib/libbluetooth/Makefile Fri Jan 20 03:56:10 2017 (r312459) +++ head/lib/libbluetooth/Makefile Fri Jan 20 03:56:42 2017 (r312460) @@ -6,7 +6,7 @@ LIB= bluetooth MAN= bluetooth.3 WARNS?= 2 -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 4 From owner-svn-src-head@freebsd.org Fri Jan 20 03:57:26 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 F3FD3CB8A35; Fri, 20 Jan 2017 03:57:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E5516CF; Fri, 20 Jan 2017 03:57:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3vOZe007457; Fri, 20 Jan 2017 03:57:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3vOnr007456; Fri, 20 Jan 2017 03:57:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200357.v0K3vOnr007456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312461 - head/lib/libbsm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:57:26 -0000 Author: ngie Date: Fri Jan 20 03:57:24 2017 New Revision: 312461 URL: https://svnweb.freebsd.org/changeset/base/312461 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libbsm/Makefile Modified: head/lib/libbsm/Makefile ============================================================================== --- head/lib/libbsm/Makefile Fri Jan 20 03:56:42 2017 (r312460) +++ head/lib/libbsm/Makefile Fri Jan 20 03:57:24 2017 (r312461) @@ -3,7 +3,7 @@ # PACKAGE= lib${LIB} -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm _LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= bsm From owner-svn-src-head@freebsd.org Fri Jan 20 03:57:53 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 DCF1FCB8AAE; Fri, 20 Jan 2017 03:57:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACC12187E; Fri, 20 Jan 2017 03:57:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3vqU2007523; Fri, 20 Jan 2017 03:57:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3vqFl007522; Fri, 20 Jan 2017 03:57:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200357.v0K3vqFl007522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312462 - head/lib/libbsnmp/libbsnmp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:57:54 -0000 Author: ngie Date: Fri Jan 20 03:57:52 2017 New Revision: 312462 URL: https://svnweb.freebsd.org/changeset/base/312462 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libbsnmp/libbsnmp/Makefile Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Fri Jan 20 03:57:24 2017 (r312461) +++ head/lib/libbsnmp/libbsnmp/Makefile Fri Jan 20 03:57:52 2017 (r312462) @@ -4,7 +4,7 @@ .include -CONTRIB= ${.CURDIR}/../../../contrib/bsnmp/lib +CONTRIB= ${SRCTOP}/contrib/bsnmp/lib .PATH: ${CONTRIB} LIB= bsnmp From owner-svn-src-head@freebsd.org Fri Jan 20 03:58:51 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 A3036CB8B3C; Fri, 20 Jan 2017 03:58:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7302C1A27; Fri, 20 Jan 2017 03:58:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3wona007623; Fri, 20 Jan 2017 03:58:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3wo0C007622; Fri, 20 Jan 2017 03:58:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200358.v0K3wo0C007622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312463 - head/lib/libbz2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:58:51 -0000 Author: ngie Date: Fri Jan 20 03:58:50 2017 New Revision: 312463 URL: https://svnweb.freebsd.org/changeset/base/312463 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libbz2/Makefile Modified: head/lib/libbz2/Makefile ============================================================================== --- head/lib/libbz2/Makefile Fri Jan 20 03:57:52 2017 (r312462) +++ head/lib/libbz2/Makefile Fri Jan 20 03:58:50 2017 (r312463) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE= lib${LIB} -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} LIB= bz2 From owner-svn-src-head@freebsd.org Fri Jan 20 03:59:12 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 3ECA0CB8B8E; Fri, 20 Jan 2017 03:59:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EC611BB9; Fri, 20 Jan 2017 03:59:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K3xBZI007684; Fri, 20 Jan 2017 03:59:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K3xBFB007683; Fri, 20 Jan 2017 03:59:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200359.v0K3xBFB007683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 03:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312464 - head/lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 03:59:12 -0000 Author: ngie Date: Fri Jan 20 03:59:10 2017 New Revision: 312464 URL: https://svnweb.freebsd.org/changeset/base/312464 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc++/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Fri Jan 20 03:58:50 2017 (r312463) +++ head/lib/libc++/Makefile Fri Jan 20 03:59:10 2017 (r312464) @@ -3,9 +3,9 @@ .include PACKAGE= clibs -_LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt -HDRDIR= ${.CURDIR}/../../contrib/libc++/include -SRCDIR= ${.CURDIR}/../../contrib/libc++/src +_LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt +HDRDIR= ${SRCTOP}/contrib/libc++/include +SRCDIR= ${SRCTOP}/contrib/libc++/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} .if ${MACHINE_CPUARCH} == "arm" STATIC_CXXFLAGS+= -mlong-calls From owner-svn-src-head@freebsd.org Fri Jan 20 04:03:57 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 2C0B5CB8DD2; Fri, 20 Jan 2017 04:03:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA38B104C; Fri, 20 Jan 2017 04:03:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K43ugp011636; Fri, 20 Jan 2017 04:03:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K43u56011635; Fri, 20 Jan 2017 04:03:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200403.v0K43u56011635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312465 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:03:57 -0000 Author: ngie Date: Fri Jan 20 04:03:55 2017 New Revision: 312465 URL: https://svnweb.freebsd.org/changeset/base/312465 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/Makefile Modified: head/lib/libcam/Makefile ============================================================================== --- head/lib/libcam/Makefile Fri Jan 20 03:59:10 2017 (r312464) +++ head/lib/libcam/Makefile Fri Jan 20 04:03:55 2017 (r312465) @@ -36,11 +36,10 @@ MLINKS+= cam.3 cam_open_device.3 \ cam_cdbparse.3 csio_encode_visit.3 \ cam_cdbparse.3 buff_encode_visit.3 -.PATH: ${.CURDIR}/../../sys/cam/scsi ${.CURDIR}/../../sys/cam/ata \ - ${.CURDIR}/../../sys/cam +.PATH: ${SRCTOP}/sys/cam/scsi ${SRCTOP}/sys/cam/ata \ + ${SRCTOP}/sys/cam -SDIR= ${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR} -I${SDIR} +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 7 From owner-svn-src-head@freebsd.org Fri Jan 20 04:04:26 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 D0EFBCB8E67; Fri, 20 Jan 2017 04:04:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0B0F11C2; Fri, 20 Jan 2017 04:04:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K44Pfo011704; Fri, 20 Jan 2017 04:04:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K44PBV011703; Fri, 20 Jan 2017 04:04:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200404.v0K44PBV011703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312466 - head/lib/libc_nonshared X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:04:26 -0000 Author: ngie Date: Fri Jan 20 04:04:25 2017 New Revision: 312466 URL: https://svnweb.freebsd.org/changeset/base/312466 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libc_nonshared/Makefile Modified: head/lib/libc_nonshared/Makefile ============================================================================== --- head/lib/libc_nonshared/Makefile Fri Jan 20 04:03:55 2017 (r312465) +++ head/lib/libc_nonshared/Makefile Fri Jan 20 04:04:25 2017 (r312466) @@ -6,7 +6,7 @@ # bsd.lib.mk doesn't have an easy way to express that. MK_PROFILE?=no .include -NO_PIC= +NO_PIC= # -fpic on some platforms, -fPIC on others. CFLAGS+=${PICFLAG} -DPIC -fvisibility=hidden @@ -18,9 +18,9 @@ LIBC_NONSHARED_SRCS= SRCS= __stub.c .if ${MK_ICONV} == "yes" -.PATH: ${.CURDIR}/../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv .include "Makefile.iconv" -CFLAGS+=-I${.CURDIR}/../libc/iconv +CFLAGS+=-I${SRCTOP}/lib/libc/iconv .endif SRCS+= ${LIBC_NONSHARED_SRCS} From owner-svn-src-head@freebsd.org Fri Jan 20 04:27:42 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 A86DBCB9309; Fri, 20 Jan 2017 04:27:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B001ADB; Fri, 20 Jan 2017 04:27:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4RfXs020046; Fri, 20 Jan 2017 04:27:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4Re1a020037; Fri, 20 Jan 2017 04:27:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200427.v0K4Re1a020037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312467 - in head/lib/ncurses: . form formw menu menuw ncurses ncursesw panel panelw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:27:42 -0000 Author: ngie Date: Fri Jan 20 04:27:40 2017 New Revision: 312467 URL: https://svnweb.freebsd.org/changeset/base/312467 Log: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/ncurses/config.mk head/lib/ncurses/form/Makefile head/lib/ncurses/formw/Makefile head/lib/ncurses/menu/Makefile head/lib/ncurses/menuw/Makefile head/lib/ncurses/ncurses/Makefile head/lib/ncurses/ncursesw/Makefile head/lib/ncurses/panel/Makefile head/lib/ncurses/panelw/Makefile Modified: head/lib/ncurses/config.mk ============================================================================== --- head/lib/ncurses/config.mk Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/config.mk Fri Jan 20 04:27:40 2017 (r312467) @@ -2,25 +2,25 @@ # This Makefile is shared by libncurses, libform, libmenu, libpanel. -NCURSES_DIR= ${.CURDIR}/../../../contrib/ncurses +NCURSES_DIR= ${SRCTOP}/contrib/ncurses .if defined(ENABLE_WIDEC) LIB_SUFFIX= w CFLAGS+= -D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC -NCURSES_CFG_H= ${.CURDIR}/../ncurses/ncurses_cfg.h +NCURSES_CFG_H= ${.CURDIR:H}/ncurses/ncurses_cfg.h .else LIB_SUFFIX= NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h .endif CFLAGS+= -I. -.if exists(${.OBJDIR}/../ncurses${LIB_SUFFIX}) -CFLAGS+= -I${.OBJDIR}/../ncurses${LIB_SUFFIX} +.if exists(${.OBJDIR:H}/ncurses${LIB_SUFFIX}) +CFLAGS+= -I${.OBJDIR:H}/ncurses${LIB_SUFFIX} .endif -CFLAGS+= -I${.CURDIR}/../ncurses${LIB_SUFFIX} +CFLAGS+= -I${.CURDIR:H}/ncurses${LIB_SUFFIX} # for ${NCURSES_CFG_H} -CFLAGS+= -I${.CURDIR}/../ncurses +CFLAGS+= -I${.CURDIR:H}/ncurses CFLAGS+= -I${NCURSES_DIR}/include CFLAGS+= -I${NCURSES_DIR}/ncurses Modified: head/lib/ncurses/form/Makefile ============================================================================== --- head/lib/ncurses/form/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/form/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/form Modified: head/lib/ncurses/formw/Makefile ============================================================================== --- head/lib/ncurses/formw/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/formw/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../form/Makefile" +.include "${.CURDIR:H}/form/Makefile" Modified: head/lib/ncurses/menu/Makefile ============================================================================== --- head/lib/ncurses/menu/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/menu/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/menu Modified: head/lib/ncurses/menuw/Makefile ============================================================================== --- head/lib/ncurses/menuw/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/menuw/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../menu/Makefile" +.include "${.CURDIR:H}/menu/Makefile" Modified: head/lib/ncurses/ncurses/Makefile ============================================================================== --- head/lib/ncurses/ncurses/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/ncurses/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -10,7 +10,7 @@ MK_MAN=no .include -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" LIB= ncurses${LIB_SUFFIX} SHLIB_MAJOR= 8 Modified: head/lib/ncurses/ncursesw/Makefile ============================================================================== --- head/lib/ncurses/ncursesw/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/ncursesw/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -2,6 +2,6 @@ ENABLE_WIDEC= -.PATH: ${.CURDIR}/../ncurses +.PATH: ${.CURDIR:H}/ncurses -.include "${.CURDIR}/../ncurses/Makefile" +.include "${.CURDIR:H}/ncurses/Makefile" Modified: head/lib/ncurses/panel/Makefile ============================================================================== --- head/lib/ncurses/panel/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/panel/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/panel Modified: head/lib/ncurses/panelw/Makefile ============================================================================== --- head/lib/ncurses/panelw/Makefile Fri Jan 20 04:04:25 2017 (r312466) +++ head/lib/ncurses/panelw/Makefile Fri Jan 20 04:27:40 2017 (r312467) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../panel/Makefile" +.include "${.CURDIR:H}/panel/Makefile" From owner-svn-src-head@freebsd.org Fri Jan 20 04:28:17 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 97EEBCB9366; Fri, 20 Jan 2017 04:28:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67C2F1C61; Fri, 20 Jan 2017 04:28:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4SGGt020117; Fri, 20 Jan 2017 04:28:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4SGhR020116; Fri, 20 Jan 2017 04:28:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200428.v0K4SGhR020116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312468 - head/lib/libthread_db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:28:17 -0000 Author: ngie Date: Fri Jan 20 04:28:16 2017 New Revision: 312468 URL: https://svnweb.freebsd.org/changeset/base/312468 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libthread_db/Makefile Modified: head/lib/libthread_db/Makefile ============================================================================== --- head/lib/libthread_db/Makefile Fri Jan 20 04:27:40 2017 (r312467) +++ head/lib/libthread_db/Makefile Fri Jan 20 04:28:16 2017 (r312468) @@ -15,7 +15,7 @@ CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def # Unfortunately, clang gives an incorrect warning about alignment in # arch/i386/libpthread_md.c, so turn that off for now. From owner-svn-src-head@freebsd.org Fri Jan 20 04:28:42 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 D2F3FCB93AB; Fri, 20 Jan 2017 04:28:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A157D1DD3; Fri, 20 Jan 2017 04:28:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Sf8u020180; Fri, 20 Jan 2017 04:28:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4SfvE020179; Fri, 20 Jan 2017 04:28:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200428.v0K4SfvE020179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312469 - head/lib/libypclnt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:28:42 -0000 Author: ngie Date: Fri Jan 20 04:28:41 2017 New Revision: 312469 URL: https://svnweb.freebsd.org/changeset/base/312469 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libypclnt/Makefile Modified: head/lib/libypclnt/Makefile ============================================================================== --- head/lib/libypclnt/Makefile Fri Jan 20 04:28:16 2017 (r312468) +++ head/lib/libypclnt/Makefile Fri Jan 20 04:28:41 2017 (r312469) @@ -24,9 +24,9 @@ GENSRCS=yp.h \ yppasswd_private_xdr.c RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C -RPCSRC= ${.CURDIR}/../../include/rpcsvc/yp.x -RPCSRC_PW= ${.CURDIR}/../../include/rpcsvc/yppasswd.x -RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x +RPCSRC= ${SRCTOP}/include/rpcsvc/yp.x +RPCSRC_PW= ${SRCTOP}/include/rpcsvc/yppasswd.x +RPCSRC_PRIV= ${SRCTOP}/usr.sbin/rpc.yppasswdd/yppasswd_private.x yp.h: ${RPCSRC} ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} From owner-svn-src-head@freebsd.org Fri Jan 20 04:29:06 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 B2483CB9406; Fri, 20 Jan 2017 04:29:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 823DC1F40; Fri, 20 Jan 2017 04:29:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4T5lc020242; Fri, 20 Jan 2017 04:29:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4T50Y020241; Fri, 20 Jan 2017 04:29:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200429.v0K4T50Y020241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312470 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:29:06 -0000 Author: ngie Date: Fri Jan 20 04:29:05 2017 New Revision: 312470 URL: https://svnweb.freebsd.org/changeset/base/312470 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Fri Jan 20 04:28:41 2017 (r312469) +++ head/lib/libutil/Makefile Fri Jan 20 04:29:05 2017 (r312470) @@ -25,7 +25,7 @@ CFLAGS+= -DLIBC_SCCS CFLAGS+= -DINET6 .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/ +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libc/gen/ MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \ humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ From owner-svn-src-head@freebsd.org Fri Jan 20 04:29:25 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 3BBA8CB944C; Fri, 20 Jan 2017 04:29:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA8610AF; Fri, 20 Jan 2017 04:29:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4TOEc020295; Fri, 20 Jan 2017 04:29:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4TOtt020294; Fri, 20 Jan 2017 04:29:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200429.v0K4TOtt020294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312471 - head/lib/libulog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:29:25 -0000 Author: ngie Date: Fri Jan 20 04:29:23 2017 New Revision: 312471 URL: https://svnweb.freebsd.org/changeset/base/312471 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libulog/Makefile Modified: head/lib/libulog/Makefile ============================================================================== --- head/lib/libulog/Makefile Fri Jan 20 04:29:05 2017 (r312470) +++ head/lib/libulog/Makefile Fri Jan 20 04:29:23 2017 (r312471) @@ -22,7 +22,7 @@ MLINKS+=ulog_login.3 ulog_login_pseudo.3 LIBADD= md -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_INSTALLLIB} != "no" From owner-svn-src-head@freebsd.org Fri Jan 20 04:30:06 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 ADD40CB94BA; Fri, 20 Jan 2017 04:30:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D916124B; Fri, 20 Jan 2017 04:30:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4U5pw020392; Fri, 20 Jan 2017 04:30:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4U5Q1020391; Fri, 20 Jan 2017 04:30:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200430.v0K4U5Q1020391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312472 - head/lib/libufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:30:06 -0000 Author: ngie Date: Fri Jan 20 04:30:05 2017 New Revision: 312472 URL: https://svnweb.freebsd.org/changeset/base/312472 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libufs/Makefile Modified: head/lib/libufs/Makefile ============================================================================== --- head/lib/libufs/Makefile Fri Jan 20 04:29:23 2017 (r312471) +++ head/lib/libufs/Makefile Fri Jan 20 04:30:05 2017 (r312472) @@ -18,7 +18,7 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillo MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3 MLINKS+= ufs_disk_close.3 ufs_disk_write.3 -.PATH: ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCTOP}/sys/ufs/ffs WARNS?= 2 From owner-svn-src-head@freebsd.org Fri Jan 20 04:31:20 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 CDA0BCB953E; Fri, 20 Jan 2017 04:31:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9549514B1; Fri, 20 Jan 2017 04:31:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4VJf0023234; Fri, 20 Jan 2017 04:31:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4VJgB023233; Fri, 20 Jan 2017 04:31:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200431.v0K4VJgB023233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312473 - head/lib/libunbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:31:20 -0000 Author: ngie Date: Fri Jan 20 04:31:19 2017 New Revision: 312473 URL: https://svnweb.freebsd.org/changeset/base/312473 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libunbound/Makefile Modified: head/lib/libunbound/Makefile ============================================================================== --- head/lib/libunbound/Makefile Fri Jan 20 04:30:05 2017 (r312472) +++ head/lib/libunbound/Makefile Fri Jan 20 04:31:19 2017 (r312473) @@ -2,8 +2,8 @@ PACKAGE=lib${LIB} # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../contrib/unbound +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound # Hold my beer and watch this .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/cachedb ${UNBOUNDDIR}/dns64 ${UNBOUNDDIR}/iterator ${UNBOUNDDIR}/sldns ${UNBOUNDDIR}/libunbound ${UNBOUNDDIR}/services ${UNBOUNDDIR}/services/cache ${UNBOUNDDIR}/util ${UNBOUNDDIR}/util/data ${UNBOUNDDIR}/util/storage ${UNBOUNDDIR}/validator From owner-svn-src-head@freebsd.org Fri Jan 20 04:32:21 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 1576DCB959F; Fri, 20 Jan 2017 04:32:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF4C51806; Fri, 20 Jan 2017 04:32:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4WJC1024152; Fri, 20 Jan 2017 04:32:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4WJ1W024150; Fri, 20 Jan 2017 04:32:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200432.v0K4WJ1W024150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312474 - in head/lib/libthr: . support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:32:21 -0000 Author: ngie Date: Fri Jan 20 04:32:19 2017 New Revision: 312474 URL: https://svnweb.freebsd.org/changeset/base/312474 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libthr/Makefile head/lib/libthr/support/Makefile.inc Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Fri Jan 20 04:31:19 2017 (r312473) +++ head/lib/libthr/Makefile Fri Jan 20 04:32:19 2017 (r312474) @@ -18,13 +18,13 @@ LIB=thr SHLIB_MAJOR= 3 WARNS?= 3 CFLAGS+=-DPTHREAD_KERNEL -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ - -I${.CURDIR}/../../include +CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ + -I${SRCTOP}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} -CFLAGS+=-I${.CURDIR}/../libthread_db +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} +CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline .ifndef NO_THREAD_UNWIND_STACK @@ -34,7 +34,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND LDFLAGS+=-Wl,-znodelete -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map MAN= libthr.3 Modified: head/lib/libthr/support/Makefile.inc ============================================================================== --- head/lib/libthr/support/Makefile.inc Fri Jan 20 04:31:19 2017 (r312473) +++ head/lib/libthr/support/Makefile.inc Fri Jan 20 04:32:19 2017 (r312474) @@ -1,15 +1,15 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string +.PATH: ${.CURDIR}/support ${SRCTOP}/lib/libc/gen ${SRCTOP}/lib/libc/string # libc must search machine_arch, then machine_cpuarch, but libthr has all its # code implemented in machine_cpuarch. Cope. -.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys) -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +.if exists(${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys) +.PATH: ${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_ARCH} .else -.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} +.PATH: ${SRCTOP}/lib/libc/${MACHINE_CPUARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_CPUARCH} .endif SYSCALLS= thr_new From owner-svn-src-head@freebsd.org Fri Jan 20 04:32:37 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 96EA6CB96C5; Fri, 20 Jan 2017 04:32:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6465C1968; Fri, 20 Jan 2017 04:32:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Wahc024205; Fri, 20 Jan 2017 04:32:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4Wadh024204; Fri, 20 Jan 2017 04:32:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200432.v0K4Wadh024204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312475 - head/lib/libtelnet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:32:37 -0000 Author: ngie Date: Fri Jan 20 04:32:36 2017 New Revision: 312475 URL: https://svnweb.freebsd.org/changeset/base/312475 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libtelnet/Makefile Modified: head/lib/libtelnet/Makefile ============================================================================== --- head/lib/libtelnet/Makefile Fri Jan 20 04:32:19 2017 (r312474) +++ head/lib/libtelnet/Makefile Fri Jan 20 04:32:36 2017 (r312475) @@ -4,7 +4,7 @@ .include PACKAGE=lib${LIB} -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/libtelnet LIB= telnet From owner-svn-src-head@freebsd.org Fri Jan 20 04:33:21 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 892DDCB973B; Fri, 20 Jan 2017 04:33:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56AA21B78; Fri, 20 Jan 2017 04:33:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4XK6d024298; Fri, 20 Jan 2017 04:33:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4XKmG024297; Fri, 20 Jan 2017 04:33:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200433.v0K4XKmG024297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312476 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:33:21 -0000 Author: ngie Date: Fri Jan 20 04:33:20 2017 New Revision: 312476 URL: https://svnweb.freebsd.org/changeset/base/312476 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsysdecode/Makefile Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Fri Jan 20 04:32:36 2017 (r312475) +++ head/lib/libsysdecode/Makefile Fri Jan 20 04:33:20 2017 (r312476) @@ -9,8 +9,8 @@ SRCS= errno.c flags.c ioctl.c signal.c s INCS= sysdecode.h CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR}/../../libexec/rtld-elf +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/libexec/rtld-elf MAN= sysdecode.3 \ sysdecode_abi_to_freebsd_errno.3 \ From owner-svn-src-head@freebsd.org Fri Jan 20 04:33:46 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 CA0C9CB9792; Fri, 20 Jan 2017 04:33:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99D611CFB; Fri, 20 Jan 2017 04:33:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4XjQT024354; Fri, 20 Jan 2017 04:33:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4XjEC024353; Fri, 20 Jan 2017 04:33:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200433.v0K4XjEC024353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312477 - head/lib/libstdthreads X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:33:46 -0000 Author: ngie Date: Fri Jan 20 04:33:45 2017 New Revision: 312477 URL: https://svnweb.freebsd.org/changeset/base/312477 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libstdthreads/Makefile Modified: head/lib/libstdthreads/Makefile ============================================================================== --- head/lib/libstdthreads/Makefile Fri Jan 20 04:33:20 2017 (r312476) +++ head/lib/libstdthreads/Makefile Fri Jan 20 04:33:45 2017 (r312477) @@ -35,7 +35,7 @@ MLINKS= thrd_create.3 call_once.3 \ LIBADD= pthread -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .include From owner-svn-src-head@freebsd.org Fri Jan 20 04:34:03 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 35248CB97E6; Fri, 20 Jan 2017 04:34:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04DE71E0E; Fri, 20 Jan 2017 04:34:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Y2Hx024415; Fri, 20 Jan 2017 04:34:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4Y2gT024414; Fri, 20 Jan 2017 04:34:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200434.v0K4Y2gT024414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312478 - head/lib/libsqlite3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:34:03 -0000 Author: ngie Date: Fri Jan 20 04:34:01 2017 New Revision: 312478 URL: https://svnweb.freebsd.org/changeset/base/312478 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsqlite3/Makefile Modified: head/lib/libsqlite3/Makefile ============================================================================== --- head/lib/libsqlite3/Makefile Fri Jan 20 04:33:45 2017 (r312477) +++ head/lib/libsqlite3/Makefile Fri Jan 20 04:34:01 2017 (r312478) @@ -8,7 +8,7 @@ LIBADD+= pthread SRCS= sqlite3.c -SQLITE= ${.CURDIR}/../../contrib/sqlite3 +SQLITE= ${SRCTOP}/contrib/sqlite3 .PATH: ${SQLITE} WARNS= 3 From owner-svn-src-head@freebsd.org Fri Jan 20 04:34:36 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 4177FCB9846; Fri, 20 Jan 2017 04:34:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C6E81FE6; Fri, 20 Jan 2017 04:34:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4YZsh024479; Fri, 20 Jan 2017 04:34:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4YZke024478; Fri, 20 Jan 2017 04:34:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200434.v0K4YZke024478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312479 - head/lib/libsmutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:34:36 -0000 Author: ngie Date: Fri Jan 20 04:34:34 2017 New Revision: 312479 URL: https://svnweb.freebsd.org/changeset/base/312479 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsmutil/Makefile Modified: head/lib/libsmutil/Makefile ============================================================================== --- head/lib/libsmutil/Makefile Fri Jan 20 04:34:01 2017 (r312478) +++ head/lib/libsmutil/Makefile Fri Jan 20 04:34:34 2017 (r312479) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmutil CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-head@freebsd.org Fri Jan 20 04:35:01 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 9940ACB98A5; Fri, 20 Jan 2017 04:35:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69298115D; Fri, 20 Jan 2017 04:35:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Z05W024552; Fri, 20 Jan 2017 04:35:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4Z0J5024551; Fri, 20 Jan 2017 04:35:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200435.v0K4Z0J5024551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312480 - head/lib/libsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:35:01 -0000 Author: ngie Date: Fri Jan 20 04:35:00 2017 New Revision: 312480 URL: https://svnweb.freebsd.org/changeset/base/312480 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsmb/Makefile Modified: head/lib/libsmb/Makefile ============================================================================== --- head/lib/libsmb/Makefile Fri Jan 20 04:34:34 2017 (r312479) +++ head/lib/libsmb/Makefile Fri Jan 20 04:35:00 2017 (r312480) @@ -3,7 +3,7 @@ .include PACKAGE=lib${LIB} -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +CONTRIBDIR= ${SRCTOP}/contrib/smbfs .PATH: ${CONTRIBDIR}/lib/smb LIB= smb From owner-svn-src-head@freebsd.org Fri Jan 20 04:35:20 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 3FFCCCB98E9; Fri, 20 Jan 2017 04:35:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FDC912BC; Fri, 20 Jan 2017 04:35:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4ZJVo024607; Fri, 20 Jan 2017 04:35:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4ZJvU024606; Fri, 20 Jan 2017 04:35:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200435.v0K4ZJvU024606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312481 - head/lib/libsmdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:35:20 -0000 Author: ngie Date: Fri Jan 20 04:35:18 2017 New Revision: 312481 URL: https://svnweb.freebsd.org/changeset/base/312481 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsmdb/Makefile Modified: head/lib/libsmdb/Makefile ============================================================================== --- head/lib/libsmdb/Makefile Fri Jan 20 04:35:00 2017 (r312480) +++ head/lib/libsmdb/Makefile Fri Jan 20 04:35:18 2017 (r312481) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmdb CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-head@freebsd.org Fri Jan 20 04:35:37 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 C865ECB9936; Fri, 20 Jan 2017 04:35:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF87143B; Fri, 20 Jan 2017 04:35:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Za4R024663; Fri, 20 Jan 2017 04:35:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4ZaUd024662; Fri, 20 Jan 2017 04:35:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200435.v0K4ZaUd024662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312482 - head/lib/libsm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:35:37 -0000 Author: ngie Date: Fri Jan 20 04:35:36 2017 New Revision: 312482 URL: https://svnweb.freebsd.org/changeset/base/312482 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsm/Makefile Modified: head/lib/libsm/Makefile ============================================================================== --- head/lib/libsm/Makefile Fri Jan 20 04:35:18 2017 (r312481) +++ head/lib/libsm/Makefile Fri Jan 20 04:35:36 2017 (r312482) @@ -3,7 +3,7 @@ .include PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-head@freebsd.org Fri Jan 20 04:35:51 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 09038CB9990; Fri, 20 Jan 2017 04:35:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C50141591; Fri, 20 Jan 2017 04:35:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4Zn8I024719; Fri, 20 Jan 2017 04:35:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4ZnkJ024718; Fri, 20 Jan 2017 04:35:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200435.v0K4ZnkJ024718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312483 - head/lib/libsbuf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:35:51 -0000 Author: ngie Date: Fri Jan 20 04:35:49 2017 New Revision: 312483 URL: https://svnweb.freebsd.org/changeset/base/312483 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libsbuf/Makefile Modified: head/lib/libsbuf/Makefile ============================================================================== --- head/lib/libsbuf/Makefile Fri Jan 20 04:35:36 2017 (r312482) +++ head/lib/libsbuf/Makefile Fri Jan 20 04:35:49 2017 (r312483) @@ -10,6 +10,6 @@ SHLIB_MAJOR = 6 SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_DEF= ${.CURDIR}/Version.def -.PATH: ${.CURDIR}/../../sys/kern +.PATH: ${SRCTOP}/sys/kern .include From owner-svn-src-head@freebsd.org Fri Jan 20 04:36:08 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 35CE4CB9A45; Fri, 20 Jan 2017 04:36:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C36B11757; Fri, 20 Jan 2017 04:36:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4a6xp024780; Fri, 20 Jan 2017 04:36:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4a6N3024779; Fri, 20 Jan 2017 04:36:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200436.v0K4a6N3024779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312484 - head/lib/librt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:36:08 -0000 Author: ngie Date: Fri Jan 20 04:36:06 2017 New Revision: 312484 URL: https://svnweb.freebsd.org/changeset/base/312484 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/librt/Makefile Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Fri Jan 20 04:35:49 2017 (r312483) +++ head/lib/librt/Makefile Fri Jan 20 04:36:06 2017 (r312484) @@ -5,7 +5,7 @@ PACKAGE=lib${LIB} LIB=rt SHLIB_MAJOR= 1 -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR} +CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND CFLAGS+=-fexceptions .endif @@ -18,7 +18,7 @@ SRCS+= aio.c mq.c sigev_thread.c timer.c PRECIOUSLIB= -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" From owner-svn-src-head@freebsd.org Fri Jan 20 04:36:29 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 6ADBECB9AEA; Fri, 20 Jan 2017 04:36:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AD4C19E4; Fri, 20 Jan 2017 04:36:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4aSvx024834; Fri, 20 Jan 2017 04:36:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4aSSP024833; Fri, 20 Jan 2017 04:36:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200436.v0K4aSSP024833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312485 - head/lib/librpcsvc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:36:29 -0000 Author: ngie Date: Fri Jan 20 04:36:28 2017 New Revision: 312485 URL: https://svnweb.freebsd.org/changeset/base/312485 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/librpcsvc/Makefile Modified: head/lib/librpcsvc/Makefile ============================================================================== --- head/lib/librpcsvc/Makefile Fri Jan 20 04:36:06 2017 (r312484) +++ head/lib/librpcsvc/Makefile Fri Jan 20 04:36:28 2017 (r312485) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../include/rpcsvc +.PATH: ${SRCTOP}/include/rpcsvc PACKAGE=lib${LIB} LIB= rpcsvc From owner-svn-src-head@freebsd.org Fri Jan 20 04:36:49 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 74F5CCB9B63; Fri, 20 Jan 2017 04:36:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F8A1BDB; Fri, 20 Jan 2017 04:36:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4amv1024896; Fri, 20 Jan 2017 04:36:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4am8L024895; Fri, 20 Jan 2017 04:36:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200436.v0K4am8L024895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312486 - head/lib/librpcsec_gss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:36:49 -0000 Author: ngie Date: Fri Jan 20 04:36:48 2017 New Revision: 312486 URL: https://svnweb.freebsd.org/changeset/base/312486 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/librpcsec_gss/Makefile Modified: head/lib/librpcsec_gss/Makefile ============================================================================== --- head/lib/librpcsec_gss/Makefile Fri Jan 20 04:36:28 2017 (r312485) +++ head/lib/librpcsec_gss/Makefile Fri Jan 20 04:36:48 2017 (r312486) @@ -8,11 +8,11 @@ SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rp LIBADD= gssapi -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -I${.CURDIR}/../../include -CFLAGS+= -I${.CURDIR}/../../libc_rpc +CFLAGS+= -I${SRCTOP}/include +CFLAGS+= -I${SRCTOP}/lib/libc_rpc MK_PROFILE= no MAN= rpcsec_gss.3 From owner-svn-src-head@freebsd.org Fri Jan 20 04:37:04 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 9561DCB9BCE; Fri, 20 Jan 2017 04:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51A561CE7; Fri, 20 Jan 2017 04:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4b3AB024954; Fri, 20 Jan 2017 04:37:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4b3V6024953; Fri, 20 Jan 2017 04:37:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200437.v0K4b3V6024953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312487 - head/lib/libpe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:37:04 -0000 Author: ngie Date: Fri Jan 20 04:37:03 2017 New Revision: 312487 URL: https://svnweb.freebsd.org/changeset/base/312487 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libpe/Makefile Modified: head/lib/libpe/Makefile ============================================================================== --- head/lib/libpe/Makefile Fri Jan 20 04:36:48 2017 (r312486) +++ head/lib/libpe/Makefile Fri Jan 20 04:37:03 2017 (r312487) @@ -3,7 +3,7 @@ INTERNALLIB= -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain +ELFTCDIR= ${SRCTOP}/contrib/elftoolchain .PATH: ${ELFTCDIR}/libpe From owner-svn-src-head@freebsd.org Fri Jan 20 04:37:23 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 CD3ECCB9C29; Fri, 20 Jan 2017 04:37:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1241EA4; Fri, 20 Jan 2017 04:37:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4bMXd025008; Fri, 20 Jan 2017 04:37:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4bM2H025007; Fri, 20 Jan 2017 04:37:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200437.v0K4bM2H025007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312488 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:37:24 -0000 Author: ngie Date: Fri Jan 20 04:37:22 2017 New Revision: 312488 URL: https://svnweb.freebsd.org/changeset/base/312488 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libproc/Makefile Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Fri Jan 20 04:37:03 2017 (r312487) +++ head/lib/libproc/Makefile Fri Jan 20 04:37:22 2017 (r312488) @@ -30,9 +30,9 @@ LIBADD+= elf procstat rtld_db util .if ${MK_CDDL} != "no" LIBADD+= ctf IGNORE_PRAGMA= YES -CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ - -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common \ + -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common \ + -I${SRCTOP}/sys/cddl/compat/opensolaris .else CFLAGS+= -DNO_CTF .endif From owner-svn-src-head@freebsd.org Fri Jan 20 04:38:56 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 57700CB9CAB; Fri, 20 Jan 2017 04:38:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4491067; Fri, 20 Jan 2017 04:38:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4ctCu025115; Fri, 20 Jan 2017 04:38:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4ctZp025114; Fri, 20 Jan 2017 04:38:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200438.v0K4ctZp025114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312489 - head/lib/libprocstat/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:38:56 -0000 Author: ngie Date: Fri Jan 20 04:38:54 2017 New Revision: 312489 URL: https://svnweb.freebsd.org/changeset/base/312489 Log: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libprocstat/zfs/Makefile Modified: head/lib/libprocstat/zfs/Makefile ============================================================================== --- head/lib/libprocstat/zfs/Makefile Fri Jan 20 04:37:22 2017 (r312488) +++ head/lib/libprocstat/zfs/Makefile Fri Jan 20 04:38:54 2017 (r312489) @@ -1,21 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/.. +.PATH: ${.CURDIR:H} SRCS= zfs.c OBJS= zfs.o WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/.. +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${.CURDIR:H} CFLAGS+= -DNEED_SOLARIS_BOOLEAN all: ${OBJS} From owner-svn-src-head@freebsd.org Fri Jan 20 04:39:37 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 92B75CB9D51; Fri, 20 Jan 2017 04:39:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE831248; Fri, 20 Jan 2017 04:39:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4daje025198; Fri, 20 Jan 2017 04:39:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4daKA025197; Fri, 20 Jan 2017 04:39:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200439.v0K4daKA025197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312490 - head/lib/libpcap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:39:37 -0000 Author: ngie Date: Fri Jan 20 04:39:36 2017 New Revision: 312490 URL: https://svnweb.freebsd.org/changeset/base/312490 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libpcap/Makefile Modified: head/lib/libpcap/Makefile ============================================================================== --- head/lib/libpcap/Makefile Fri Jan 20 04:38:54 2017 (r312489) +++ head/lib/libpcap/Makefile Fri Jan 20 04:39:36 2017 (r312490) @@ -114,7 +114,7 @@ SHLIB_MAJOR= 8 # # Magic to grab sources out of src/contrib # -PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap +PCAP_DISTDIR?=${SRCTOP}/contrib/libpcap CFLAGS+=-I${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR}/bpf/net From owner-svn-src-head@freebsd.org Fri Jan 20 04:40:12 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 117F5CB9DFB; Fri, 20 Jan 2017 04:40:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5712143C; Fri, 20 Jan 2017 04:40:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4eAso025296; Fri, 20 Jan 2017 04:40:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4eAln025295; Fri, 20 Jan 2017 04:40:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200440.v0K4eAln025295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312491 - head/lib/libopie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:40:12 -0000 Author: ngie Date: Fri Jan 20 04:40:10 2017 New Revision: 312491 URL: https://svnweb.freebsd.org/changeset/base/312491 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libopie/Makefile Modified: head/lib/libopie/Makefile ============================================================================== --- head/lib/libopie/Makefile Fri Jan 20 04:39:36 2017 (r312490) +++ head/lib/libopie/Makefile Fri Jan 20 04:40:10 2017 (r312491) @@ -3,7 +3,7 @@ # $FreeBSD$ # PACKAGE=lib${LIB} -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} SHLIB_MAJOR= 8 From owner-svn-src-head@freebsd.org Fri Jan 20 04:40:56 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 949C0CB9E4E; Fri, 20 Jan 2017 04:40:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6486B164A; Fri, 20 Jan 2017 04:40:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4etR0025363; Fri, 20 Jan 2017 04:40:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4etMm025362; Fri, 20 Jan 2017 04:40:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200440.v0K4etMm025362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312492 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:40:56 -0000 Author: ngie Date: Fri Jan 20 04:40:55 2017 New Revision: 312492 URL: https://svnweb.freebsd.org/changeset/base/312492 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Fri Jan 20 04:40:10 2017 (r312491) +++ head/lib/libnv/Makefile Fri Jan 20 04:40:55 2017 (r312492) @@ -8,8 +8,8 @@ SHLIBDIR?= /lib LIB= nv SHLIB_MAJOR= 0 -.PATH: ${.CURDIR}/../../sys/contrib/libnv ${.CURDIR}/../../sys/sys -CFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR} +.PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys +CFLAGS+=-I${SRCTOP}/sys -I${.CURDIR} SRCS= cnvlist.c SRCS+= dnvlist.c From owner-svn-src-head@freebsd.org Fri Jan 20 04:41:54 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 BB963CB9FAD; Fri, 20 Jan 2017 04:41:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9F819A2; Fri, 20 Jan 2017 04:41:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4frSV026179; Fri, 20 Jan 2017 04:41:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4frja026178; Fri, 20 Jan 2017 04:41:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200441.v0K4frja026178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312493 - head/lib/libngatm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:41:54 -0000 Author: ngie Date: Fri Jan 20 04:41:53 2017 New Revision: 312493 URL: https://svnweb.freebsd.org/changeset/base/312493 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libngatm/Makefile Modified: head/lib/libngatm/Makefile ============================================================================== --- head/lib/libngatm/Makefile Fri Jan 20 04:40:55 2017 (r312492) +++ head/lib/libngatm/Makefile Fri Jan 20 04:41:53 2017 (r312493) @@ -8,8 +8,8 @@ SHLIB_MAJOR= 4 MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3 # source of the library lives in contrib -SDIR= ${.CURDIR}/../../sys -CTRB= ${.CURDIR}/../../contrib/ngatm +SDIR= ${SRCTOP}/sys +CTRB= ${SRCTOP}/contrib/ngatm LIBBASE= ${SDIR}/contrib/ngatm CFLAGS+= -I${LIBBASE} -I${.OBJDIR} -I${CTRB}/libngatm From owner-svn-src-head@freebsd.org Fri Jan 20 04:42:13 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 19C7CCB9004; Fri, 20 Jan 2017 04:42:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDB891B1A; Fri, 20 Jan 2017 04:42:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4gBua029170; Fri, 20 Jan 2017 04:42:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4gBDw029169; Fri, 20 Jan 2017 04:42:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200442.v0K4gBDw029169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312494 - head/lib/libmp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:42:13 -0000 Author: ngie Date: Fri Jan 20 04:42:11 2017 New Revision: 312494 URL: https://svnweb.freebsd.org/changeset/base/312494 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libmp/Makefile Modified: head/lib/libmp/Makefile ============================================================================== --- head/lib/libmp/Makefile Fri Jan 20 04:41:53 2017 (r312493) +++ head/lib/libmp/Makefile Fri Jan 20 04:42:11 2017 (r312494) @@ -10,9 +10,9 @@ MAN= libmp.3 INCS= mp.h SRCS= mpasbn.c -CFLAGS+= -I${.CURDIR}/../../crypto +CFLAGS+= -I${SRCTOP}/crypto -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" From owner-svn-src-head@freebsd.org Fri Jan 20 04:42: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 0DDF1CB905A; Fri, 20 Jan 2017 04:42:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1F701D18; Fri, 20 Jan 2017 04:42:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4gh3t029229; Fri, 20 Jan 2017 04:42:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4ghkn029228; Fri, 20 Jan 2017 04:42:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200442.v0K4ghkn029228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312495 - head/lib/libmilter X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:42:45 -0000 Author: ngie Date: Fri Jan 20 04:42:43 2017 New Revision: 312495 URL: https://svnweb.freebsd.org/changeset/base/312495 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libmilter/Makefile Modified: head/lib/libmilter/Makefile ============================================================================== --- head/lib/libmilter/Makefile Fri Jan 20 04:42:11 2017 (r312494) +++ head/lib/libmilter/Makefile Fri Jan 20 04:42:43 2017 (r312495) @@ -3,7 +3,7 @@ .include PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-head@freebsd.org Fri Jan 20 04:43:22 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 6CF28CB90D1; Fri, 20 Jan 2017 04:43:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CA991E9C; Fri, 20 Jan 2017 04:43:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4hLuQ029301; Fri, 20 Jan 2017 04:43:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4hLOa029300; Fri, 20 Jan 2017 04:43:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200443.v0K4hLOa029300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312496 - head/lib/libmd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:43:22 -0000 Author: ngie Date: Fri Jan 20 04:43:21 2017 New Revision: 312496 URL: https://svnweb.freebsd.org/changeset/base/312496 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libmd/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Fri Jan 20 04:42:43 2017 (r312495) +++ head/lib/libmd/Makefile Fri Jan 20 04:43:21 2017 (r312496) @@ -78,11 +78,11 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ # in which case: # * macros are used to rename symbols to libcrypt internal names # * no weak aliases are generated -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys/crypto/sha2 -CFLAGS+= -I${.CURDIR}/../../sys/crypto/skein +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 +CFLAGS+= -I${SRCTOP}/sys/crypto/skein CFLAGS+= -DWEAK_REFS -.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 -.PATH: ${.CURDIR}/../../sys/crypto/skein ${.CURDIR}/../../sys/crypto/skein/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 +.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S From owner-svn-src-head@freebsd.org Fri Jan 20 04:45:10 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 DB7E9CB9153; Fri, 20 Jan 2017 04:45:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB258102B; Fri, 20 Jan 2017 04:45:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4j9xN029435; Fri, 20 Jan 2017 04:45:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4j9KM029434; Fri, 20 Jan 2017 04:45:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200445.v0K4j9KM029434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312497 - head/lib/libmagic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:45:11 -0000 Author: ngie Date: Fri Jan 20 04:45:09 2017 New Revision: 312497 URL: https://svnweb.freebsd.org/changeset/base/312497 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Fri Jan 20 04:43:21 2017 (r312496) +++ head/lib/libmagic/Makefile Fri Jan 20 04:45:09 2017 (r312497) @@ -2,7 +2,7 @@ # Copyright (c) David E. O'Brien, 2000-2004, 2006, 2009 PACKAGE=lib${LIB} -CONTRDIR= ${.CURDIR}/../../contrib/file +CONTRDIR= ${SRCTOP}/contrib/file .PATH: ${CONTRDIR}/src .PATH: ${CONTRDIR}/doc From owner-svn-src-head@freebsd.org Fri Jan 20 04:46:21 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 D3905CB91D3; Fri, 20 Jan 2017 04:46:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A335C11B2; Fri, 20 Jan 2017 04:46:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4kKwh029527; Fri, 20 Jan 2017 04:46:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4kKd2029526; Fri, 20 Jan 2017 04:46:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200446.v0K4kKd2029526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312498 - head/lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:46:21 -0000 Author: ngie Date: Fri Jan 20 04:46:20 2017 New Revision: 312498 URL: https://svnweb.freebsd.org/changeset/base/312498 Log: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/liblzma/Makefile Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Fri Jan 20 04:45:09 2017 (r312497) +++ head/lib/liblzma/Makefile Fri Jan 20 04:46:20 2017 (r312498) @@ -2,9 +2,9 @@ PACKAGE=lib${LIB} LIB= lzma -LZMADIR= ${.CURDIR}/../../contrib/xz/src/liblzma +LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma -.PATH: ${LZMADIR}/../common +.PATH: ${LZMADIR:H}/common SRCS+= tuklib_physmem.c tuklib_cpucores.c .PATH: ${LZMADIR}/api/lzma @@ -145,7 +145,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/lzma \ -I${LZMADIR}/delta \ -I${LZMADIR}/simple \ - -I${LZMADIR}/../common + -I${LZMADIR:H}/common LIBADD+= pthread From owner-svn-src-head@freebsd.org Fri Jan 20 04:50:20 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 6BFC5CB9276; Fri, 20 Jan 2017 04:50:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5F41355; Fri, 20 Jan 2017 04:50:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4oJi5029730; Fri, 20 Jan 2017 04:50:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4oJs7029729; Fri, 20 Jan 2017 04:50:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200450.v0K4oJs7029729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312499 - head/lib/libldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:50:20 -0000 Author: ngie Date: Fri Jan 20 04:50:19 2017 New Revision: 312499 URL: https://svnweb.freebsd.org/changeset/base/312499 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libldns/Makefile Modified: head/lib/libldns/Makefile ============================================================================== --- head/lib/libldns/Makefile Fri Jan 20 04:46:20 2017 (r312498) +++ head/lib/libldns/Makefile Fri Jan 20 04:50:19 2017 (r312499) @@ -1,7 +1,7 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR = ${.CURDIR}/../../contrib/ldns +LDNSDIR = ${SRCTOP}/contrib/ldns PACKAGE=lib${LIB} .PATH: ${LDNSDIR} ${LDNSDIR}/compat From owner-svn-src-head@freebsd.org Fri Jan 20 04:50:47 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 B1CFFCB92D0; Fri, 20 Jan 2017 04:50:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81A931568; Fri, 20 Jan 2017 04:50:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4okE2029789; Fri, 20 Jan 2017 04:50:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4okdv029788; Fri, 20 Jan 2017 04:50:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200450.v0K4okdv029788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312500 - head/lib/libkiconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:50:47 -0000 Author: ngie Date: Fri Jan 20 04:50:46 2017 New Revision: 312500 URL: https://svnweb.freebsd.org/changeset/base/312500 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libkiconv/Makefile Modified: head/lib/libkiconv/Makefile ============================================================================== --- head/lib/libkiconv/Makefile Fri Jan 20 04:50:19 2017 (r312499) +++ head/lib/libkiconv/Makefile Fri Jan 20 04:50:46 2017 (r312500) @@ -17,7 +17,7 @@ MLINKS+= kiconv.3 kiconv_add_xlat16_cspa kiconv.3 kiconv_add_xlat16_cspairs.3 \ kiconv.3 kiconv_add_xlat16_table.3 -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys WARNS?= 1 From owner-svn-src-head@freebsd.org Fri Jan 20 04:51:37 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 E4E9DCB943C; Fri, 20 Jan 2017 04:51:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B398D1772; Fri, 20 Jan 2017 04:51:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4paaX030598; Fri, 20 Jan 2017 04:51:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4parv030597; Fri, 20 Jan 2017 04:51:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200451.v0K4parv030597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312501 - head/lib/libcom_err X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:51:38 -0000 Author: ngie Date: Fri Jan 20 04:51:36 2017 New Revision: 312501 URL: https://svnweb.freebsd.org/changeset/base/312501 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcom_err/Makefile Modified: head/lib/libcom_err/Makefile ============================================================================== --- head/lib/libcom_err/Makefile Fri Jan 20 04:50:46 2017 (r312500) +++ head/lib/libcom_err/Makefile Fri Jan 20 04:51:36 2017 (r312501) @@ -5,7 +5,7 @@ LIB= com_err SRCS= com_err.c error.c INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h MAN= com_err.3 -COM_ERRDIR= ${.CURDIR}/../../contrib/com_err +COM_ERRDIR= ${SRCTOP}/contrib/com_err CFLAGS+= -I${COM_ERRDIR} LDFLAGS= -Wl,--no-undefined From owner-svn-src-head@freebsd.org Fri Jan 20 04:52:02 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 445A6CB948D; Fri, 20 Jan 2017 04:52:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 136601976; Fri, 20 Jan 2017 04:52:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4q1Ze031321; Fri, 20 Jan 2017 04:52:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4q1UH031320; Fri, 20 Jan 2017 04:52:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200452.v0K4q1UH031320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312502 - head/lib/libcompat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:52:02 -0000 Author: ngie Date: Fri Jan 20 04:52:00 2017 New Revision: 312502 URL: https://svnweb.freebsd.org/changeset/base/312502 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcompat/Makefile Modified: head/lib/libcompat/Makefile ============================================================================== --- head/lib/libcompat/Makefile Fri Jan 20 04:51:36 2017 (r312501) +++ head/lib/libcompat/Makefile Fri Jan 20 04:52:00 2017 (r312502) @@ -3,7 +3,7 @@ PACKAGE=lib${LIB} LIB= compat -CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale +CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${SRCTOP}/lib/libc/locale NO_PIC= WARNS?= 0 From owner-svn-src-head@freebsd.org Fri Jan 20 04:52:31 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 1E132CB94F6; Fri, 20 Jan 2017 04:52:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E201F1C53; Fri, 20 Jan 2017 04:52:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4qUYQ033470; Fri, 20 Jan 2017 04:52:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4qUvh033469; Fri, 20 Jan 2017 04:52:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200452.v0K4qUvh033469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312503 - head/lib/libcrypt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:52:31 -0000 Author: ngie Date: Fri Jan 20 04:52:29 2017 New Revision: 312503 URL: https://svnweb.freebsd.org/changeset/base/312503 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcrypt/Makefile Modified: head/lib/libcrypt/Makefile ============================================================================== --- head/lib/libcrypt/Makefile Fri Jan 20 04:52:00 2017 (r312502) +++ head/lib/libcrypt/Makefile Fri Jan 20 04:52:29 2017 (r312503) @@ -10,7 +10,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 5 LIB= crypt -.PATH: ${.CURDIR}/../libmd ${.CURDIR}/../../sys/crypto/sha2 +.PATH: ${SRCTOP}/lib/libmd ${SRCTOP}/sys/crypto/sha2 SRCS= crypt.c misc.c \ crypt-md5.c md5c.c \ crypt-nthash.c md4c.c \ @@ -19,12 +19,12 @@ SRCS= crypt.c misc.c \ MAN= crypt.3 MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \ crypt.3 crypt_set_format.3 -CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ - -I${.CURDIR}/../../sys/crypto/sha2 +CFLAGS+= -I${SRCTOP}/lib/libmd -I${SRCTOP}/lib/libutil \ + -I${SRCTOP}/sys/crypto/sha2 # Pull in the strong crypto, if it is present. -.if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no" -.PATH: ${.CURDIR}/../../secure/lib/libcrypt +.if exists(${SRCTOP}/secure/lib/libcrypt) && ${MK_CRYPT} != "no" +.PATH: ${SRCTOP}/secure/lib/libcrypt SRCS+= crypt-des.c crypt-blowfish.c blowfish.c CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH .endif From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:01 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 AE8F6CB957E; Fri, 20 Jan 2017 04:53:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E7461E2D; Fri, 20 Jan 2017 04:53:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4r05B033545; Fri, 20 Jan 2017 04:53:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4r0k1033544; Fri, 20 Jan 2017 04:53:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4r0k1033544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312504 - head/lib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:01 -0000 Author: ngie Date: Fri Jan 20 04:53:00 2017 New Revision: 312504 URL: https://svnweb.freebsd.org/changeset/base/312504 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcxxrt/Makefile Modified: head/lib/libcxxrt/Makefile ============================================================================== --- head/lib/libcxxrt/Makefile Fri Jan 20 04:52:29 2017 (r312503) +++ head/lib/libcxxrt/Makefile Fri Jan 20 04:53:00 2017 (r312504) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE= clibs -SRCDIR= ${.CURDIR}/../../contrib/libcxxrt +SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 SHLIBDIR?= /lib From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:21 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 A7B09CB95D9; Fri, 20 Jan 2017 04:53:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 778741FA1; Fri, 20 Jan 2017 04:53:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4rKlX033599; Fri, 20 Jan 2017 04:53:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4rKM6033598; Fri, 20 Jan 2017 04:53:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4rKM6033598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312505 - head/lib/libgssapi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:21 -0000 Author: ngie Date: Fri Jan 20 04:53:20 2017 New Revision: 312505 URL: https://svnweb.freebsd.org/changeset/base/312505 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libgssapi/Makefile Modified: head/lib/libgssapi/Makefile ============================================================================== --- head/lib/libgssapi/Makefile Fri Jan 20 04:53:00 2017 (r312504) +++ head/lib/libgssapi/Makefile Fri Jan 20 04:53:20 2017 (r312505) @@ -3,7 +3,7 @@ PACKAGE=lib${LIB} LIB= gssapi SHLIB_MAJOR= 10 -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map SRCS= From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:27 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 D6161CB9620; Fri, 20 Jan 2017 04:53:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D1D1FF8; Fri, 20 Jan 2017 04:53:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4rQ0u033649; Fri, 20 Jan 2017 04:53:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4rQEJ033647; Fri, 20 Jan 2017 04:53:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4rQEJ033647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312506 - in head/lib/libiconv_modules: . mapper_parallel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:28 -0000 Author: ngie Date: Fri Jan 20 04:53:26 2017 New Revision: 312506 URL: https://svnweb.freebsd.org/changeset/base/312506 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libiconv_modules/Makefile.inc head/lib/libiconv_modules/mapper_parallel/Makefile Modified: head/lib/libiconv_modules/Makefile.inc ============================================================================== --- head/lib/libiconv_modules/Makefile.inc Fri Jan 20 04:53:20 2017 (r312505) +++ head/lib/libiconv_modules/Makefile.inc Fri Jan 20 04:53:26 2017 (r312506) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv SHLIB_MAJOR= 4 WARNS?= 6 -CFLAGS+= -I${.CURDIR}/../../libc/iconv +CFLAGS+= -I${SRCTOP}/lib/libc/iconv CFLAGS+= -Dbool=_Bool Modified: head/lib/libiconv_modules/mapper_parallel/Makefile ============================================================================== --- head/lib/libiconv_modules/mapper_parallel/Makefile Fri Jan 20 04:53:20 2017 (r312505) +++ head/lib/libiconv_modules/mapper_parallel/Makefile Fri Jan 20 04:53:26 2017 (r312506) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../mapper_serial +.PATH: ${.CURDIR:H}/mapper_serial SHLIB= mapper_parallel SRCS+= citrus_mapper_serial.c From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:41 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 DB581CB96B1; Fri, 20 Jan 2017 04:53:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A30311193; Fri, 20 Jan 2017 04:53:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4reNA033702; Fri, 20 Jan 2017 04:53:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4reId033701; Fri, 20 Jan 2017 04:53:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4reId033701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312507 - head/lib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:42 -0000 Author: ngie Date: Fri Jan 20 04:53:40 2017 New Revision: 312507 URL: https://svnweb.freebsd.org/changeset/base/312507 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libexecinfo/Makefile Modified: head/lib/libexecinfo/Makefile ============================================================================== --- head/lib/libexecinfo/Makefile Fri Jan 20 04:53:26 2017 (r312506) +++ head/lib/libexecinfo/Makefile Fri Jan 20 04:53:40 2017 (r312507) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -LIBEXECINFO= ${.CURDIR}/../../contrib/libexecinfo +LIBEXECINFO= ${SRCTOP}/contrib/libexecinfo LIB= execinfo SHLIB_MAJOR= 1 From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:46 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 56357CB96E7; Fri, 20 Jan 2017 04:53:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E1791214; Fri, 20 Jan 2017 04:53:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4rjS8033752; Fri, 20 Jan 2017 04:53:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4rj4E033751; Fri, 20 Jan 2017 04:53:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4rj4E033751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312508 - head/lib/libexpat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:46 -0000 Author: ngie Date: Fri Jan 20 04:53:45 2017 New Revision: 312508 URL: https://svnweb.freebsd.org/changeset/base/312508 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libexpat/Makefile Modified: head/lib/libexpat/Makefile ============================================================================== --- head/lib/libexpat/Makefile Fri Jan 20 04:53:40 2017 (r312507) +++ head/lib/libexpat/Makefile Fri Jan 20 04:53:45 2017 (r312508) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -EXPAT= ${.CURDIR}/../../contrib/expat +EXPAT= ${SRCTOP}/contrib/expat LIB= bsdxml SHLIBDIR?= /lib From owner-svn-src-head@freebsd.org Fri Jan 20 04:53:51 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 96443CB9732; Fri, 20 Jan 2017 04:53:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65BD512AF; Fri, 20 Jan 2017 04:53:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4roqK033803; Fri, 20 Jan 2017 04:53:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4roia033802; Fri, 20 Jan 2017 04:53:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200453.v0K4roia033802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312509 - head/lib/libevent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:53:51 -0000 Author: ngie Date: Fri Jan 20 04:53:50 2017 New Revision: 312509 URL: https://svnweb.freebsd.org/changeset/base/312509 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libevent/Makefile Modified: head/lib/libevent/Makefile ============================================================================== --- head/lib/libevent/Makefile Fri Jan 20 04:53:45 2017 (r312508) +++ head/lib/libevent/Makefile Fri Jan 20 04:53:50 2017 (r312509) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -.PATH: ${.CURDIR}/../../contrib/pf/libevent +.PATH: ${SRCTOP}/contrib/pf/libevent .include From owner-svn-src-head@freebsd.org Fri Jan 20 04:54:11 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 4707DCB97C1; Fri, 20 Jan 2017 04:54:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BD0614FF; Fri, 20 Jan 2017 04:54:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4sAeq033865; Fri, 20 Jan 2017 04:54:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4sASc033864; Fri, 20 Jan 2017 04:54:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200454.v0K4sASc033864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312510 - head/lib/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:54:11 -0000 Author: ngie Date: Fri Jan 20 04:54:09 2017 New Revision: 312510 URL: https://svnweb.freebsd.org/changeset/base/312510 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Fri Jan 20 04:53:50 2017 (r312509) +++ head/lib/libelf/Makefile Fri Jan 20 04:54:09 2017 (r312510) @@ -82,7 +82,7 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${ELFTCDIR}/common -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA +sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys ln -sf ${.ALLSRC} ${.TARGET} From owner-svn-src-head@freebsd.org Fri Jan 20 04:54:22 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 A1ED0CB9809; Fri, 20 Jan 2017 04:54:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CAC41643; Fri, 20 Jan 2017 04:54:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4sLIR033915; Fri, 20 Jan 2017 04:54:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4sLLQ033914; Fri, 20 Jan 2017 04:54:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200454.v0K4sLLQ033914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312511 - head/lib/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:54:22 -0000 Author: ngie Date: Fri Jan 20 04:54:21 2017 New Revision: 312511 URL: https://svnweb.freebsd.org/changeset/base/312511 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libdwarf/Makefile Modified: head/lib/libdwarf/Makefile ============================================================================== --- head/lib/libdwarf/Makefile Fri Jan 20 04:54:09 2017 (r312510) +++ head/lib/libdwarf/Makefile Fri Jan 20 04:54:21 2017 (r312511) @@ -94,7 +94,7 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${ELFTCDIR}/common -I${ELFTCDIR}/libelf -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA +sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys ln -sf ${.ALLSRC} ${.TARGET} From owner-svn-src-head@freebsd.org Fri Jan 20 04:55:16 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 49BE5CB98CC; Fri, 20 Jan 2017 04:55:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 197CE1B25; Fri, 20 Jan 2017 04:55:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K4tF0c034019; Fri, 20 Jan 2017 04:55:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K4tFUM034018; Fri, 20 Jan 2017 04:55:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200455.v0K4tFUM034018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 04:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312512 - head/lib/libdevdctl/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 04:55:16 -0000 Author: ngie Date: Fri Jan 20 04:55:14 2017 New Revision: 312512 URL: https://svnweb.freebsd.org/changeset/base/312512 Log: Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libdevdctl/tests/Makefile Modified: head/lib/libdevdctl/tests/Makefile ============================================================================== --- head/lib/libdevdctl/tests/Makefile Fri Jan 20 04:54:21 2017 (r312511) +++ head/lib/libdevdctl/tests/Makefile Fri Jan 20 04:55:14 2017 (r312512) @@ -2,7 +2,7 @@ TESTSDIR= ${TESTSBASE}/lib/libdevdctl -.PATH: ${.CURDIR}/.. +.PATH: ${.CURDIR:H} PLAIN_TESTS_CXX= libdevdctl_unittest From owner-svn-src-head@freebsd.org Fri Jan 20 05:35:32 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 53F30CB9110; Fri, 20 Jan 2017 05:35:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5171AAB; Fri, 20 Jan 2017 05:35:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 741F110450B0; Fri, 20 Jan 2017 16:35:21 +1100 (AEDT) Date: Fri, 20 Jan 2017 16:35:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sean Bruno cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312434 - head/sys/sys In-Reply-To: <201701191958.v0JJw98r009581@repo.freebsd.org> Message-ID: <20170120162524.D1727@besplex.bde.org> References: <201701191958.v0JJw98r009581@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=Ti_X0qcXNKnn0ZM1Vb4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 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: Fri, 20 Jan 2017 05:35:32 -0000 On Thu, 19 Jan 2017, Sean Bruno wrote: > Author: sbruno > Date: Thu Jan 19 19:58:08 2017 > New Revision: 312434 > URL: https://svnweb.freebsd.org/changeset/base/312434 > > Log: > Adjust gtaskqueue startup again so that we catch the !SMP case and > users that choose not to use EARLY_AP_STARTUP. > > There is still an initialization issue/panic with !SMP and !EARLY_AP_STARTUP > that we have yet to resolve. > > Submitted by: bde It is more for "legacy" (non-MSI) interrupts with most of the 8 combinations SMP, EARLY_AP_STARTUP and (ncpus > 1). Some combinations work, but not the simplest ones with ncpus == 1 since the complications for the complex cases affect the simplest cases adversely. Bruce From owner-svn-src-head@freebsd.org Fri Jan 20 05:45:08 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 7CA75CB92CE; Fri, 20 Jan 2017 05:45:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F29B1F72; Fri, 20 Jan 2017 05:45:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K5j7uS054349; Fri, 20 Jan 2017 05:45:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K5j7RQ054348; Fri, 20 Jan 2017 05:45:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200545.v0K5j7RQ054348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 05:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312513 - head/sys/modules/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 05:45:08 -0000 Author: ngie Date: Fri Jan 20 05:45:07 2017 New Revision: 312513 URL: https://svnweb.freebsd.org/changeset/base/312513 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Fri Jan 20 04:55:14 2017 (r312512) +++ head/sys/modules/ath/Makefile Fri Jan 20 05:45:07 2017 (r312513) @@ -31,8 +31,8 @@ ATH_RATE?= sample # tx rate control algorithm -.PATH: ${.CURDIR}/../../dev/ath -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal KMOD= if_ath SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c @@ -46,7 +46,7 @@ SRCS+= device_if.h bus_if.h pci_if.h opt # # AR5210 support; these are first generation 11a-only devices. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5210 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5210 SRCS+= ah_eeprom_v1.c \ ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \ ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \ @@ -56,7 +56,7 @@ SRCS+= ah_eeprom_v1.c \ # AR5211 support; these are second generation 11b/g/a devices # (but 11g was OFDM only and is not supported). # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5211 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5211 SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \ ar5211_recv.c ar5211_reset.c ar5211_xmit.c @@ -64,7 +64,7 @@ SRCS+= ar5211_attach.c ar5211_beacon.c a # # AR5212 support; this covers all other pci/cardbus legacy parts. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5212 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5212 SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \ ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \ @@ -85,7 +85,7 @@ SRCS+= ar5413.c # NB: 9160 depends on 5416 but 5416 does not require 9160 # # + 5416 (Owl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5416 SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \ ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ @@ -97,7 +97,7 @@ SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ SRCS+= ar2133.c # + AR9160 (Sowl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9001 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9001 SRCS+= ar9160_attach.c # + AR9130 - (Sowl) - Embedded (AR913x SoC) @@ -111,7 +111,7 @@ SRCS+= ar9130_attach.c ar9130_eeprom.c a # AR9002 series chips # + AR9220/AR9280 - Merlin -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9280.c ar9280_attach.c ar9280_olc.c # + AR9285 - Kite @@ -119,13 +119,13 @@ SRCS+= ar9285.c ar9285_reset.c ar9285_at SRCS+= ar9285_diversity.c ar9285_btcoex.c # + AR9287 - Kiwi -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal SRCS+= ah_eeprom_9287.c -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c # + AR9300 HAL -.PATH: ${.CURDIR}/../../contrib/dev/ath/ath_hal/ar9300 +.PATH: ${SRCTOP}/sys/contrib/dev/ath/ath_hal/ar9300 SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c @@ -135,22 +135,22 @@ SRCS+= ar9300_power.c ar9300_timer.c ar9 # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/sample SRCS+= sample.c .elif ${ATH_RATE} == "onoe" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/onoe +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/onoe SRCS+= onoe.c .elif ${ATH_RATE} == "amrr" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/amrr +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/amrr SRCS+= amrr.c .endif # DFS -.PATH: ${.CURDIR}/../../dev/ath/ath_dfs/null +.PATH: ${SRCTOP}/sys/dev/ath/ath_dfs/null SRCS+= dfs_null.c -CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal -CFLAGS+= -I. -I${.CURDIR}/../../contrib/dev/ath/ath_hal/ +CFLAGS+= -I. -I${SRCTOP}/sys/dev/ath -I${SRCTOP}/sys/dev/ath/ath_hal +CFLAGS+= -I. -I${SRCTOP}/sys/contrib/dev/ath/ath_hal/ .if !defined(KERNBUILDDIR) opt_ah.h: From owner-svn-src-head@freebsd.org Fri Jan 20 05:51:26 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 9D8A2CB93FB; Fri, 20 Jan 2017 05:51:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69DAC1395; Fri, 20 Jan 2017 05:51:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K5pPaZ055370; Fri, 20 Jan 2017 05:51:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K5pPNG055369; Fri, 20 Jan 2017 05:51:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200551.v0K5pPNG055369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 05:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312514 - head/gnu/usr.bin/gdb/gdbserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 05:51:26 -0000 Author: ngie Date: Fri Jan 20 05:51:25 2017 New Revision: 312514 URL: https://svnweb.freebsd.org/changeset/base/312514 Log: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdbserver/Makefile Fri Jan 20 05:45:07 2017 (r312513) +++ head/gnu/usr.bin/gdb/gdbserver/Makefile Fri Jan 20 05:51:25 2017 (r312514) @@ -3,7 +3,7 @@ # Not elf specific so don't install in /usr/libexec/elf BINDIR=/usr/bin -GDBDIR= ${.CURDIR}/../../../../contrib/gdb +GDBDIR= ${SRCTOP}/contrib/gdb .PATH: ${GDBDIR}/gdb/signals .PATH: ${GDBDIR}/gdb/gdbserver .PATH: ${GDBDIR}/gdb From owner-svn-src-head@freebsd.org Fri Jan 20 05:56:26 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 A4205CB95A3; Fri, 20 Jan 2017 05:56:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 655391673; Fri, 20 Jan 2017 05:56:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id e4so4762672pfg.0; Thu, 19 Jan 2017 21:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=P9rfnczcrJByxkHyuHfOF9RIlwTgYcp914RLrNfoQAY=; b=YJ4kPS6rLHx2MB+XI24BLQOqt9kFBmIiA9tr+0QnJWxcIujad1fLEQUb+b/1sVL9vr 8xdsqHcSrBK1PFYHgfE7vRDuGzPykULd1o9riiKiEkS8hQqYbJMRVcay6YjJQxOkpe4B Eu+ZjdNor7whzSZoamR5wf6xRu5WtlpyqImT21i9DqZVCw/Jn79F77nllAzYZ8yT3VbG hZ4mNjpHAUI9kCf//up8rOsZda41hY8qcQGhVpt4sazkWdcgqdfbHQelTjgqN7Ha9nE4 lna9BGjcLzX5ffhHw4LdFTiefVmDWClArJuTYgRbfZmli17jJpAdY670KmEAESyz2Oot 9hVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=P9rfnczcrJByxkHyuHfOF9RIlwTgYcp914RLrNfoQAY=; b=XPxSDMj18mwnfMBp9V4BmWZHzyzpEzvRbb1LSIr7ad7zivch3hquCoiW/3ZipKryzm 2IrzjI75l0L2mxsbOIKuFyb2qjrJAXghmmaoDGNJ1FttwWincJB+WxAa2sonjM/vq/UO IGdRozxGHc6/jnNybQxgERsPIqz6/M8jaSe6GRQuK3dLi7G2BoDtBoTXWGXey1Dx6I3m YLcP2Lal9HZOsaxi+oahlT4qtuYJ4ZycdzDvbxZt84KgKwKnVnQ5TBRO2c6JAWety0ik uyEPAwQ7y3sq4zePoY2KfcYsdjpU3zMmvy/T+KRCNb/pXOZGnW112ieb44RGhgawddnE kx5w== X-Gm-Message-State: AIkVDXLo/JxS9VZ+eBEEWqj2F+6YZDLcJH5KMb9PWK5pGIdbcXpgZMA0+JTxN6rsOYaoGw== X-Received: by 10.98.10.69 with SMTP id s66mr14369264pfi.146.1484891785860; Thu, 19 Jan 2017 21:56:25 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p1sm13085844pgc.29.2017.01.19.21.56.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 21:56:25 -0800 (PST) Subject: Re: svn commit: r312513 - head/sys/modules/ath Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0A03316C-9C98-4A60-A3F3-30EE6D4C1155"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701200545.v0K5j7RQ054348@repo.freebsd.org> Date: Thu, 19 Jan 2017 21:56:24 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <9AFF044E-E0D2-429F-A350-49FEA2D43CF8@gmail.com> References: <201701200545.v0K5j7RQ054348@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) 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: Fri, 20 Jan 2017 05:56:26 -0000 --Apple-Mail=_0A03316C-9C98-4A60-A3F3-30EE6D4C1155 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 19, 2017, at 21:45, Ngie Cooper wrote: >=20 > Author: ngie > Date: Fri Jan 20 05:45:07 2017 > New Revision: 312513 > URL: https://svnweb.freebsd.org/changeset/base/312513 >=20 > Log: > Use SRCTOP-relative paths to other directories instead of = .CURDIR-relative ones >=20 > This simplifies pathing in make/displayed output >=20 > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon I hope that this also gives Jenkins the hint that these warnings are not = unique because the filename is now consistent between sys/conf/files and = sys/modules/ath/Makefile: = https://groups.google.com/forum/#!topic/jenkinsci-issues/8ewZHr_dXiU . = We=E2=80=99ll see=E2=80=A6 -Ngie --Apple-Mail=_0A03316C-9C98-4A60-A3F3-30EE6D4C1155 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYgaaIAAoJEPWDqSZpMIYVtewQAKDGafKgvtA/L8hr9ptOI9UC 8Ne/eJMifH10NFByhMweQCRNgQC755aS/xqzQmF3ViMeZ23jHYwUPWTGFdTKfaCB +ZLBgo/KMhRXo8bbbZDYe3mNDd/yFxVETaJMdwSGaaUPlHmJ+FX3hD5UcJSElM/+ FZxf9jcm9Rdad9NwmpATs2+OfDZAGnw4T33FkNoMSunp10J/DWJZo51VFePbYV/k rbzIkiPWEoFoE1Oq6wTsWCRHdcdJUVnhvCEJkTBX1ZabZW958ttuo7OQMekEfiq8 ofzP9crsGzUq22b5dv35/zklT1+1EvAKneG1QF/pCy4g4Quudpe7cwWkOdpVjAS/ 9bf8aEBrH1p4DonvCddvad+D2mnXHxtRYRyg/2YpP+9+gWC9eTxm/SNm9y1aN5aE 1sMouK84eq/yn0cG4XNi51pX1sVNYFPYgKmnXslRJgomiWFWo5pqXwAka0nkAhAO lilvpnqS5riz6vkJlRFlfl6GT3XKcHGVcEqZGokOcGVI377zOh9I4z+c4Qxuz4KS hwZocoAEAZpfe5rWYFyDY8LmA7NKJmtrUTtIvzOUATSxJDlosgth3cUQ75RdGXSr fiH7SL2qL4BJ/7cWs2/+zqSCKMByfJwiOPEZq8HYGo18pq9CUtaLJJIe0z1miJaE /bqdmFirK5G/ten7aAGK =xKiZ -----END PGP SIGNATURE----- --Apple-Mail=_0A03316C-9C98-4A60-A3F3-30EE6D4C1155-- From owner-svn-src-head@freebsd.org Fri Jan 20 06:29:53 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 AAACECB9E59; Fri, 20 Jan 2017 06:29:53 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 741431717; Fri, 20 Jan 2017 06:29:53 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-it0-x244.google.com with SMTP id e137so1953649itc.0; Thu, 19 Jan 2017 22:29:53 -0800 (PST) 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=GWCy4sLcOg3U5r2wNHfXR7anBHpMaN9lybgeMkd0ZgA=; b=kqHrt9B3d/T4NaWyXdspEVhtxzHmBoxdBPjuz21sioBpuUkh3pii1bpc+Xs/MbZEnL T3sKpu+p6sED0/dgQNgWQbA9u9q3Cb58/c8fiiYDagDaYEnjFnARup4FmoFRj30Hbl4t robUaDK45DWacPipAhmDdYfv0KmR6gnuHR/y5rJlp93Dn9ctWzQbxRfTvOqled50FnNO KDq9yFS4sQQ7vyojbvbMu+SDxmhwKdX1T7nMlij4y2y/D3Tl3RrFLPrjjPSpSfDzUmx0 iZedq5/mSwyOjGOVN6kdXuvxWBklOlbB6g+FIQ+eae4FDqMUn+nxLb5ZRM7hLH7PND/n 7PfA== 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=GWCy4sLcOg3U5r2wNHfXR7anBHpMaN9lybgeMkd0ZgA=; b=Z1DO8bIWR8i6caQIciG4yFRz2grotP2A2N95fov9rNYsVV7fFcipkqkjvl9ZnEDp9Z +FsAWYZ4ZnHYNEY/sl+VWK56X+qiEa9TrfQwsmKtBs4U7iHE5gXBJ4zxaOg63ubeJt2k WUzvhaElKMUJCcSEc3ueezvHtp0wpCEcYT6c9XltwWiKx76eU7gafHWCsokUcFqZLHMX 272gC0e8JPHey1y0CAFHFExNO4JZzn+8Dt2hN8r+7HDQNxd5rwF0zgRjgAOj4lF0vUEB xdTto1yphmOeLkP24p2Q6pWmmcAZw57iEyFq0zDvOvh97kfkowtRw8gR5tvaWZ74gHJa /qpw== X-Gm-Message-State: AIkVDXLBvjEPq3wp9eW+86dwMZl1FH0rMqxA1qKzgWbolg/spl/WNj/TyYf0cjtmDo/o4RL+3rfsYuI2uqBgIg== X-Received: by 10.36.40.139 with SMTP id h133mr2174106ith.40.1484893792682; Thu, 19 Jan 2017 22:29:52 -0800 (PST) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.205.142 with HTTP; Thu, 19 Jan 2017 22:29:52 -0800 (PST) In-Reply-To: <201701190801.v0J81ZG9008267@repo.freebsd.org> References: <201701190801.v0J81ZG9008267@repo.freebsd.org> From: Antoine Brodin Date: Fri, 20 Jan 2017 07:29:52 +0100 X-Google-Sender-Auth: qjXz9JKboAGyxKL30Dxn8dmkN5w Message-ID: Subject: Re: svn commit: r312404 - head/usr.bin/sed To: Xin LI Cc: src-committers , 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: Fri, 20 Jan 2017 06:29:53 -0000 On Thu, Jan 19, 2017 at 9:01 AM, Xin LI wrote: > Author: delphij > Date: Thu Jan 19 08:01:35 2017 > New Revision: 312404 > URL: https://svnweb.freebsd.org/changeset/base/312404 > > Log: > Use S_ISREG instead of manual & (also it's better to compare the > result from & and the pattern instead of just assuming it's one bit > value). > > Pointed out by Tianjie Mao . > > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D4827 Hi, sed -i no longer works on symlinks which breaks lots of ports. Please revert and request an exp-run. Cheers, Antoine From owner-svn-src-head@freebsd.org Fri Jan 20 06:43:27 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 63C74CB92A4; Fri, 20 Jan 2017 06:43:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) (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 E49E0126B; Fri, 20 Jan 2017 06:43:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f65.google.com with SMTP id r126so4324632wmr.3; Thu, 19 Jan 2017 22:43:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=TN6e0m4WW6GIcNbV7B9BtXRrqIG6OKUjGfw4lkUo+TA=; b=fshRbIKg6afmx1RLSi3cvbuVIbr+FMwHZozEPMM7AmICEECwwYscHQOhpfilUvh50F v6QAxm0nMiLS6KXIKvnmWe69Xjcx3aOBrtVAuHDZ1C/UTU2X2CrI4vZpDD8usp68mxld EbEs916Auc/MMZQIb3Q0NPFgwfifQUGCweXQHf4LbuZ/YtX8QXur8NDnA4ret0F49WGM cXNcshUPEgE/9K4FX1LoAZkGf7aFPZZcWyi2xzbS+6fXKHT/C93jMWnZ3yr1eS/miE0T 9lVuyb3FL6ppzEd+bq31Wbbs5scYUjjdW7l/0EYbVvLbNuWABam4VUlOVMMq6kTjKZoa V42Q== X-Gm-Message-State: AIkVDXIcwKLJC0vsVCh4faE/e8/FMob4/rrMz/feRh/uvA2YrO9jksa0sELfCgfYaT5sVw== X-Received: by 10.28.34.194 with SMTP id i185mr1905677wmi.118.1484894217655; Thu, 19 Jan 2017 22:36:57 -0800 (PST) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id 191sm3765749wmo.21.2017.01.19.22.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 22:36:57 -0800 (PST) Received: by mail-wm0-f52.google.com with SMTP id c206so28643674wme.0; Thu, 19 Jan 2017 22:36:57 -0800 (PST) X-Received: by 10.28.100.70 with SMTP id y67mr1840509wmb.45.1484894217406; Thu, 19 Jan 2017 22:36:57 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Thu, 19 Jan 2017 22:36:56 -0800 (PST) In-Reply-To: References: <201701190801.v0J81ZG9008267@repo.freebsd.org> From: Conrad Meyer Date: Thu, 19 Jan 2017 22:36:56 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r312404 - head/usr.bin/sed To: Antoine Brodin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Fri, 20 Jan 2017 06:43:27 -0000 On Thu, Jan 19, 2017 at 10:29 PM, Antoine Brodin wrot= e: > On Thu, Jan 19, 2017 at 9:01 AM, Xin LI wrote: >> Author: delphij >> Date: Thu Jan 19 08:01:35 2017 >> New Revision: 312404 >> URL: https://svnweb.freebsd.org/changeset/base/312404 >> >> Log: >> Use S_ISREG instead of manual & (also it's better to compare the >> result from & and the pattern instead of just assuming it's one bit >> value). >> >> Pointed out by Tianjie Mao . >> >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D4827 > > Hi, > > sed -i no longer works on symlinks which breaks lots of ports. > Please revert and request an exp-run. That is clearly the intent of the code in question. It was a bug that it worked before =E2=80=94 S_IFLNK and S_IFSOCK just happen to have the S_IFREG bit set. It seems like either such ports should be fixed to dereference the link manually, or the check should be removed entirely. Best, Conrad From owner-svn-src-head@freebsd.org Fri Jan 20 06:45:07 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 5CB39CB930F; Fri, 20 Jan 2017 06:45:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1BE13E5; Fri, 20 Jan 2017 06:45:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K6j6fG078907; Fri, 20 Jan 2017 06:45:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K6j6EK078906; Fri, 20 Jan 2017 06:45:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701200645.v0K6j6EK078906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 20 Jan 2017 06:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312519 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 06:45:07 -0000 Author: delphij Date: Fri Jan 20 06:45:06 2017 New Revision: 312519 URL: https://svnweb.freebsd.org/changeset/base/312519 Log: Revert r312404 as we need to do an exp-run and fix existing ports that rely on the previous behavior. Requested by: antonie (portmgr) Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Fri Jan 20 06:40:12 2017 (r312518) +++ head/usr.bin/sed/main.c Fri Jan 20 06:45:06 2017 (r312519) @@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (inplace != NULL) { if (lstat(fname, &sb) != 0) err(1, "%s", fname); - if (!S_ISREG(sb.st_mode)) + if (!(sb.st_mode & S_IFREG)) errx(1, "%s: %s %s", fname, "in-place editing only", "works for regular files"); From owner-svn-src-head@freebsd.org Fri Jan 20 06:47:03 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 591BCCB9376; Fri, 20 Jan 2017 06:47:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27A0715F1; Fri, 20 Jan 2017 06:47:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K6l2k8079037; Fri, 20 Jan 2017 06:47:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K6l2Sj079036; Fri, 20 Jan 2017 06:47:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200647.v0K6l2Sj079036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 06:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312520 - head/usr.bin/sed/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 06:47:03 -0000 Author: ngie Date: Fri Jan 20 06:47:02 2017 New Revision: 312520 URL: https://svnweb.freebsd.org/changeset/base/312520 Log: Integrate contrib/netbsd-tests/usr.bin/sed/t_sed.sh into the FreeBSD test suite as usr.bin/sed/sed_test Don't expect :emptybackref to fail -- it succeeds on FreeBSD MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/sed/tests/Makefile Modified: head/usr.bin/sed/tests/Makefile ============================================================================== --- head/usr.bin/sed/tests/Makefile Fri Jan 20 06:45:06 2017 (r312519) +++ head/usr.bin/sed/tests/Makefile Fri Jan 20 06:47:02 2017 (r312520) @@ -2,11 +2,15 @@ PACKAGE= tests +NETBSD_ATF_TESTS_SH+= sed_test TAP_TESTS_SH= legacy_test TAP_TESTS_SH+= multi_test TEST_METADATA.multi_test+= required_files="/usr/share/dict/words" TAP_TESTS_SH+= inplace_race_test +ATF_TESTS_SH_SED_sed_test+= -e 's,atf_expect_fail "PR bin/28126",,g' +${PACKAGE}FILES+= d_c2048.in + ${PACKAGE}FILES+= hanoi.sed ${PACKAGE}FILES+= math.sed ${PACKAGE}FILES+= regress.G.out @@ -35,4 +39,5 @@ ${PACKAGE}FILES+= regress.y.out SUBDIR= regress.multitest.out +.include .include From owner-svn-src-head@freebsd.org Fri Jan 20 06:59:57 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 28B91CB95DF; Fri, 20 Jan 2017 06:59:57 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2A001BF6; Fri, 20 Jan 2017 06:59:56 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:389e:e35e:c4a4:70e1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 7861B2B95A; Thu, 19 Jan 2017 22:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1484895596; x=1484909996; bh=lqhSIIk6VI7QoHintmU6A2TpILACLjVHTD3ZQCZqw54=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=p/GuRXOsXHFpkttfY7xmFZji4MhSivm4ezAkbzKjLf6HJDuPaq6IAmj5X1cbNIpGz 4xGqD17ZFm8COgnUzZ9WToDWGuu8sMCVeX5xO6RICi/k/IOlMbsC2z4EUWM2ZhZ9f+ M2b0UAD05pnLB9v4pjK0VgaYDaG+L41newks/2PE= Subject: Re: svn commit: r312404 - head/usr.bin/sed To: cem@freebsd.org, Antoine Brodin References: <201701190801.v0J81ZG9008267@repo.freebsd.org> Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Xin Li Message-ID: <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net> Date: Thu, 19 Jan 2017 22:59:52 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC" 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: Fri, 20 Jan 2017 06:59:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC Content-Type: multipart/mixed; boundary="SuRItJcO1rFLU3g36HqQDilesvQueKFIa"; protected-headers="v1" From: Xin Li To: cem@freebsd.org, Antoine Brodin Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net> Subject: Re: svn commit: r312404 - head/usr.bin/sed References: <201701190801.v0J81ZG9008267@repo.freebsd.org> In-Reply-To: --SuRItJcO1rFLU3g36HqQDilesvQueKFIa Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/19/17 22:36, Conrad Meyer wrote: > On Thu, Jan 19, 2017 at 10:29 PM, Antoine Brodin = wrote: >> On Thu, Jan 19, 2017 at 9:01 AM, Xin LI wrote: >>> Author: delphij >>> Date: Thu Jan 19 08:01:35 2017 >>> New Revision: 312404 >>> URL: https://svnweb.freebsd.org/changeset/base/312404 >>> >>> Log: >>> Use S_ISREG instead of manual & (also it's better to compare the >>> result from & and the pattern instead of just assuming it's one bit= >>> value). >>> >>> Pointed out by Tianjie Mao . >>> >>> MFC after: 2 weeks >>> Differential Revision: https://reviews.freebsd.org/D4827 >> >> Hi, >> >> sed -i no longer works on symlinks which breaks lots of ports. >> Please revert and request an exp-run. >=20 > That is clearly the intent of the code in question. It was a bug that > it worked before =E2=80=94 S_IFLNK and S_IFSOCK just happen to have the= > S_IFREG bit set. It seems like either such ports should be fixed to > dereference the link manually, or the check should be removed > entirely. There are other issues with previous behavior, for instance, the file would inherit permissions from the symlink itself, while a more sensible behavior would be to use the permissions on the symlink target. But I think it's reasonable to revert for now and do a exp-run so we know what would be broken. Personally I have been running with this for a year and that made me thought it's safe :) Cheers, --SuRItJcO1rFLU3g36HqQDilesvQueKFIa-- --kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYgbVrAAoJEJW2GBstM+ns1wcP/05NpskWm7rBiOOdvcEctDCF OGTyzt7N6YyAP5lka78MmpVOxAs+u1roAgRO64tre7QSFr7JcWSTkgDTiO+BmIew EF89DKO/NCOAoPmXX/LONZd3X8h4zbMPLx4M4MgxTBwwuMQlXRe104NXcuX+7wWf OSwE5EF/jwgO7iPjtaUZz5rNxqa8VYysLZdqhZJKPpW2qZyI1O4BXMi1hs5lK2ZG 7BtxN6n3qbmGY4Nnlh4r6EKPne1bBZg0/GPfjR1AaYGsszXYAPBYtc3wfcX+ODvj 2Zo5i0bmAWZKMYlS9vzROIQw6kmVBXVccvMbIn5eWblPDx48HhT7hLw7jkALySIR swjYq+1WVOlgdk64nDCFQr0PHFPeX8CU6V3b+nHj+XTlQvp/IVu2VkOvd9UVf1/d E27MI3XyxIZ4Iv7P54vOQ+oxa5KbsAV7nun7p9R1kTGKytJtnabKKpSCLLFswnPZ Gz8RHk1puA+2z4Ydc+uQWMDGpX+WDn6UH6MVqsAmA3V8ZtcNj+T+UsO0qjtoRKUy DpZW87nPMlSyykY0f9ZGGPCmpOjJURfsJApVP+0QOHgAhCh4OVIalIGOoQ8itKgG Iytf5l5z2KFb6ThQmfqelsFLFKhOeTc9EG1h9Tu7ICmET7WJ4BmBWwiiZA42z4OH PUMLXry6+fFEvkTg2R+P =oPGP -----END PGP SIGNATURE----- --kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:00:25 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 83CF3CB9661; Fri, 20 Jan 2017 07:00:25 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 668B71D71; Fri, 20 Jan 2017 07:00:25 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:389e:e35e:c4a4:70e1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 1BAEA2B96F; Thu, 19 Jan 2017 23:00:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1484895625; x=1484910025; bh=1RHS7DyETlhMmgNXz6mHk2FZ7muuwMIqvPjO0HOzrHk=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=4QaKLDrLr3ImMJSz8d5XUEl1udu2xnYKBk5mmgB3SBymHbS3FC33+7tghsjq3hQ0D AQEZAmLF18JSYvVcsFtsCOe3C87R2P2nwuCsNzftVZe4BqdLvNQZmGylQQy1jC4RE4 JD8+EepjPxbfAsBfIsOA0ldkw6WQZzqcA8mQHDiU= Subject: Re: svn commit: r312404 - head/usr.bin/sed To: Antoine Brodin , Xin LI References: <201701190801.v0J81ZG9008267@repo.freebsd.org> Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Xin Li Message-ID: <9ef03812-a23a-8cd0-d8a1-1568c468e882@delphij.net> Date: Thu, 19 Jan 2017 23:00:24 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SENJsW1H2Ed9QTL5T1dRhBvn3lc1L4fWC" 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: Fri, 20 Jan 2017 07:00:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SENJsW1H2Ed9QTL5T1dRhBvn3lc1L4fWC Content-Type: multipart/mixed; boundary="d44b1ivlC1HxeatqxGkS12JbgLghNw6LD"; protected-headers="v1" From: Xin Li To: Antoine Brodin , Xin LI Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <9ef03812-a23a-8cd0-d8a1-1568c468e882@delphij.net> Subject: Re: svn commit: r312404 - head/usr.bin/sed References: <201701190801.v0J81ZG9008267@repo.freebsd.org> In-Reply-To: --d44b1ivlC1HxeatqxGkS12JbgLghNw6LD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/19/17 22:29, Antoine Brodin wrote: > On Thu, Jan 19, 2017 at 9:01 AM, Xin LI wrote: >> Author: delphij >> Date: Thu Jan 19 08:01:35 2017 >> New Revision: 312404 >> URL: https://svnweb.freebsd.org/changeset/base/312404 >> >> Log: >> Use S_ISREG instead of manual & (also it's better to compare the >> result from & and the pattern instead of just assuming it's one bit >> value). >> >> Pointed out by Tianjie Mao . >> >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D4827 >=20 > Hi, >=20 > sed -i no longer works on symlinks which breaks lots of ports. > Please revert and request an exp-run. Done. Requested as bug 216309. Cheers, --d44b1ivlC1HxeatqxGkS12JbgLghNw6LD-- --SENJsW1H2Ed9QTL5T1dRhBvn3lc1L4fWC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYgbWIAAoJEJW2GBstM+nsil8P/2thGy73XAVRt6DFZmMMmCMy 5nRtCP9bqdBdEqVw6Xfu5/lyymhaH7oGgXiTQ8hGRKOGIvs0tGjTCr1MX23O8xkC Rp+M3JJVXNU82vidTgWeq6udiGOJ4VDTcRxvKna11LwakqDqgAVcUn3R+U7X+m/s hg2NXkEzyRWkB8qEgdTBGbW/YmHF8MFxKXuv/iV+TxlnyRFqI/JLHvSlS9MTGDri SczzIVZmkcO8vqWgPOxHB8AxYsUQu/g00BbIe7abvebYguDnnt6EUNnQJGVV9OVl jP1i8m4Yh09KxzFaJdEZL8Ld6AatBe2Gl3zRWByEKAlzFTnj0ELTD6z/gU7rmzry R38WBplt3GCHvNgjuUhZ9uiI+v7kkgchJHSHJbm9GCgpKovzm/1j41TSzHhC9p3w LXeIzIyyC0hIRJd/ThwVioIpxI44c0ZyW3xfy2x/oiMU89CZbK9272fr7rrrfFmK C4RMMu+xzNZHYgYz1UCAlmec4UOeq3IWl4/eRLabcaeKqbRbN6DaExxPLafaRxzw UNZQWxK4kigX5tNe1xzDDhHnmthFjj9AFCFtyRbJ7Yj4MB1eQurffam64yK9jJau woyBXn+CuH55ldf5o8fmOEvO0uGsWMv+TW/em9ctDD9sYIDM8pL2SlxQ+oX7v4y/ S0iYm/1+QtaJlfaXT5Mm =dTzG -----END PGP SIGNATURE----- --SENJsW1H2Ed9QTL5T1dRhBvn3lc1L4fWC-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:11:23 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 05513CB9851; Fri, 20 Jan 2017 07:11:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B228513A0; Fri, 20 Jan 2017 07:11:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K7BLXX090340; Fri, 20 Jan 2017 07:11:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K7BLEA090338; Fri, 20 Jan 2017 07:11:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200711.v0K7BLEA090338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 07:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312521 - head/usr.bin/sed/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 07:11:23 -0000 Author: ngie Date: Fri Jan 20 07:11:21 2017 New Revision: 312521 URL: https://svnweb.freebsd.org/changeset/base/312521 Log: Add testcases for -i with hardlinks and symlinks The symlink testcase is expected to fail, post-r312519 (the revert of r312404); mark it so. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/usr.bin/sed/tests/sed2_test.sh (contents, props changed) Modified: head/usr.bin/sed/tests/Makefile Modified: head/usr.bin/sed/tests/Makefile ============================================================================== --- head/usr.bin/sed/tests/Makefile Fri Jan 20 06:47:02 2017 (r312520) +++ head/usr.bin/sed/tests/Makefile Fri Jan 20 07:11:21 2017 (r312521) @@ -2,6 +2,7 @@ PACKAGE= tests +ATF_TESTS_SH+= sed2_test NETBSD_ATF_TESTS_SH+= sed_test TAP_TESTS_SH= legacy_test TAP_TESTS_SH+= multi_test Added: head/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sed/tests/sed2_test.sh Fri Jan 20 07:11:21 2017 (r312521) @@ -0,0 +1,61 @@ +# +# Copyright 2017 Dell EMC. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +atf_test_case inplace_hardlink_src +inplace_hardlink_src_head() +{ + atf_set "descr" "Verify -i works with a symlinked source file" +} +inplace_hardlink_src_body() +{ + echo foo > a + atf_check ln a b + atf_check sed -i '' -e 's,foo,bar,g' b + atf_check -o 'inline:bar\n' -s exit:0 cat b +} + +atf_test_case inplace_symlink_src +inplace_symlink_src_head() +{ + atf_set "descr" "Verify -i works with a symlinked source file" +} +inplace_symlink_src_body() +{ + atf_expect_fail "Check for S_IFREG reverted in r312404" + + echo foo > a + atf_check ln -s a b + atf_check -e not-empty -s not-exit:0 sed -i '' -e 's,foo,bar,g' b +} + +atf_init_test_cases() +{ + atf_add_test_case inplace_hardlink_src + atf_add_test_case inplace_symlink_src +} From owner-svn-src-head@freebsd.org Fri Jan 20 07:14:02 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 47914CB99EE; Fri, 20 Jan 2017 07:14:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 13D731687; Fri, 20 Jan 2017 07:14:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id e4so4905033pfg.0; Thu, 19 Jan 2017 23:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Lr/52di4IRonJgEsx2nyqBywviGuhNDaQo+K3JxXZrk=; b=Mhty7x8f3aOKT1i/edKRS7vPbDvJQxC2nVpNssZ5DBRKDfIHLpWScLgs/CgmI8x5aH sg2/4Y0svbHr8sji+T5yDzRNp/JcTEyN1muMaYQpRL6vzlMsAGQIiM7KZ2o6OoJ5waFq eRpzyDMTShwsMVxNsGCgCsccD4Pp1otitWOT+L81rnm4bRKS2T8xxozkljF2EzZrWy8v uYzz8gdMySojSpkgEDCQ1ftdiqKujR2Y1hc3m7+oMNRowui9gQ6ed78hdhw4s8Ti5EHS o44o9fOhlW7+g8OB1OpVKEvx8Llo80HTDkgr8Y2GIA1ZgplUlUXyu5qFk/BW6BywohEf Ky8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Lr/52di4IRonJgEsx2nyqBywviGuhNDaQo+K3JxXZrk=; b=Wm3CUIFDkY0m69lXFrro+Hi0T9J5TW6N6csRF9mpoxEHYcgTnzFCuPeUsu9Y2ioXpk wOjmAKLHy5iDFQZdiaRwA9VC/bqzuOBYTLwrVw0humipGglrpFEKdjoAx+6boLm9/Hoy YQCRenbcm/EgIrQIb7p4yIo2JSdOr8kLBbpHhvLpgjQUcZ3nMn5O5rxu9Z/MIp0tN8nf bWzgf9/sRbIUE/yWdmMf7d3m0CpVr3EYZe5QFqa78u7in9DphNVAjvyVkvv/XK/8HkGe nxQHgLIidT0JExcNkPle09KiqD9YjsjsX4+yMXDwEvDLNxX3+FYzA4Z13dXn2zPZqyDw ub/g== X-Gm-Message-State: AIkVDXJvE67H/MxWOUwkIl9ZiGAsTWlgsglT1DBsbUdsaWt+dk09dujMyKa3dcdH7fjxgQ== X-Received: by 10.99.98.132 with SMTP id w126mr15268842pgb.59.1484896441524; Thu, 19 Jan 2017 23:14:01 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 143sm13739935pfu.58.2017.01.19.23.14.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 23:14:00 -0800 (PST) Subject: Re: svn commit: r312519 - head/usr.bin/sed Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E8CA5559-A9A4-4CA8-8553-7343DC0A5F77"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701200645.v0K6j6EK078906@repo.freebsd.org> Date: Thu, 19 Jan 2017 23:13:59 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> References: <201701200645.v0K6j6EK078906@repo.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.3124) 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: Fri, 20 Jan 2017 07:14:02 -0000 --Apple-Mail=_E8CA5559-A9A4-4CA8-8553-7343DC0A5F77 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 19, 2017, at 22:45, Xin LI wrote: >=20 > Author: delphij > Date: Fri Jan 20 06:45:06 2017 > New Revision: 312519 > URL: https://svnweb.freebsd.org/changeset/base/312519 >=20 > Log: > Revert r312404 as we need to do an exp-run and fix existing ports = that > rely on the previous behavior. >=20 > Requested by: antonie (portmgr) I added 2 testcases to help check for this behavior later in = r312521. All that needs to be done is remove this line: = https://svnweb.freebsd.org/base/head/usr.bin/sed/tests/sed2_test.sh?view=3D= markup&pathrev=3D312521#l50 . Cheers! -Ngie --Apple-Mail=_E8CA5559-A9A4-4CA8-8553-7343DC0A5F77 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYgbi3AAoJEPWDqSZpMIYVMxoQAJj0d5Kx6O+2KIZX0Xmc3jjw grOMCjB36oX2Jyi4DkogwtP3iRs3iqKbtL1H6pwTF1qjC1izOW1dCjAfR5R606tP dnJdnvUi3HMY5lOOTNB734Vxba1D0DFORA/KUOXLgYAe4d1GLB2GHj4WdxUPMEaX Z0R9jVefJGzp9NF8p4jfTGl41TAHwq2NtpJ9MnFOGFdc6PKixigtLVCTJOH96sbo oWBa4ZQ8JawNHfc3VKaLZPo6mZMi6WifkclRB3hRz2bG9g6wxnqZGTKV30Pj96gD iUm9WVLTSwFISjDbCxJBrx6Fz7osw7xr/HK39siVK0kI2xG8t7WdG36hfp8byum0 8Dd5QLMkp8NefM5QPTre3SGnbmIZMMMudgxifvwE0PaazWT2Iyrx5HKPljd+cXUR 8Q4kk5T80p/wXdzf7BqGOADshS8sJPsERHzaDABAqbyr4d+wCm0yoUqkalpSyk4O tBs3i0Fw/WJIQrNadlMoLDaEJ+LhvZNmv18pR+KEw9QOy3I+KenXAw1tAQh6EZ42 gdrvKzQvM4FxZN05iKdIkfhog3OuqMSz6AnADhaJwI4+cSlrqxe0wRch70ZXZ07/ oToKfVMMnS7+tg3DRJ2oQ7VPjfmW36weDDOXzRuBml6wZWAanhAVzJMOPHC+oarS +IloztkczeG0seZVKtGo =ur1K -----END PGP SIGNATURE----- --Apple-Mail=_E8CA5559-A9A4-4CA8-8553-7343DC0A5F77-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:16:07 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 D369ECB9A99; Fri, 20 Jan 2017 07:16:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCB1191F; Fri, 20 Jan 2017 07:16:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id A8102D6945B; Fri, 20 Jan 2017 18:15:59 +1100 (AEDT) Date: Fri, 20 Jan 2017 18:15:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Antoine Brodin cc: Xin LI , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312404 - head/usr.bin/sed In-Reply-To: Message-ID: <20170120174258.X1938@besplex.bde.org> References: <201701190801.v0J81ZG9008267@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=7glOachtraqBiMcJk8MA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 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: Fri, 20 Jan 2017 07:16:07 -0000 On Fri, 20 Jan 2017, Antoine Brodin wrote: > On Thu, Jan 19, 2017 at 9:01 AM, Xin LI wrote: >> Author: delphij >> Date: Thu Jan 19 08:01:35 2017 >> New Revision: 312404 >> URL: https://svnweb.freebsd.org/changeset/base/312404 >> >> Log: >> Use S_ISREG instead of manual & (also it's better to compare the >> result from & and the pattern instead of just assuming it's one bit >> value). >> >> Pointed out by Tianjie Mao . >> >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D4827 > > Hi, > > sed -i no longer works on symlinks which breaks lots of ports. > Please revert and request an exp-run. sed() doesn't seem to actually understand symlinks (it has no flag like -h to prevent following them when opening files), so its use of lstat() to classify them is wrong. This was harmless for symlinks but not for other irregular file types pointed to by symlinks. The buggy S_IFREG test accidentally classified symlinks, sockets and whiteouts as regular, but failed classify the file type of the target of symlinks that will actually be used. The fixed test limits sed to "regular" files (including highly irregular ones in /proc). It is a bug for sed to have any restrictions on file types. This breaks device indepedence. Even /dev/std* was supposed to not work, but worked accidentally since these files happen to be implemented as symlinks. Their targets /dev/fd/[0-2] didn't work accidentally, but it was possible to trick sed into working on them by pointing to them using symlinks. Similarly for all file types. POSIX only requires sed to work on text files. I couldn't find anywhere where it clearly defines what a text file is or any restriction to regular files. It requires sed to work on stdin which is often a pipe, so it must not restrict on the file type found by fstat(). So a text file should defined as "a file of any type containing text". Utilities shouldn't be restricted to text either, but that is a larger bug. It is now difficult to even define text. Non-ASCII encodings of text look like binary to me. Bruce From owner-svn-src-head@freebsd.org Fri Jan 20 07:27:40 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 9217CCB9C78; Fri, 20 Jan 2017 07:27:40 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74A201E36; Fri, 20 Jan 2017 07:27:40 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:389e:e35e:c4a4:70e1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 480712BADC; Thu, 19 Jan 2017 23:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1484897254; x=1484911654; bh=ICddl4mGoxkwJmXj81XFhUpGFEP4VPbx1abC9t1oVxg=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=VSndp14cjjGnzr6G5JSRnJRdz8852hE9GG09+12iQEuLU9lgEFkkczACqGGJZNoVr WrghOPaJxIQH62Pm/JHx89icCXlqFzRIFFvVXUPyju7Ds2cX//l+4egoth2RrXdC39 w320B/KrkxjZU9AhmjuxAtp2Q2KMe1BrfzXHFJkA= Subject: Re: svn commit: r312519 - head/usr.bin/sed To: "Ngie Cooper (yaneurabeya)" , Xin LI References: <201701200645.v0K6j6EK078906@repo.freebsd.org> <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Xin Li Message-ID: <0cf8edf5-ec3d-e6f1-9d55-1e286014d8f1@delphij.net> Date: Thu, 19 Jan 2017 23:27:31 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KlL93I8QRuC1rb6IFxocOOGpMtwIwBfc1" 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: Fri, 20 Jan 2017 07:27:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KlL93I8QRuC1rb6IFxocOOGpMtwIwBfc1 Content-Type: multipart/mixed; boundary="mg3jPN5L3CIPvlsgSWmagSKphlLLGFW29"; protected-headers="v1" From: Xin Li To: "Ngie Cooper (yaneurabeya)" , Xin LI Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0cf8edf5-ec3d-e6f1-9d55-1e286014d8f1@delphij.net> Subject: Re: svn commit: r312519 - head/usr.bin/sed References: <201701200645.v0K6j6EK078906@repo.freebsd.org> <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> In-Reply-To: <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> --mg3jPN5L3CIPvlsgSWmagSKphlLLGFW29 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 1/19/17 23:13, Ngie Cooper (yaneurabeya) wrote: >=20 >> On Jan 19, 2017, at 22:45, Xin LI wrote: >> >> Author: delphij >> Date: Fri Jan 20 06:45:06 2017 >> New Revision: 312519 >> URL: https://svnweb.freebsd.org/changeset/base/312519 >> >> Log: >> Revert r312404 as we need to do an exp-run and fix existing ports tha= t >> rely on the previous behavior. >> >> Requested by: antonie (portmgr) >=20 > I added 2 testcases to help check for this behavior later in r312521. = All that needs to be done is remove this line: https://svnweb.freebsd.org= /base/head/usr.bin/sed/tests/sed2_test.sh?view=3Dmarkup&pathrev=3D312521#= l50 . Hmm to be honest I believe the old behavior is wrong and the intent is to reinstate the revision after we have fixed the ports. Cheers, --mg3jPN5L3CIPvlsgSWmagSKphlLLGFW29-- --KlL93I8QRuC1rb6IFxocOOGpMtwIwBfc1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYgbvlAAoJEJW2GBstM+ns7yMP/3iOFYi/qi6W3njCu+s/Qnug 4dWOnkYPH7c3Y/YbQ2pQBocOSrQGvFN3MuX7nC2WNH8zkWbjthdh6C+T5tPKtUZ5 7KMXxispj9Uc6wHsPmD5KJIy3UGHeq8EMtVILuHcP4kLbSQ0vgAAU5HHL1AqlQCi zURtAhrn28ZtJHvJ9yOZMT3jENSbtVX51QyvIaTL2uBfyAf7MNcb/W0mCGG3XgF7 xcSFBFYf3AT7VqGpkslEAp+HpA/lr79EbGGbhsjfRqRkYR+PrQ2Y91HJJtcUzSfP EGoRpaPdeF0FJI/kGYTfRZUYqqLzmBNEyeKkugwMW0OACfUTRil2wYLcU8CQpFiI NKaptBHoLGeXCwD4/YZ1xtnn8AUKuniK0WUQoCbvn2SGm5a3B9bV/RRzZnN8kbii 0uog5biKjqC6ISrHbeAjQ7xKd/n08MkeBuEgYigLpaz+Ds8fXzhxTFYOlWFByhmQ g0QbN3ewAARXfAMu0R3vZwcFokFtQroE0iWTVPSBeihj80AnPFIPpXaweIZgAB6m KAGLvCLwW+yFoxS2EI0MLflVUEqh0GecXSLYIHTyEshEaj5hlUn/NIOJUl1KLAMI kuTHtZl0czRsx9q8w8hnEcbReRm5HuGMzTzl2iyeZjz/WjQmXSaVQydHrKcCP6El 5beaSBGaKs5OIacnGUXe =JcHQ -----END PGP SIGNATURE----- --KlL93I8QRuC1rb6IFxocOOGpMtwIwBfc1-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:31:58 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 EF1D0CB9E84; Fri, 20 Jan 2017 07:31:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (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 BB2451223; Fri, 20 Jan 2017 07:31:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id 204so6251445pge.2; Thu, 19 Jan 2017 23:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=pYg5XZ7sCEsedq86QtT2uC4eB12YaqXz++6rjBsy9Rc=; b=GcU0lqlM1BRVCmfbWAweS7GlII2vwfZuvJb/nZ/vMWV9KiMzaapNMOfNafEHEKPduj mJu3BI1t7T1CfgNy5Cfdc1E8f7TY1nIVvbNBFauqt5Eou2wAOWVeWDqHAvl50kliaGxl Vu1i+7Nhj8zWObSwsbtt28h40I+et3EXLx0wvTj/W92XB/SQ0LYM8BZrapUqsyiyA1jq k5XlWSK3YEmz++AHH2deqoVCgufS/MP2l6o50Hw5OyQvnmnm0tI0xcCanW7VmdsDVZuT b7+xCbiLE4wjmMe0IIX37RxXTqEfj523jxzbolWF4mrbjffIeuNJ2hePU31drLOf7mie /3EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=pYg5XZ7sCEsedq86QtT2uC4eB12YaqXz++6rjBsy9Rc=; b=AXUz1lZbbdJXY0JgeX2FNOMRXB/Pgv3IVkIcs+ecZa7GUCu6F7zHHCvNojS7wyqXJF wTQiYCLla2FtPpDkqaBeM19u/Q/LaoZSFbHjjgzbcthSamFcA9syEaszBlpAIu6pJ9ls nSANHQTzCL03mcv10dLQx+BL3oXZLF1DAORfIuDhcNj/w5bHraRowK0G+ztdXYvoom6H pj3C0uySz6j4aZPjSe6vWrjO9JvD942dui0LgBTDHLe82yk2fa0E/HCo9HTsjwagUbJ/ yqLbDYIE5Fhp4lIocN/OomFXrdFugfVvmQ9H39MTO0jcXLOYHWJ3YcxDqlELyb0JNpx8 LSow== X-Gm-Message-State: AIkVDXItg+pgWdzQhb2Yw41bK+Et/hkSvso92hOSlt5YguJSuVXQedwCoUMh9o3l2H5xuQ== X-Received: by 10.99.174.75 with SMTP id e11mr15153970pgp.89.1484897518321; Thu, 19 Jan 2017 23:31:58 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 66sm13964461pfx.29.2017.01.19.23.31.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 23:31:57 -0800 (PST) Subject: Re: svn commit: r312519 - head/usr.bin/sed Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DDC87A2F-A6C1-49F1-B803-C1B5CCBB4516"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <0cf8edf5-ec3d-e6f1-9d55-1e286014d8f1@delphij.net> Date: Thu, 19 Jan 2017 23:31:56 -0800 Cc: Xin LI , d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701200645.v0K6j6EK078906@repo.freebsd.org> <35562B6D-E733-4CC8-97C0-81CC8EAC87A7@gmail.com> <0cf8edf5-ec3d-e6f1-9d55-1e286014d8f1@delphij.net> To: Xin Li X-Mailer: Apple Mail (2.3124) 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: Fri, 20 Jan 2017 07:31:59 -0000 --Apple-Mail=_DDC87A2F-A6C1-49F1-B803-C1B5CCBB4516 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Jan 19, 2017, at 23:27, Xin Li wrote: >=20 >=20 >=20 > On 1/19/17 23:13, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Jan 19, 2017, at 22:45, Xin LI wrote: >>>=20 >>> Author: delphij >>> Date: Fri Jan 20 06:45:06 2017 >>> New Revision: 312519 >>> URL: https://svnweb.freebsd.org/changeset/base/312519 >>>=20 >>> Log: >>> Revert r312404 as we need to do an exp-run and fix existing ports = that >>> rely on the previous behavior. >>>=20 >>> Requested by: antonie (portmgr) >>=20 >> I added 2 testcases to help check for this behavior later in = r312521. All that needs to be done is remove this line: = https://svnweb.freebsd.org/base/head/usr.bin/sed/tests/sed2_test.sh?view=3D= markup&pathrev=3D312521#l50 . >=20 > Hmm to be honest I believe the old behavior is wrong and the intent is > to reinstate the revision after we have fixed the ports. I agree =97 once the revision is fixed and committed, it will = verify that sed again fails. If that=92s not correct per the designed fix, we can modify the = testcase further. Thanks :), -Ngie --Apple-Mail=_DDC87A2F-A6C1-49F1-B803-C1B5CCBB4516 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYgbzsAAoJEPWDqSZpMIYVBGMQALJFA2i5OOMNu9BHWmsepOX3 XWxUl/CwX5e9FdtOJxNMxhxKvOrQ7THGmY3LVeLbza7DlKfzSevlecl8vtFQpop6 N7LjH+J1TW+laQBK7JTAZgTSkkTLDSh09QW0z2De8eajKyOchpPTy6WcA4s/A1JF UsPsOXQh9d+ECeX0DR+EPccJgzrQ19BsnJzIZ/i+EgsrjZYiMZe5KYYPpvNYy746 2HJm5dP5aPJKjtd5PkXWa2vo/F9jlPkAIPax0rhxV39w638AVJvcIgBsnxPckNlr bgd0aifWscW9cTZf8aoQR9Ddvwtfb7fvmZDgTNAVunWh0+aYm/tj49q0Ia+8a9y2 jez6DoX0PU61dk0AbiiLYusqZHK0LWdqWNQzE3SzM3gOLSSdMnOKO2IBoYWJZgwh OBY5aJCUQ+/r22RyZO3A8whCzBk+oFPfExq9SXLlUsrrZPd9kAzKTn5RE7TPDkKb QtxAmX53Tdsb3BeQmK3LuuZ0J8WK5CJs9Utt42fVFqLU3eXQHOAIKWxW4f0as4QD sdGXky9lTmrRdt3ifCgMsSPyLwJQ/5vJ46YwitmcnFCA+Y+8sWJ3sXVhATn/1MQp +x+fEIL4yVI+VE2JcS3vxhzUvwzXmUMn4Wa5VBIWmBtGO4V+UK/6qW4byGoW/Grk sSE7jjJ3mTGLGZUn3d5M =2aK/ -----END PGP SIGNATURE----- --Apple-Mail=_DDC87A2F-A6C1-49F1-B803-C1B5CCBB4516-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:35:46 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 1675FCB9F1E; Fri, 20 Jan 2017 07:35:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 D598914AD; Fri, 20 Jan 2017 07:35:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id e4so4945054pfg.0; Thu, 19 Jan 2017 23:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=l6SIuiQZ9EBBl2UYiu8R+gZpnaJhYHgjcjbCdeLj3vE=; b=Y9y6efFS2BGKmOy+zmLR7cpKz6HU5uQ76vraQJnCxC9hk/P3WuhggqDexw3yVrLaY3 sqGkrzzwm9u/I5d9i98NKd8SWG/oXSqMDVWYCdCTgA9yNxKpK963Kn1WGXC/9EM7QGJu Pvr4yljMDjI2a3yEaVo4V2rFc+i5K+Fa9otDX8JXVom83Ft2ayuk1RdKCIOTejHyT8Av GFP7kyPVe2iry1l7T2cYkYiuN0Kz/bX6dOr+Vspr798NOwzfO2K8nrJQ4Wa1BmuFnA+1 5i2vQLXRGuEye6bTyfCAegOwWfUnPxHZybnk7fNbCxBFZHOoQjnc1yf37fx86MyZLqLz VXjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=l6SIuiQZ9EBBl2UYiu8R+gZpnaJhYHgjcjbCdeLj3vE=; b=r/P1nizhuX5Yyv7IYsWAw+1DGKyr705LzIwaRqZheM/1Gh7bkLTyW2RPr4+PSdxZV7 8modl6BmJgChvoFPBlqlj9Q3CvYWHbxmcqeGG1es5QjjHYB30s6bMPJ2VbaZ1DvUsmK8 bsZqWZHp/lh5eQk5JapOmmYFo+kE/L6/XIdXQjZfd0eHwimkHogVEAt0xY/d3PfkyYDW VMxGT1pfHpPPcay4C+xZmiqe8IJDEuBcuy/PVhcx6AcOFQaMxvk2fkXkbp8YoRQrOCBK 0JCJW6CtUau2uaBh2S3pFr3qc5+tJBUHT6EHSg0c87i9VdtBUdQ7YZ0oYQYhKij6+VU8 p3WA== X-Gm-Message-State: AIkVDXIhou+Z7u4gAaZ7pXRWMxgHligflpIp9rr6S7WI2RGvISTvl8TC5UVxe/VgqI/OEw== X-Received: by 10.99.65.1 with SMTP id o1mr14990938pga.93.1484897745518; Thu, 19 Jan 2017 23:35:45 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y184sm13904163pfg.86.2017.01.19.23.35.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 23:35:44 -0800 (PST) Subject: Re: svn commit: r312404 - head/usr.bin/sed Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2533D595-5E8D-4E31-88BF-7748A70946BD"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net> Date: Thu, 19 Jan 2017 23:35:44 -0800 Cc: cem@freebsd.org, Antoine Brodin , d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <9518E870-57E8-47F8-ACEA-5BBDB3B6C0E0@gmail.com> References: <201701190801.v0J81ZG9008267@repo.freebsd.org> <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net> To: Xin Li X-Mailer: Apple Mail (2.3124) 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: Fri, 20 Jan 2017 07:35:46 -0000 --Apple-Mail=_2533D595-5E8D-4E31-88BF-7748A70946BD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 19, 2017, at 22:59, Xin Li wrote: =E2=80=A6 > There are other issues with previous behavior, for instance, the file > would inherit permissions from the symlink itself, while a more = sensible > behavior would be to use the permissions on the symlink target. >=20 > But I think it's reasonable to revert for now and do a exp-run so we > know what would be broken. Personally I have been running with this = for > a year and that made me thought it's safe :) I think the lstat=E2=80=99s the incorrect part now =E2=80=94 should open = with O_NONBLOCK|O_RDONLY and fstat be used instead? Thanks! -Ngie --Apple-Mail=_2533D595-5E8D-4E31-88BF-7748A70946BD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYgb3QAAoJEPWDqSZpMIYVqF4QAKn/QYQUPafPTuBcluCoJmKW /3IycZByqWXf/COMO2sbOtdbuXtWQyLMuWhKSoIr+sdcNiz/Xwc+Bf2eAbsrB9h1 gR5AyMXppJEgjGuowj05+sxvtRhmB5t7U7wK4iLub5pO8CInBDXYD1U4DcqJBoMu sRtgUnDKBV4oozzV4lX/qvbiuVMhxnXV/sstpBjZ9cLag45wK9RJ/uBlKKgNmr/j hS9PUzhYRNQucC9rQo+goTVRfpH3RQqX8df7MZvs8E2BmRgDp0ky1suR9cV6YV9c y0QoGuWA0MIuOdn4Xnr0mvQH8h2CFjSTcMHpWCGl8RBa3+VjyV6NdMmDapFM4zcV 5BZGb1syWKSAuV4tGWSrAhBjvM69/9VXiO4u8WEJ726ENnkNvayhZDWdvprmB7OC Vb3Ce+xbpdhGR9mCrBpjwX50ET8qfQ/u7lJawjwEgwNW5CtF7UoLegNUzlIrRc55 GC4MDahUVTIbOINZRE+ZxNCg0cXEp7pAAMhPNDZFnn4o4an4q5Sz2C3GF0oWgiob +q1774f+sR4TU3c0/hn4TfmfMlseCrK7QDbKg5KV2zANk7B/RDfO6WQuliOtDBPe X5nIOBcnT+xHONelAiTmWNuv+0PofzO1gL4A62FJpnZfdlQH6UnzeNjWB2ia55W/ 8R6NUyzFy/DRGOLvCpdi =XYHI -----END PGP SIGNATURE----- --Apple-Mail=_2533D595-5E8D-4E31-88BF-7748A70946BD-- From owner-svn-src-head@freebsd.org Fri Jan 20 07:43:42 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 0D796CB9166; Fri, 20 Jan 2017 07:43:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D02551A15; Fri, 20 Jan 2017 07:43:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K7heeB003609; Fri, 20 Jan 2017 07:43:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K7heje003608; Fri, 20 Jan 2017 07:43:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701200743.v0K7heje003608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 20 Jan 2017 07:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312522 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 07:43:42 -0000 Author: adrian Date: Fri Jan 20 07:43:40 2017 New Revision: 312522 URL: https://svnweb.freebsd.org/changeset/base/312522 Log: [net80211] allow for MCS16-23 to be statically configured. Tested: * AR9380, STA mode Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Fri Jan 20 07:11:21 2017 (r312521) +++ head/sys/net80211/ieee80211_ioctl.c Fri Jan 20 07:43:40 2017 (r312522) @@ -2225,7 +2225,7 @@ checkmcs(int mcs) return 1; if ((mcs & IEEE80211_RATE_MCS) == 0) /* MCS always have 0x80 set */ return 0; - return (mcs & 0x7f) <= 15; /* XXX could search ht rate set */ + return (mcs & 0x7f) <= 31; /* XXX could search ht rate set */ } static int From owner-svn-src-head@freebsd.org Fri Jan 20 07:46:41 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 26DB3CB91FE; Fri, 20 Jan 2017 07:46:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id E08F41BD8; Fri, 20 Jan 2017 07:46:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 7459AD4578F; Fri, 20 Jan 2017 18:46:32 +1100 (AEDT) Date: Fri, 20 Jan 2017 18:46:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Antoine Brodin , Xin LI , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312404 - head/usr.bin/sed In-Reply-To: <20170120174258.X1938@besplex.bde.org> Message-ID: <20170120182151.E2080@besplex.bde.org> References: <201701190801.v0J81ZG9008267@repo.freebsd.org> <20170120174258.X1938@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=nsIxdVpnNxUyBZHfyOYA:9 a=CjuIK1q_8ugA:10 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: Fri, 20 Jan 2017 07:46:41 -0000 On Fri, 20 Jan 2017, Bruce Evans wrote: > On Fri, 20 Jan 2017, Antoine Brodin wrote: >> sed -i no longer works on symlinks which breaks lots of ports. >> Please revert and request an exp-run. > > sed() doesn't seem to actually understand symlinks (it has no flag like > -h to prevent following them when opening files), so its use of lstat() > to classify them is wrong. This was harmless for symlinks but not for Oops. It only does the lstat() classification for the -I and -i cases, where restricting to regular files is not completely wrong, but I don't see any reason to do it. Just require the target of the symlink to be regular (and still be wrong when it is an irregular regular file in /proc). The check also has races. These may be hard to avoid if symlinks must not be followed, but since sed must follow symlinks the correct method is to open the file (following symlinks) and fstat() the fd. sed has special support for stdin and stdout and special checks to disallow -I and -i on stdin and stdout. The fstat() check on them wouldn't work right. Editing stdin is only impossible since you can't reopen it for both input and output. sed has related problems and races in its supported case whee reopening is possible since the file name is know. A non-racy version might open the file in r+ mode, then fstat() it, but sed actually uses separate streams and even a tempoary file, so it is not very in-place and has the usual races with temporary files. Bruce From owner-svn-src-head@freebsd.org Fri Jan 20 08:00:38 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 14B4CCB9622; Fri, 20 Jan 2017 08:00:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C796A10C5; Fri, 20 Jan 2017 08:00:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0K80ars007860; Fri, 20 Jan 2017 08:00:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0K80a37007858; Fri, 20 Jan 2017 08:00:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701200800.v0K80a37007858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 20 Jan 2017 08:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312523 - head/usr.bin/cut/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 08:00:38 -0000 Author: ngie Date: Fri Jan 20 08:00:36 2017 New Revision: 312523 URL: https://svnweb.freebsd.org/changeset/base/312523 Log: Add some basic -s flag testcases for cut(1) The remaining functionality seems to be covered in one form or another via the NetBSD ATF testcase. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/usr.bin/cut/tests/cut2_test.sh (contents, props changed) Modified: head/usr.bin/cut/tests/Makefile Modified: head/usr.bin/cut/tests/Makefile ============================================================================== --- head/usr.bin/cut/tests/Makefile Fri Jan 20 07:43:40 2017 (r312522) +++ head/usr.bin/cut/tests/Makefile Fri Jan 20 08:00:36 2017 (r312523) @@ -2,6 +2,7 @@ PACKAGE= tests +ATF_TESTS_SH+= cut2_test NETBSD_ATF_TESTS_SH= cut_test ${PACKAGE}FILES= d_basic.out Added: head/usr.bin/cut/tests/cut2_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/cut/tests/cut2_test.sh Fri Jan 20 08:00:36 2017 (r312523) @@ -0,0 +1,51 @@ +# +# Copyright (c) 2017 Dell EMC +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Check -s flag" +} + +s_flag_body() +{ + cat >input< 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 C198ACB96F8; Fri, 20 Jan 2017 10:47:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D33F1485; Fri, 20 Jan 2017 10:47:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KAlWbq077925; Fri, 20 Jan 2017 10:47:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KAlWcj077924; Fri, 20 Jan 2017 10:47:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201047.v0KAlWcj077924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 10:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312526 - head/sys/dev/mlx5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 10:47:33 -0000 Author: hselasky Date: Fri Jan 20 10:47:32 2017 New Revision: 312526 URL: https://svnweb.freebsd.org/changeset/base/312526 Log: Update firmware interface structures and definitions adding support for new features and commands. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ifc.h Modified: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Fri Jan 20 10:13:40 2017 (r312525) +++ head/sys/dev/mlx5/mlx5_ifc.h Fri Jan 20 10:47:32 2017 (r312526) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,13 +23,8 @@ * SUCH DAMAGE. * * $FreeBSD$ + */ - Autogenerated file. - Date: 2015-04-13 14:59 - Source Document Name: Mellanox - Source Document Version: 0.28 - Generated by adb_to_c.py (EAT.ME Version: 1.0.70) -*/ #ifndef MLX5_IFC_H #define MLX5_IFC_H @@ -56,6 +51,8 @@ enum { MLX5_EVENT_TYPE_CODING_TEMP_WARNING_EVENT = 0x17, MLX5_EVENT_TYPE_REMOTE_CONFIG = 0x19, MLX5_EVENT_TYPE_CODING_DCBX_CHANGE_EVENT = 0x1e, + MLX5_EVENT_TYPE_CODING_PPS_EVENT = 0x25, + MLX5_EVENT_TYPE_CODING_GENERAL_NOTIFICATION_EVENT = 0x22, MLX5_EVENT_TYPE_DB_BF_CONGESTION = 0x1a, MLX5_EVENT_TYPE_STALL_EVENT = 0x1b, MLX5_EVENT_TYPE_DROPPED_PACKET_LOGGED_EVENT = 0x1f, @@ -89,6 +86,8 @@ enum { MLX5_CMD_OP_QUERY_ISSI = 0x10a, MLX5_CMD_OP_SET_ISSI = 0x10b, MLX5_CMD_OP_SET_DRIVER_VERSION = 0x10d, + MLX5_CMD_OP_QUERY_OTHER_HCA_CAP = 0x10e, + MLX5_CMD_OP_MODIFY_OTHER_HCA_CAP = 0x10f, MLX5_CMD_OP_CREATE_MKEY = 0x200, MLX5_CMD_OP_QUERY_MKEY = 0x201, MLX5_CMD_OP_DESTROY_MKEY = 0x202, @@ -190,6 +189,12 @@ enum { MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY = 0x82b, MLX5_CMD_OP_SET_WOL_ROL = 0x830, MLX5_CMD_OP_QUERY_WOL_ROL = 0x831, + MLX5_CMD_OP_CREATE_LAG = 0x840, + MLX5_CMD_OP_MODIFY_LAG = 0x841, + MLX5_CMD_OP_QUERY_LAG = 0x842, + MLX5_CMD_OP_DESTROY_LAG = 0x843, + MLX5_CMD_OP_CREATE_VPORT_LAG = 0x844, + MLX5_CMD_OP_DESTROY_VPORT_LAG = 0x845, MLX5_CMD_OP_CREATE_TIR = 0x900, MLX5_CMD_OP_MODIFY_TIR = 0x901, MLX5_CMD_OP_DESTROY_TIR = 0x902, @@ -206,6 +211,8 @@ enum { MLX5_CMD_OP_MODIFY_RMP = 0x90d, MLX5_CMD_OP_DESTROY_RMP = 0x90e, MLX5_CMD_OP_QUERY_RMP = 0x90f, + MLX5_CMD_OP_SET_DELAY_DROP_PARAMS = 0x910, + MLX5_CMD_OP_QUERY_DELAY_DROP_PARAMS = 0x911, MLX5_CMD_OP_CREATE_TIS = 0x912, MLX5_CMD_OP_MODIFY_TIS = 0x913, MLX5_CMD_OP_DESTROY_TIS = 0x914, @@ -226,7 +233,10 @@ enum { MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY = 0x938, MLX5_CMD_OP_ALLOC_FLOW_COUNTER = 0x939, MLX5_CMD_OP_DEALLOC_FLOW_COUNTER = 0x93a, - MLX5_CMD_OP_QUERY_FLOW_COUNTER = 0x93b + MLX5_CMD_OP_QUERY_FLOW_COUNTER = 0x93b, + MLX5_CMD_OP_MODIFY_FLOW_TABLE = 0x93c, + MLX5_CMD_OP_ALLOC_ENCAP_HEADER = 0x93d, + MLX5_CMD_OP_DEALLOC_ENCAP_HEADER = 0x93e, }; enum { @@ -271,7 +281,11 @@ struct mlx5_ifc_flow_table_fields_suppor u8 outer_gre_protocol[0x1]; u8 outer_gre_key[0x1]; u8 outer_vxlan_vni[0x1]; - u8 reserved_2[0x5]; + u8 outer_geneve_vni[0x1]; + u8 outer_geneve_oam[0x1]; + u8 outer_geneve_protocol_type[0x1]; + u8 outer_geneve_opt_len[0x1]; + u8 reserved_2[0x1]; u8 source_eswitch_port[0x1]; u8 inner_dmac[0x1]; @@ -299,10 +313,12 @@ struct mlx5_ifc_flow_table_fields_suppor u8 inner_tcp_flags[0x1]; u8 reserved_5[0x9]; - u8 reserved_6[0x1f]; + u8 reserved_6[0x1a]; + u8 bth_dst_qp[0x1]; + u8 reserved_7[0x4]; u8 source_sqn[0x1]; - u8 reserved_7[0x20]; + u8 reserved_8[0x20]; }; struct mlx5_ifc_eth_discard_cntrs_grp_bits { @@ -356,7 +372,11 @@ struct mlx5_ifc_eth_discard_cntrs_grp_bi u8 egress_stp_filter_low[0x20]; - u8 reserved_at_340[0x480]; + u8 egress_hoq_stall_high[0x20]; + + u8 egress_hoq_stall_low[0x20]; + + u8 reserved_at_340[0x440]; }; struct mlx5_ifc_flow_table_prop_layout_bits { u8 ft_support[0x1]; @@ -411,6 +431,7 @@ enum { MLX5_FLOW_CONTEXT_DEST_TYPE_VPORT = 0x0, MLX5_FLOW_CONTEXT_DEST_TYPE_FLOW_TABLE = 0x1, MLX5_FLOW_CONTEXT_DEST_TYPE_TIR = 0x2, + MLX5_FLOW_CONTEXT_DEST_TYPE_QP = 0x3, }; struct mlx5_ifc_dest_format_struct_bits { @@ -490,9 +511,14 @@ struct mlx5_ifc_fte_match_set_misc_bits u8 reserved_6[0xc]; u8 inner_ipv6_flow_label[0x14]; - u8 reserved7[0x10]; + u8 reserved_7[0xa]; + u8 geneve_opt_len[0x6]; u8 geneve_protocol_type[0x10]; - u8 reserved8[0xc0]; + + u8 reserved_8[0x8]; + u8 bth_dst_qp[0x18]; + + u8 reserved_9[0xa0]; }; struct mlx5_ifc_cmd_pas_bits { @@ -698,7 +724,8 @@ struct mlx5_ifc_per_protocol_networking_ u8 lro_psh_flag[0x1]; u8 lro_time_stamp[0x1]; u8 lro_max_msg_sz_mode[0x2]; - u8 reserved_0[0x2]; + u8 wqe_vlan_insert[0x1]; + u8 self_lb_en_modifiable[0x1]; u8 self_lb_mc[0x1]; u8 self_lb_uc[0x1]; u8 max_lso_cap[0x5]; @@ -715,7 +742,8 @@ struct mlx5_ifc_per_protocol_networking_ u8 swp[0x1]; u8 swp_csum[0x1]; u8 swp_lso[0x1]; - u8 reserved_2[0x1c]; + u8 reserved_2[0x1b]; + u8 max_geneve_opt_len[0x1]; u8 tunnel_stateless_geneve_rx[0x1]; u8 reserved_3[0x10]; @@ -910,7 +938,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 vport_counters[0x1]; u8 retransmission_q_counters[0x1]; u8 debug[0x1]; - u8 reserved_16[0x2]; + u8 modify_rq_counters_set_id[0x1]; + u8 rq_delay_drop[0x1]; u8 max_qp_cnt[0xa]; u8 pkey_table_size[0x10]; @@ -980,7 +1009,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 cq_oi[0x1]; u8 cq_resize[0x1]; u8 cq_moderation[0x1]; - u8 reserved_31[0x3]; + u8 cq_period_mode_modify[0x1]; + u8 cq_invalidate[0x1]; + u8 reserved_at_225[0x1]; u8 cq_eq_remap[0x1]; u8 pg[0x1]; u8 block_lb_mc[0x1]; @@ -1068,7 +1099,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 log_max_wq_sz[0x5]; u8 nic_vport_change_event[0x1]; - u8 reserved_59[0xa]; + u8 disable_local_lb[0x1]; + u8 reserved_59[0x9]; u8 log_max_vlan_list[0x5]; u8 reserved_60[0x3]; u8 log_max_current_mc_list[0x5]; @@ -1312,6 +1344,8 @@ enum { MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_CQ_MAX_COUNT = 0x2, MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_OI = 0x4, MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_C_EQN = 0x8, + MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_CQ_PERIOD_MODE = 0x10, + MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_STATUS = 0x20, }; struct mlx5_ifc_modify_field_select_bits { @@ -2239,9 +2273,15 @@ enum { MLX5_RQC_STATE_ERR = 0x3, }; +enum { + MLX5_RQC_DROPLESS_MODE_DISABLE = 0x0, + MLX5_RQC_DROPLESS_MODE_ENABLE = 0x1, +}; + struct mlx5_ifc_rqc_bits { - u8 rlky[0x1]; - u8 reserved_0[0x2]; + u8 rlkey[0x1]; + u8 delay_drop_en[0x1]; + u8 scatter_fcs[0x1]; u8 vlan_strip_disable[0x1]; u8 mem_rq_type[0x4]; u8 state[0x4]; @@ -2293,7 +2333,9 @@ enum { struct mlx5_ifc_nic_vport_context_bits { u8 reserved_0[0x5]; u8 min_wqe_inline_mode[0x3]; - u8 reserved_1[0x17]; + u8 reserved_1[0x15]; + u8 disable_mc_local_lb[0x1]; + u8 disable_uc_local_lb[0x1]; u8 roce_en[0x1]; u8 arm_change_event[0x1]; @@ -3075,6 +3117,50 @@ struct mlx5_ifc_teardown_hca_in_bits { u8 reserved_3[0x20]; }; +struct mlx5_ifc_set_delay_drop_params_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_set_delay_drop_params_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x20]; + + u8 reserved_at_60[0x10]; + u8 delay_drop_timeout[0x10]; +}; + +struct mlx5_ifc_query_delay_drop_params_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x20]; + + u8 reserved_at_60[0x10]; + u8 delay_drop_timeout[0x10]; +}; + +struct mlx5_ifc_query_delay_drop_params_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x40]; +}; + struct mlx5_ifc_suspend_qp_out_bits { u8 status[0x8]; u8 reserved_0[0x18]; @@ -4076,31 +4162,39 @@ struct mlx5_ifc_query_q_counter_out_bits u8 out_of_buffer[0x20]; - u8 reserved_7[0x20]; + u8 reserved_7[0x20]; u8 out_of_sequence[0x20]; - u8 reserved_8[0x20]; + u8 reserved_8[0x20]; - u8 duplicate_request[0x20]; + u8 duplicate_request[0x20]; - u8 reserved_9[0x20]; + u8 reserved_9[0x20]; - u8 rnr_nak_retry_err[0x20]; + u8 rnr_nak_retry_err[0x20]; - u8 reserved_10[0x20]; + u8 reserved_10[0x20]; - u8 packet_seq_err[0x20]; + u8 packet_seq_err[0x20]; - u8 reserved_11[0x20]; + u8 reserved_11[0x20]; - u8 implied_nak_seq_err[0x20]; + u8 implied_nak_seq_err[0x20]; - u8 reserved_12[0x20]; + u8 reserved_12[0x20]; + + u8 local_ack_timeout_err[0x20]; + + u8 reserved_13[0x20]; + + u8 resp_rnr_nak[0x20]; + + u8 reserved_14[0x20]; - u8 local_ack_timeout_err[0x20]; + u8 req_rnr_retries_exceeded[0x20]; - u8 reserved_13[0x4e0]; + u8 reserved_15[0x460]; }; struct mlx5_ifc_query_q_counter_in_bits { @@ -5204,7 +5298,9 @@ struct mlx5_ifc_modify_nic_vport_context }; struct mlx5_ifc_modify_nic_vport_field_select_bits { - u8 reserved_0[0x16]; + u8 reserved_0[0x14]; + u8 disable_uc_local_lb[0x1]; + u8 disable_mc_local_lb[0x1]; u8 node_guid[0x1]; u8 port_guid[0x1]; u8 min_wqe_inline_mode[0x1]; @@ -7958,6 +8054,42 @@ struct mlx5_ifc_phys_layer_cntrs_bits { u8 reserved_0[0x180]; }; +struct mlx5_ifc_phys_layer_statistical_cntrs_bits { + u8 time_since_last_clear_high[0x20]; + + u8 time_since_last_clear_low[0x20]; + + u8 phy_received_bits_high[0x20]; + + u8 phy_received_bits_low[0x20]; + + u8 phy_symbol_errors_high[0x20]; + + u8 phy_symbol_errors_low[0x20]; + + u8 phy_corrected_bits_high[0x20]; + + u8 phy_corrected_bits_low[0x20]; + + u8 phy_corrected_bits_lane0_high[0x20]; + + u8 phy_corrected_bits_lane0_low[0x20]; + + u8 phy_corrected_bits_lane1_high[0x20]; + + u8 phy_corrected_bits_lane1_low[0x20]; + + u8 phy_corrected_bits_lane2_high[0x20]; + + u8 phy_corrected_bits_lane2_low[0x20]; + + u8 phy_corrected_bits_lane3_high[0x20]; + + u8 phy_corrected_bits_lane3_low[0x20]; + + u8 reserved_at_200[0x5c0]; +}; + struct mlx5_ifc_infiniband_port_cntrs_bits { u8 symbol_error_counter[0x10]; u8 link_error_recovery_counter[0x8]; @@ -9187,6 +9319,7 @@ union mlx5_ifc_eth_cntrs_grp_data_layout struct mlx5_ifc_eth_discard_cntrs_grp_bits eth_discard_cntrs_grp; struct mlx5_ifc_eth_per_prio_grp_data_layout_bits eth_per_prio_grp_data_layout; struct mlx5_ifc_phys_layer_cntrs_bits phys_layer_cntrs; + struct mlx5_ifc_phys_layer_statistical_cntrs_bits phys_layer_statistical_cntrs; struct mlx5_ifc_infiniband_port_cntrs_bits infiniband_port_cntrs; u8 reserved_0[0x7c0]; }; From owner-svn-src-head@freebsd.org Fri Jan 20 11:11:51 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 410CCCB9E9E; Fri, 20 Jan 2017 11:11:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B74011F1; Fri, 20 Jan 2017 11:11:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KBBo52088055; Fri, 20 Jan 2017 11:11:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KBBngZ088051; Fri, 20 Jan 2017 11:11:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201111.v0KBBngZ088051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 11:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312527 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 11:11:51 -0000 Author: hselasky Date: Fri Jan 20 11:11:49 2017 New Revision: 312527 URL: https://svnweb.freebsd.org/changeset/base/312527 Log: Add runtime support for modifying the SQ and RQ completion event moderation mode. The presence of this feature is indicated through the firmware capabilities. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/cq.h head/sys/dev/mlx5/mlx5_core/mlx5_cq.c head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/cq.h ============================================================================== --- head/sys/dev/mlx5/cq.h Fri Jan 20 10:47:32 2017 (r312526) +++ head/sys/dev/mlx5/cq.h Fri Jan 20 11:11:49 2017 (r312527) @@ -88,6 +88,7 @@ enum { MLX5_CQ_MODIFY_PERIOD = 1 << 0, MLX5_CQ_MODIFY_COUNT = 1 << 1, MLX5_CQ_MODIFY_OVERRUN = 1 << 2, + MLX5_CQ_MODIFY_PERIOD_MODE = 1 << 4, }; enum { @@ -165,6 +166,11 @@ int mlx5_core_modify_cq(struct mlx5_core int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, u16 cq_period, u16 cq_max_count); +int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, + struct mlx5_core_cq *cq, + u16 cq_period, + u16 cq_max_count, + u8 cq_mode); int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Jan 20 10:47:32 2017 (r312526) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Fri Jan 20 11:11:49 2017 (r312527) @@ -266,6 +266,28 @@ int mlx5_core_modify_cq_moderation(struc return mlx5_core_modify_cq(dev, cq, &in, sizeof(in)); } +int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, + struct mlx5_core_cq *cq, + u16 cq_period, + u16 cq_max_count, + u8 cq_mode) +{ + struct mlx5_modify_cq_mbox_in in; + + memset(&in, 0, sizeof(in)); + + in.cqn = cpu_to_be32(cq->cqn); + in.ctx.cq_period = cpu_to_be16(cq_period); + in.ctx.cq_max_count = cpu_to_be16(cq_max_count); + in.ctx.cqe_sz_flags = (cq_mode & 2) >> 1; + in.ctx.st = (cq_mode & 1) << 7; + in.field_select = cpu_to_be32(MLX5_CQ_MODIFY_PERIOD | + MLX5_CQ_MODIFY_COUNT | + MLX5_CQ_MODIFY_PERIOD_MODE); + + return mlx5_core_modify_cq(dev, cq, &in, sizeof(in)); +} + int mlx5_init_cq_table(struct mlx5_core_dev *dev) { struct mlx5_cq_table *table = &dev->priv.cq_table; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Jan 20 10:47:32 2017 (r312526) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Jan 20 11:11:49 2017 (r312527) @@ -92,6 +92,7 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG { struct mlx5e_priv *priv = arg1; uint64_t value; + int mode_modify; int was_opened; int error; @@ -114,6 +115,7 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG goto done; } was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state); + mode_modify = MLX5_CAP_GEN(priv->mdev, cq_period_mode_modify); switch (MLX5_PARAM_OFFSET(arg[arg2])) { case MLX5_PARAM_OFFSET(rx_coalesce_usecs): @@ -266,7 +268,7 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG case MLX5_PARAM_OFFSET(rx_coalesce_mode): /* network interface must be down */ - if (was_opened) + if (was_opened != 0 && mode_modify == 0) mlx5e_close_locked(priv->ifp); /* import RX coalesce mode */ @@ -276,13 +278,17 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG priv->params_ethtool.rx_coalesce_mode; /* restart network interface, if any */ - if (was_opened) - mlx5e_open_locked(priv->ifp); + if (was_opened != 0) { + if (mode_modify == 0) + mlx5e_open_locked(priv->ifp); + else + error = mlx5e_refresh_channel_params(priv); + } break; case MLX5_PARAM_OFFSET(tx_coalesce_mode): /* network interface must be down */ - if (was_opened) + if (was_opened != 0 && mode_modify == 0) mlx5e_close_locked(priv->ifp); /* import TX coalesce mode */ @@ -292,8 +298,12 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG priv->params_ethtool.tx_coalesce_mode; /* restart network interface, if any */ - if (was_opened) - mlx5e_open_locked(priv->ifp); + if (was_opened != 0) { + if (mode_modify == 0) + mlx5e_open_locked(priv->ifp); + else + error = mlx5e_refresh_channel_params(priv); + } break; case MLX5_PARAM_OFFSET(hw_lro): Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 10:47:32 2017 (r312526) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 11:11:49 2017 (r312527) @@ -1766,6 +1766,25 @@ mlx5e_close_channels(struct mlx5e_priv * static int mlx5e_refresh_sq_params(struct mlx5e_priv *priv, struct mlx5e_sq *sq) { + + if (MLX5_CAP_GEN(priv->mdev, cq_period_mode_modify)) { + uint8_t cq_mode; + + switch (priv->params.tx_cq_moderation_mode) { + case 0: + cq_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; + break; + default: + cq_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; + break; + } + + return (mlx5_core_modify_cq_moderation_mode(priv->mdev, &sq->cq.mcq, + priv->params.tx_cq_moderation_usec, + priv->params.tx_cq_moderation_pkts, + cq_mode)); + } + return (mlx5_core_modify_cq_moderation(priv->mdev, &sq->cq.mcq, priv->params.tx_cq_moderation_usec, priv->params.tx_cq_moderation_pkts)); @@ -1774,6 +1793,28 @@ mlx5e_refresh_sq_params(struct mlx5e_pri static int mlx5e_refresh_rq_params(struct mlx5e_priv *priv, struct mlx5e_rq *rq) { + + if (MLX5_CAP_GEN(priv->mdev, cq_period_mode_modify)) { + uint8_t cq_mode; + int retval; + + switch (priv->params.rx_cq_moderation_mode) { + case 0: + cq_mode = MLX5_CQ_PERIOD_MODE_START_FROM_EQE; + break; + default: + cq_mode = MLX5_CQ_PERIOD_MODE_START_FROM_CQE; + break; + } + + retval = mlx5_core_modify_cq_moderation_mode(priv->mdev, &rq->cq.mcq, + priv->params.rx_cq_moderation_usec, + priv->params.rx_cq_moderation_pkts, + cq_mode); + + return (retval); + } + return (mlx5_core_modify_cq_moderation(priv->mdev, &rq->cq.mcq, priv->params.rx_cq_moderation_usec, priv->params.rx_cq_moderation_pkts)); From owner-svn-src-head@freebsd.org Fri Jan 20 12:02:42 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 365EDCB52F1; Fri, 20 Jan 2017 12:02:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB19C1E05; Fri, 20 Jan 2017 12:02:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KC2fr1011119; Fri, 20 Jan 2017 12:02:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KC2euM011116; Fri, 20 Jan 2017 12:02:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201202.v0KC2euM011116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 12:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312528 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 12:02:42 -0000 Author: hselasky Date: Fri Jan 20 12:02:40 2017 New Revision: 312528 URL: https://svnweb.freebsd.org/changeset/base/312528 Log: Make draining a sendqueue more robust. Add own state variable to track if a sendqueue is stopped or not. This will prevent traffic from entering the sendqueue while it is being destroyed. Update drain function to wait for traffic to be transmitted before returning when the link state is active. Add extra checks in transmit path for stopped SQ's. While at it: - Use likely() for a mbuf pointer check. - Remove redundant IFF_DRV_RUNNING check. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Fri Jan 20 11:11:49 2017 (r312527) +++ head/sys/dev/mlx5/mlx5_en/en.h Fri Jan 20 12:02:40 2017 (r312528) @@ -507,10 +507,11 @@ struct mlx5e_sq { u16 bf_offset; u16 cev_counter; /* completion event counter */ u16 cev_factor; /* completion event factor */ - u32 cev_next_state; /* next completion event state */ + u16 cev_next_state; /* next completion event state */ #define MLX5E_CEV_STATE_INITIAL 0 /* timer not started */ #define MLX5E_CEV_STATE_SEND_NOPS 1 /* send NOPs */ #define MLX5E_CEV_STATE_HOLD_NOPS 2 /* don't send NOPs yet */ + u16 stopped; /* set if SQ is stopped */ struct callout cev_callout; union { u32 d32[2]; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 11:11:49 2017 (r312527) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 12:02:40 2017 (r312528) @@ -1219,8 +1219,25 @@ mlx5e_sq_cev_timeout(void *arg) void mlx5e_drain_sq(struct mlx5e_sq *sq) { + int error; + + /* + * Check if already stopped. + * + * NOTE: The "stopped" variable is only written when both the + * priv's configuration lock and the SQ's lock is locked. It + * can therefore safely be read when only one of the two locks + * is locked. This function is always called when the priv's + * configuration lock is locked. + */ + if (sq->stopped != 0) + return; mtx_lock(&sq->lock); + + /* don't put more packets into the SQ */ + sq->stopped = 1; + /* teardown event factor timer, if any */ sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; callout_stop(&sq->cev_callout); @@ -1232,14 +1249,29 @@ mlx5e_drain_sq(struct mlx5e_sq *sq) /* make sure it is safe to free the callout */ callout_drain(&sq->cev_callout); + /* wait till SQ is empty or link is down */ + mtx_lock(&sq->lock); + while (sq->cc != sq->pc && + (sq->priv->media_status_last & IFM_ACTIVE) != 0) { + mtx_unlock(&sq->lock); + msleep(1); + sq->cq.mcq.comp(&sq->cq.mcq); + mtx_lock(&sq->lock); + } + mtx_unlock(&sq->lock); + /* error out remaining requests */ - mlx5e_modify_sq(sq, MLX5_SQC_STATE_RDY, MLX5_SQC_STATE_ERR); + error = mlx5e_modify_sq(sq, MLX5_SQC_STATE_RDY, MLX5_SQC_STATE_ERR); + if (error != 0) { + if_printf(sq->ifp, + "mlx5e_modify_sq() from RDY to ERR failed: %d\n", error); + } /* wait till SQ is empty */ mtx_lock(&sq->lock); while (sq->cc != sq->pc) { mtx_unlock(&sq->lock); - msleep(4); + msleep(1); sq->cq.mcq.comp(&sq->cq.mcq); mtx_lock(&sq->lock); } Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Jan 20 11:11:49 2017 (r312527) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Jan 20 12:02:40 2017 (r312528) @@ -81,11 +81,15 @@ static struct mlx5e_sq * mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) { struct mlx5e_priv *priv = ifp->if_softc; + struct mlx5e_channel * volatile *ppch; + struct mlx5e_channel *pch; u32 ch; u32 tc; + ppch = priv->channel; + /* check if channels are successfully opened */ - if (unlikely(priv->channel == NULL)) + if (unlikely(ppch == NULL)) return (NULL); /* obtain VLAN information if present */ @@ -123,11 +127,11 @@ mlx5e_select_queue(struct ifnet *ifp, st #endif } - /* check if channel is allocated */ - if (unlikely(priv->channel[ch] == NULL)) - return (NULL); - - return (&priv->channel[ch]->sq[tc]); + /* check if channel is allocated and not stopped */ + pch = ppch[ch]; + if (likely(pch != NULL && pch->sq[tc].stopped == 0)) + return (&pch->sq[tc]); + return (NULL); } static inline u16 @@ -445,18 +449,21 @@ mlx5e_xmit_locked(struct ifnet *ifp, str struct mbuf *next; int err = 0; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - if (mb) - err = drbr_enqueue(ifp, sq->br, mb); - return (err); - } - - if (mb != NULL) + if (likely(mb != NULL)) { /* * If we can't insert mbuf into drbr, try to xmit anyway. * We keep the error we got so we could return that after xmit. */ err = drbr_enqueue(ifp, sq->br, mb); + } + + /* + * Check if the network interface is closed or if the SQ is + * being stopped: + */ + if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + sq->stopped != 0)) + return (err); /* Process the queue */ while ((next = drbr_peek(ifp, sq->br)) != NULL) { @@ -470,8 +477,6 @@ mlx5e_xmit_locked(struct ifnet *ifp, str break; } drbr_advance(ifp, sq->br); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; } /* Check if we need to write the doorbell */ if (likely(sq->doorbell.d64 != 0)) { From owner-svn-src-head@freebsd.org Fri Jan 20 13:21:29 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 0516ACB7ECB; Fri, 20 Jan 2017 13:21:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C70EB1CE8; Fri, 20 Jan 2017 13:21:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KDLRGr040416; Fri, 20 Jan 2017 13:21:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KDLRRu040415; Fri, 20 Jan 2017 13:21:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701201321.v0KDLRRu040415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 20 Jan 2017 13:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312531 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 13:21:29 -0000 Author: avg Date: Fri Jan 20 13:21:27 2017 New Revision: 312531 URL: https://svnweb.freebsd.org/changeset/base/312531 Log: vmm_dev: work around a bogus error with gcc 6.3.0 The error is: vmm_dev.c: In function 'alloc_memseg': vmm_dev.c:261:11: error: null argument where non-null required (argument 1) [-Werror=nonnull] Apparently, the gcc is unable to figure out that if a ternary operator produced a non-NULL value once, then the operator with exactly the same operands would produce the same value again. MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Fri Jan 20 13:01:25 2017 (r312530) +++ head/sys/amd64/vmm/vmm_dev.c Fri Jan 20 13:21:27 2017 (r312531) @@ -258,7 +258,7 @@ alloc_memseg(struct vmmdev_softc *sc, st if (VM_MEMSEG_NAME(mseg)) { sysmem = false; name = malloc(SPECNAMELEN + 1, M_VMMDEV, M_WAITOK); - error = copystr(VM_MEMSEG_NAME(mseg), name, SPECNAMELEN + 1, 0); + error = copystr(mseg->name, name, SPECNAMELEN + 1, 0); if (error) goto done; } From owner-svn-src-head@freebsd.org Fri Jan 20 13:39:09 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 41568CB83B7; Fri, 20 Jan 2017 13:39:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0948715F7; Fri, 20 Jan 2017 13:39:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KDd8wb048767; Fri, 20 Jan 2017 13:39:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KDd87p048766; Fri, 20 Jan 2017 13:39:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701201339.v0KDd87p048766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 20 Jan 2017 13:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312532 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 13:39:09 -0000 Author: avg Date: Fri Jan 20 13:39:07 2017 New Revision: 312532 URL: https://svnweb.freebsd.org/changeset/base/312532 Log: don't abort writing of a core dump after EFAULT It's possible to get EFAULT when writing a segment backed by a file if the segment extends beyond the file. The core dump could still be useful if we skip the rest of the segment and proceed to other segements. The skipped segment (or a portion of it) will be zero-filled. While there, use 'const' to signify that core_write() only reads the buffer and use __DECONST before calling vn_rdwr_inchunks() because it can be used for both reading and writing. Before the change: kernel: Failed to write core file for process mmap_trunc_core (error 14) kernel: pid 77718 (mmap_trunc_core), uid 1001: exited on signal 6 After the change: kernel: Failed to fully fault in a core file segment at VA 0x800645000 with size 0x4000 to be written at offset 0x29000 for process mmap_trunc_core kernel: pid 4901 (mmap_trunc_core), uid 1001: exited on signal 6 (core dumped) Reviewed by: julian, kib Obtained from: Panzura (older version of the change) MFC after: 5 days Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D9233 Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Fri Jan 20 13:21:27 2017 (r312531) +++ head/sys/kern/imgact_elf.c Fri Jan 20 13:39:07 2017 (r312532) @@ -1160,7 +1160,7 @@ struct coredump_params { static void cb_put_phdr(vm_map_entry_t, void *); static void cb_size_segment(vm_map_entry_t, void *); -static int core_write(struct coredump_params *, void *, size_t, off_t, +static int core_write(struct coredump_params *, const void *, size_t, off_t, enum uio_seg); static void each_dumpable_segment(struct thread *, segment_callback, void *); static int __elfN(corehdr)(struct coredump_params *, int, void *, size_t, @@ -1202,7 +1202,14 @@ compress_chunk(struct coredump_params *p while (len > 0) { chunk_len = MIN(len, CORE_BUF_SIZE); - copyin(base, buf, chunk_len); + + /* + * We can get EFAULT error here. + * In that case zero out the current chunk of the segment. + */ + error = copyin(base, buf, chunk_len); + if (error != 0) + bzero(buf, chunk_len); error = gzio_write(p->gzs, buf, chunk_len); if (error != 0) break; @@ -1222,12 +1229,12 @@ core_gz_write(void *base, size_t len, of #endif /* GZIO */ static int -core_write(struct coredump_params *p, void *base, size_t len, off_t offset, - enum uio_seg seg) +core_write(struct coredump_params *p, const void *base, size_t len, + off_t offset, enum uio_seg seg) { - return (vn_rdwr_inchunks(UIO_WRITE, p->vp, base, len, offset, - seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, + return (vn_rdwr_inchunks(UIO_WRITE, p->vp, __DECONST(void *, base), + len, offset, seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, p->active_cred, p->file_cred, NULL, p->td)); } @@ -1235,12 +1242,32 @@ static int core_output(void *base, size_t len, off_t offset, struct coredump_params *p, void *tmpbuf) { + int error; #ifdef GZIO if (p->gzs != NULL) return (compress_chunk(p, base, tmpbuf, len)); #endif - return (core_write(p, base, len, offset, UIO_USERSPACE)); + /* + * EFAULT is a non-fatal error that we can get, for example, + * if the segment is backed by a file but extends beyond its + * end. + */ + error = core_write(p, base, len, offset, UIO_USERSPACE); + if (error == EFAULT) { + log(LOG_WARNING, "Failed to fully fault in a core file segment " + "at VA %p with size 0x%zx to be written at offset 0x%jx " + "for process %s\n", base, len, offset, curproc->p_comm); + + /* + * Write a "real" zero byte at the end of the target region + * in the case this is the last segment. + * The intermediate space will be implicitly zero-filled. + */ + error = core_write(p, zero_region, 1, offset + len - 1, + UIO_SYSSPACE); + } + return (error); } /* From owner-svn-src-head@freebsd.org Fri Jan 20 13:49:05 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 791C8CB8658; Fri, 20 Jan 2017 13:49:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E0CE1B7B; Fri, 20 Jan 2017 13:49:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KDn4k8052729; Fri, 20 Jan 2017 13:49:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KDn4o1052728; Fri, 20 Jan 2017 13:49:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701201349.v0KDn4o1052728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Jan 2017 13:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312533 - head/sys/geom/multipath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 13:49:05 -0000 Author: mav Date: Fri Jan 20 13:49:04 2017 New Revision: 312533 URL: https://svnweb.freebsd.org/changeset/base/312533 Log: Report disk addition errors on `add` or `create` subcommand. MFC after: 1 week Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Fri Jan 20 13:39:07 2017 (r312532) +++ head/sys/geom/multipath/g_multipath.c Fri Jan 20 13:49:04 2017 (r312533) @@ -923,6 +923,7 @@ g_multipath_ctl_add_name(struct gctl_req struct g_provider *pp; const char *mpname; static const char devpf[6] = "/dev/"; + int error; g_topology_assert(); @@ -972,10 +973,9 @@ g_multipath_ctl_add_name(struct gctl_req return; } - /* - * Now add.... - */ - (void) g_multipath_add_disk(gp, pp); + error = g_multipath_add_disk(gp, pp); + if (error != 0) + gctl_error(req, "Provider addition error: %d", error); } static void From owner-svn-src-head@freebsd.org Fri Jan 20 14:59:58 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 093B4CB9268; Fri, 20 Jan 2017 14:59:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D80A61947; Fri, 20 Jan 2017 14:59:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KExuap081494; Fri, 20 Jan 2017 14:59:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KExuLr081493; Fri, 20 Jan 2017 14:59:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701201459.v0KExuLr081493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Jan 2017 14:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312534 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 14:59:58 -0000 Author: emaste Date: Fri Jan 20 14:59:56 2017 New Revision: 312534 URL: https://svnweb.freebsd.org/changeset/base/312534 Log: ANSYfy kern_ktrace.c and remove archaic register keyword Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_ktrace.c Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Fri Jan 20 13:49:04 2017 (r312533) +++ head/sys/kern/kern_ktrace.c Fri Jan 20 14:59:56 2017 (r312534) @@ -437,9 +437,7 @@ ktr_freeproc(struct proc *p, struct ucre } void -ktrsyscall(code, narg, args) - int code, narg; - register_t args[]; +ktrsyscall(int code, int narg, register_t args[]) { struct ktr_request *req; struct ktr_syscall *ktp; @@ -468,9 +466,7 @@ ktrsyscall(code, narg, args) } void -ktrsysret(code, error, retval) - int code, error; - register_t retval; +ktrsysret(int code, int error, register_t retval) { struct ktr_request *req; struct ktr_sysret *ktp; @@ -637,9 +633,7 @@ ktrnamei(path) } void -ktrsysctl(name, namelen) - int *name; - u_int namelen; +ktrsysctl(int *name, u_int namelen) { struct ktr_request *req; u_int mib[CTL_MAXNAME + 2]; @@ -671,11 +665,7 @@ ktrsysctl(name, namelen) } void -ktrgenio(fd, rw, uio, error) - int fd; - enum uio_rw rw; - struct uio *uio; - int error; +ktrgenio(int fd, enum uio_rw rw, struct uio *uio, int error) { struct ktr_request *req; struct ktr_genio *ktg; @@ -710,11 +700,7 @@ ktrgenio(fd, rw, uio, error) } void -ktrpsig(sig, action, mask, code) - int sig; - sig_t action; - sigset_t *mask; - int code; +ktrpsig(int sig, sig_t action, sigset_t *mask, int code) { struct thread *td = curthread; struct ktr_request *req; @@ -733,9 +719,7 @@ ktrpsig(sig, action, mask, code) } void -ktrcsw(out, user, wmesg) - int out, user; - const char *wmesg; +ktrcsw(int out, int user, const char *wmesg) { struct thread *td = curthread; struct ktr_request *req; @@ -756,10 +740,7 @@ ktrcsw(out, user, wmesg) } void -ktrstruct(name, data, datalen) - const char *name; - void *data; - size_t datalen; +ktrstruct(const char *name, void *data, size_t datalen) { struct ktr_request *req; char *buf; @@ -782,10 +763,8 @@ ktrstruct(name, data, datalen) } void -ktrcapfail(type, needed, held) - enum ktr_cap_fail_type type; - const cap_rights_t *needed; - const cap_rights_t *held; +ktrcapfail(enum ktr_cap_fail_type type, const cap_rights_t *needed, + const cap_rights_t *held) { struct thread *td = curthread; struct ktr_request *req; @@ -809,9 +788,7 @@ ktrcapfail(type, needed, held) } void -ktrfault(vaddr, type) - vm_offset_t vaddr; - int type; +ktrfault(vm_offset_t vaddr, int type) { struct thread *td = curthread; struct ktr_request *req; @@ -828,8 +805,7 @@ ktrfault(vaddr, type) } void -ktrfaultend(result) - int result; +ktrfaultend(int result) { struct thread *td = curthread; struct ktr_request *req; @@ -857,13 +833,11 @@ struct ktrace_args { #endif /* ARGSUSED */ int -sys_ktrace(td, uap) - struct thread *td; - register struct ktrace_args *uap; +sys_ktrace(struct thread *td, struct ktrace_args *uap) { #ifdef KTRACE - register struct vnode *vp = NULL; - register struct proc *p; + struct vnode *vp = NULL; + struct proc *p; struct pgrp *pg; int facs = uap->facs & ~KTRFAC_ROOT; int ops = KTROP(uap->ops); @@ -1002,9 +976,7 @@ done: /* ARGSUSED */ int -sys_utrace(td, uap) - struct thread *td; - register struct utrace_args *uap; +sys_utrace(struct thread *td, struct utrace_args *uap) { #ifdef KTRACE @@ -1038,11 +1010,7 @@ sys_utrace(td, uap) #ifdef KTRACE static int -ktrops(td, p, ops, facs, vp) - struct thread *td; - struct proc *p; - int ops, facs; - struct vnode *vp; +ktrops(struct thread *td, struct proc *p, int ops, int facs, struct vnode *vp) { struct vnode *tracevp = NULL; struct ucred *tracecred = NULL; @@ -1093,14 +1061,11 @@ ktrops(td, p, ops, facs, vp) } static int -ktrsetchildren(td, top, ops, facs, vp) - struct thread *td; - struct proc *top; - int ops, facs; - struct vnode *vp; +ktrsetchildren(struct thread *td, struct proc *top, int ops, int facs, + struct vnode *vp) { - register struct proc *p; - register int ret = 0; + struct proc *p; + int ret = 0; p = top; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -1260,9 +1225,7 @@ ktr_writerequest(struct thread *td, stru * so, only root may further change it. */ static int -ktrcanset(td, targetp) - struct thread *td; - struct proc *targetp; +ktrcanset(struct thread *td, struct proc *targetp) { PROC_LOCK_ASSERT(targetp, MA_OWNED); From owner-svn-src-head@freebsd.org Fri Jan 20 15:01:05 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 EEF39CB93AD; Fri, 20 Jan 2017 15:01:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C181CA2; Fri, 20 Jan 2017 15:01:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KF14CT084441; Fri, 20 Jan 2017 15:01:04 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KF14QP084438; Fri, 20 Jan 2017 15:01:04 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201701201501.v0KF14QP084438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Fri, 20 Jan 2017 15:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312535 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 15:01:06 -0000 Author: jpaetzel Date: Fri Jan 20 15:01:04 2017 New Revision: 312535 URL: https://svnweb.freebsd.org/changeset/base/312535 Log: MFV 312436 6569 large file delete can starve out write ops illumos/illumos-gate@ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6 https://github.com/illumos/illumos-gate/commit/ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6 https://www.illumos.org/issues/6569 The core issue I've found is that there is no throttle for how many deletes get assigned to one TXG. As a results when deleting large files we end up filling consecutive TXGs with deletes/frees, then write throttling other (more important) ops. There is an easy test case for this problem. Try deleting several large files (at least 1/2 TB) while you do write ops on the same pool. What we've seen is performance of these write ops (let's call it sideload I/O) would drop to zero. More specifically the problem is that dmu_free_long_range_impl() can/will fill up all of the dirty data in the pool "instantly", before many of the sideload ops can get in. So sideload performance will be impacted until all the files are freed. The solution we have tested at Nexenta (with positive results) creates a relatively simple throttle for how many "free" ops we let into one TXG. However this solution exposes other problems that should also be addressed. If we are to slow down freeing of data that means one has to wait even longer (assuming vnode ref count of 1) to get shell back after an rm or for NFS thread to finish the free-ing op. To avoid this the proposed solution is to call zfs_inactive() async for "large" files. Async freeing then begs for the reclaimed space to be accounted for in the zpool's "freeing" prop. The other issue with having a longer delete is the inability to export/unmount for a longer period of time. The proposed solution is to interrupt freeing of blocks when a fs is unmounted. Author: Alek Pinchuk Reviewed by: Matt Ahrens Reviewed by: Sanjay Nadkarni Reviewed by: Pavel Zakharov Approved by: Dan McDonald Reviewed by: avg Differential Revision: D9008 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Jan 20 14:59:56 2017 (r312534) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Jan 20 15:01:04 2017 (r312535) @@ -60,6 +60,16 @@ SYSCTL_DECL(_vfs_zfs); SYSCTL_INT(_vfs_zfs, OID_AUTO, nopwrite_enabled, CTLFLAG_RDTUN, &zfs_nopwrite_enabled, 0, "Enable nopwrite feature"); +/* + * Tunable to control percentage of dirtied blocks from frees in one TXG. + * After this threshold is crossed, additional dirty blocks from frees + * wait until the next TXG. + * A value of zero will disable this throttle. + */ +uint32_t zfs_per_txg_dirty_frees_percent = 30; +SYSCTL_INT(_vfs_zfs, OID_AUTO, per_txg_dirty_frees_percent, CTLFLAG_RWTUN, + &zfs_per_txg_dirty_frees_percent, 0, "Percentage of dirtied blocks from frees in one txg"); + const dmu_object_type_info_t dmu_ot[DMU_OT_NUMTYPES] = { { DMU_BSWAP_UINT8, TRUE, "unallocated" }, { DMU_BSWAP_ZAP, TRUE, "object directory" }, @@ -718,15 +728,25 @@ dmu_free_long_range_impl(objset_t *os, d { uint64_t object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz; int err; + uint64_t dirty_frees_threshold; + dsl_pool_t *dp = dmu_objset_pool(os); if (offset >= object_size) return (0); + if (zfs_per_txg_dirty_frees_percent <= 100) + dirty_frees_threshold = + zfs_per_txg_dirty_frees_percent * zfs_dirty_data_max / 100; + else + dirty_frees_threshold = zfs_dirty_data_max / 4; + if (length == DMU_OBJECT_END || offset + length > object_size) length = object_size - offset; while (length != 0) { - uint64_t chunk_end, chunk_begin; + uint64_t chunk_end, chunk_begin, chunk_len; + uint64_t long_free_dirty_all_txgs = 0; + dmu_tx_t *tx; chunk_end = chunk_begin = offset + length; @@ -737,9 +757,28 @@ dmu_free_long_range_impl(objset_t *os, d ASSERT3U(chunk_begin, >=, offset); ASSERT3U(chunk_begin, <=, chunk_end); - dmu_tx_t *tx = dmu_tx_create(os); - dmu_tx_hold_free(tx, dn->dn_object, - chunk_begin, chunk_end - chunk_begin); + chunk_len = chunk_end - chunk_begin; + + mutex_enter(&dp->dp_lock); + for (int t = 0; t < TXG_SIZE; t++) { + long_free_dirty_all_txgs += + dp->dp_long_free_dirty_pertxg[t]; + } + mutex_exit(&dp->dp_lock); + + /* + * To avoid filling up a TXG with just frees wait for + * the next TXG to open before freeing more chunks if + * we have reached the threshold of frees + */ + if (dirty_frees_threshold != 0 && + long_free_dirty_all_txgs >= dirty_frees_threshold) { + txg_wait_open(dp, 0); + continue; + } + + tx = dmu_tx_create(os); + dmu_tx_hold_free(tx, dn->dn_object, chunk_begin, chunk_len); /* * Mark this transaction as typically resulting in a net @@ -751,10 +790,18 @@ dmu_free_long_range_impl(objset_t *os, d dmu_tx_abort(tx); return (err); } - dnode_free_range(dn, chunk_begin, chunk_end - chunk_begin, tx); + + mutex_enter(&dp->dp_lock); + dp->dp_long_free_dirty_pertxg[dmu_tx_get_txg(tx) & TXG_MASK] += + chunk_len; + mutex_exit(&dp->dp_lock); + DTRACE_PROBE3(free__long__range, + uint64_t, long_free_dirty_all_txgs, uint64_t, chunk_len, + uint64_t, dmu_tx_get_txg(tx)); + dnode_free_range(dn, chunk_begin, chunk_len, tx); dmu_tx_commit(tx); - length -= chunk_end - chunk_begin; + length -= chunk_len; } return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Jan 20 14:59:56 2017 (r312534) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Jan 20 15:01:04 2017 (r312535) @@ -24,6 +24,7 @@ * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #include @@ -593,6 +594,16 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t t dsl_pool_undirty_space(dp, dp->dp_dirty_pertxg[txg & TXG_MASK], txg); /* + * Update the long range free counter after + * we're done syncing user data + */ + mutex_enter(&dp->dp_lock); + ASSERT(spa_sync_pass(dp->dp_spa) == 1 || + dp->dp_long_free_dirty_pertxg[txg & TXG_MASK] == 0); + dp->dp_long_free_dirty_pertxg[txg & TXG_MASK] = 0; + mutex_exit(&dp->dp_lock); + + /* * After the data blocks have been written (ensured by the zio_wait() * above), update the user/group space accounting. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Fri Jan 20 14:59:56 2017 (r312534) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Fri Jan 20 15:01:04 2017 (r312535) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _SYS_DSL_POOL_H @@ -103,6 +104,7 @@ typedef struct dsl_pool { kcondvar_t dp_spaceavail_cv; uint64_t dp_dirty_pertxg[TXG_SIZE]; uint64_t dp_dirty_total; + uint64_t dp_long_free_dirty_pertxg[TXG_SIZE]; uint64_t dp_mos_used_delta; uint64_t dp_mos_compressed_delta; uint64_t dp_mos_uncompressed_delta; From owner-svn-src-head@freebsd.org Fri Jan 20 15:45:23 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 651CCCB829B; Fri, 20 Jan 2017 15:45:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 251991733; Fri, 20 Jan 2017 15:45:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KFjMtX001855; Fri, 20 Jan 2017 15:45:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KFjLDw001850; Fri, 20 Jan 2017 15:45:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201545.v0KFjLDw001850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 15:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312536 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 15:45:23 -0000 Author: hselasky Date: Fri Jan 20 15:45:21 2017 New Revision: 312536 URL: https://svnweb.freebsd.org/changeset/base/312536 Log: Allow transmit packet bufring in software to be disabled. - Add new sysctl node to control the transmit packet bufring. - Add optimised version of the transmit routine which output packets directly to the DMA ring instead of using bufring in case the transmit lock is congested. This can reduce the number of taskswitches which in turn influence the overall system CPU usage, depending on the workload. - Add " TX" suffix to debug name for transmit mutexes to silence some witness warnings about aquiring duplicate locks having same name. MFC after: 1 week Sponsored by: Mellanox Technologies Suggested by: gallatin @ Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Fri Jan 20 15:01:04 2017 (r312535) +++ head/sys/dev/mlx5/mlx5_en/en.h Fri Jan 20 15:45:21 2017 (r312536) @@ -402,6 +402,7 @@ struct mlx5e_params { m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \ m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \ m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ + m(+1, u64 tx_bufring_disable, "tx_bufring_disable", "0: Enable bufring 1: Disable bufring") \ m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Jan 20 15:01:04 2017 (r312535) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Fri Jan 20 15:45:21 2017 (r312536) @@ -352,6 +352,18 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG mlx5e_open_locked(priv->ifp); break; + case MLX5_PARAM_OFFSET(tx_bufring_disable): + /* rangecheck input value */ + priv->params_ethtool.tx_bufring_disable = + priv->params_ethtool.tx_bufring_disable ? 1 : 0; + + /* reconfigure the sendqueues, if any */ + if (was_opened) { + mlx5e_close_locked(priv->ifp); + mlx5e_open_locked(priv->ifp); + } + break; + case MLX5_PARAM_OFFSET(tx_completion_fact): /* network interface must be down */ if (was_opened) Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 15:01:04 2017 (r312535) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 15:45:21 2017 (r312536) @@ -439,7 +439,8 @@ mlx5e_update_stats_work(struct work_stru tso_packets += sq_stats->tso_packets; tso_bytes += sq_stats->tso_bytes; tx_queue_dropped += sq_stats->dropped; - tx_queue_dropped += sq_br->br_drops; + if (sq_br != NULL) + tx_queue_dropped += sq_br->br_drops; tx_defragged += sq_stats->defragged; tx_offload_none += sq_stats->csum_offload_none; } @@ -987,34 +988,37 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->priv = priv; sq->tc = tc; - sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, - M_WAITOK, &sq->lock); - if (sq->br == NULL) { - if_printf(c->ifp, "%s: Failed allocating sq drbr buffer\n", - __func__); - err = -ENOMEM; - goto err_free_sq_db; - } - - sq->sq_tq = taskqueue_create_fast("mlx5e_que", M_WAITOK, - taskqueue_thread_enqueue, &sq->sq_tq); - if (sq->sq_tq == NULL) { - if_printf(c->ifp, "%s: Failed allocating taskqueue\n", - __func__); - err = -ENOMEM; - goto err_free_drbr; - } + /* check if we should allocate a second packet buffer */ + if (priv->params_ethtool.tx_bufring_disable == 0) { + sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, + M_WAITOK, &sq->lock); + if (sq->br == NULL) { + if_printf(c->ifp, "%s: Failed allocating sq drbr buffer\n", + __func__); + err = -ENOMEM; + goto err_free_sq_db; + } + + sq->sq_tq = taskqueue_create_fast("mlx5e_que", M_WAITOK, + taskqueue_thread_enqueue, &sq->sq_tq); + if (sq->sq_tq == NULL) { + if_printf(c->ifp, "%s: Failed allocating taskqueue\n", + __func__); + err = -ENOMEM; + goto err_free_drbr; + } - TASK_INIT(&sq->sq_task, 0, mlx5e_tx_que, sq); + TASK_INIT(&sq->sq_task, 0, mlx5e_tx_que, sq); #ifdef RSS - cpu_id = rss_getcpu(c->ix % rss_getnumbuckets()); - CPU_SETOF(cpu_id, &cpu_mask); - taskqueue_start_threads_cpuset(&sq->sq_tq, 1, PI_NET, &cpu_mask, - "%s TX SQ%d.%d CPU%d", c->ifp->if_xname, c->ix, tc, cpu_id); + cpu_id = rss_getcpu(c->ix % rss_getnumbuckets()); + CPU_SETOF(cpu_id, &cpu_mask); + taskqueue_start_threads_cpuset(&sq->sq_tq, 1, PI_NET, &cpu_mask, + "%s TX SQ%d.%d CPU%d", c->ifp->if_xname, c->ix, tc, cpu_id); #else - taskqueue_start_threads(&sq->sq_tq, 1, PI_NET, - "%s TX SQ%d.%d", c->ifp->if_xname, c->ix, tc); + taskqueue_start_threads(&sq->sq_tq, 1, PI_NET, + "%s TX SQ%d.%d", c->ifp->if_xname, c->ix, tc); #endif + } snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), buffer, mlx5e_sq_stats_desc, MLX5E_SQ_STATS_NUM, @@ -1047,9 +1051,12 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); - taskqueue_drain(sq->sq_tq, &sq->sq_task); - taskqueue_free(sq->sq_tq); - buf_ring_free(sq->br, M_MLX5EN); + if (sq->sq_tq != NULL) { + taskqueue_drain(sq->sq_tq, &sq->sq_task); + taskqueue_free(sq->sq_tq); + } + if (sq->br != NULL) + buf_ring_free(sq->br, M_MLX5EN); } int @@ -1497,9 +1504,10 @@ mlx5e_chan_mtx_init(struct mlx5e_channel for (tc = 0; tc < c->num_tc; tc++) { struct mlx5e_sq *sq = c->sq + tc; - mtx_init(&sq->lock, "mlx5tx", MTX_NETWORK_LOCK, MTX_DEF); - mtx_init(&sq->comp_lock, "mlx5comp", MTX_NETWORK_LOCK, - MTX_DEF); + mtx_init(&sq->lock, "mlx5tx", + MTX_NETWORK_LOCK " TX", MTX_DEF); + mtx_init(&sq->comp_lock, "mlx5comp", + MTX_NETWORK_LOCK " TX", MTX_DEF); callout_init_mtx(&sq->cev_callout, &sq->lock, 0); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Jan 20 15:01:04 2017 (r312535) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Jan 20 15:45:21 2017 (r312536) @@ -439,7 +439,8 @@ mlx5e_poll_tx_cq(struct mlx5e_sq *sq, in sq->cc = sqcc; - if (atomic_cmpset_int(&sq->queue_state, MLX5E_SQ_FULL, MLX5E_SQ_READY)) + if (sq->sq_tq != NULL && + atomic_cmpset_int(&sq->queue_state, MLX5E_SQ_FULL, MLX5E_SQ_READY)) taskqueue_enqueue(sq->sq_tq, &sq->sq_task); } @@ -498,6 +499,45 @@ mlx5e_xmit_locked(struct ifnet *ifp, str return (err); } +static int +mlx5e_xmit_locked_no_br(struct ifnet *ifp, struct mlx5e_sq *sq, struct mbuf *mb) +{ + int err = 0; + + if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + sq->stopped != 0)) { + m_freem(mb); + return (ENETDOWN); + } + + /* Do transmit */ + if (mlx5e_sq_xmit(sq, &mb) != 0) { + /* NOTE: m_freem() is NULL safe */ + m_freem(mb); + err = ENOBUFS; + } + + /* Check if we need to write the doorbell */ + if (likely(sq->doorbell.d64 != 0)) { + mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0); + sq->doorbell.d64 = 0; + } + + /* + * Check if we need to start the event timer which flushes the + * transmit ring on timeout: + */ + if (unlikely(sq->cev_next_state == MLX5E_CEV_STATE_INITIAL && + sq->cev_factor != 1)) { + /* start the timer */ + mlx5e_sq_cev_timeout(sq); + } else { + /* don't send NOPs yet */ + sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; + } + return (err); +} + int mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) { @@ -510,7 +550,13 @@ mlx5e_xmit(struct ifnet *ifp, struct mbu m_freem(mb); return (ENXIO); } - if (mtx_trylock(&sq->lock)) { + + if (unlikely(sq->br == NULL)) { + /* rate limited traffic */ + mtx_lock(&sq->lock); + ret = mlx5e_xmit_locked_no_br(ifp, sq, mb); + mtx_unlock(&sq->lock); + } else if (mtx_trylock(&sq->lock)) { ret = mlx5e_xmit_locked(ifp, sq, mb); mtx_unlock(&sq->lock); } else { From owner-svn-src-head@freebsd.org Fri Jan 20 15:47:30 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 D1675CB8379; Fri, 20 Jan 2017 15:47:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0C7718FF; Fri, 20 Jan 2017 15:47:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KFlT1b001961; Fri, 20 Jan 2017 15:47:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KFlTQn001960; Fri, 20 Jan 2017 15:47:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201547.v0KFlTQn001960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 15:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312537 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 15:47:30 -0000 Author: hselasky Date: Fri Jan 20 15:47:29 2017 New Revision: 312537 URL: https://svnweb.freebsd.org/changeset/base/312537 Log: Remove superfluous return statement. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 15:45:21 2017 (r312536) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Jan 20 15:47:29 2017 (r312537) @@ -1191,7 +1191,6 @@ done: mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0); sq->doorbell.d64 = 0; } - return; } void From owner-svn-src-head@freebsd.org Fri Jan 20 15:56:41 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 D3D60CB8678; Fri, 20 Jan 2017 15:56:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A352B1F92; Fri, 20 Jan 2017 15:56:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KFuehd006168; Fri, 20 Jan 2017 15:56:40 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KFueQl006167; Fri, 20 Jan 2017 15:56:40 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701201556.v0KFueQl006167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 20 Jan 2017 15:56:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312538 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 15:56:41 -0000 Author: pfg Date: Fri Jan 20 15:56:40 2017 New Revision: 312538 URL: https://svnweb.freebsd.org/changeset/base/312538 Log: Addition of clang nullability qualifiers. For consistency with the qualifiers added in r310977, define a new qualifier _Null_unspecified which is also defined in clang 3.7+. Add two new macros: __NULLABILITY_PRAGMA_PUSH __NULLABILITY_PRAGMA_POP These are for use in headers when we want avoid noisy warnings if some pointers are left without nullability annotations. These are added with way ahead of their first use to teach the GCC ports headers of their existance before their first use. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Jan 20 15:47:29 2017 (r312537) +++ head/sys/sys/cdefs.h Fri Jan 20 15:56:40 2017 (r312538) @@ -793,6 +793,13 @@ #if !(defined(__clang__) && __has_feature(nullability)) #define _Nonnull #define _Nullable +#define _Null_unspecified +#define __NULLABILITY_PRAGMA_PUSH +#define __NULLABILITY_PRAGMA_POP +#else +#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") +#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") #endif /* From owner-svn-src-head@freebsd.org Fri Jan 20 16:01:02 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 B6E11CB8897; Fri, 20 Jan 2017 16:01:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC3A155F; Fri, 20 Jan 2017 16:01:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KG11rq007248; Fri, 20 Jan 2017 16:01:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KG11kS007246; Fri, 20 Jan 2017 16:01:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701201601.v0KG11kS007246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Jan 2017 16:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312539 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 16:01:02 -0000 Author: mav Date: Fri Jan 20 16:01:01 2017 New Revision: 312539 URL: https://svnweb.freebsd.org/changeset/base/312539 Log: Remove some unused code. MFC after: 2 weeks Modified: head/usr.bin/iscsictl/iscsictl.c head/usr.bin/iscsictl/iscsictl.h Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Fri Jan 20 15:56:40 2017 (r312538) +++ head/usr.bin/iscsictl/iscsictl.c Fri Jan 20 16:01:01 2017 (r312539) @@ -704,17 +704,6 @@ usage(void) exit(1); } -char * -checked_strdup(const char *s) -{ - char *c; - - c = strdup(s); - if (c == NULL) - xo_err(1, "strdup"); - return (c); -} - int main(int argc, char **argv) { Modified: head/usr.bin/iscsictl/iscsictl.h ============================================================================== --- head/usr.bin/iscsictl/iscsictl.h Fri Jan 20 15:56:40 2017 (r312538) +++ head/usr.bin/iscsictl/iscsictl.h Fri Jan 20 16:01:01 2017 (r312539) @@ -40,7 +40,6 @@ #define DEFAULT_IQN "iqn.1994-09.org.freebsd:" #define MAX_NAME_LEN 223 -#define MAX_DATA_SEGMENT_LENGTH 65536 #define AUTH_METHOD_UNSPECIFIED 0 #define AUTH_METHOD_NONE 1 @@ -88,23 +87,6 @@ struct conf { TAILQ_HEAD(, target) conf_targets; }; -#define CONN_SESSION_TYPE_NONE 0 -#define CONN_SESSION_TYPE_DISCOVERY 1 -#define CONN_SESSION_TYPE_NORMAL 2 - -struct connection { - struct target *conn_target; - int conn_socket; - int conn_session_type; - uint32_t conn_cmdsn; - uint32_t conn_statsn; - size_t conn_max_data_segment_length; - size_t conn_max_burst_length; - size_t conn_max_outstanding_r2t; - int conn_header_digest; - int conn_data_digest; -}; - struct conf *conf_new(void); struct conf *conf_new_from_file(const char *path); void conf_delete(struct conf *conf); @@ -116,7 +98,6 @@ void target_delete(struct target *ic); void print_periphs(int session_id); -char *checked_strdup(const char *); bool valid_iscsi_name(const char *name); int parse_enable(const char *enable); From owner-svn-src-head@freebsd.org Fri Jan 20 17:14:11 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 DE38ACB9AE2; Fri, 20 Jan 2017 17:14:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93FD61DE1; Fri, 20 Jan 2017 17:14:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHEAGL039039; Fri, 20 Jan 2017 17:14:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHEA1N039038; Fri, 20 Jan 2017 17:14:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701201714.v0KHEA1N039038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Jan 2017 17:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312543 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:14:12 -0000 Author: mav Date: Fri Jan 20 17:14:10 2017 New Revision: 312543 URL: https://svnweb.freebsd.org/changeset/base/312543 Log: Remove ISCSI_MAX_DATA_SEGMENT_LENGTH, using negotiated value. MFC after: 2 weeks Modified: head/usr.sbin/iscsid/pdu.c Modified: head/usr.sbin/iscsid/pdu.c ============================================================================== --- head/usr.sbin/iscsid/pdu.c Fri Jan 20 17:03:44 2017 (r312542) +++ head/usr.sbin/iscsid/pdu.c Fri Jan 20 17:14:10 2017 (r312543) @@ -106,13 +106,15 @@ pdu_new_response(struct pdu *request) static void pdu_receive_proxy(struct pdu *pdu) { + struct connection *conn; struct iscsi_daemon_receive *idr; size_t len; int error; - assert(pdu->pdu_connection->conn_conf.isc_iser != 0); + conn = pdu->pdu_connection; + assert(conn->conn_conf.isc_iser != 0); - pdu->pdu_data = malloc(ISCSI_MAX_DATA_SEGMENT_LENGTH); + pdu->pdu_data = malloc(conn->conn_max_recv_data_segment_length); if (pdu->pdu_data == NULL) log_err(1, "malloc"); @@ -120,12 +122,12 @@ pdu_receive_proxy(struct pdu *pdu) if (idr == NULL) log_err(1, "calloc"); - idr->idr_session_id = pdu->pdu_connection->conn_session_id; + idr->idr_session_id = conn->conn_session_id; idr->idr_bhs = pdu->pdu_bhs; - idr->idr_data_segment_len = ISCSI_MAX_DATA_SEGMENT_LENGTH; + idr->idr_data_segment_len = conn->conn_max_recv_data_segment_length; idr->idr_data_segment = pdu->pdu_data; - error = ioctl(pdu->pdu_connection->conn_iscsi_fd, ISCSIDRECEIVE, idr); + error = ioctl(conn->conn_iscsi_fd, ISCSIDRECEIVE, idr); if (error != 0) log_err(1, "ISCSIDRECEIVE"); @@ -134,7 +136,7 @@ pdu_receive_proxy(struct pdu *pdu) log_errx(1, "protocol error: non-empty AHS"); len = pdu_data_segment_length(pdu); - assert(len <= ISCSI_MAX_DATA_SEGMENT_LENGTH); + assert(len <= (size_t)conn->conn_max_recv_data_segment_length); pdu->pdu_data_len = len; free(idr); @@ -143,10 +145,12 @@ pdu_receive_proxy(struct pdu *pdu) static void pdu_send_proxy(struct pdu *pdu) { + struct connection *conn; struct iscsi_daemon_send *ids; int error; - assert(pdu->pdu_connection->conn_conf.isc_iser != 0); + conn = pdu->pdu_connection; + assert(conn->conn_conf.isc_iser != 0); pdu_set_data_segment_length(pdu, pdu->pdu_data_len); @@ -154,12 +158,12 @@ pdu_send_proxy(struct pdu *pdu) if (ids == NULL) log_err(1, "calloc"); - ids->ids_session_id = pdu->pdu_connection->conn_session_id; + ids->ids_session_id = conn->conn_session_id; ids->ids_bhs = pdu->pdu_bhs; ids->ids_data_segment_len = pdu->pdu_data_len; ids->ids_data_segment = pdu->pdu_data; - error = ioctl(pdu->pdu_connection->conn_iscsi_fd, ISCSIDSEND, ids); + error = ioctl(conn->conn_iscsi_fd, ISCSIDSEND, ids); if (error != 0) log_err(1, "ISCSIDSEND"); @@ -204,18 +208,18 @@ pdu_read(const struct connection *conn, void pdu_receive(struct pdu *pdu) { + struct connection *conn; size_t len, padding; char dummy[4]; + conn = pdu->pdu_connection; #ifdef ICL_KERNEL_PROXY - if (pdu->pdu_connection->conn_conf.isc_iser != 0) + if (conn->conn_conf.isc_iser != 0) return (pdu_receive_proxy(pdu)); #endif + assert(conn->conn_conf.isc_iser == 0); - assert(pdu->pdu_connection->conn_conf.isc_iser == 0); - - pdu_read(pdu->pdu_connection, - (char *)pdu->pdu_bhs, sizeof(*pdu->pdu_bhs)); + pdu_read(conn, (char *)pdu->pdu_bhs, sizeof(*pdu->pdu_bhs)); len = pdu_ahs_length(pdu); if (len > 0) @@ -223,10 +227,10 @@ pdu_receive(struct pdu *pdu) len = pdu_data_segment_length(pdu); if (len > 0) { - if (len > ISCSI_MAX_DATA_SEGMENT_LENGTH) { + if (len > (size_t)conn->conn_max_recv_data_segment_length) { log_errx(1, "protocol error: received PDU " "with DataSegmentLength exceeding %d", - ISCSI_MAX_DATA_SEGMENT_LENGTH); + conn->conn_max_recv_data_segment_length); } pdu->pdu_data_len = len; @@ -234,14 +238,12 @@ pdu_receive(struct pdu *pdu) if (pdu->pdu_data == NULL) log_err(1, "malloc"); - pdu_read(pdu->pdu_connection, - (char *)pdu->pdu_data, pdu->pdu_data_len); + pdu_read(conn, (char *)pdu->pdu_data, pdu->pdu_data_len); padding = pdu_padding(pdu); if (padding != 0) { assert(padding < sizeof(dummy)); - pdu_read(pdu->pdu_connection, - (char *)dummy, padding); + pdu_read(conn, (char *)dummy, padding); } } } @@ -249,18 +251,20 @@ pdu_receive(struct pdu *pdu) void pdu_send(struct pdu *pdu) { + struct connection *conn; ssize_t ret, total_len; size_t padding; uint32_t zero = 0; struct iovec iov[3]; int iovcnt; + conn = pdu->pdu_connection; #ifdef ICL_KERNEL_PROXY - if (pdu->pdu_connection->conn_conf.isc_iser != 0) + if (conn->conn_conf.isc_iser != 0) return (pdu_send_proxy(pdu)); #endif - assert(pdu->pdu_connection->conn_conf.isc_iser == 0); + assert(conn->conn_conf.isc_iser == 0); pdu_set_data_segment_length(pdu, pdu->pdu_data_len); iov[0].iov_base = pdu->pdu_bhs; @@ -284,7 +288,7 @@ pdu_send(struct pdu *pdu) } } - ret = writev(pdu->pdu_connection->conn_socket, iov, iovcnt); + ret = writev(conn->conn_socket, iov, iovcnt); if (ret < 0) { if (timed_out()) log_errx(1, "exiting due to timeout"); From owner-svn-src-head@freebsd.org Fri Jan 20 17:16:49 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 BF00ECB9C04; Fri, 20 Jan 2017 17:16:49 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7228E1FBE; Fri, 20 Jan 2017 17:16:49 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHGm8D039163; Fri, 20 Jan 2017 17:16:48 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHGmSF039161; Fri, 20 Jan 2017 17:16:48 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201701201716.v0KHGmSF039161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Fri, 20 Jan 2017 17:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312544 - in head/sys: dev/ixgbe net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:16:49 -0000 Author: rstone Date: Fri Jan 20 17:16:48 2017 New Revision: 312544 URL: https://svnweb.freebsd.org/changeset/base/312544 Log: Fix reference to free memory in ixgbe/if_media.c When ixgbe receives an interrupt indicating that a new optical module may have been inserted, it discards all of its current media types by calling ifmedia_removeall() and then creates a new set of media types for the supported media on the new module. However, ifmedia_removeall() was maintaining a pointer to whatever the current media type was before the call to ifmedia_removealL(). The result of this was that any attempt to read the current media type of the interface (e.g. via ifconfig) would return potentially garbage data from free memory (or if one were particularly unlucky on an architecture that does not malloc() from a direct map, page fault the kernel). Fix this by NULL'ing out the current media field in if_media.c, and have ixgbe update the current media type after recreating them. Submitted by: Matt Joras Reviewed by: sbruno, erj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9164 Modified: head/sys/dev/ixgbe/if_ix.c head/sys/net/if_media.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Fri Jan 20 17:14:10 2017 (r312543) +++ head/sys/dev/ixgbe/if_ix.c Fri Jan 20 17:16:48 2017 (r312544) @@ -3878,6 +3878,7 @@ ixgbe_handle_msf(void *context, int pend /* Adjust media types shown in ifconfig */ ifmedia_removeall(&adapter->media); ixgbe_add_media_types(adapter); + ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); IXGBE_CORE_UNLOCK(adapter); return; } Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Fri Jan 20 17:14:10 2017 (r312543) +++ head/sys/net/if_media.c Fri Jan 20 17:16:48 2017 (r312544) @@ -107,6 +107,7 @@ ifmedia_removeall(ifm) LIST_REMOVE(entry, ifm_list); free(entry, M_IFADDR); } + ifm->ifm_cur = NULL; } /* From owner-svn-src-head@freebsd.org Fri Jan 20 17:30:01 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 43E0ACB9FE6; Fri, 20 Jan 2017 17:30:01 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130631891; Fri, 20 Jan 2017 17:30:01 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHU0AS043466; Fri, 20 Jan 2017 17:30:00 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHU0dK043465; Fri, 20 Jan 2017 17:30:00 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201701201730.v0KHU0dK043465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 20 Jan 2017 17:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312547 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:30:01 -0000 Author: wblock (doc committer) Date: Fri Jan 20 17:29:59 2017 New Revision: 312547 URL: https://svnweb.freebsd.org/changeset/base/312547 Log: Mention sendfile(2) by popular demand. Submitted by: alc, kib MFC after: 1 week Sponsored by: iXsystems Differential Revision: https://reviews.freebsd.org/D9259 Modified: head/lib/libc/sys/shm_open.2 Modified: head/lib/libc/sys/shm_open.2 ============================================================================== --- head/lib/libc/sys/shm_open.2 Fri Jan 20 17:28:52 2017 (r312546) +++ head/lib/libc/sys/shm_open.2 Fri Jan 20 17:29:59 2017 (r312547) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2017 +.Dd January 20, 2017 .Dt SHM_OPEN 2 .Os .Sh NAME @@ -187,6 +187,11 @@ kernel implementation explicitly include and .Xr write 2 . .Pp +.Fx +also supports zero-copy transmission of data from shared memory +objects with +.Xr sendfile 2 . +.Pp Neither shared memory objects nor their contents persist across reboots. .Pp Writes do not extend shared memory objects, so @@ -281,7 +286,8 @@ requires write permission to the shared .Xr fstat 2 , .Xr ftruncate 2 , .Xr mmap 2 , -.Xr munmap 2 +.Xr munmap 2 , +.Xr sendfile 2 .Sh STANDARDS The .Fn shm_open From owner-svn-src-head@freebsd.org Fri Jan 20 17:40:32 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 7BEEACB8608; Fri, 20 Jan 2017 17:40:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC8A15DB; Fri, 20 Jan 2017 17:40:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHeV8a047969; Fri, 20 Jan 2017 17:40:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHeVNT047968; Fri, 20 Jan 2017 17:40:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701201740.v0KHeVNT047968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 20 Jan 2017 17:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312551 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:40:32 -0000 Author: hselasky Date: Fri Jan 20 17:40:31 2017 New Revision: 312551 URL: https://svnweb.freebsd.org/changeset/base/312551 Log: Fix for race leading to endless timer interrupts related to configtimer(). During normal operation "state->nextcallopt" will always be less than or equal to "state->nextcall" and checking only "state->nextcallopt" before calling "callout_process()" is sufficient. However when "configtimer()" is called a race might happen requiring both of these binary times to be checked. Short description of race: 1) A configtimer() call will reset both "state->nextcall" and "state->nextcallopt" to the same binary time. 2) If a "callout_reset()" call happens between "configtimer()" and the next "callout_process()" call, "state->nextcallopt" will get updated and "state->nextcall" will remain at the current time. Refer to logic inside cpu_new_callout(). 3) getnextcpuevent() only respects "state->nextcall" and returns this value over and over again, even if it is in the past, until "now >= state->nextcallopt" becomes true. Then these two time variables are corrected by a "callout_process()" call and the situation goes back to normal. The problem manifests itself in different ways. The common factor is the timer process(es) consume all CPU on one or more CPU cores for a long time, blocking other kernel processes from getting execution time. This can be seen by very high interrupt counts as displayed by "vmstat -i | grep timer" right after boot. When EARLY_AP_STARTUP was enabled in r310177 the likelyhood of hitting this bug apparently increased. Example output from "vmstat -i" before patch: cpu0:timer 7591 69 cpu9:timer 39031773 358089 cpu4:timer 9359 85 cpu3:timer 9100 83 cpu2:timer 9620 88 Example output from "vmstat -i" after patch: cpu0:timer 4242 34 cpu6:timer 5531 44 cpu3:timer 6450 52 cpu1:timer 4545 36 cpu9:timer 7153 58 Before the patch cpu9 in the example above, was spinning in a loop in order to reach 39 million interrupts just a few seconds after bootup. After the patch the timer interrupt counts are more or less consistent. Discussed with: mav @ Reported by: several people MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Fri Jan 20 17:39:38 2017 (r312550) +++ head/sys/kern/kern_clocksource.c Fri Jan 20 17:40:31 2017 (r312551) @@ -207,7 +207,7 @@ handleevents(sbintime_t now, int fake) } } else state->nextprof = state->nextstat; - if (now >= state->nextcallopt) { + if (now >= state->nextcallopt || now >= state->nextcall) { state->nextcall = state->nextcallopt = SBT_MAX; callout_process(now); } From owner-svn-src-head@freebsd.org Fri Jan 20 17:43:37 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 BBFEFCB8878; Fri, 20 Jan 2017 17:43:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3701B60; Fri, 20 Jan 2017 17:43:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHhatX051789; Fri, 20 Jan 2017 17:43:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHhaVv051788; Fri, 20 Jan 2017 17:43:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701201743.v0KHhaVv051788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Jan 2017 17:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312552 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:43:37 -0000 Author: mav Date: Fri Jan 20 17:43:36 2017 New Revision: 312552 URL: https://svnweb.freebsd.org/changeset/base/312552 Log: Fix build with ICL_KERNEL_PROXY. MFC after: 2 weeks Modified: head/usr.sbin/ctld/pdu.c Modified: head/usr.sbin/ctld/pdu.c ============================================================================== --- head/usr.sbin/ctld/pdu.c Fri Jan 20 17:40:31 2017 (r312551) +++ head/usr.sbin/ctld/pdu.c Fri Jan 20 17:43:36 2017 (r312552) @@ -106,9 +106,11 @@ pdu_new_response(struct pdu *request) static void pdu_receive_proxy(struct pdu *pdu) { + struct connection *conn; size_t len; assert(proxy_mode); + conn = pdu->pdu_connection; kernel_receive(pdu); @@ -117,7 +119,7 @@ pdu_receive_proxy(struct pdu *pdu) log_errx(1, "protocol error: non-empty AHS"); len = pdu_data_segment_length(pdu); - assert(len <= pdu->pdu_connection->conn_max_recv_data_segment_length); + assert(len <= (size_t)conn->conn_max_recv_data_segment_length); pdu->pdu_data_len = len; } @@ -185,7 +187,7 @@ pdu_receive(struct pdu *pdu) len = pdu_data_segment_length(pdu); if (len > 0) { - if ((int)len > conn->conn_max_recv_data_segment_length) { + if (len > (size_t)conn->conn_max_recv_data_segment_length) { log_errx(1, "protocol error: received PDU " "with DataSegmentLength exceeding %d", conn->conn_max_recv_data_segment_length); From owner-svn-src-head@freebsd.org Fri Jan 20 17:54:25 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 C335BCB8D42; Fri, 20 Jan 2017 17:54:25 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92B9C12F8; Fri, 20 Jan 2017 17:54:25 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KHsO23056082; Fri, 20 Jan 2017 17:54:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KHsORL056081; Fri, 20 Jan 2017 17:54:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701201754.v0KHsORL056081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 20 Jan 2017 17:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312553 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 17:54:25 -0000 Author: asomers Date: Fri Jan 20 17:54:24 2017 New Revision: 312553 URL: https://svnweb.freebsd.org/changeset/base/312553 Log: Fix "camcontrol timestamp -s" with LTO-7 drives The length of the scsi_set_timestamp_parameters struct was incorrect. LTO-5 drives don't care, but LTO-7 drives do. Reviewed by: Sam Klopsch MFC after: 2 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Fri Jan 20 17:43:36 2017 (r312552) +++ head/sys/cam/scsi/scsi_all.h Fri Jan 20 17:54:24 2017 (r312553) @@ -3039,7 +3039,7 @@ struct scsi_set_timestamp_parameters { uint8_t reserved1[4]; uint8_t timestamp[6]; - uint8_t reserved2[4]; + uint8_t reserved2[2]; }; struct scsi_report_timestamp_parameter_data From owner-svn-src-head@freebsd.org Fri Jan 20 18:37:16 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 4603ECB9275; Fri, 20 Jan 2017 18:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1583B1F24; Fri, 20 Jan 2017 18:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KIbFnl072660; Fri, 20 Jan 2017 18:37:15 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KIbFuC072659; Fri, 20 Jan 2017 18:37:15 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201701201837.v0KIbFuC072659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Fri, 20 Jan 2017 18:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312554 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 18:37:16 -0000 Author: sobomax Date: Fri Jan 20 18:37:14 2017 New Revision: 312554 URL: https://svnweb.freebsd.org/changeset/base/312554 Log: Improve wording around SO_TS_CLOCK documentation. Submitted by: wblock Differential Revision: https://reviews.freebsd.org/D9171 Modified: head/lib/libc/sys/getsockopt.2 Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Fri Jan 20 17:54:24 2017 (r312553) +++ head/lib/libc/sys/getsockopt.2 Fri Jan 20 18:37:14 2017 (r312554) @@ -456,10 +456,10 @@ Additional timestamp types are available .Dv SO_TIMESTAMP with .Dv SO_TS_CLOCK , -which requests specific timestamp format to be returned instead of +which requests a specific timestamp format to be returned instead of .Dv SCM_TIMESTAMP when .Dv SO_TIMESTAMP is enabled. -The following +These .Dv SO_TS_CLOCK values are recognized in .Fx : From owner-svn-src-head@freebsd.org Fri Jan 20 19:08:46 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 7F070CB9D3F; Fri, 20 Jan 2017 19:08:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40BB510AA; Fri, 20 Jan 2017 19:08:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KJ8jqk084708; Fri, 20 Jan 2017 19:08:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KJ8jms084704; Fri, 20 Jan 2017 19:08:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701201908.v0KJ8jms084704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jan 2017 19:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312555 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 19:08:46 -0000 Author: kib Date: Fri Jan 20 19:08:44 2017 New Revision: 312555 URL: https://svnweb.freebsd.org/changeset/base/312555 Log: Use SFENCE for ordering CLFLUSHOPT. SDM states that CLFLUSHOPT instructions can be ordered with other writes by SFENCE, heavier MFENCE is not required. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpufunc.h head/sys/i386/i386/pmap.c head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jan 20 18:37:14 2017 (r312554) +++ head/sys/amd64/amd64/pmap.c Fri Jan 20 19:08:44 2017 (r312555) @@ -1862,16 +1862,16 @@ pmap_invalidate_cache_range(vm_offset_t return; /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { if (pmap_kextract(sva) == lapic_paddr) @@ -1915,7 +1915,9 @@ pmap_invalidate_cache_pages(vm_page_t *p ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt)) pmap_invalidate_cache(); else { - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (i = 0; i < count; i++) { daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); @@ -1927,7 +1929,9 @@ pmap_invalidate_cache_pages(vm_page_t *p clflush(daddr); } } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); } } Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Jan 20 18:37:14 2017 (r312554) +++ head/sys/amd64/include/cpufunc.h Fri Jan 20 19:08:44 2017 (r312555) @@ -327,6 +327,13 @@ mfence(void) } static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + +static __inline void ia32_pause(void) { __asm __volatile("pause"); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jan 20 18:37:14 2017 (r312554) +++ head/sys/i386/i386/pmap.c Fri Jan 20 19:08:44 2017 (r312555) @@ -1283,16 +1283,16 @@ pmap_invalidate_cache_range(vm_offset_t return; #endif /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { #ifdef DEV_APIC @@ -5300,12 +5300,14 @@ pmap_flush_page(vm_page_t m) eva = sva + PAGE_SIZE; /* - * Use mfence despite the ordering implied by + * Use mfence or sfence despite the ordering implied by * mtx_{un,}lock() because clflush on non-Intel CPUs * and clflushopt are not guaranteed to be ordered by * any other instruction. */ - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (; sva < eva; sva += cpu_clflush_line_size) { if (useclflushopt) @@ -5313,7 +5315,9 @@ pmap_flush_page(vm_page_t m) else clflush(sva); } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); *cmap_pte2 = 0; sched_unpin(); Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Fri Jan 20 18:37:14 2017 (r312554) +++ head/sys/i386/include/cpufunc.h Fri Jan 20 19:08:44 2017 (r312555) @@ -158,6 +158,13 @@ mfence(void) __asm __volatile("mfence" : : : "memory"); } +static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + #ifdef _KERNEL #define HAVE_INLINE_FFS From owner-svn-src-head@freebsd.org Fri Jan 20 21:21:43 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 96102CBA32E; Fri, 20 Jan 2017 21:21:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56FD3115F; Fri, 20 Jan 2017 21:21:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KLLgRx046867; Fri, 20 Jan 2017 21:21:42 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KLLgm0046863; Fri, 20 Jan 2017 21:21:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701202121.v0KLLgm0046863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 20 Jan 2017 21:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312558 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 21:21:43 -0000 Author: asomers Date: Fri Jan 20 21:21:41 2017 New Revision: 312558 URL: https://svnweb.freebsd.org/changeset/base/312558 Log: Misc Coverity fixes in camcontrol(8) CID 1229913 Fix output of "camcontrol persist -i report_capabilities". The reported Persistent Reservation Types were wrong in all cases. CID 1356029 Annotate the code so Coverity will know that this is a false positive. CID 1366830 Fix a memory leak in "camcontrol timestamp -s" CID 1366832 Fix a segfault that could be caused by bad drive firmware Also, fix the man page entry for the "camcontrol epc state" command to match what the code does. Reviewed by: ken, wblock MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9239 Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/epc.c head/sbin/camcontrol/persist.c head/sbin/camcontrol/timestamp.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Jan 20 21:15:22 2017 (r312557) +++ head/sbin/camcontrol/camcontrol.8 Fri Jan 20 21:21:41 2017 (r312558) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2017 +.Dd January 20, 2017 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -2374,6 +2374,20 @@ this power condition will be affected. .It state Enable or disable a particular power condition. .Bl -tag -width 7n +.It Fl e +Enable the power condition. +One of +.Fl e +or +.Fl d +is required. +.It Fl d +Disable the power condition. +One of +.Fl d +or +.Fl e +is required. .It Fl p Ar cond Specify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. This argument is required. Modified: head/sbin/camcontrol/epc.c ============================================================================== --- head/sbin/camcontrol/epc.c Fri Jan 20 21:15:22 2017 (r312557) +++ head/sbin/camcontrol/epc.c Fri Jan 20 21:21:41 2017 (r312558) @@ -783,6 +783,7 @@ epc(struct cam_device *device, int argc, warnx("Must specify a timer value (-T time)"); error = 1; } + /* FALLTHROUGH */ case ATA_SF_EPC_SET_STATE: if (enable == -1) { warnx("Must specify enable (-e) or disable (-d)"); Modified: head/sbin/camcontrol/persist.c ============================================================================== --- head/sbin/camcontrol/persist.c Fri Jan 20 21:15:22 2017 (r312557) +++ head/sbin/camcontrol/persist.c Fri Jan 20 21:21:41 2017 (r312558) @@ -241,9 +241,11 @@ persist_print_cap(struct scsi_per_res_ca { uint32_t length; int check_type_mask = 0; + uint32_t type_mask; length = scsi_2btoul(cap->length); length = MIN(length, valid_len); + type_mask = scsi_2btoul(cap->type_mask); if (length < __offsetof(struct scsi_per_res_cap, type_mask)) { fprintf(stdout, "Insufficient data (%u bytes) to report " @@ -345,20 +347,20 @@ persist_print_cap(struct scsi_per_res_ca fprintf(stdout, "Supported Persistent Reservation Types:\n"); fprintf(stdout, " Write Exclusive - All Registrants " "(WR_EX_AR): %d\n", - (cap->type_mask[0] & SPRI_TM_WR_EX_AR)? 1 : 0); + (type_mask & SPRI_TM_WR_EX_AR)? 1 : 0); fprintf(stdout, " Exclusive Access - Registrants Only " "(EX_AC_RO): %d\n", - (cap->type_mask[0] & SPRI_TM_EX_AC_RO) ? 1 : 0); + (type_mask & SPRI_TM_EX_AC_RO) ? 1 : 0); fprintf(stdout, " Write Exclusive - Registrants Only " "(WR_EX_RO): %d\n", - (cap->type_mask[0] & SPRI_TM_WR_EX_RO)? 1 : 0); + (type_mask & SPRI_TM_WR_EX_RO)? 1 : 0); fprintf(stdout, " Exclusive Access (EX_AC): %d\n", - (cap->type_mask[0] & SPRI_TM_EX_AC) ? 1 : 0); + (type_mask & SPRI_TM_EX_AC) ? 1 : 0); fprintf(stdout, " Write Exclusive (WR_EX): %d\n", - (cap->type_mask[0] & SPRI_TM_WR_EX) ? 1 : 0); + (type_mask & SPRI_TM_WR_EX) ? 1 : 0); fprintf(stdout, " Exclusive Access - All Registrants " "(EX_AC_AR): %d\n", - (cap->type_mask[1] & SPRI_TM_EX_AC_AR) ? 1 : 0); + (type_mask & SPRI_TM_EX_AC_AR) ? 1 : 0); } else { fprintf(stdout, "Persistent Reservation Type Mask is NOT " "valid\n"); Modified: head/sbin/camcontrol/timestamp.c ============================================================================== --- head/sbin/camcontrol/timestamp.c Fri Jan 20 21:15:22 2017 (r312557) +++ head/sbin/camcontrol/timestamp.c Fri Jan 20 21:21:41 2017 (r312558) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -138,6 +139,8 @@ set_restore_flags(struct cam_device *dev * Create the control page at the correct point in the mode_buf, it * starts after the header and the blk description. */ + assert(hdr_and_blk_length <= + sizeof(mode_buf) - sizeof(struct scsi_control_ext_page)); control_page = (struct scsi_control_ext_page *)&mode_buf [hdr_and_blk_length]; if (set_flag != 0) { @@ -240,6 +243,7 @@ report_timestamp(struct cam_device *devi bailout: if (ccb != NULL) cam_freeccb(ccb); + free(report_buf); return error; } From owner-svn-src-head@freebsd.org Fri Jan 20 21:40:05 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 D1944CBA8A1; Fri, 20 Jan 2017 21:40:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC5981A40; Fri, 20 Jan 2017 21:40:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KLe4i8053253; Fri, 20 Jan 2017 21:40:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KLe4aK053252; Fri, 20 Jan 2017 21:40:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701202140.v0KLe4aK053252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 20 Jan 2017 21:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312559 - head/usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 21:40:05 -0000 Author: asomers Date: Fri Jan 20 21:40:04 2017 New Revision: 312559 URL: https://svnweb.freebsd.org/changeset/base/312559 Log: Fix misc Coverity defects in camdd(8) CID 1341620 Fix a small memory leak CID 1341630 Though this is technically a false positive, rearrange the code for clarity. CID 1341635 Eliminate dead code CID 1368663 Fix a double mutex unlock in the error path Also: * Use sig_atomic_t for variables accessed from signal handlers * Don't conditionalize free(3) on its argument being non-null Reported by: Coverity CID: 1341620 1341630 1341635 1368663 Reviewed by: ken MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9237 Modified: head/usr.sbin/camdd/camdd.c Modified: head/usr.sbin/camdd/camdd.c ============================================================================== --- head/usr.sbin/camdd/camdd.c Fri Jan 20 21:21:41 2017 (r312558) +++ head/usr.sbin/camdd/camdd.c Fri Jan 20 21:40:04 2017 (r312559) @@ -420,9 +420,9 @@ struct camdd_dev { }; static sem_t camdd_sem; -static int need_exit = 0; -static int error_exit = 0; -static int need_status = 0; +static sig_atomic_t need_exit = 0; +static sig_atomic_t error_exit = 0; +static sig_atomic_t need_status = 0; #ifndef min #define min(a, b) (a < b) ? a : b @@ -712,11 +712,7 @@ camdd_alloc_buf(struct camdd_dev *dev, c return (buf); bailout_error: - if (data_ptr != NULL) - free(data_ptr); - - if (buf != NULL) - free(buf); + free(data_ptr); return (NULL); } @@ -2262,6 +2258,7 @@ camdd_file_run(struct camdd_dev *dev) if (file_dev->tmp_buf == NULL) { buf->status = CAMDD_STATUS_ERROR; error_count++; + pthread_mutex_lock(&dev->mutex); goto bailout; } for (i = 0, cur_offset = 0; i < data->sg_count; i++) { @@ -2984,7 +2981,6 @@ int camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io, int retry_count, int timeout) { - char *device = NULL; struct cam_device *new_cam_dev = NULL; struct camdd_dev *devs[2]; struct timespec start_time; @@ -3004,12 +3000,11 @@ camdd_rw(struct camdd_io_opts *io_opts, for (i = 0; i < num_io_opts; i++) { switch (io_opts[i].dev_type) { case CAMDD_DEV_PASS: { - camdd_argmask new_arglist = CAMDD_ARG_NONE; - int bus = 0, target = 0, lun = 0; - char name[30]; - int rv; - if (isdigit(io_opts[i].dev_name[0])) { + camdd_argmask new_arglist = CAMDD_ARG_NONE; + int bus = 0, target = 0, lun = 0; + int rv; + /* device specified as bus:target[:lun] */ rv = parse_btl(io_opts[i].dev_name, &bus, &target, &lun, &new_arglist); @@ -3025,23 +3020,21 @@ camdd_rw(struct camdd_io_opts *io_opts, lun = 0; new_arglist |= CAMDD_ARG_LUN; } + new_cam_dev = cam_open_btl(bus, target, lun, + O_RDWR, NULL); } else { + char name[30]; + if (cam_get_device(io_opts[i].dev_name, name, sizeof name, &unit) == -1) { warnx("%s", cam_errbuf); error = 1; goto bailout; } - device = strdup(name); - new_arglist |= CAMDD_ARG_DEVICE |CAMDD_ARG_UNIT; + new_cam_dev = cam_open_spec_device(name, unit, + O_RDWR, NULL); } - if (new_arglist & (CAMDD_ARG_BUS | CAMDD_ARG_TARGET)) - new_cam_dev = cam_open_btl(bus, target, lun, - O_RDWR, NULL); - else - new_cam_dev = cam_open_spec_device(device, unit, - O_RDWR, NULL); if (new_cam_dev == NULL) { warnx("%s", cam_errbuf); error = 1; From owner-svn-src-head@freebsd.org Fri Jan 20 22:41:17 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 C444ACB9DD0; Fri, 20 Jan 2017 22:41:17 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93EE91E12; Fri, 20 Jan 2017 22:41:17 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KMfGwY078906; Fri, 20 Jan 2017 22:41:16 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KMfGSm078905; Fri, 20 Jan 2017 22:41:16 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701202241.v0KMfGSm078905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 20 Jan 2017 22:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312560 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 20 Jan 2017 22:41:17 -0000 Author: avos Date: Fri Jan 20 22:41:16 2017 New Revision: 312560 URL: https://svnweb.freebsd.org/changeset/base/312560 Log: ifconfig(8): fix '-stbc' parameter name. MFC after: 5 days Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Fri Jan 20 21:40:04 2017 (r312559) +++ head/sbin/ifconfig/ifieee80211.c Fri Jan 20 22:41:16 2017 (r312560) @@ -5602,7 +5602,7 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD("stbctx", 1, set80211stbc), DEF_CMD("-stbctx", -1, set80211stbc), DEF_CMD("stbc", 3, set80211stbc), /* NB: tx+rx */ - DEF_CMD("-ampdu", -3, set80211stbc), + DEF_CMD("-stbc", -3, set80211stbc), DEF_CMD("puren", 1, set80211puren), DEF_CMD("-puren", 0, set80211puren), DEF_CMD("doth", 1, set80211doth), From owner-svn-src-head@freebsd.org Fri Jan 20 23:03:40 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 AFB57CBA1F6; Fri, 20 Jan 2017 23:03:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 5652318A7; Fri, 20 Jan 2017 23:03:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id r144so66651904wme.1; Fri, 20 Jan 2017 15:03:40 -0800 (PST) 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; bh=OGuLehhYy85RboQ2AgoR3aGChMynbGWo/YJuXVp1w68=; b=sWq8ptuFTFa5dhBpmRsV8GgDoPcO+0B9W41oMkCPc9pWx8FLdQsDx2dB/HTC7oUTeE pfDm8PLm2KZsrUc5jcE1jnoi9cQXMI+C7ULw4Fge4Bs/Tw6QCc6boLuAE85reUdQVY5H Wlakeik8I9bUonAqaH3Gc+tTJOQ1Atdo9Jna6YOsh/hS4TaxiRgknBCuOYogRJVGMekF TyjON87y8LvvlIDyVGuRXSr8mR+jB1k9BVFDK7lQZvDlF+6OD390cJWTKTbnPx/FQv76 uQrwCOECqaW+RsJxk3DVacy1UHz9HKiSjUgCFNEZUXYTALdilBUqUbl2XlpkbSK311ox cyRw== 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; bh=OGuLehhYy85RboQ2AgoR3aGChMynbGWo/YJuXVp1w68=; b=odbsl2dGr3DKpk70SucYedzWmM0vDe7eKMbPVujYFMAM+BM1uymrkBviSatJ9nHSET NFcBahDCPklMw4xz31hfqcA7vM3Xd9wL4qyz94EGxX9mgrHxVfCYLZFWhktthwHOsG8R vnrBynGwXR87LYJ7JBpFzN3Pm/X4waKNhkF3ox76YrfvF1Xy6IkEsWCPsMaqMZb1uK8V /Bu36LJgC02MaGygNu3E3WYDb51iksNZThpi3BVh4RJGUh+X2JY7LkflhJHiT3AjTsZJ EAHEsbJKQPbQDp3RIVeE4BgUdajGB2iLMs/B1IunjzkYazyF9VBfhhaBf2xpYISyuKZJ Avng== X-Gm-Message-State: AIkVDXK13J57LZ3/mdcm9fCxPU1I1x5WSBZZie4Ix4JeNw2qaqFvX0cywiznDPTHUpwFhdgWT/hqlDrMhrjq8g== X-Received: by 10.223.173.80 with SMTP id p74mr13211931wrc.168.1484953417744; Fri, 20 Jan 2017 15:03:37 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Fri, 20 Jan 2017 15:03:36 -0800 (PST) In-Reply-To: <201701200743.v0K7heje003608@repo.freebsd.org> References: <201701200743.v0K7heje003608@repo.freebsd.org> From: Adrian Chadd Date: Fri, 20 Jan 2017 15:03:36 -0800 X-Google-Sender-Auth: P-LgKbwDCbf11rPUeYg4xiUz1fg Message-ID: Subject: Re: svn commit: r312522 - head/sys/net80211 To: "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: Fri, 20 Jan 2017 23:03:40 -0000 ... MCS16-31. God, don't commit late at night adrian. -a On 19 January 2017 at 23:43, Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 20 07:43:40 2017 > New Revision: 312522 > URL: https://svnweb.freebsd.org/changeset/base/312522 > > Log: > [net80211] allow for MCS16-23 to be statically configured. > > Tested: > > * AR9380, STA mode > > Modified: > head/sys/net80211/ieee80211_ioctl.c > > Modified: head/sys/net80211/ieee80211_ioctl.c > ============================================================================== > --- head/sys/net80211/ieee80211_ioctl.c Fri Jan 20 07:11:21 2017 (r312521) > +++ head/sys/net80211/ieee80211_ioctl.c Fri Jan 20 07:43:40 2017 (r312522) > @@ -2225,7 +2225,7 @@ checkmcs(int mcs) > return 1; > if ((mcs & IEEE80211_RATE_MCS) == 0) /* MCS always have 0x80 set */ > return 0; > - return (mcs & 0x7f) <= 15; /* XXX could search ht rate set */ > + return (mcs & 0x7f) <= 31; /* XXX could search ht rate set */ > } > > static int > From owner-svn-src-head@freebsd.org Sat Jan 21 02:37:29 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 2B40ECBA3C3; Sat, 21 Jan 2017 02:37:29 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CF9D191B; Sat, 21 Jan 2017 02:37:29 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OK300100Z8AC800@mr11p00im-asmtp002.me.com>; Sat, 21 Jan 2017 02:37:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1484966242; bh=PgUnH2YQsIJ1jTVH59xewH6rc7YBt+pY+E+ZHxF2LJ4=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=KPBN2OPT86M9oFBmXPdiBGK6numugkfRsjiUmv6OCsQYiGMDykiRh09hKcd8h9Qdu FFdYx7qGmWub5N4g3PhnRiwZxYadaa/vViaqrDwIzEv3VY/x1VFkEqEvZtAcOjKreW qNgrD0yeVVmCgc4DUT+GSIMvPw1Ahn00o4p8KfqbEvaFj0UYpUrhqq4UyM74IsGvHg alWJdfjGnyCTAWyoxLtmXoBS095k6U+o/2mzKUW5u1RcHfAfD5Z0kSh9BgTAK/q64G r1ODjbVU4sif0k5zpusAFXjZAvKBJ6kZ9qVLdqTb+ZEdtc/TYshnxX4yWMefVGagA8 u/f0DioRoNmNQ== Received: from [172.17.133.77] (unknown [12.202.168.51]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OK3005RJZA9KH20@mr11p00im-asmtp002.me.com>; Sat, 21 Jan 2017 02:37:22 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-20_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1701210037 User-Agent: Microsoft-MacOutlook/f.1e.0.170107 Date: Fri, 20 Jan 2017 18:37:20 -0800 Subject: Re: svn commit: r286700 - in head: sbin/ifconfig sys/net From: Ravi Pokala Sender: "Pokala, Ravi" To: Hiren Panchasara , Alan Somers , lakshmi.n@msystechnologies.com, smh@FreeBSD.org Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-id: Thread-topic: svn commit: r286700 - in head: sbin/ifconfig sys/net References: <201508122021.t7CKL5wk016750@repo.freebsd.org> <20170118223827.GJ86256@strugglingcoder.info> In-reply-to: <20170118223827.GJ86256@strugglingcoder.info> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit 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: Sat, 21 Jan 2017 02:37:29 -0000 -----Original Message----- > From: on behalf of Hiren Panchasara > Date: 2017-01-18, Wednesday at 14:38 > To: Alan Somers , , , > Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" > Subject: Re: svn commit: r286700 - in head: sbin/ifconfig sys/net > > Adding the submitter and other reviewers for their comments. > > On 01/18/17 at 03:03P, Alan Somers wrote: >> Is the change to lacp_port_create correct? The comment indicates that >> fast is configurable, but it's actually constant. Later on, there's >> some dead code that depends on the value of fast (it was dead before >> this commit, too). >> >> CID: 1305734 >> CID: 1305692 You're right that in lacp_port_create(), "fast" (and "active") are both constant. I think the comment intended to indicate that "fast" could be changed via ioctl *after create*. It seems to me that the right thing to do would be to remove both "fast" and "active" from lacp_port_create(), and have it unconditionally set "lp->lp_state" to LACP_STATE_ACTIVITY. That would eliminate the unclear comments and fix both Coverity issues, without changing any behavior. -Ravi (rpokala@) >> -Alan >> >> On Wed, Aug 12, 2015 at 2:21 PM, Hiren Panchasara wrote: >>> Author: hiren >>> Date: Wed Aug 12 20:21:04 2015 >>> New Revision: 286700 >>> URL: https://svnweb.freebsd.org/changeset/base/286700 >>> >>> Log: >>> Make LAG LACP fast timeout tunable through IOCTL. >>> >>> Differential Revision: D3300 >>> Submitted by: LN Sundararajan >>> Reviewed by: wblock, smh, gnn, hiren, rpokala at panasas >>> MFC after: 2 weeks >>> Sponsored by: Panasas >>> >>> Modified: >>> head/sbin/ifconfig/ifconfig.8 >>> head/sbin/ifconfig/iflagg.c >>> head/sys/net/ieee8023ad_lacp.c >>> head/sys/net/ieee8023ad_lacp.h >>> head/sys/net/if_lagg.c >>> head/sys/net/if_lagg.h >>> >>> Modified: head/sbin/ifconfig/ifconfig.8 >>> ============================================================================== >>> --- head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sbin/ifconfig/ifconfig.8 Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -28,7 +28,7 @@ >>> .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 >>> .\" $FreeBSD$ >>> .\" >>> -.Dd May 15, 2015 >>> +.Dd Aug 12, 2015 >>> .Dt IFCONFIG 8 >>> .Os >>> .Sh NAME >>> @@ -2396,6 +2396,10 @@ Disable local hash computation for RSS h >>> Set a shift parameter for RSS local hash computation. >>> Hash is calculated by using flowid bits in a packet header mbuf >>> which are shifted by the number of this parameter. >>> +.It Cm lacp_fast_timeout >>> +Enable lacp fast-timeout on the interface. >>> +.It Cm -lacp_fast_timeout >>> +Disable lacp fast-timeout on the interface. >>> .El >>> .Pp >>> The following parameters are specific to IP tunnel interfaces, >>> >>> Modified: head/sbin/ifconfig/iflagg.c >>> ============================================================================== >>> --- head/sbin/ifconfig/iflagg.c Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sbin/ifconfig/iflagg.c Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -115,6 +115,8 @@ setlaggsetopt(const char *val, int d, in >>> case -LAGG_OPT_LACP_TXTEST: >>> case LAGG_OPT_LACP_RXTEST: >>> case -LAGG_OPT_LACP_RXTEST: >>> + case LAGG_OPT_LACP_TIMEOUT: >>> + case -LAGG_OPT_LACP_TIMEOUT: >>> break; >>> default: >>> err(1, "Invalid lagg option"); >>> @@ -293,6 +295,8 @@ static struct cmd lagg_cmds[] = { >>> DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), >>> DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), >>> DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), >>> + DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), >>> + DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), >>> DEF_CMD_ARG("flowid_shift", setlaggflowidshift), >>> }; >>> static struct afswtch af_lagg = { >>> >>> Modified: head/sys/net/ieee8023ad_lacp.c >>> ============================================================================== >>> --- head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sys/net/ieee8023ad_lacp.c Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -522,7 +522,7 @@ lacp_port_create(struct lagg_port *lgp) >>> int error; >>> >>> boolean_t active = TRUE; /* XXX should be configurable */ >>> - boolean_t fast = FALSE; /* XXX should be configurable */ >>> + boolean_t fast = FALSE; /* Configurable via ioctl */ >>> >>> link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); >>> sdl.sdl_alen = ETHER_ADDR_LEN; >>> >>> Modified: head/sys/net/ieee8023ad_lacp.h >>> ============================================================================== >>> --- head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sys/net/ieee8023ad_lacp.h Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -251,6 +251,7 @@ struct lacp_softc { >>> u_int32_t lsc_tx_test; >>> } lsc_debug; >>> u_int32_t lsc_strict_mode; >>> + boolean_t lsc_fast_timeout; /* if set, fast timeout */ >>> }; >>> >>> #define LACP_TYPE_ACTORINFO 1 >>> >>> Modified: head/sys/net/if_lagg.c >>> ============================================================================== >>> --- head/sys/net/if_lagg.c Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sys/net/if_lagg.c Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -1257,6 +1257,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd >>> ro->ro_opts |= LAGG_OPT_LACP_RXTEST; >>> if (lsc->lsc_strict_mode != 0) >>> ro->ro_opts |= LAGG_OPT_LACP_STRICT; >>> + if (lsc->lsc_fast_timeout != 0) >>> + ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT; >>> >>> ro->ro_active = sc->sc_active; >>> } else { >>> @@ -1292,6 +1294,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd >>> case -LAGG_OPT_LACP_RXTEST: >>> case LAGG_OPT_LACP_STRICT: >>> case -LAGG_OPT_LACP_STRICT: >>> + case LAGG_OPT_LACP_TIMEOUT: >>> + case -LAGG_OPT_LACP_TIMEOUT: >>> valid = lacp = 1; >>> break; >>> default: >>> @@ -1320,6 +1324,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd >>> sc->sc_opts &= ~ro->ro_opts; >>> } else { >>> struct lacp_softc *lsc; >>> + struct lacp_port *lp; >>> >>> lsc = (struct lacp_softc *)sc->sc_psc; >>> >>> @@ -1342,6 +1347,20 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd >>> case -LAGG_OPT_LACP_STRICT: >>> lsc->lsc_strict_mode = 0; >>> break; >>> + case LAGG_OPT_LACP_TIMEOUT: >>> + LACP_LOCK(lsc); >>> + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) >>> + lp->lp_state |= LACP_STATE_TIMEOUT; >>> + LACP_UNLOCK(lsc); >>> + lsc->lsc_fast_timeout = 1; >>> + break; >>> + case -LAGG_OPT_LACP_TIMEOUT: >>> + LACP_LOCK(lsc); >>> + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) >>> + lp->lp_state &= ~LACP_STATE_TIMEOUT; >>> + LACP_UNLOCK(lsc); >>> + lsc->lsc_fast_timeout = 0; >>> + break; >>> } >>> } >>> LAGG_WUNLOCK(sc); >>> >>> Modified: head/sys/net/if_lagg.h >>> ============================================================================== >>> --- head/sys/net/if_lagg.h Wed Aug 12 20:16:13 2015 (r286699) >>> +++ head/sys/net/if_lagg.h Wed Aug 12 20:21:04 2015 (r286700) >>> @@ -150,6 +150,7 @@ struct lagg_reqopts { >>> #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ >>> #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ >>> #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ >>> +#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ >>> u_int ro_count; /* number of ports */ >>> u_int ro_active; /* active port count */ >>> u_int ro_flapping; /* number of flapping */ >>> From owner-svn-src-head@freebsd.org Sat Jan 21 06:53:32 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 46E5BCBBD11; Sat, 21 Jan 2017 06:53:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10E991078; Sat, 21 Jan 2017 06:53:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0L6rVcL080345; Sat, 21 Jan 2017 06:53:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0L6rVoS080344; Sat, 21 Jan 2017 06:53:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701210653.v0L6rVoS080344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Jan 2017 06:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312562 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 06:53:32 -0000 Author: adrian Date: Sat Jan 21 06:53:30 2017 New Revision: 312562 URL: https://svnweb.freebsd.org/changeset/base/312562 Log: [ath] ensure both iv_ampdu_limit and iv_ampdu_rxmax is set. A recent change enforced the VAP limit as well as the peer limit. I now need to actually set iv_ampdu_limit or we don't transmit more than 8K sized aggregates. This restores the expected (suboptimal, but still much faster) behaviour. Tested: * AR9380, STA mode Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jan 21 06:48:52 2017 (r312561) +++ head/sys/dev/ath/if_ath.c Sat Jan 21 06:53:30 2017 (r312562) @@ -1638,6 +1638,7 @@ ath_vap_create(struct ieee80211com *ic, * However, for now that's enforced by the TX path. */ vap->iv_ampdu_rxmax = IEEE80211_HTCAP_MAXRXAMPDU_64K; + vap->iv_ampdu_limit = IEEE80211_HTCAP_MAXRXAMPDU_64K; avp->av_bslot = -1; if (needbeacon) { From owner-svn-src-head@freebsd.org Sat Jan 21 07:07:51 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 A5541CBBF41; Sat, 21 Jan 2017 07:07:51 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74EEC157F; Sat, 21 Jan 2017 07:07:51 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0L77o8d084372; Sat, 21 Jan 2017 07:07:50 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0L77o0Q084371; Sat, 21 Jan 2017 07:07:50 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201701210707.v0L77o0Q084371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 21 Jan 2017 07:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312563 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 07:07:51 -0000 Author: kevlo Date: Sat Jan 21 07:07:50 2017 New Revision: 312563 URL: https://svnweb.freebsd.org/changeset/base/312563 Log: Mention softfloat and hardfloat supports for RISC-V. Reviewed by: br Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Sat Jan 21 06:53:30 2017 (r312562) +++ head/share/man/man7/arch.7 Sat Jan 21 07:07:50 2017 (r312563) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2016 +.Dd January 21, 2017 .Dt ARCH 7 .Os .Sh NAME @@ -135,7 +135,8 @@ On all supported architectures, .It mips64hf Ta hard Ta identical to double .It powerpc Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision -.It riscv Ta +.It riscv64 Ta hard Ta hard, double precision +.It riscv64sf Ta soft Ta soft, double precision .It sparc64 Ta hard Ta hard, quad precision .El .Ss Predefined Macros From owner-svn-src-head@freebsd.org Sat Jan 21 09:08:29 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 4E37ECB91E4; Sat, 21 Jan 2017 09:08:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130E41CE4; Sat, 21 Jan 2017 09:08:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0L98S5W033736; Sat, 21 Jan 2017 09:08:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0L98SQp033735; Sat, 21 Jan 2017 09:08:28 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201701210908.v0L98SQp033735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sat, 21 Jan 2017 09:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312588 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 09:08:29 -0000 Author: brooks Date: Sat Jan 21 09:08:27 2017 New Revision: 312588 URL: https://svnweb.freebsd.org/changeset/base/312588 Log: Enable TMPFS on MALTA so we can use it on minimalist disk images without modules. Sponsored by: DARPA, AFRL Modified: head/sys/mips/conf/std.MALTA Modified: head/sys/mips/conf/std.MALTA ============================================================================== --- head/sys/mips/conf/std.MALTA Sat Jan 21 08:43:41 2017 (r312587) +++ head/sys/mips/conf/std.MALTA Sat Jan 21 09:08:27 2017 (r312588) @@ -27,6 +27,8 @@ options NFS_ROOT #NFS usable as /, req options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options TMPFS #Efficient memory filesystem + options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists From owner-svn-src-head@freebsd.org Sat Jan 21 11:41:26 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 1867BCBA185; Sat, 21 Jan 2017 11:41:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A484F1D93; Sat, 21 Jan 2017 11:41:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v0LBfK95032669 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 21 Jan 2017 13:41:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v0LBfK95032669 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v0LBfKkG032668; Sat, 21 Jan 2017 13:41:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Jan 2017 13:41:20 +0200 From: Konstantin Belousov To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312588 - head/sys/mips/conf Message-ID: <20170121114120.GU2349@kib.kiev.ua> References: <201701210908.v0L98SQp033735@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701210908.v0L98SQp033735@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sat, 21 Jan 2017 11:41:26 -0000 On Sat, Jan 21, 2017 at 09:08:28AM +0000, Brooks Davis wrote: > +options TMPFS #Efficient memory filesystem Is the word 'efficient' copied from somewhere ? Yes, I see it in sys/conf/NOTES. I do not see what useful meaning the word has there, applied to the tmpfs. In my opinion, it should be removed from comments. From owner-svn-src-head@freebsd.org Sat Jan 21 13:17:27 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 78C0ECB9D6E; Sat, 21 Jan 2017 13:17:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 412711753; Sat, 21 Jan 2017 13:17:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LDHQin036933; Sat, 21 Jan 2017 13:17:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LDHPkm036923; Sat, 21 Jan 2017 13:17:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701211317.v0LDHPkm036923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 21 Jan 2017 13:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312593 - in head: . contrib/mdocml usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 13:17:27 -0000 Author: bapt Date: Sat Jan 21 13:17:25 2017 New Revision: 312593 URL: https://svnweb.freebsd.org/changeset/base/312593 Log: Import mandoc cvs snapshot 20170121 (pre 1.14) Note that mandoc does not use anymore sqlite3 but a home made database format An important improvement has been made as well in makewhatis performance: Tests on my laptop shows makewhatis on the entire system goes from 26s to 12s Added: head/contrib/mdocml/dba.c - copied unchanged from r312592, vendor/mdocml/dist/dba.c head/contrib/mdocml/dba.h - copied unchanged from r312592, vendor/mdocml/dist/dba.h head/contrib/mdocml/dba_array.c - copied unchanged from r312592, vendor/mdocml/dist/dba_array.c head/contrib/mdocml/dba_array.h - copied unchanged from r312592, vendor/mdocml/dist/dba_array.h head/contrib/mdocml/dba_read.c - copied unchanged from r312592, vendor/mdocml/dist/dba_read.c head/contrib/mdocml/dba_write.c - copied unchanged from r312592, vendor/mdocml/dist/dba_write.c head/contrib/mdocml/dba_write.h - copied unchanged from r312592, vendor/mdocml/dist/dba_write.h head/contrib/mdocml/dbm.c - copied unchanged from r312592, vendor/mdocml/dist/dbm.c head/contrib/mdocml/dbm.h - copied unchanged from r312592, vendor/mdocml/dist/dbm.h head/contrib/mdocml/dbm_map.c - copied unchanged from r312592, vendor/mdocml/dist/dbm_map.c head/contrib/mdocml/dbm_map.h - copied unchanged from r312592, vendor/mdocml/dist/dbm_map.h head/contrib/mdocml/test-EFTYPE.c - copied unchanged from r312592, vendor/mdocml/dist/test-EFTYPE.c head/contrib/mdocml/test-PATH_MAX.c - copied unchanged from r312592, vendor/mdocml/dist/test-PATH_MAX.c head/contrib/mdocml/test-be32toh.c - copied unchanged from r312592, vendor/mdocml/dist/test-be32toh.c head/contrib/mdocml/test-nanosleep.c - copied unchanged from r312592, vendor/mdocml/dist/test-nanosleep.c head/contrib/mdocml/test-ntohl.c - copied unchanged from r312592, vendor/mdocml/dist/test-ntohl.c head/contrib/mdocml/test-sandbox_init.c - copied unchanged from r312592, vendor/mdocml/dist/test-sandbox_init.c Deleted: head/contrib/mdocml/compat_sqlite3_errstr.c head/contrib/mdocml/config.log head/contrib/mdocml/mansearch_const.c head/contrib/mdocml/test-mmap.c head/contrib/mdocml/test-sqlite3.c head/contrib/mdocml/test-sqlite3_errstr.c Modified: head/Makefile.inc1 head/contrib/mdocml/INSTALL head/contrib/mdocml/LICENSE head/contrib/mdocml/Makefile head/contrib/mdocml/Makefile.depend head/contrib/mdocml/TODO head/contrib/mdocml/cgi.c head/contrib/mdocml/compat_fts.c head/contrib/mdocml/compat_fts.h head/contrib/mdocml/config.h head/contrib/mdocml/configure head/contrib/mdocml/configure.local.example head/contrib/mdocml/demandoc.c head/contrib/mdocml/eqn_html.c head/contrib/mdocml/html.c head/contrib/mdocml/html.h head/contrib/mdocml/lib.in head/contrib/mdocml/libmandoc.h head/contrib/mdocml/main.c head/contrib/mdocml/main.h head/contrib/mdocml/makewhatis.8 head/contrib/mdocml/man.1 head/contrib/mdocml/man.c head/contrib/mdocml/man.conf.5 head/contrib/mdocml/man_hash.c head/contrib/mdocml/man_html.c head/contrib/mdocml/man_macro.c head/contrib/mdocml/man_term.c head/contrib/mdocml/mandoc.1 head/contrib/mdocml/mandoc.3 head/contrib/mdocml/mandoc.css head/contrib/mdocml/mandoc.db.5 head/contrib/mdocml/mandoc.h head/contrib/mdocml/mandoc_aux.h head/contrib/mdocml/mandoc_html.3 head/contrib/mdocml/mandocdb.c head/contrib/mdocml/manpath.c head/contrib/mdocml/mansearch.c head/contrib/mdocml/mansearch.h head/contrib/mdocml/mdoc.7 head/contrib/mdocml/mdoc.c head/contrib/mdocml/mdoc_argv.c head/contrib/mdocml/mdoc_hash.c head/contrib/mdocml/mdoc_html.c head/contrib/mdocml/mdoc_macro.c head/contrib/mdocml/mdoc_man.c head/contrib/mdocml/mdoc_state.c head/contrib/mdocml/mdoc_term.c head/contrib/mdocml/mdoc_validate.c head/contrib/mdocml/read.c head/contrib/mdocml/roff.c head/contrib/mdocml/roff.h head/contrib/mdocml/tag.c head/contrib/mdocml/tbl_html.c head/contrib/mdocml/term.c head/contrib/mdocml/term_ascii.c head/contrib/mdocml/term_ps.c head/contrib/mdocml/test-fts.c head/contrib/mdocml/test-ohash.c head/contrib/mdocml/test-vasprintf.c head/contrib/mdocml/test-wchar.c head/contrib/mdocml/tree.c head/usr.bin/mandoc/Makefile head/usr.bin/mandoc/Makefile.depend Directory Properties: head/contrib/mdocml/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jan 21 13:02:53 2017 (r312592) +++ head/Makefile.inc1 Sat Jan 21 13:17:25 2017 (r312593) @@ -1694,11 +1694,10 @@ _kerberos5_bootstrap_tools= \ .endif # r283777 makewhatis(1) replaced with mandoc version which builds a database. -.if ${MK_MANDOCDB} != "no" && ${BOOTSTRAPPING} < 1100075 +.if ${MK_MANDOCDB} != "no" _libopenbsd?= lib/libopenbsd -_makewhatis= lib/libsqlite3 \ - usr.bin/mandoc -${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd ${_bt}-lib/libsqlite3 +_makewhatis= usr.bin/mandoc +${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd .endif bootstrap-tools: .PHONY Modified: head/contrib/mdocml/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/INSTALL Sat Jan 21 13:17:25 2017 (r312593) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.15 2016/07/14 11:09:06 schwarze Exp $ +$Id: INSTALL,v 1.17 2016/07/19 22:40:33 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- @@ -35,7 +35,11 @@ To install mandoc manually, the followin command "echo BUILD_CGI=1 > configure.local". Then run "cp cgi.h.examples cgi.h" and edit cgi.h as desired. -2. Run "./configure". +2. Define MANPATH_DEFAULT in configure.local +if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate +for your operating system. + +3. Run "./configure". This script attempts autoconfiguration of mandoc for your system. Read both its standard output and the file "Makefile.local" it generates. If anything looks wrong or different from what you @@ -45,28 +49,21 @@ result seems right to you. On Solaris 10 and earlier, you may have to run "ksh ./configure" because the native /bin/sh lacks some POSIX features. -3. Run "make". +4. Run "make". Any POSIX-compatible make, in particular both BSD make and GNU make, should work. If the build fails, look at "configure.local.example" and go back to step 2. -4. Run "make -n install" and check whether everything will be +5. Run "make -n install" and check whether everything will be installed to the intended places. Otherwise, put some *DIR or *NM* -variables into "configure.local" and go back to step 2. +variables into "configure.local" and go back to step 3. -5. Run "sudo make install". If you intend to build a binary +6. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -6. If you want to use the integrated man(1) and your system uses -manpath(1), make sure it is configured correctly, in particular, -it returns all directory trees where manual pages are installed. -Otherwise, if your system uses man.conf(5), make sure it contains -a "manpath" line for each directory tree, and the order of these -lines meets your wishes. - -7. If you compiled with database support, run the command "sudo +7. Run the command "sudo makewhatis" to build mandoc.db(5) databases in all the directory trees configured in step 6. Whenever installing new manual pages, re-run makewhatis(8) to update the databases, or apropos(1) will @@ -84,20 +81,9 @@ manual page source. Understanding mandoc dependencies --------------------------------- -The mandoc(1), man(1), and demandoc(1) utilities only depend -on the zlib library for decompressing gzipped manual pages, -but makewhatis(8) and apropos(1) depend on the following -additional software: - -1. The SQLite database system, see . -The recommended version of SQLite is 3.8.4.3 or newer. The mandoc -toolset is known to work with version 3.7.5 or newer. Versions -older than 3.8.3 may not achieve full performance due to the -missing SQLITE_DETERMINISTIC optimization flag. Versions older -than 3.8.0 may not show full error information if opening a database -fails due to the missing sqlite3_errstr() API. Both are very minor -problems, apropos(1) is fully usable with SQLite 3.7.5. Versions -older than 3.7.5 may or may not work, they have not been tested. +The following libraries are required: + +1. zlib for decompressing gzipped manual pages. 2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version Modified: head/contrib/mdocml/LICENSE ============================================================================== --- head/contrib/mdocml/LICENSE Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/LICENSE Sat Jan 21 13:17:25 2017 (r312593) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.12 2016/07/07 23:46:36 schwarze Exp $ +$Id: LICENSE,v 1.13 2016/10/18 14:15:33 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright @@ -8,7 +8,8 @@ Copyright (c) 2008-2012, 2014 Kristaps D Copyright (c) 2010-2016 Ingo Schwarze Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner -Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2016 Ed Maste Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek @@ -41,7 +42,7 @@ other people's Copyright and are distrib and 3-clause BSD licenses; see these individual files for details. soelim.c, soelim.1: -Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2014 Baptiste Daroussin compat_err.c, compat_fts.c, compat_fts.h, compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, Modified: head/contrib/mdocml/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/Makefile Sat Jan 21 13:17:25 2017 (r312593) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.488 2016/07/12 05:18:38 kristaps Exp $ +# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013-2016 Ingo Schwarze @@ -15,27 +15,29 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.13.4 +VERSION = 1.14.0 # === LIST OF FILES ==================================================== -TESTSRCS = test-dirent-namlen.c \ +TESTSRCS = test-be32toh.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ test-err.c \ test-fts.c \ test-getline.c \ test-getsubopt.c \ test-isblank.c \ test-mkdtemp.c \ - test-mmap.c \ + test-nanosleep.c \ + test-ntohl.c \ test-ohash.c \ + test-PATH_MAX.c \ test-pledge.c \ test-progname.c \ test-reallocarray.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ test-sandbox_init.c \ - test-sqlite3.c \ - test-sqlite3_errstr.c \ test-strcasestr.c \ test-stringlist.c \ test-strlcat.c \ @@ -58,7 +60,6 @@ SRCS = att.c \ compat_ohash.c \ compat_progname.c \ compat_reallocarray.c \ - compat_sqlite3_errstr.c \ compat_strcasestr.c \ compat_stringlist.c \ compat_strlcat.c \ @@ -66,6 +67,12 @@ SRCS = att.c \ compat_strsep.c \ compat_strtonum.c \ compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ demandoc.c \ eqn.c \ eqn_html.c \ @@ -86,7 +93,6 @@ SRCS = att.c \ manpage.c \ manpath.c \ mansearch.c \ - mansearch_const.c \ mdoc.c \ mdoc_argv.c \ mdoc_hash.c \ @@ -128,6 +134,11 @@ DISTFILES = INSTALL \ compat_stringlist.h \ configure \ configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ demandoc.1 \ eqn.7 \ gmdiff \ @@ -220,7 +231,6 @@ COMPAT_OBJS = compat_err.o \ compat_ohash.o \ compat_progname.o \ compat_reallocarray.o \ - compat_sqlite3_errstr.o \ compat_strcasestr.o \ compat_strlcat.o \ compat_strlcpy.o \ @@ -244,28 +254,35 @@ MANDOC_TERM_OBJS = eqn_term.o \ term_ps.o \ tbl_term.o -BASE_OBJS = $(MANDOC_HTML_OBJS) \ +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ main.o \ manpath.o \ out.o \ tag.o \ tree.o -MAIN_OBJS = $(BASE_OBJS) - -DB_OBJS = mandocdb.o \ - mansearch.o \ - mansearch_const.o - CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ cgi.o \ - mansearch.o \ - mansearch_const.o \ out.o -MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o +MANPAGE_OBJS = $(DBM_OBJS) \ + manpage.o \ + manpath.o DEMANDOC_OBJS = demandoc.o @@ -329,7 +346,7 @@ www: $(WWW_OBJS) $(WWW_MANS) $(WWW_MANS): mandoc -.PHONY: base-install cgi-install db-install install www-install +.PHONY: base-install cgi-install install www-install .PHONY: clean distclean depend include Makefile.depend @@ -341,7 +358,7 @@ distclean: clean clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) - rm -f mandoc $(BASE_OBJS) $(DB_OBJS) + rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) @@ -351,50 +368,45 @@ clean: base-install: base-build mkdir -p $(DESTDIR)$(BINDIR) - mkdir -p $(DESTDIR)$(LIBDIR) - mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 - mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) - $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) - $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ - $(DESTDIR)$(INCLUDEDIR) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 - $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ - mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 - -db-install: base-build - mkdir -p $(DESTDIR)$(BINDIR) - mkdir -p $(DESTDIR)$(SBINDIR) - mkdir -p $(DESTDIR)$(MANDIR)/man1 - mkdir -p $(DESTDIR)$(MANDIR)/man3 - mkdir -p $(DESTDIR)$(MANDIR)/man5 - mkdir -p $(DESTDIR)$(MANDIR)/man8 - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) - ln -f $(DESTDIR)$(BINDIR)/mandoc \ - $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) - $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 - ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ - $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 - $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 - $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 $(INSTALL_MAN) makewhatis.8 \ $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 +lib-install: base-build + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + cgi-install: cgi-build mkdir -p $(DESTDIR)$(CGIBINDIR) mkdir -p $(DESTDIR)$(HTDOCDIR) Modified: head/contrib/mdocml/Makefile.depend ============================================================================== --- head/contrib/mdocml/Makefile.depend Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/Makefile.depend Sat Jan 21 13:17:25 2017 (r312593) @@ -10,7 +10,6 @@ compat_mkdtemp.o: compat_mkdtemp.c confi compat_ohash.o: compat_ohash.c config.h compat_ohash.h compat_progname.o: compat_progname.c config.h compat_reallocarray.o: compat_reallocarray.c config.h -compat_sqlite3_errstr.o: compat_sqlite3_errstr.c config.h compat_strcasestr.o: compat_strcasestr.c config.h compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h compat_strlcat.o: compat_strlcat.c config.h @@ -18,6 +17,12 @@ compat_strlcpy.o: compat_strlcpy.c confi compat_strsep.o: compat_strsep.c config.h compat_strtonum.o: compat_strtonum.c config.h compat_vasprintf.o: compat_vasprintf.c config.h +dba.o: dba.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mansearch.h dba_write.h dba_array.h dba.h +dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h +dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h +dba_write.o: dba_write.c config.h dba_write.h +dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h +dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h @@ -26,7 +31,7 @@ html.o: html.c config.h mandoc.h mandoc_ lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -man_hash.o: man_hash.c config.h roff.h man.h libman.h +man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h @@ -34,14 +39,13 @@ man_validate.o: man_validate.c config.h mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h -mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h manpage.o: manpage.c config.h manconf.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h -mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h -mansearch_const.o: mansearch_const.c config.h mansearch.h +mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h -mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h -mdoc_hash.o: mdoc_hash.c config.h roff.h mdoc.h libmdoc.h +mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h Modified: head/contrib/mdocml/TODO ============================================================================== --- head/contrib/mdocml/TODO Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/TODO Sat Jan 21 13:17:25 2017 (r312593) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.218 2016/06/05 21:06:04 schwarze Exp $ +* $Id: TODO,v 1.223 2017/01/17 15:32:43 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -33,15 +33,6 @@ Obviously, as the issues have not been s are mere guesses, and some may be wrong. ************************************************************************ -* crashes -************************************************************************ - -- The abort() in bufcat(), html.c, can be triggered via buffmt_includes() - by running -Thtml -Oincludes on a file containing a long .In argument. - Fixing this will probably require reworking the whole bufcat() concept. - loc ** exist * algo * size ** imp ** - -************************************************************************ * missing features ************************************************************************ @@ -213,6 +204,13 @@ are mere guesses, and some may be wrong. synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 loc ** exist ** algo ** size ** imp *** +- break long text into lines inside cells + net/lftp(1) from jirib via bentley@ Sep 13, 2016 + +- layout l1 for a column of max text width 3 reduces the following + inter-column spacing for groff, but not for mandoc + net/lftp(1) from jirib via bentley@ Sep 13, 2016 + - the "w" layout option is ignored synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 loc * exist * algo * size * imp ** @@ -529,16 +527,6 @@ are mere guesses, and some may be wrong. loc ** exist ** algo ** size * imp ** ************************************************************************ -* portability -************************************************************************ - -- systems having UTF-8 but not en_US.UTF-8 - call locale(1) from ./configure, select a UTF-8-locale, - and use that for test-wchar.c and term_ascii.c - to Markus Waldeck Sat, 18 Jul 2015 01:55:37 +0200 - loc * exist * algo * size * imp * - -************************************************************************ * warning issues ************************************************************************ @@ -612,7 +600,6 @@ are mere guesses, and some may be wrong. ************************************************************************ - Why are we using MAP_SHARED, not MAP_PRIVATE for mmap(2)? - How does SQLITE_CONFIG_PAGECACHE actually work? Document it! from kristaps@ Sat, 09 Aug 2014 13:51:36 +0200 Several areas can be cleaned up to make mandoc even faster. These are @@ -631,6 +618,13 @@ Several areas can be cleaned up to make * structural issues ************************************************************************ +- POSIX says in the documentation of sysconf(3) that PATH_MAX + is allowed to be so large that it is a bad idea to use it + for sizing static buffers. So use dynamic buffers throughout. + See the file test-PATH_MAX.c for details. + Found by Aaron M. Ucko in the GNU Hurd via Bdale Garbee, + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624 + - We use the input line number at several places to distinguish same-line from different-line input. That plainly doesn't work with user-defined macros, leading to random breakage. @@ -646,11 +640,6 @@ Several areas can be cleaned up to make - struct mparse refactoring Steffen Nurpmeso Thu, 04 Sep 2014 12:50:00 +0200 -- Consider creating some views that will make the database more - readable from the sqlite3 shell. Consider using them to - abstract from the database structure, too. - suggested by espie@ Sat, 19 Apr 2014 14:52:57 +0200 - ************************************************************************ * CGI issues ************************************************************************ Modified: head/contrib/mdocml/cgi.c ============================================================================== --- head/contrib/mdocml/cgi.c Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/cgi.c Sat Jan 21 13:17:25 2017 (r312593) @@ -1,7 +1,7 @@ -/* $Id: cgi.c,v 1.135 2016/07/11 22:48:37 schwarze Exp $ */ +/* $Id: cgi.c,v 1.144 2017/01/21 01:20:31 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons - * Copyright (c) 2014, 2015, 2016 Ingo Schwarze + * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -113,17 +113,18 @@ static const char *const sec_names[] = { static const int sec_MAX = sizeof(sec_names) / sizeof(char *); static const char *const arch_names[] = { - "amd64", "alpha", "armish", "armv7", - "hppa", "hppa64", "i386", "landisk", + "amd64", "alpha", "armv7", + "hppa", "i386", "landisk", "loongson", "luna88k", "macppc", "mips64", - "octeon", "sgi", "socppc", "sparc", - "sparc64", "zaurus", - "amiga", "arc", "arm32", "atari", - "aviion", "beagle", "cats", "hp300", + "octeon", "sgi", "socppc", "sparc64", + "amiga", "arc", "armish", "arm32", + "atari", "aviion", "beagle", "cats", + "hppa64", "hp300", "ia64", "mac68k", "mvme68k", "mvme88k", "mvmeppc", "palm", "pc532", "pegasos", - "pmax", "powerpc", "solbourne", "sun3", - "vax", "wgrisc", "x68k" + "pmax", "powerpc", "solbourne", "sparc", + "sun3", "vax", "wgrisc", "x68k", + "zaurus" }; static const int arch_MAX = sizeof(arch_names) / sizeof(char *); @@ -137,7 +138,7 @@ html_putchar(char c) switch (c) { case ('"'): - printf(""e;"); + printf("""); break; case ('&'): printf("&"); @@ -337,6 +338,7 @@ resp_copy(const char *filename) fflush(stdout); while ((sz = read(fd, buf, sizeof(buf))) > 0) write(STDOUT_FILENO, buf, sz); + close(fd); } } @@ -349,13 +351,12 @@ resp_begin_html(int code, const char *ms printf("\n" "\n" "\n" - "\n" - "\n" + " \n" - "%s\n" + " %s\n" "\n" - "\n" - "\n", + "\n", CSS_DIR, CUSTOMIZE_TITLE); resp_copy(MAN_DIR "/header.html"); @@ -376,16 +377,14 @@ resp_searchform(const struct req *req, e { int i; - puts(""); - printf("
\n" - "
\n" - "
\n" - "Manual Page Search Parameters\n", + printf("\n" + "
\n" + " Manual Page Search Parameters\n", scriptname); /* Write query input box. */ - printf("q.query != NULL) html_print(req->q.query); printf( "\" size=\"40\""); @@ -395,45 +394,46 @@ resp_searchform(const struct req *req, e /* Write submission buttons. */ - printf( "\n" - "\n
\n"); + " \n" + "
\n"); /* Write section selector. */ - puts(""); for (i = 0; i < sec_MAX; i++) { - printf("\n", sec_names[i]); } - puts(""); + puts(" "); /* Write architecture selector. */ - printf( ""); + puts(" "); /* Write manpath selector. */ if (req->psz > 1) { - puts(""); for (i = 0; i < (int)req->psz; i++) { - printf(""); } - puts(""); + puts(" "); } - puts("
\n" - "\n" - "
"); - puts(""); + puts(" \n" + ""); } static int @@ -496,9 +494,9 @@ pg_index(const struct req *req) resp_searchform(req, FOCUS_QUERY); printf("

\n" "This web interface is documented in the\n" - "man.cgi(8)\n" + "man.cgi(8)\n" "manual, and the\n" - "apropos(1)\n" + "apropos(1)\n" "manual explains the query syntax.\n" "

\n", scriptname, *scriptname == '\0' ? "" : "/", @@ -578,27 +576,21 @@ pg_searchres(const struct req *req, stru req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY); if (sz > 1) { - puts("
"); - puts(""); - + puts("
"); for (i = 0; i < sz; i++) { - printf("\n" - "\n" - "\n" + " \n" - ""); + puts("\n" + " "); } - - puts("
\n" - "\n" + " " + "", scriptname, *scriptname == '\0' ? "" : "/", req->q.manpath, r[i].file); - printf("\">"); html_print(r[i].names); - printf("\n" - ""); + printf(""); html_print(r[i].output); - puts("
\n" - "
"); + puts(""); } /* @@ -800,7 +792,8 @@ resp_format(const struct req *req, const } mchars_alloc(); - mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, req->q.manpath); + mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1, + MANDOCLEVEL_BADARG, NULL, req->q.manpath); mparse_readfd(mp, fd, file); close(fd); Modified: head/contrib/mdocml/compat_fts.c ============================================================================== --- head/contrib/mdocml/compat_fts.c Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/compat_fts.c Sat Jan 21 13:17:25 2017 (r312593) @@ -6,8 +6,8 @@ int dummy; #else -/* $Id: compat_fts.c,v 1.9 2015/03/18 19:29:48 schwarze Exp $ */ -/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */ +/* $Id: compat_fts.c,v 1.12 2016/10/18 23:58:12 schwarze Exp $ */ +/* $OpenBSD: fts.c,v 1.56 2016/09/21 04:38:56 guenther Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -59,6 +59,7 @@ static void fts_load(FTS *, FTSENT *); static size_t fts_maxarglen(char * const *); static void fts_padjust(FTS *, FTSENT *); static int fts_palloc(FTS *, size_t); +static FTSENT *fts_sort(FTS *, FTSENT *, int); static unsigned short fts_stat(FTS *, FTSENT *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) @@ -68,19 +69,22 @@ static unsigned short fts_stat(FTS *, F #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif #define CLR(opt) (sp->fts_options &= ~(opt)) #define ISSET(opt) (sp->fts_options & (opt)) #define SET(opt) (sp->fts_options |= (opt)) FTS * -fts_open(char * const *argv, int options, void *dummy) +fts_open(char * const *argv, int options, + int (*compar)(const FTSENT **, const FTSENT **)) { FTS *sp; FTSENT *p, *root; int nitems; FTSENT *parent, *tmp; - size_t len; /* Options check. */ if (options & ~FTS_OPTIONMASK) { @@ -88,9 +92,16 @@ fts_open(char * const *argv, int options return (NULL); } + /* At least one path must be specified. */ + if (*argv == NULL) { + errno = EINVAL; + return (NULL); + } + /* Allocate/initialize the stream */ if ((sp = calloc(1, sizeof(FTS))) == NULL) return (NULL); + sp->fts_compar = compar; sp->fts_options = options; /* @@ -107,13 +118,7 @@ fts_open(char * const *argv, int options /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) { - /* Don't allow zero-length paths. */ - if ((len = strlen(*argv)) == 0) { - errno = ENOENT; - goto mem3; - } - - if ((p = fts_alloc(sp, *argv, len)) == NULL) + if ((p = fts_alloc(sp, *argv, strlen(*argv))) == NULL) goto mem3; p->fts_level = FTS_ROOTLEVEL; p->fts_parent = parent; @@ -124,14 +129,25 @@ fts_open(char * const *argv, int options if (p->fts_info == FTS_DOT) p->fts_info = FTS_D; - p->fts_link = NULL; - if (root == NULL) - tmp = root = p; - else { - tmp->fts_link = p; - tmp = p; + /* + * If comparison routine supplied, traverse in sorted + * order; otherwise traverse in the order specified. + */ + if (compar) { + p->fts_link = root; + root = p; + } else { + p->fts_link = NULL; + if (root == NULL) + tmp = root = p; + else { + tmp->fts_link = p; + tmp = p; + } } } + if (compar && nitems > 1) + root = fts_sort(sp, root, nitems); /* * Allocate a dummy pointer and make fts_read think that we've just @@ -201,6 +217,7 @@ fts_close(FTS *sp) /* Free up child linked list, sort array, path buffer, stream ptr.*/ if (sp->fts_child) fts_lfree(sp->fts_child); + free(sp->fts_array); free(sp->fts_path); free(sp); @@ -317,7 +334,6 @@ name: t = sp->fts_path + NAPPEND(p->fts * semantics to fts using fts_set. An error return is allowed for similar * reasons. */ -/* ARGSUSED */ int fts_set(FTS *sp, FTSENT *p, int instr) { @@ -416,8 +432,7 @@ fts_build(FTS *sp) * structures already allocated. */ mem1: saved_errno = errno; - if (p) - free(p); + free(p); fts_lfree(head); (void)closedir(dirp); cur->fts_info = FTS_ERR; @@ -490,6 +505,10 @@ mem1: saved_errno = errno; cur->fts_info = FTS_DP; return (NULL); } + + /* Sort the entries. */ + if (sp->fts_compar && nitems > 1) + head = fts_sort(sp, head, nitems); return (head); } @@ -547,6 +566,40 @@ fts_stat(FTS *sp, FTSENT *p) } static FTSENT * +fts_sort(FTS *sp, FTSENT *head, int nitems) +{ + FTSENT **ap, *p; + + /* + * Construct an array of pointers to the structures and call qsort(3). + * Reassemble the array in the order returned by qsort. If unable to + * sort for memory reasons, return the directory entries in their + * current order. Allocate enough space for the current needs plus + * 40 so don't realloc one entry at a time. + */ + if (nitems > sp->fts_nitems) { + struct _ftsent **a; + + sp->fts_nitems = nitems + 40; + if ((a = reallocarray(sp->fts_array, + sp->fts_nitems, sizeof(FTSENT *))) == NULL) { + free(sp->fts_array); + sp->fts_array = NULL; + sp->fts_nitems = 0; + return (head); + } + sp->fts_array = a; + } + for (ap = sp->fts_array, p = head; p; p = p->fts_link) + *ap++ = p; + qsort(sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); + for (head = *(ap = sp->fts_array); --nitems; ++ap) + ap[0]->fts_link = ap[1]; + ap[0]->fts_link = NULL; + return (head); +} + +static FTSENT * fts_alloc(FTS *sp, const char *name, size_t namelen) { FTSENT *p; @@ -597,8 +650,7 @@ fts_palloc(FTS *sp, size_t more) */ more += 256; if (sp->fts_pathlen + more < sp->fts_pathlen) { - if (sp->fts_path) - free(sp->fts_path); + free(sp->fts_path); sp->fts_path = NULL; errno = ENAMETOOLONG; return (1); @@ -606,8 +658,7 @@ fts_palloc(FTS *sp, size_t more) sp->fts_pathlen += more; p = realloc(sp->fts_path, sp->fts_pathlen); if (p == NULL) { - if (sp->fts_path) - free(sp->fts_path); + free(sp->fts_path); sp->fts_path = NULL; return (1); } Modified: head/contrib/mdocml/compat_fts.h ============================================================================== --- head/contrib/mdocml/compat_fts.h Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/compat_fts.h Sat Jan 21 13:17:25 2017 (r312593) @@ -38,9 +38,12 @@ typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ + struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ size_t fts_pathlen; /* sizeof(path) */ + int fts_nitems; /* elements in the sort array */ + int (*fts_compar)(); /* compare function */ #define FTS_NOCHDIR 0x0004 /* don't change directories */ #define FTS_PHYSICAL 0x0010 /* physical walk */ @@ -94,7 +97,8 @@ typedef struct _ftsent { int fts_close(FTS *); -FTS *fts_open(char * const *, int, void *); +FTS *fts_open(char * const *, int, + int (*)(const FTSENT **, const FTSENT **)); FTSENT *fts_read(FTS *); int fts_set(FTS *, FTSENT *, int); Modified: head/contrib/mdocml/config.h ============================================================================== --- head/contrib/mdocml/config.h Sat Jan 21 13:02:53 2017 (r312592) +++ head/contrib/mdocml/config.h Sat Jan 21 13:17:25 2017 (r312593) @@ -2,30 +2,33 @@ #error "Do not use C++. See the INSTALL file." #endif -#ifndef MANDOC_CONFIG_H -#define MANDOC_CONFIG_H +#if !defined(__GNUC__) || (__GNUC__ < 4) +#define __attribute__(x) +#endif #if defined(__linux__) || defined(__MINT__) #define _GNU_SOURCE /* See test-*.c what needs this. */ #endif -#include -#include #define MAN_CONF_FILE "/etc/man.conf" +#define MANPATH_DEFAULT "/usr/share/man:/usr/local/man" +#define UTF8_LOCALE "en_US.UTF-8" #define HAVE_DIRENT_NAMLEN 1 +#define HAVE_ENDIAN 0 #define HAVE_ERR 1 #define HAVE_FTS 1 #define HAVE_GETLINE 1 #define HAVE_GETSUBOPT 1 #define HAVE_ISBLANK 1 #define HAVE_MKDTEMP 1 -#define HAVE_MMAP 1 +#define HAVE_NTOHL 1 #define HAVE_PLEDGE 0 #define HAVE_PROGNAME 1 #define HAVE_REALLOCARRAY 1 -#define HAVE_REWB_BSD 0 -#define HAVE_REWB_SYSV 0 +#define HAVE_REWB_BSD 1 +#define HAVE_REWB_SYSV 1 +#define HAVE_SANDBOX_INIT 0 #define HAVE_STRCASESTR 1 #define HAVE_STRINGLIST 1 #define HAVE_STRLCAT 1 @@ -33,20 +36,14 @@ #define HAVE_STRPTIME 1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jan 21 14:19:08 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 7D445CBBF2D; Sat, 21 Jan 2017 14:19:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57D22CC7; Sat, 21 Jan 2017 14:19:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LEJ7df063381; Sat, 21 Jan 2017 14:19:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LEJ67H063374; Sat, 21 Jan 2017 14:19:06 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701211419.v0LEJ67H063374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 21 Jan 2017 14:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312596 - in head: sbin/ifconfig sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 14:19:08 -0000 Author: avos Date: Sat Jan 21 14:19:06 2017 New Revision: 312596 URL: https://svnweb.freebsd.org/changeset/base/312596 Log: net80211: allow to configure LDPC support Tested with RTL8821AU, STA mode (Tx support only) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9268 Modified: head/sbin/ifconfig/ifieee80211.c head/sys/net80211/_ieee80211.h head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_var.h Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sat Jan 21 13:25:57 2017 (r312595) +++ head/sbin/ifconfig/ifieee80211.c Sat Jan 21 14:19:06 2017 (r312596) @@ -1787,6 +1787,21 @@ set80211stbc(const char *val, int d, int set80211(s, IEEE80211_IOC_STBC, stbc, 0, NULL); } +static void +set80211ldpc(const char *val, int d, int s, const struct afswtch *rafp) +{ + int ldpc; + + if (get80211val(s, IEEE80211_IOC_LDPC, &ldpc) < 0) + errx(-1, "cannot set LDPC setting"); + if (d < 0) { + d = -d; + ldpc &= ~d; + } else + ldpc |= d; + set80211(s, IEEE80211_IOC_LDPC, ldpc, 0, NULL); +} + static DECL_CMD_FUNC(set80211ampdulimit, val, d) { @@ -5030,6 +5045,23 @@ end: break; } } + if (get80211val(s, IEEE80211_IOC_LDPC, &val) != -1) { + switch (val) { + case 0: + LINE_CHECK("-ldpc"); + break; + case 1: + LINE_CHECK("ldpctx -ldpcrx"); + break; + case 2: + LINE_CHECK("-ldpctx ldpcrx"); + break; + case 3: + if (verbose) + LINE_CHECK("ldpc"); + break; + } + } } if (IEEE80211_IS_CHAN_VHT(c) || verbose) { @@ -5603,6 +5635,12 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD("-stbctx", -1, set80211stbc), DEF_CMD("stbc", 3, set80211stbc), /* NB: tx+rx */ DEF_CMD("-stbc", -3, set80211stbc), + DEF_CMD("ldpcrx", 2, set80211ldpc), + DEF_CMD("-ldpcrx", -2, set80211ldpc), + DEF_CMD("ldpctx", 1, set80211ldpc), + DEF_CMD("-ldpctx", -1, set80211ldpc), + DEF_CMD("ldpc", 3, set80211ldpc), /* NB: tx+rx */ + DEF_CMD("-ldpc", -3, set80211ldpc), DEF_CMD("puren", 1, set80211puren), DEF_CMD("-puren", 0, set80211puren), DEF_CMD("doth", 1, set80211doth), Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/_ieee80211.h Sat Jan 21 14:19:06 2017 (r312596) @@ -517,9 +517,10 @@ struct ieee80211_mimo_info { #define IEEE80211_HTC_RXMCS32 0x00400000 /* CAPABILITY: MCS32 support */ #define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ #define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 support */ +#define IEEE80211_HTC_TXLDPC 0x02000000 /* CAPABILITY: TX using LDPC */ #define IEEE80211_C_HTCAP_BITS \ "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ - "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" + "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS\32TXLDPC" #endif /* _NET80211__IEEE80211_H_ */ Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/ieee80211.h Sat Jan 21 14:19:06 2017 (r312596) @@ -617,7 +617,7 @@ struct ieee80211_ie_htcap { } __packed; /* HT capability flags (ht_cap) */ -#define IEEE80211_HTCAP_LDPC 0x0001 /* LDPC supported */ +#define IEEE80211_HTCAP_LDPC 0x0001 /* LDPC rx supported */ #define IEEE80211_HTCAP_CHWIDTH40 0x0002 /* 20/40 supported */ #define IEEE80211_HTCAP_SMPS 0x000c /* SM Power Save mode */ #define IEEE80211_HTCAP_SMPS_OFF 0x000c /* disabled */ Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/ieee80211_ht.c Sat Jan 21 14:19:06 2017 (r312596) @@ -298,6 +298,11 @@ ieee80211_ht_vattach(struct ieee80211vap vap->iv_flags_ht |= IEEE80211_FHT_STBC_TX; if (vap->iv_htcaps & IEEE80211_HTCAP_RXSTBC) vap->iv_flags_ht |= IEEE80211_FHT_STBC_RX; + + if (vap->iv_htcaps & IEEE80211_HTCAP_LDPC) + vap->iv_flags_ht |= IEEE80211_FHT_LDPC_RX; + if (vap->iv_htcaps & IEEE80211_HTC_TXLDPC) + vap->iv_flags_ht |= IEEE80211_FHT_LDPC_TX; } /* NB: disable default legacy WDS, too many issues right now */ if (vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY) @@ -1650,6 +1655,20 @@ htcap_update_shortgi(struct ieee80211_no } /* + * Update LDPC state according to received htcap + * and local settings. + */ +static __inline void +htcap_update_ldpc(struct ieee80211_node *ni) +{ + struct ieee80211vap *vap = ni->ni_vap; + + if ((ni->ni_htcap & IEEE80211_HTCAP_LDPC) && + (vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX)) + ni->ni_flags |= IEEE80211_NODE_LDPC; +} + +/* * Parse and update HT-related state extracted from * the HT cap and info ie's. * @@ -1669,6 +1688,7 @@ ieee80211_ht_updateparams(struct ieee802 if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS) htcap_update_mimo_ps(ni); htcap_update_shortgi(ni); + htcap_update_ldpc(ni); if (htinfoie[0] == IEEE80211_ELEMID_VENDOR) htinfoie += 4; @@ -1821,6 +1841,7 @@ ieee80211_ht_updatehtcap(struct ieee8021 if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS) htcap_update_mimo_ps(ni); htcap_update_shortgi(ni); + htcap_update_ldpc(ni); } /* @@ -3027,7 +3048,9 @@ ieee80211_add_htcap_body(uint8_t *frm, s if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) == 0) caps &= ~IEEE80211_HTCAP_RXSTBC; - /* XXX TODO: adjust LDPC based on receive capabilities */ + /* adjust LDPC based on receive capabilites */ + if ((vap->iv_flags_ht & IEEE80211_FHT_LDPC_RX) == 0) + caps &= ~IEEE80211_HTCAP_LDPC; ADDSHORT(frm, caps); Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/ieee80211_ioctl.c Sat Jan 21 14:19:06 2017 (r312596) @@ -1136,6 +1136,13 @@ ieee80211_ioctl_get80211(struct ieee8021 if (vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) ireq->i_val |= 2; break; + case IEEE80211_IOC_LDPC: + ireq->i_val = 0; + if (vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) + ireq->i_val |= 1; + if (vap->iv_flags_ht & IEEE80211_FHT_LDPC_RX) + ireq->i_val |= 2; + break; /* VHT */ case IEEE80211_IOC_VHTCONF: @@ -3372,6 +3379,31 @@ ieee80211_ioctl_set80211(struct ieee8021 if (isvapht(vap)) error = ERESTART; break; + case IEEE80211_IOC_LDPC: + /* Check if we can do LDPC TX/RX before changing the setting */ + if ((ireq->i_val & 1) && + (vap->iv_htcaps & IEEE80211_HTC_TXLDPC) == 0) + return EOPNOTSUPP; + if ((ireq->i_val & 2) && + (vap->iv_htcaps & IEEE80211_HTCAP_LDPC) == 0) + return EOPNOTSUPP; + + /* TX */ + if (ireq->i_val & 1) + vap->iv_flags_ht |= IEEE80211_FHT_LDPC_TX; + else + vap->iv_flags_ht &= ~IEEE80211_FHT_LDPC_TX; + + /* RX */ + if (ireq->i_val & 2) + vap->iv_flags_ht |= IEEE80211_FHT_LDPC_RX; + else + vap->iv_flags_ht &= ~IEEE80211_FHT_LDPC_RX; + + /* NB: reset only if we're operating on an 11n channel */ + if (isvapht(vap)) + error = ERESTART; + break; /* VHT */ case IEEE80211_IOC_VHTCONF: Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/ieee80211_node.h Sat Jan 21 14:19:06 2017 (r312596) @@ -143,6 +143,7 @@ struct ieee80211_node { #define IEEE80211_NODE_AMSDU_RX 0x040000 /* AMSDU rx enabled */ #define IEEE80211_NODE_AMSDU_TX 0x080000 /* AMSDU tx enabled */ #define IEEE80211_NODE_VHT 0x100000 /* VHT enabled */ +#define IEEE80211_NODE_LDPC 0x200000 /* LDPC enabled */ uint16_t ni_associd; /* association ID */ uint16_t ni_vlan; /* vlan tag */ uint16_t ni_txpower; /* current transmit power */ Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Sat Jan 21 13:25:57 2017 (r312595) +++ head/sys/net80211/ieee80211_var.h Sat Jan 21 14:19:06 2017 (r312596) @@ -641,6 +641,8 @@ MALLOC_DECLARE(M_80211_VAP); /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ +#define IEEE80211_FHT_LDPC_TX 0x00010000 /* CONF: LDPC tx enabled */ +#define IEEE80211_FHT_LDPC_RX 0x00020000 /* CONF: LDPC rx enabled */ #define IEEE80211_FHT_GF 0x00040000 /* CONF: Greenfield enabled */ #define IEEE80211_FHT_HT 0x00080000 /* CONF: HT supported */ #define IEEE80211_FHT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */ From owner-svn-src-head@freebsd.org Sat Jan 21 15:03:59 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 AB2EACBBB57; Sat, 21 Jan 2017 15:03:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85D757BC; Sat, 21 Jan 2017 15:03:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LF3wcN084221; Sat, 21 Jan 2017 15:03:58 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LF3wtD084216; Sat, 21 Jan 2017 15:03:58 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701211503.v0LF3wtD084216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 21 Jan 2017 15:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312597 - in head/sys/dev/rtwn: . rtl8812a rtl8812a/usb rtl8821a/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 15:03:59 -0000 Author: avos Date: Sat Jan 21 15:03:58 2017 New Revision: 312597 URL: https://svnweb.freebsd.org/changeset/base/312597 Log: rtwn: enable LDPC support where possible Tested with RTL8821AU, STA mode. Modified: head/sys/dev/rtwn/if_rtwn.c head/sys/dev/rtwn/rtl8812a/r12a_rx.c head/sys/dev/rtwn/rtl8812a/r12a_tx.c head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Sat Jan 21 14:19:06 2017 (r312596) +++ head/sys/dev/rtwn/if_rtwn.c Sat Jan 21 15:03:58 2017 (r312597) @@ -695,6 +695,7 @@ rtwn_ioctl_reset(struct ieee80211vap *va case IEEE80211_IOC_RTSTHRESHOLD: case IEEE80211_IOC_PROTMODE: case IEEE80211_IOC_HTPROTMODE: + case IEEE80211_IOC_LDPC: error = 0; break; default: Modified: head/sys/dev/rtwn/rtl8812a/r12a_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_rx.c Sat Jan 21 14:19:06 2017 (r312596) +++ head/sys/dev/rtwn/rtl8812a/r12a_rx.c Sat Jan 21 15:03:58 2017 (r312597) @@ -252,7 +252,9 @@ r12a_get_rx_stats(struct rtwn_softc *sc, rxdw4 = le32toh(stat->rxdw4); rate = MS(rxdw3, R12A_RXDW3_RATE); - /* TODO: STBC, LDPC */ + /* TODO: STBC */ + if (rxdw4 & R12A_RXDW4_LDPC) + rxs->c_pktflags |= IEEE80211_RX_F_LDPC; if (rxdw1 & R12A_RXDW1_AMPDU) { if (rxdw0 & R92C_RXDW0_PHYST) rxs->c_pktflags |= IEEE80211_RX_F_AMPDU; Modified: head/sys/dev/rtwn/rtl8812a/r12a_tx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_tx.c Sat Jan 21 14:19:06 2017 (r312596) +++ head/sys/dev/rtwn/rtl8812a/r12a_tx.c Sat Jan 21 15:03:58 2017 (r312597) @@ -214,6 +214,17 @@ r12a_tx_set_sgi(struct rtwn_softc *sc, v txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); } +static void +r12a_tx_set_ldpc(struct rtwn_softc *sc, struct r12a_tx_desc *txd, + struct ieee80211_node *ni) +{ + struct ieee80211vap *vap = ni->ni_vap; + + if ((vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) && + (ni->ni_htcap & IEEE80211_HTCAP_LDPC)) + txd->txdw5 |= htole32(R12A_TXDW5_DATA_LDPC); +} + void r12a_fill_tx_desc(struct rtwn_softc *sc, struct ieee80211_node *ni, struct mbuf *m, void *buf, uint8_t ridx, int maxretry) @@ -284,6 +295,7 @@ r12a_fill_tx_desc(struct rtwn_softc *sc, if (ridx >= RTWN_RIDX_MCS(0)) { r12a_tx_set_ht40(sc, txd, ni); r12a_tx_set_sgi(sc, txd, ni); + r12a_tx_set_ldpc(sc, txd, ni); prot = ic->ic_htprotmode; } else if (ic->ic_flags & IEEE80211_F_USEPROT) prot = ic->ic_protmode; Modified: head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c Sat Jan 21 14:19:06 2017 (r312596) +++ head/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c Sat Jan 21 15:03:58 2017 (r312597) @@ -168,7 +168,15 @@ r12a_read_chipid_vendor(struct rtwn_soft static void r12au_adj_devcaps(struct rtwn_softc *sc) { - /* TODO: LDPC, STBC etc */ + struct r12a_softc *rs = sc->sc_priv; + struct ieee80211com *ic = &sc->sc_ic; + + if (rs->chip & R12A_CHIP_C_CUT) { + ic->ic_htcaps |= IEEE80211_HTCAP_LDPC | + IEEE80211_HTC_TXLDPC; + } + + /* TODO: STBC, VHT etc */ } void Modified: head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c Sat Jan 21 14:19:06 2017 (r312596) +++ head/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c Sat Jan 21 15:03:58 2017 (r312597) @@ -157,10 +157,11 @@ r21au_adj_devcaps(struct rtwn_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct r12a_softc *rs = sc->sc_priv; + ic->ic_htcaps |= IEEE80211_HTC_TXLDPC; if (rs->rs_radar != 0) ic->ic_caps |= IEEE80211_C_DFS; - /* TODO: LDPC etc */ + /* TODO: VHT */ } void From owner-svn-src-head@freebsd.org Sat Jan 21 16:59:52 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 29785CBB45A; Sat, 21 Jan 2017 16:59:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED5631FD2; Sat, 21 Jan 2017 16:59:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LGxpZd030786; Sat, 21 Jan 2017 16:59:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LGxpDr030785; Sat, 21 Jan 2017 16:59:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701211659.v0LGxpDr030785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Jan 2017 16:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312598 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 16:59:52 -0000 Author: mjg Date: Sat Jan 21 16:59:50 2017 New Revision: 312598 URL: https://svnweb.freebsd.org/changeset/base/312598 Log: vfs: hide the getvnode NULL mp message behind DIAGNOSTIC Since crossmp vnode changes the message was being printed on each boot. Reported by: trasz Discussed with: kib Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Jan 21 15:03:58 2017 (r312597) +++ head/sys/kern/vfs_subr.c Sat Jan 21 16:59:50 2017 (r312598) @@ -1489,12 +1489,14 @@ alloc: vp->v_op = vops; v_init_counters(vp); vp->v_bufobj.bo_ops = &buf_ops_bio; +#ifdef DIAGNOSTIC + if (mp == NULL && vops != &dead_vnodeops) + printf("NULL mp in getnewvnode()\n"); +#endif #ifdef MAC mac_vnode_init(vp); if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0) mac_vnode_associate_singlelabel(mp, vp); - else if (mp == NULL && vops != &dead_vnodeops) - printf("NULL mp in getnewvnode()\n"); #endif if (mp != NULL) { vp->v_bufobj.bo_bsize = mp->mnt_stat.f_iosize; From owner-svn-src-head@freebsd.org Sat Jan 21 17:39:12 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 52ED7CBBFA3; Sat, 21 Jan 2017 17:39:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0909616F2; Sat, 21 Jan 2017 17:39:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LHdBC8048195; Sat, 21 Jan 2017 17:39:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LHdAjY048192; Sat, 21 Jan 2017 17:39:10 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701211739.v0LHdAjY048192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 21 Jan 2017 17:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312599 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 17:39:12 -0000 Author: cem Date: Sat Jan 21 17:39:10 2017 New Revision: 312599 URL: https://svnweb.freebsd.org/changeset/base/312599 Log: Add remaining ELF compression definitions and structs A follow-up to r300231. Sponsored by: Dell EMC Isilon Modified: head/sys/sys/elf32.h head/sys/sys/elf64.h head/sys/sys/elf_common.h Modified: head/sys/sys/elf32.h ============================================================================== --- head/sys/sys/elf32.h Sat Jan 21 16:59:50 2017 (r312598) +++ head/sys/sys/elf32.h Sat Jan 21 17:39:10 2017 (r312599) @@ -254,4 +254,10 @@ typedef struct { Elf32_Half si_flags; /* per symbol flags */ } Elf32_Syminfo; +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + #endif /* !_SYS_ELF32_H_ */ Modified: head/sys/sys/elf64.h ============================================================================== --- head/sys/sys/elf64.h Sat Jan 21 16:59:50 2017 (r312598) +++ head/sys/sys/elf64.h Sat Jan 21 17:39:10 2017 (r312599) @@ -257,4 +257,11 @@ typedef struct { Elf64_Half si_flags; /* per symbol flags */ } Elf64_Syminfo; +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + #endif /* !_SYS_ELF64_H_ */ Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sat Jan 21 16:59:50 2017 (r312598) +++ head/sys/sys/elf_common.h Sat Jan 21 17:39:10 2017 (r312599) @@ -849,6 +849,13 @@ typedef struct { #define SYMINFO_CURRENT 1 #define SYMINFO_NUM 2 +/* Values for ch_type (compressed section headers). */ +#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE */ +#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific */ +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific */ +#define ELFCOMPRESS_HIPROC 0x7fffffff + /* * Relocation types. * From owner-svn-src-head@freebsd.org Sat Jan 21 17:51:02 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 D0ABFCBB2D0 for ; Sat, 21 Jan 2017 17:51:02 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A77E71F9A for ; Sat, 21 Jan 2017 17:51:02 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 3a474350-e002-11e6-8c89-112185c90658 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 3a474350-e002-11e6-8c89-112185c90658; Sat, 21 Jan 2017 17:51:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0LHosE9006761; Sat, 21 Jan 2017 10:50:54 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1485021054.34897.180.camel@freebsd.org> Subject: Re: svn commit: r312588 - head/sys/mips/conf From: Ian Lepore To: Konstantin Belousov , Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 21 Jan 2017 10:50:54 -0700 In-Reply-To: <20170121114120.GU2349@kib.kiev.ua> References: <201701210908.v0L98SQp033735@repo.freebsd.org> <20170121114120.GU2349@kib.kiev.ua> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 17:51:02 -0000 On Sat, 2017-01-21 at 13:41 +0200, Konstantin Belousov wrote: > On Sat, Jan 21, 2017 at 09:08:28AM +0000, Brooks Davis wrote: > > > > +options  TMPFS #Efficient memory > > filesystem > Is the word 'efficient' copied from somewhere ? Yes, I see it in > sys/conf/NOTES. I do not see what useful meaning the word has there, > applied to the tmpfs. In my opinion, it should be removed from > comments. > Is it not more efficient than the alternatives based on md(4)? -- Ian From owner-svn-src-head@freebsd.org Sat Jan 21 18:13:12 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 4E592CBBAAD; Sat, 21 Jan 2017 18:13:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF4B7CF9; Sat, 21 Jan 2017 18:13:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v0LID6Yx045454 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 21 Jan 2017 20:13:06 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v0LID6Yx045454 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v0LID6G6045453; Sat, 21 Jan 2017 20:13:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Jan 2017 20:13:06 +0200 From: Konstantin Belousov To: Ian Lepore Cc: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312588 - head/sys/mips/conf Message-ID: <20170121181306.GX2349@kib.kiev.ua> References: <201701210908.v0L98SQp033735@repo.freebsd.org> <20170121114120.GU2349@kib.kiev.ua> <1485021054.34897.180.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1485021054.34897.180.camel@freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sat, 21 Jan 2017 18:13:12 -0000 On Sat, Jan 21, 2017 at 10:50:54AM -0700, Ian Lepore wrote: > On Sat, 2017-01-21 at 13:41 +0200, Konstantin Belousov wrote: > > On Sat, Jan 21, 2017 at 09:08:28AM +0000, Brooks Davis wrote: > > > > > > +optionsš TMPFS #Efficient memory > > > filesystem > > Is the word 'efficient' copied from somewhere ? Yes, I see it in > > sys/conf/NOTES. I do not see what useful meaning the word has there, > > applied to the tmpfs. In my opinion, it should be removed from > > comments. > > > > Is it not more efficient than the alternatives based on md(4)? If UFS on a swap-backed md(4) is configured without SU and with trim enabled, then it should be very similar to tmpfs. Even more similar if the UFS mount is sync. Except in the case when the files from such mount are mmaped, in which case UFS inherently performs double-copy. From owner-svn-src-head@freebsd.org Sat Jan 21 18:38:18 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 515BACBB103; Sat, 21 Jan 2017 18:38:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165A21A02; Sat, 21 Jan 2017 18:38:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LIcHwV072627; Sat, 21 Jan 2017 18:38:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LIcHIv072626; Sat, 21 Jan 2017 18:38:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701211838.v0LIcHIv072626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Jan 2017 18:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312600 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 18:38:18 -0000 Author: mjg Date: Sat Jan 21 18:38:16 2017 New Revision: 312600 URL: https://svnweb.freebsd.org/changeset/base/312600 Log: vfs: refactor _vn_lock Stop testing for LK_RETRY and error multiple times. Also postpone the VI_DOOMED until after LK_RETRY was seen as it reads from the vnode. No functional changes. Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Jan 21 17:39:10 2017 (r312599) +++ head/sys/kern/vfs_vnops.c Sat Jan 21 18:38:16 2017 (r312600) @@ -1539,27 +1539,24 @@ _vn_lock(struct vnode *vp, int flags, ch VNASSERT((flags & LK_TYPE_MASK) != 0, vp, ("vn_lock called with no locktype.")); - do { #ifdef DEBUG_VFS_LOCKS - KASSERT(vp->v_holdcnt != 0, - ("vn_lock %p: zero hold count", vp)); + KASSERT(vp->v_holdcnt != 0, + ("vn_lock %p: zero hold count", vp)); #endif - error = VOP_LOCK1(vp, flags, file, line); - flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ - KASSERT((flags & LK_RETRY) == 0 || error == 0, - ("LK_RETRY set with incompatible flags (0x%x) or an error occurred (%d)", - flags, error)); - /* - * Callers specify LK_RETRY if they wish to get dead vnodes. - * If RETRY is not set, we return ENOENT instead. - */ - if (error == 0 && vp->v_iflag & VI_DOOMED && - (flags & LK_RETRY) == 0) { +retry: + error = VOP_LOCK1(vp, flags, file, line); + flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ + KASSERT((flags & LK_RETRY) == 0 || error == 0, + ("LK_RETRY set with incompatible flags (0x%x) or an error occurred (%d)", + flags, error)); + if (flags & LK_RETRY) { + if ((error != 0)) + goto retry; + if ((vp->v_iflag & VI_DOOMED)) { VOP_UNLOCK(vp, 0); error = ENOENT; - break; } - } while (flags & LK_RETRY && error != 0); + } return (error); } From owner-svn-src-head@freebsd.org Sat Jan 21 18:56:59 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 AA2B9CBB72B; Sat, 21 Jan 2017 18:56:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A15388D; Sat, 21 Jan 2017 18:56:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LIuwIo080823; Sat, 21 Jan 2017 18:56:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LIuwgM080819; Sat, 21 Jan 2017 18:56:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701211856.v0LIuwgM080819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Jan 2017 18:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312601 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 18:56:59 -0000 Author: mjg Date: Sat Jan 21 18:56:58 2017 New Revision: 312601 URL: https://svnweb.freebsd.org/changeset/base/312601 Log: vfs: fix whitespace damage in r312600 While here wrap the previously overly long line so that it fits 80 chars. Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Jan 21 18:38:16 2017 (r312600) +++ head/sys/kern/vfs_vnops.c Sat Jan 21 18:56:58 2017 (r312601) @@ -1547,8 +1547,8 @@ retry: error = VOP_LOCK1(vp, flags, file, line); flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ KASSERT((flags & LK_RETRY) == 0 || error == 0, - ("LK_RETRY set with incompatible flags (0x%x) or an error occurred (%d)", - flags, error)); + ("LK_RETRY set with incompatible flags (0x%x) or " + " an error occurred (%d)", flags, error)); if (flags & LK_RETRY) { if ((error != 0)) goto retry; From owner-svn-src-head@freebsd.org Sat Jan 21 19:01:44 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 1E55ACBB839; Sat, 21 Jan 2017 19:01:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E27CFCEB; Sat, 21 Jan 2017 19:01:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LJ1hgh081830; Sat, 21 Jan 2017 19:01:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LJ1hft081829; Sat, 21 Jan 2017 19:01:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701211901.v0LJ1hft081829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Jan 2017 19:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312602 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 19:01:44 -0000 Author: mjg Date: Sat Jan 21 19:01:42 2017 New Revision: 312602 URL: https://svnweb.freebsd.org/changeset/base/312602 Log: vfs: __predict_false the need to handle F_HASLOCK Also reorder the check with DTYPE_VNODE. Passed files are vnodes vast majority of the time, so it is typically true. Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Jan 21 18:56:58 2017 (r312601) +++ head/sys/kern/vfs_vnops.c Sat Jan 21 19:01:42 2017 (r312602) @@ -1575,12 +1575,12 @@ vn_closefile(fp, td) vp = fp->f_vnode; fp->f_ops = &badfileops; - if (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) - vref(vp); + if (__predict_false(fp->f_flag & FHASLOCK) && fp->f_type == DTYPE_VNODE) + vrefact(vp); error = vn_close(vp, fp->f_flag, fp->f_cred, td); - if (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) { + if (__predict_false(fp->f_flag & FHASLOCK) && fp->f_type == DTYPE_VNODE) { lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; From owner-svn-src-head@freebsd.org Sat Jan 21 19:38:29 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 55C1FCBB7A2; Sat, 21 Jan 2017 19:38:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02A2AEAE; Sat, 21 Jan 2017 19:38:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LJcSJT097479; Sat, 21 Jan 2017 19:38:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LJcQOV097466; Sat, 21 Jan 2017 19:38:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701211938.v0LJcQOV097466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 21 Jan 2017 19:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312603 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 19:38:29 -0000 Author: mav Date: Sat Jan 21 19:38:26 2017 New Revision: 312603 URL: https://svnweb.freebsd.org/changeset/base/312603 Log: Add initial support for CTL module unloading. It is only a first step and not perfect, but better then nothing. The main blocker is CAM target frontend, that can not be unloaded, since CAM does not have mechanism to unregister periph driver now. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend.h head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_ioctl.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_tpc_local.c head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl.c Sat Jan 21 19:38:26 2017 (r312603) @@ -424,7 +424,7 @@ static void ctl_isc_event_handler(ctl_ha static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); static void ctl_copy_sense_data_back(union ctl_io *src, union ctl_ha_msg *dest); static int ctl_init(void); -void ctl_shutdown(void); +static int ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); static void ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); @@ -520,6 +520,8 @@ static const struct ctl_cmd_entry * ctl_validate_command(struct ctl_scsiio *ctsio); static int ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry); +static int ctl_ha_init(void); +static int ctl_ha_shutdown(void); static uint64_t ctl_get_prkey(struct ctl_lun *lun, uint32_t residx); static void ctl_clr_prkey(struct ctl_lun *lun, uint32_t residx); @@ -561,6 +563,49 @@ MODULE_VERSION(ctl, 1); static struct ctl_frontend ha_frontend = { .name = "ha", + .init = ctl_ha_init, + .shutdown = ctl_ha_shutdown, +}; + +static int +ctl_ha_init(void) +{ + struct ctl_softc *softc = control_softc; + + if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, + &softc->othersc_pool) != 0) + return (ENOMEM); + if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) + != CTL_HA_STATUS_SUCCESS) { + ctl_ha_msg_destroy(softc); + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + return (0); +}; + +static int +ctl_ha_shutdown(void) +{ + struct ctl_softc *softc = control_softc; + struct ctl_port *port; + + ctl_ha_msg_shutdown(softc); + if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) != CTL_HA_STATUS_SUCCESS) + return (EIO); + if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) + return (EIO); + ctl_pool_free(softc->othersc_pool); + while ((port = STAILQ_FIRST(&ha_frontend.port_list)) != NULL) { + ctl_port_deregister(port); + free(port->port_name, M_CTL); + free(port, M_CTL); + } + return (0); }; static void @@ -1782,7 +1827,6 @@ ctl_init(void) { struct make_dev_args args; struct ctl_softc *softc; - void *other_pool; int i, error; softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF, @@ -1855,15 +1899,6 @@ ctl_init(void) STAILQ_INIT(&softc->be_list); ctl_tpc_init(softc); - if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, - &other_pool) != 0) - { - printf("ctl: can't allocate %d entry other SC pool, " - "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); - return (ENOMEM); - } - softc->othersc_pool = other_pool; - if (worker_threads <= 0) worker_threads = max(1, mp_ncpus / 4); if (worker_threads > CTL_MAX_THREADS) @@ -1883,22 +1918,19 @@ ctl_init(void) &softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); - ctl_pool_free(other_pool); return (error); } } error = kproc_kthread_add(ctl_lun_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "lun"); + &softc->ctl_proc, &softc->lun_thread, 0, 0, "ctl", "lun"); if (error != 0) { printf("error creating CTL lun thread!\n"); - ctl_pool_free(other_pool); return (error); } error = kproc_kthread_add(ctl_thresh_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "thresh"); + &softc->ctl_proc, &softc->thresh_thread, 0, 0, "ctl", "thresh"); if (error != 0) { printf("error creating CTL threshold thread!\n"); - ctl_pool_free(other_pool); return (error); } @@ -1907,58 +1939,54 @@ ctl_init(void) softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head"); if (softc->is_single == 0) { - ctl_frontend_register(&ha_frontend); - if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_init failed.\n"); + if (ctl_frontend_register(&ha_frontend) != 0) softc->is_single = 1; - } else - if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) - != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_register failed.\n"); - softc->is_single = 1; - } } return (0); } -void +static int ctl_shutdown(void) { struct ctl_softc *softc = control_softc; - struct ctl_lun *lun, *next_lun; + int i; - if (softc->is_single == 0) { - ctl_ha_msg_shutdown(softc); - if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) - != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_deregister failed.\n", __func__); - if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_destroy failed.\n", __func__); + if (softc->is_single == 0) ctl_frontend_deregister(&ha_frontend); - } - - mtx_lock(&softc->ctl_lock); - - STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) - ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); + destroy_dev(softc->dev); -#if 0 - ctl_shutdown_thread(softc->work_thread); - mtx_destroy(&softc->queue_lock); -#endif + /* Shutdown CTL threads. */ + softc->shutdown = 1; + for (i = 0; i < worker_threads; i++) { + struct ctl_thread *thr = &softc->threads[i]; + while (thr->thread != NULL) { + wakeup(thr); + if (thr->thread != NULL) + pause("CTL thr shutdown", 1); + } + mtx_destroy(&thr->queue_lock); + } + while (softc->lun_thread != NULL) { + wakeup(&softc->pending_lun_queue); + if (softc->lun_thread != NULL) + pause("CTL thr shutdown", 1); + } + while (softc->thresh_thread != NULL) { + wakeup(softc->thresh_thread); + if (softc->thresh_thread != NULL) + pause("CTL thr shutdown", 1); + } ctl_tpc_shutdown(softc); uma_zdestroy(softc->io_zone); mtx_destroy(&softc->ctl_lock); - destroy_dev(softc->dev); - sysctl_ctx_free(&softc->sysctl_ctx); free(softc, M_DEVBUF); control_softc = NULL; + return (0); } static int @@ -1969,7 +1997,7 @@ ctl_module_event_handler(module_t mod, i case MOD_LOAD: return (ctl_init()); case MOD_UNLOAD: - return (EBUSY); + return (ctl_shutdown()); default: return (EOPNOTSUPP); } @@ -13268,7 +13296,7 @@ ctl_work_thread(void *arg) CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); - for (;;) { + while (!softc->shutdown) { /* * We handle the queues in this order: * - ISC @@ -13318,6 +13346,8 @@ ctl_work_thread(void *arg) /* Sleep until we have something to do. */ mtx_sleep(thr, &thr->queue_lock, PDROP | PRIBIO, "-", 0); } + thr->thread = NULL; + kthread_exit(); } static void @@ -13328,7 +13358,7 @@ ctl_lun_thread(void *arg) CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); be_lun = STAILQ_FIRST(&softc->pending_lun_queue); if (be_lun != NULL) { @@ -13342,6 +13372,8 @@ ctl_lun_thread(void *arg) mtx_sleep(&softc->pending_lun_queue, &softc->ctl_lock, PDROP | PRIBIO, "-", 0); } + softc->lun_thread = NULL; + kthread_exit(); } static void @@ -13357,7 +13389,7 @@ ctl_thresh_thread(void *arg) CTL_DEBUG_PRINT(("ctl_thresh_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { if ((lun->flags & CTL_LUN_DISABLED) || @@ -13442,9 +13474,11 @@ ctl_thresh_thread(void *arg) mtx_lock(&softc->ctl_lock); } } - mtx_unlock(&softc->ctl_lock); - pause("-", CTL_LBP_PERIOD * hz); + mtx_sleep(&softc->thresh_thread, &softc->ctl_lock, + PDROP | PRIBIO, "-", CTL_LBP_PERIOD * hz); } + softc->thresh_thread = NULL; + kthread_exit(); } static void Modified: head/sys/cam/ctl/ctl_backend.c ============================================================================== --- head/sys/cam/ctl/ctl_backend.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_backend.c Sat Jan 21 19:38:26 2017 (r312603) @@ -67,11 +67,10 @@ ctl_backend_register(struct ctl_backend_ { struct ctl_softc *softc = control_softc; struct ctl_backend_driver *be_tmp; + int error; + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ STAILQ_FOREACH(be_tmp, &softc->be_list, links) { if (strcmp(be_tmp->name, be->name) == 0) { mtx_unlock(&softc->ctl_lock); @@ -79,39 +78,24 @@ ctl_backend_register(struct ctl_backend_ } } mtx_unlock(&softc->ctl_lock); - - /* - * Call the backend's initialization routine. - */ - be->init(); - - mtx_lock(&softc->ctl_lock); - - STAILQ_INSERT_TAIL(&softc->be_list, be, links); - - softc->num_backends++; - - /* - * Don't want to increment the usage count for internal consumers, - * we won't be able to unload otherwise. - */ - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_INC_USE_COUNT; -#endif - #ifdef CS_BE_CONFIG_MOVE_DONE_IS_NOT_USED be->config_move_done = ctl_config_move_done; #endif - /* XXX KDM fix this! */ be->num_luns = 0; -#if 0 - atomic_set(&be->num_luns, 0); -#endif - mtx_unlock(&softc->ctl_lock); + /* Call the backend's initialization routine. */ + if (be->init != NULL) { + if ((error = be->init()) != 0) { + printf("%s backend init error: %d\n", + be->name, error); + return (error); + } + } + mtx_lock(&softc->ctl_lock); + STAILQ_INSERT_TAIL(&softc->be_list, be, links); + softc->num_backends++; + mtx_unlock(&softc->ctl_lock); return (0); } @@ -119,30 +103,21 @@ int ctl_backend_deregister(struct ctl_backend_driver *be) { struct ctl_softc *softc = control_softc; + int error; - mtx_lock(&softc->ctl_lock); - -#if 0 - if (atomic_read(&be->num_luns) != 0) { -#endif - /* XXX KDM fix this! */ - if (be->num_luns != 0) { - mtx_unlock(&softc->ctl_lock); - return (-1); + /* Call the backend's shutdown routine. */ + if (be->shutdown != NULL) { + if ((error = be->shutdown()) != 0) { + printf("%s backend shutdown error: %d\n", + be->name, error); + return (error); + } } + mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->be_list, be, ctl_backend_driver, links); - softc->num_backends--; - - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_DEC_USE_COUNT; -#endif - mtx_unlock(&softc->ctl_lock); - return (0); } Modified: head/sys/cam/ctl/ctl_backend.h ============================================================================== --- head/sys/cam/ctl/ctl_backend.h Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_backend.h Sat Jan 21 19:38:26 2017 (r312603) @@ -55,12 +55,13 @@ typedef enum { { \ switch (type) { \ case MOD_LOAD: \ - ctl_backend_register( \ - (struct ctl_backend_driver *)data); \ + return (ctl_backend_register( \ + (struct ctl_backend_driver *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_backend_deregister( \ + (struct ctl_backend_driver *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ @@ -179,10 +180,10 @@ struct ctl_be_lun { typedef enum { CTL_BE_FLAG_NONE = 0x00, /* no flags */ CTL_BE_FLAG_HAS_CONFIG = 0x01, /* can do config reads, writes */ - CTL_BE_FLAG_INTERNAL = 0x02 /* don't inc mod refcount */ } ctl_backend_flags; typedef int (*be_init_t)(void); +typedef int (*be_shutdown_t)(void); typedef int (*be_func_t)(union ctl_io *io); typedef void (*be_vfunc_t)(union ctl_io *io); typedef int (*be_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -194,6 +195,7 @@ struct ctl_backend_driver { char name[CTL_BE_NAME_LEN]; /* passed to CTL */ ctl_backend_flags flags; /* passed to CTL */ be_init_t init; /* passed to CTL */ + be_shutdown_t shutdown; /* passed to CTL */ be_func_t data_submit; /* passed to CTL */ be_func_t data_move_done; /* passed to CTL */ be_func_t config_read; /* passed to CTL */ Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_backend_block.c Sat Jan 21 19:38:26 2017 (r312603) @@ -183,6 +183,7 @@ struct ctl_be_block_lun { */ struct ctl_be_block_softc { struct mtx lock; + uma_zone_t beio_zone; int num_luns; STAILQ_HEAD(, ctl_be_block_lun) lun_list; }; @@ -273,13 +274,15 @@ static int ctl_be_block_config_write(uni static int ctl_be_block_config_read(union ctl_io *io); static int ctl_be_block_lun_info(void *be_lun, struct sbuf *sb); static uint64_t ctl_be_block_lun_attr(void *be_lun, const char *attrname); -int ctl_be_block_init(void); +static int ctl_be_block_init(void); +static int ctl_be_block_shutdown(void); static struct ctl_backend_driver ctl_be_block_driver = { .name = "block", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_be_block_init, + .shutdown = ctl_be_block_shutdown, .data_submit = ctl_be_block_submit, .data_move_done = ctl_be_block_move_done, .config_read = ctl_be_block_config_read, @@ -292,14 +295,12 @@ static struct ctl_backend_driver ctl_be_ MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend"); CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver); -static uma_zone_t beio_zone; - static struct ctl_be_block_io * ctl_alloc_beio(struct ctl_be_block_softc *softc) { struct ctl_be_block_io *beio; - beio = uma_zalloc(beio_zone, M_WAITOK | M_ZERO); + beio = uma_zalloc(softc->beio_zone, M_WAITOK | M_ZERO); beio->softc = softc; return (beio); } @@ -332,7 +333,7 @@ ctl_free_beio(struct ctl_be_block_io *be duplicate_free, beio->num_segs); } - uma_zfree(beio_zone, beio); + uma_zfree(beio->softc->beio_zone, beio); } static void @@ -2859,19 +2860,40 @@ ctl_be_block_lun_attr(void *be_lun, cons return (lun->getattr(lun, attrname)); } -int +static int ctl_be_block_init(void) { - struct ctl_be_block_softc *softc; - int retval; - - softc = &backend_block_softc; - retval = 0; + struct ctl_be_block_softc *softc = &backend_block_softc; mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); - beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), + softc->beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->lun_list); + return (0); +} - return (retval); + +static int +ctl_be_block_shutdown(void) +{ + struct ctl_be_block_softc *softc = &backend_block_softc; + struct ctl_be_block_lun *lun, *next_lun; + + mtx_lock(&softc->lock); + STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { + /* + * Drop our lock here. Since ctl_invalidate_lun() can call + * back into us, this could potentially lead to a recursive + * lock of the same mutex, which would cause a hang. + */ + mtx_unlock(&softc->lock); + ctl_disable_lun(&lun->cbe_lun); + ctl_invalidate_lun(&lun->cbe_lun); + mtx_lock(&softc->lock); + } + mtx_unlock(&softc->lock); + + uma_zdestroy(softc->beio_zone); + mtx_destroy(&softc->lock); + return (0); } Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Sat Jan 21 19:38:26 2017 (r312603) @@ -108,8 +108,8 @@ struct ctl_be_ramdisk_softc { static struct ctl_be_ramdisk_softc rd_softc; extern struct ctl_softc *control_softc; -int ctl_backend_ramdisk_init(void); -void ctl_backend_ramdisk_shutdown(void); +static int ctl_backend_ramdisk_init(void); +static int ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); static void ctl_backend_ramdisk_continue(union ctl_io *io); @@ -133,6 +133,7 @@ static struct ctl_backend_driver ctl_be_ .name = "ramdisk", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_backend_ramdisk_init, + .shutdown = ctl_backend_ramdisk_shutdown, .data_submit = ctl_backend_ramdisk_submit, .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, @@ -170,7 +171,7 @@ ctl_backend_ramdisk_init(void) return (0); } -void +static int ctl_backend_ramdisk_shutdown(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; @@ -192,20 +193,16 @@ ctl_backend_ramdisk_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); - + #ifdef CTL_RAMDISK_PAGES for (i = 0; i < softc->num_pages; i++) free(softc->ramdisk_pages[i], M_RAMDISK); - free(softc->ramdisk_pages, M_RAMDISK); #else free(softc->ramdisk_buffer, M_RAMDISK); #endif - - if (ctl_backend_deregister(&ctl_be_ramdisk_driver) != 0) { - printf("ctl_backend_ramdisk_shutdown: " - "ctl_backend_deregister() failed!\n"); - } + mtx_destroy(&softc->lock); + return (0); } static int Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_frontend.c Sat Jan 21 19:38:26 2017 (r312603) @@ -70,12 +70,11 @@ ctl_frontend_register(struct ctl_fronten { struct ctl_softc *softc = control_softc; struct ctl_frontend *fe_tmp; + int error; KASSERT(softc != NULL, ("CTL is not initialized")); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(fe_tmp, &softc->fe_list, links) { if (strcmp(fe_tmp->name, fe->name) == 0) { @@ -86,11 +85,14 @@ ctl_frontend_register(struct ctl_fronten mtx_unlock(&softc->ctl_lock); STAILQ_INIT(&fe->port_list); - /* - * Call the frontend's initialization routine. - */ - if (fe->init != NULL) - fe->init(); + /* Call the frontend's initialization routine. */ + if (fe->init != NULL) { + if ((error = fe->init()) != 0) { + printf("%s frontend init error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); softc->num_frontends++; @@ -103,20 +105,21 @@ int ctl_frontend_deregister(struct ctl_frontend *fe) { struct ctl_softc *softc = control_softc; + int error; - if (!STAILQ_EMPTY(&fe->port_list)) - return (-1); + /* Call the frontend's shutdown routine.*/ + if (fe->shutdown != NULL) { + if ((error = fe->shutdown()) != 0) { + printf("%s frontend shutdown error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->fe_list, fe, ctl_frontend, links); softc->num_frontends--; mtx_unlock(&softc->ctl_lock); - - /* - * Call the frontend's shutdown routine. - */ - if (fe->shutdown != NULL) - fe->shutdown(); return (0); } Modified: head/sys/cam/ctl/ctl_frontend.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend.h Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_frontend.h Sat Jan 21 19:38:26 2017 (r312603) @@ -49,7 +49,7 @@ typedef enum { } ctl_port_status; typedef int (*fe_init_t)(void); -typedef void (*fe_shutdown_t)(void); +typedef int (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); typedef int (*port_info_func_t)(void *onoff_arg, struct sbuf *sb); typedef int (*lun_func_t)(void *arg, int lun_id); @@ -61,12 +61,13 @@ typedef int (*fe_ioctl_t)(struct cdev *d { \ switch (type) { \ case MOD_LOAD: \ - ctl_frontend_register( \ - (struct ctl_frontend *)data); \ + return (ctl_frontend_register( \ + (struct ctl_frontend *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_frontend_deregister( \ + (struct ctl_frontend *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Jan 21 19:38:26 2017 (r312603) @@ -94,15 +94,14 @@ struct cfcs_softc { CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR | \ CAM_SENSE_PHYS) -int cfcs_init(void); +static int cfcs_init(void); +static int cfcs_shutdown(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); static void cfcs_datamove(union ctl_io *io); static void cfcs_done(union ctl_io *io); void cfcs_action(struct cam_sim *sim, union ccb *ccb); -static void cfcs_async(void *callback_arg, uint32_t code, - struct cam_path *path, void *arg); struct cfcs_softc cfcs_softc; /* @@ -121,14 +120,14 @@ static struct ctl_frontend cfcs_frontend { .name = "camsim", .init = cfcs_init, + .shutdown = cfcs_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfcs, cfcs_frontend); -int +static int cfcs_init(void) { struct cfcs_softc *softc; - struct ccb_setasync csa; struct ctl_port *port; int retval; @@ -214,13 +213,6 @@ cfcs_init(void) goto bailout; } - xpt_setup_ccb(&csa.ccb_h, softc->path, CAM_PRIORITY_NONE); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_LOST_DEVICE; - csa.callback = cfcs_async; - csa.callback_arg = softc->sim; - xpt_action((union ccb *)&csa); - mtx_unlock(&softc->lock); return (retval); @@ -236,6 +228,27 @@ bailout: return (retval); } +static int +cfcs_shutdown(void) +{ + struct cfcs_softc *softc = &cfcs_softc; + struct ctl_port *port = &softc->port; + int error; + + ctl_port_offline(port); + + mtx_lock(&softc->lock); + xpt_free_path(softc->path); + xpt_bus_deregister(cam_sim_path(softc->sim)); + cam_sim_free(softc->sim, /*free_devq*/ TRUE); + mtx_unlock(&softc->lock); + mtx_destroy(&softc->lock); + + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: cam_sim port deregistration failed\n", __func__); + return (error); +} + static void cfcs_poll(struct cam_sim *sim) { @@ -801,9 +814,3 @@ cfcs_action(struct cam_sim *sim, union c break; } } - -static void -cfcs_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) -{ - -} Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_ioctl.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_frontend_ioctl.c Sat Jan 21 19:38:26 2017 (r312603) @@ -76,7 +76,7 @@ struct cfi_softc { static struct cfi_softc cfi_softc; static int cfi_init(void); -static void cfi_shutdown(void); +static int cfi_shutdown(void); static void cfi_datamove(union ctl_io *io); static void cfi_done(union ctl_io *io); @@ -93,6 +93,7 @@ cfi_init(void) { struct cfi_softc *isoftc = &cfi_softc; struct ctl_port *port; + int error = 0; memset(isoftc, 0, sizeof(*isoftc)); @@ -108,24 +109,25 @@ cfi_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { + if ((error = ctl_port_register(port)) != 0) { printf("%s: ioctl port registration failed\n", __func__); - return (0); + return (error); } ctl_port_online(port); return (0); } -void +static int cfi_shutdown(void) { struct cfi_softc *isoftc = &cfi_softc; - struct ctl_port *port; + struct ctl_port *port = &isoftc->port; + int error = 0; - port = &isoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&isoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: ioctl port deregistration failed\n", __func__); + return (error); } /* Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 21 19:38:26 2017 (r312603) @@ -144,7 +144,8 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO #define PDU_TOTAL_TRANSFER_LEN(X) (X)->ip_prv1 #define PDU_R2TSN(X) (X)->ip_prv2 -int cfiscsi_init(void); +static int cfiscsi_init(void); +static int cfiscsi_shutdown(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); static int cfiscsi_info(void *arg, struct sbuf *sb); @@ -182,6 +183,7 @@ static struct ctl_frontend cfiscsi_front .name = "iscsi", .init = cfiscsi_init, .ioctl = cfiscsi_ioctl, + .shutdown = cfiscsi_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfiscsi, cfiscsi_frontend); MODULE_DEPEND(ctlcfiscsi, icl, 1, 1, 1); @@ -1321,7 +1323,7 @@ cfiscsi_session_delete(struct cfiscsi_se free(cs, M_CFISCSI); } -int +static int cfiscsi_init(void) { struct cfiscsi_softc *softc; @@ -1344,6 +1346,23 @@ cfiscsi_init(void) return (0); } +static int +cfiscsi_shutdown(void) +{ + struct cfiscsi_softc *softc = &cfiscsi_softc; + + if (!TAILQ_EMPTY(&softc->sessions) || !TAILQ_EMPTY(&softc->targets)) + return (EBUSY); + + uma_zdestroy(cfiscsi_data_wait_zone); +#ifdef ICL_KERNEL_PROXY + cv_destroy(&softc->accept_cv); +#endif + cv_destroy(&softc->sessions_cv); + mtx_destroy(&softc->lock); + return (0); +} + #ifdef ICL_KERNEL_PROXY static void cfiscsi_accept(struct socket *so, struct sockaddr *sa, int portal_id) Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_private.h Sat Jan 21 19:38:26 2017 (r312603) @@ -470,7 +470,10 @@ struct ctl_softc { STAILQ_HEAD(, ctl_backend_driver) be_list; struct uma_zone *io_zone; uint32_t cur_pool_id; + int shutdown; struct ctl_thread threads[CTL_MAX_THREADS]; + struct thread *lun_thread; + struct thread *thresh_thread; TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; struct callout tpc_timeout; struct mtx tpc_lock; Modified: head/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc_local.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/ctl_tpc_local.c Sat Jan 21 19:38:26 2017 (r312603) @@ -65,7 +65,7 @@ struct tpcl_softc { static struct tpcl_softc tpcl_softc; static int tpcl_init(void); -static void tpcl_shutdown(void); +static int tpcl_shutdown(void); static void tpcl_datamove(union ctl_io *io); static void tpcl_done(union ctl_io *io); @@ -84,7 +84,7 @@ tpcl_init(void) struct tpcl_softc *tsoftc = &tpcl_softc; struct ctl_port *port; struct scsi_transportid_spi *tid; - int len; + int error, len; memset(tsoftc, 0, sizeof(*tsoftc)); @@ -100,9 +100,9 @@ tpcl_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { - printf("%s: ctl_port_register() failed with error\n", __func__); - return (0); + if ((error = ctl_port_register(port)) != 0) { + printf("%s: tpc port registration failed\n", __func__); + return (error); } len = sizeof(struct scsi_transportid_spi); @@ -118,16 +118,17 @@ tpcl_init(void) return (0); } -void +static int tpcl_shutdown(void) { struct tpcl_softc *tsoftc = &tpcl_softc; - struct ctl_port *port; + struct ctl_port *port = &tsoftc->port; + int error; - port = &tsoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&tsoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: tpc port deregistration failed\n", __func__); + return (error); } static void Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Jan 21 19:01:42 2017 (r312602) +++ head/sys/cam/ctl/scsi_ctl.c Sat Jan 21 19:38:26 2017 (r312603) @@ -188,8 +188,8 @@ MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CA #define PRIV_CCB(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0]) #define PRIV_INFO(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1]) -int ctlfeinitialize(void); -void ctlfeshutdown(void); +static int ctlfeinitialize(void); +static int ctlfeshutdown(void); static periph_init_t ctlfeperiphinit; static void ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); @@ -227,13 +227,15 @@ static struct ctl_frontend ctlfe_fronten }; CTL_FRONTEND_DECLARE(ctlfe, ctlfe_frontend); -void +static int ctlfeshutdown(void) { - return; + + /* CAM does not support periph driver unregister now. */ + return (EBUSY); } -int +static int ctlfeinitialize(void) { @@ -243,7 +245,7 @@ ctlfeinitialize(void) return (0); } -void +static void ctlfeperiphinit(void) { cam_status status; From owner-svn-src-head@freebsd.org Sat Jan 21 19:49:40 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 B6BF6CBBB51; Sat, 21 Jan 2017 19:49:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7072F1589; Sat, 21 Jan 2017 19:49:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LJndEG001975; Sat, 21 Jan 2017 19:49:39 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LJndW4001974; Sat, 21 Jan 2017 19:49:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701211949.v0LJndW4001974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 21 Jan 2017 19:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312604 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 19:49:40 -0000 Author: loos Date: Sat Jan 21 19:49:39 2017 New Revision: 312604 URL: https://svnweb.freebsd.org/changeset/base/312604 Log: Simplify the handling of small packets padding in cpsw: - Pad small packets to 60 bytes and not 64 (exclude the CRC bytes); - Pad the packet using m_append(9), if the packet has enough space for padding, which is usually true, it will not be necessary append a newly allocated mbuf to the chain. Suggested by: yongari MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Sat Jan 21 19:38:26 2017 (r312603) +++ head/sys/arm/ti/cpsw/if_cpsw.c Sat Jan 21 19:49:39 2017 (r312604) @@ -783,8 +783,7 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, static int cpsw_attach(device_t dev) { - bus_dma_segment_t segs[1]; - int error, i, nsegs; + int error, i; struct cpsw_softc *sc; uint32_t reg; @@ -859,15 +858,8 @@ cpsw_attach(device_t dev) return (error); } - /* Allocate the null mbuf and pre-sync it. */ - sc->null_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - memset(sc->null_mbuf->m_data, 0, sc->null_mbuf->m_ext.ext_size); - bus_dmamap_create(sc->mbuf_dtag, 0, &sc->null_mbuf_dmamap); - bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, sc->null_mbuf_dmamap, - sc->null_mbuf, segs, &nsegs, BUS_DMA_NOWAIT); - bus_dmamap_sync(sc->mbuf_dtag, sc->null_mbuf_dmamap, - BUS_DMASYNC_PREWRITE); - sc->null_mbuf_paddr = segs[0].ds_addr; + /* Allocate a NULL buffer for padding. */ + sc->nullpad = malloc(ETHER_MIN_LEN, M_DEVBUF, M_WAITOK | M_ZERO); cpsw_init_slots(sc); @@ -946,13 +938,9 @@ cpsw_detach(device_t dev) for (i = 0; i < nitems(sc->_slots); ++i) cpsw_free_slot(sc, &sc->_slots[i]); - /* Free null mbuf. */ - if (sc->null_mbuf_dmamap) { - bus_dmamap_unload(sc->mbuf_dtag, sc->null_mbuf_dmamap); - error = bus_dmamap_destroy(sc->mbuf_dtag, sc->null_mbuf_dmamap); - KASSERT(error == 0, ("Mapping still active")); - m_freem(sc->null_mbuf); - } + /* Free null padding buffer. */ + if (sc->nullpad) + free(sc->nullpad, M_DEVBUF); /* Free DMA tag */ if (sc->mbuf_dtag) { @@ -1829,21 +1817,19 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) break; slot->mbuf = m0; - padlen = ETHER_MIN_LEN - slot->mbuf->m_pkthdr.len; + padlen = ETHER_MIN_LEN - ETHER_CRC_LEN - m0->m_pkthdr.len; if (padlen < 0) padlen = 0; + else if (padlen > 0) + m_append(slot->mbuf, padlen, sc->swsc->nullpad); /* Create mapping in DMA memory */ error = bus_dmamap_load_mbuf_sg(sc->swsc->mbuf_dtag, slot->dmamap, slot->mbuf, segs, &nsegs, BUS_DMA_NOWAIT); /* If the packet is too fragmented, try to simplify. */ if (error == EFBIG || - (error == 0 && - nsegs + (padlen > 0 ? 1 : 0) > sc->swsc->tx.avail_queue_len)) { + (error == 0 && nsegs > sc->swsc->tx.avail_queue_len)) { bus_dmamap_unload(sc->swsc->mbuf_dtag, slot->dmamap); - if (padlen > 0) /* May as well add padding. */ - m_append(slot->mbuf, padlen, - sc->swsc->null_mbuf->m_data); m0 = m_defrag(slot->mbuf, M_NOWAIT); if (m0 == NULL) { device_printf(sc->dev, @@ -1895,7 +1881,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.bufptr = segs[0].ds_addr; bd.bufoff = 0; bd.buflen = segs[0].ds_len; - bd.pktlen = m_length(slot->mbuf, NULL) + padlen; + bd.pktlen = m_length(slot->mbuf, NULL); bd.flags = CPDMA_BD_SOP | CPDMA_BD_OWNER; if (sc->swsc->dualemac) { bd.flags |= CPDMA_BD_TO_PORT; @@ -1920,42 +1906,18 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.pktlen = 0; bd.flags = CPDMA_BD_OWNER; } + /* Save the final buffer. */ - if (padlen <= 0) - bd.flags |= CPDMA_BD_EOP; - else { - next = STAILQ_NEXT(slot, next); - bd.next = cpsw_cpdma_bd_paddr(sc->swsc, next); - } + bd.flags |= CPDMA_BD_EOP; cpsw_cpdma_write_bd(sc->swsc, slot, &bd); STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); STAILQ_INSERT_TAIL(&sc->swsc->tx.active, slot, next); - if (padlen > 0) { - slot = STAILQ_FIRST(&sc->swsc->tx.avail); - - /* Setup buffer of null pad bytes (definitely EOP). */ - bd.next = 0; - bd.bufptr = sc->swsc->null_mbuf_paddr; - bd.bufoff = 0; - bd.buflen = padlen; - bd.pktlen = 0; - bd.flags = CPDMA_BD_EOP | CPDMA_BD_OWNER; - cpsw_cpdma_write_bd(sc->swsc, slot, &bd); - ++nsegs; - - STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); - STAILQ_INSERT_TAIL(&sc->swsc->tx.active, slot, next); - } - last = slot; - added += nsegs; if (nsegs > sc->swsc->tx.longest_chain) sc->swsc->tx.longest_chain = nsegs; - // TODO: Should we defer the BPF tap until - // after all packets are queued? BPF_MTAP(sc->ifp, m0); } From owner-svn-src-head@freebsd.org Sat Jan 21 19:51:19 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 C6DE7CBBD19; Sat, 21 Jan 2017 19:51:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 706D51797; Sat, 21 Jan 2017 19:51:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v0LJpEgc070262 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 21 Jan 2017 21:51:14 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v0LJpEgc070262 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v0LJpEdM070261; Sat, 21 Jan 2017 21:51:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Jan 2017 21:51:14 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312600 - head/sys/kern Message-ID: <20170121195114.GA2349@kib.kiev.ua> References: <201701211838.v0LIcHIv072626@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701211838.v0LIcHIv072626@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sat, 21 Jan 2017 19:51:19 -0000 On Sat, Jan 21, 2017 at 06:38:17PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sat Jan 21 18:38:16 2017 > New Revision: 312600 > URL: https://svnweb.freebsd.org/changeset/base/312600 > > Log: > vfs: refactor _vn_lock > > Stop testing for LK_RETRY and error multiple times. Also postpone the > VI_DOOMED until after LK_RETRY was seen as it reads from the vnode. > > No functional changes. > > Modified: > head/sys/kern/vfs_vnops.c > > Modified: head/sys/kern/vfs_vnops.c > ============================================================================== > --- head/sys/kern/vfs_vnops.c Sat Jan 21 17:39:10 2017 (r312599) > +++ head/sys/kern/vfs_vnops.c Sat Jan 21 18:38:16 2017 (r312600) > @@ -1539,27 +1539,24 @@ _vn_lock(struct vnode *vp, int flags, ch > > VNASSERT((flags & LK_TYPE_MASK) != 0, vp, > ("vn_lock called with no locktype.")); > - do { > #ifdef DEBUG_VFS_LOCKS > - KASSERT(vp->v_holdcnt != 0, > - ("vn_lock %p: zero hold count", vp)); > + KASSERT(vp->v_holdcnt != 0, > + ("vn_lock %p: zero hold count", vp)); This line also has wrong inde seems to not be fixed by later commit. > #endif > - error = VOP_LOCK1(vp, flags, file, line); > - flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ > - KASSERT((flags & LK_RETRY) == 0 || error == 0, > - ("LK_RETRY set with incompatible flags (0x%x) or an error occurred (%d)", > - flags, error)); > - /* > - * Callers specify LK_RETRY if they wish to get dead vnodes. > - * If RETRY is not set, we return ENOENT instead. > - */ > - if (error == 0 && vp->v_iflag & VI_DOOMED && > - (flags & LK_RETRY) == 0) { > +retry: > + error = VOP_LOCK1(vp, flags, file, line); > + flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ > + KASSERT((flags & LK_RETRY) == 0 || error == 0, > + ("LK_RETRY set with incompatible flags (0x%x) or an error occurred (%d)", > + flags, error)); > + if (flags & LK_RETRY) { Stylish test is if ((flags & LK_RETRY) != 0) { > + if ((error != 0)) Too many (). > + goto retry; > + if ((vp->v_iflag & VI_DOOMED)) { Too many braces again, or missed != 0. > VOP_UNLOCK(vp, 0); > error = ENOENT; > - break; Also, this does the functional change, it seems to completely break LK_RERY logic. If LK_RETRY is specified, VI_DOOMED must not result in ENOENT. > } > - } while (flags & LK_RETRY && error != 0); > + } > return (error); > } > From owner-svn-src-head@freebsd.org Sat Jan 21 19:56:30 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 F29B1CBBDD9; Sat, 21 Jan 2017 19:56:29 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C23AC1B7A; Sat, 21 Jan 2017 19:56:29 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LJuS6e005849; Sat, 21 Jan 2017 19:56:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LJuSTZ005848; Sat, 21 Jan 2017 19:56:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701211956.v0LJuSTZ005848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 21 Jan 2017 19:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312605 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 19:56:30 -0000 Author: loos Date: Sat Jan 21 19:56:28 2017 New Revision: 312605 URL: https://svnweb.freebsd.org/changeset/base/312605 Log: Commit the struture changes for the padding of small packets on if_cpsw. Should have been committed together with r312604. MFC with: r312604 Modified: head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Sat Jan 21 19:49:39 2017 (r312604) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Sat Jan 21 19:56:28 2017 (r312605) @@ -104,10 +104,8 @@ struct cpsw_softc { struct resource *irq_res[CPSW_INTR_COUNT]; void *ih_cookie[CPSW_INTR_COUNT]; - /* An mbuf full of nulls for TX padding. */ - bus_dmamap_t null_mbuf_dmamap; - struct mbuf *null_mbuf; - bus_addr_t null_mbuf_paddr; + /* A buffer full of nulls for TX padding. */ + void *nullpad; bus_dma_tag_t mbuf_dtag; From owner-svn-src-head@freebsd.org Sat Jan 21 20:14:58 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 1243CCBB2D4; Sat, 21 Jan 2017 20:14:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 D3E0F789; Sat, 21 Jan 2017 20:14:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 194so9868193pgd.0; Sat, 21 Jan 2017 12:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=wAyJ0lkVChKwr2nsJoH/vlvXuzRooHEDdttt9fDyWJg=; b=rg/rW9xbSyiNYRYvbgpiJxTp4Zrj2RgKg2s5GwC2LjGqlSa6UHDsLGoaUKxFBUkCJZ byQkXjvvF67g9GlGA7KRr/AVzv1L5lwR7kZU5oTK9s9XQQaeNc4XlGxgbQZmKOvA6OPe vjFIzSOavIHfRMhE0yz0OdwtlmLd59qQOgbkS2zeYhlZZLh3ukylx1f8L45jYGx3lLdM Eg3x0rpT/8Nfb24uqXWPHELlM2fR4oDEVux4rB2Afq6+4jIc2jwnZrHE1MydIVOrNQ2B yvADjzi4F664+JtTKLC74SXEeQjONYYSHxBUVMwCvzqAaM/feYfVWxNQRGb8RC8xk33x Bjog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=wAyJ0lkVChKwr2nsJoH/vlvXuzRooHEDdttt9fDyWJg=; b=rm/Z3EBPRyI4myG6J7gOLu4ZN1glPHmPezk3mbXDIRQxoa/jK/p0o2PhSCGK38Iz8Q q8QMQ2EsilWYcfwQ4qELjyBIPwPk9zWmk9nJ2KZGpD1OHVQXoJqvbQFYnNSolFJdyqox 5mSyTz6S3I0nt76UgkY4T+vMdWU/6Uu0aGVlyA09nL+thCKNKrsEVhLEqMtH9DediSkV mC1vGZEjiAArIRaLdRwqsDEL8De/++Syw7Zo3H6LBUyJzPvoxUj2sZOxmLANe5M3iLE5 oyVdF2Jpe18scfuay1ZcsKCTYna0rLvBH91WzvbPiYgXxIpud+pfC1xKvlha9zvF+ujX QSEw== X-Gm-Message-State: AIkVDXKwgGt3wRdXb6JRjFrJliBNBJV++ZvelFsUzA3IrHRX54rFVil2ZpmU7Sf3xEz7Ag== X-Received: by 10.99.117.8 with SMTP id q8mr24430545pgc.9.1485029697225; Sat, 21 Jan 2017 12:14:57 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r74sm25853107pfb.67.2017.01.21.12.14.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 21 Jan 2017 12:14:56 -0800 (PST) Subject: Re: svn commit: r312598 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FC3BAA41-ACB3-49B2-B442-74099C38EC20"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701211659.v0LGxpDr030785@repo.freebsd.org> Date: Sat, 21 Jan 2017 12:14:55 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701211659.v0LGxpDr030785@repo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3124) 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: Sat, 21 Jan 2017 20:14:58 -0000 --Apple-Mail=_FC3BAA41-ACB3-49B2-B442-74099C38EC20 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 21, 2017, at 08:59, Mateusz Guzik wrote: > > Author: mjg > Date: Sat Jan 21 16:59:50 2017 > New Revision: 312598 > URL: https://svnweb.freebsd.org/changeset/base/312598 > > Log: > vfs: hide the getvnode NULL mp message behind DIAGNOSTIC > > Since crossmp vnode changes the message was being printed on each boot. > > Reported by: trasz > Discussed with: kib Thank you, -Ngie --Apple-Mail=_FC3BAA41-ACB3-49B2-B442-74099C38EC20 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYg8E/AAoJEPWDqSZpMIYV3kEQANPvzB9tnTF8M/rvcoGLJ7tI h1vlcz4EElBT/LvDRSR+E88nglwNbcPAzNio8udOuSuY5l4FzPxM4j4ZGQJ/1hZN RmEsvnVywx/skeJuSICjl2jv81C67GlS12IEF8eAboybTXnRkDOEF0a94EOcPy09 Vxdb9FffNegro/eFo9+/OsXbrAQ2WQm3icyOzUzlsmi3iAyrp5yOdtpxdJpl/aAt QOrzK01YTkXWwFH3oYVEnwmnxBwsMz6Nygdcv762HcTA8WGkoXsFkaYMYcqx3qLr SMxVB0/2WFDQUvDDsajRIpFqn7qh/jjyzH2o3ptgyT4iJcLdkIub8MkYCgo8by4p jG6gaSrEQ/nAonQ7R+k9PzaKH9OLZxTbfGTNkSXr1Tce0SulMk1v1pB3DvrAqaCW 4WbK8k+LaRNsXucazFySqmSt1h6AkA1BJ8zdasij7cdXEZu37A94YT0ygJ5+MUSo eM6nB63bQEes5CMOb+CsYQiKCq7516DGMrO6JrWckraXT1i+QPOBKWTmN/emkfWd qfJtr4TS3LwZwYFodFUDVXUsg9Z/N0ZpVbfUQs6xa9DQefHLAmUXh7/oq0a7yR2c KAA5Utw+mXI3ov9JIrrBjJFEgF6m8Nrknly4RATsP/s3+//yUGyAT4Pa1clW8uEG lqjcCw/IG5/HidqUG8uM =WfpJ -----END PGP SIGNATURE----- --Apple-Mail=_FC3BAA41-ACB3-49B2-B442-74099C38EC20-- From owner-svn-src-head@freebsd.org Sat Jan 21 20:34:21 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 583D3CBBA52; Sat, 21 Jan 2017 20:34:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2222B10F8; Sat, 21 Jan 2017 20:34:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LKYKJa021808; Sat, 21 Jan 2017 20:34:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LKYKA9021807; Sat, 21 Jan 2017 20:34:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701212034.v0LKYKA9021807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Jan 2017 20:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312606 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 20:34:21 -0000 Author: mjg Date: Sat Jan 21 20:34:20 2017 New Revision: 312606 URL: https://svnweb.freebsd.org/changeset/base/312606 Log: vfs: fix LK_RETRY logic braino in r312600 Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Jan 21 19:56:28 2017 (r312605) +++ head/sys/kern/vfs_vnops.c Sat Jan 21 20:34:20 2017 (r312606) @@ -1549,13 +1549,15 @@ retry: KASSERT((flags & LK_RETRY) == 0 || error == 0, ("LK_RETRY set with incompatible flags (0x%x) or " " an error occurred (%d)", flags, error)); - if (flags & LK_RETRY) { - if ((error != 0)) - goto retry; - if ((vp->v_iflag & VI_DOOMED)) { + + if ((flags & LK_RETRY) == 0) { + if (error == 0 && vp->v_iflag & VI_DOOMED) { VOP_UNLOCK(vp, 0); error = ENOENT; } + } else { + if (error != 0) + goto retry; } return (error); } From owner-svn-src-head@freebsd.org Sat Jan 21 21:03:28 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 4BE06CBA182; Sat, 21 Jan 2017 21:03:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B8541E4F; Sat, 21 Jan 2017 21:03:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LL3Ri8033833; Sat, 21 Jan 2017 21:03:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LL3RMm033831; Sat, 21 Jan 2017 21:03:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701212103.v0LL3RMm033831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 21 Jan 2017 21:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312607 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 21:03:28 -0000 Author: avos Date: Sat Jan 21 21:03:26 2017 New Revision: 312607 URL: https://svnweb.freebsd.org/changeset/base/312607 Log: ath: adapt LDPC support checks Set both IEEE80211_HTCAP_LDPC and IEEE80211_HTC_TXLDPC capability flags if LDPC is supported + set 'do_ldpc = 1' only when it is not disabled, not just supported. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9277 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jan 21 20:34:20 2017 (r312606) +++ head/sys/dev/ath/if_ath.c Sat Jan 21 21:03:26 2017 (r312607) @@ -1178,7 +1178,8 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_has_ldpc = 1; device_printf(sc->sc_dev, "[HT] LDPC transmit/receive enabled\n"); - ic->ic_htcaps |= IEEE80211_HTCAP_LDPC; + ic->ic_htcaps |= IEEE80211_HTCAP_LDPC | + IEEE80211_HTC_TXLDPC; } Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 20:34:20 2017 (r312606) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 21:03:26 2017 (r312607) @@ -239,7 +239,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft * it if any of the rate entries aren't 11n. */ do_ldpc = 0; - if ((ni->ni_vap->iv_htcaps & IEEE80211_HTCAP_LDPC) && + if ((ni->ni_vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) && (ni->ni_htcap & IEEE80211_HTCAP_LDPC)) do_ldpc = 1; From owner-svn-src-head@freebsd.org Sat Jan 21 21:36:22 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 1B880CBAB23; Sat, 21 Jan 2017 21:36:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 B6A55120D; Sat, 21 Jan 2017 21:36:21 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id r126so15927932wmr.3; Sat, 21 Jan 2017 13:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0whhwIqH+H2+J8SVr7slJuEqP0Y3rth1cuZUk3MPRvc=; b=K8aEcx6BP5b8GBO33PWHATQp+SdeWxy1qJ2pzIqWZ7sC+nJk8Fn297DqntYX0AB1j7 OUxZCQJFGTrmuyOROPIYFItTxKGpPIFbWQn1iaA9ucaR7ay+2NRVeugJ7MUj2x89mA82 pob00k/62oQejhyvEpxebovkHIV8esOzbjB8IjXxnoPBPrK2kpsot6k/p5QYmd0JshTl 89HFlsmjo/ejPaMdIJ5QfDaxSPdsG/8W9tXhByhogp6vbeKCNcs5XaPuRBYNS0vjkIMd jw3A+mh/FJz/H/wl9cy4W+tXKq57C2G8lG0H9EtXjBFx6gxKkMdNOU7S03w/pztADrZ4 P/wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0whhwIqH+H2+J8SVr7slJuEqP0Y3rth1cuZUk3MPRvc=; b=P1ejX4CMqKOCXV09XePL7dj3pxEjP1MyEhXsLzUmgGKZXyIYSTIyLNTODvkLRe+TeR eWXSWG8FBvgeEbwppLxxFSy58cTipO3zajP/Bw/jvtfK8Nop/WvFYWxZO3e+UN5ol6wJ 2heG088FARB38eGb4T0ab4AIkYTygYtNuMOE3o+G7sS4VaPylPzWDi0SkghnJ0alZq7A NaG9Y9n1BgTQ+0u8O2bW4CL4lA2iqwdNglW6ghNpzsPVe4XywCRAeUGuuvR5h4sV+fqu br3wHjE61Mw0Jy2VzhVy1UJLgYHdQ49fSQeEIukdc3puZ0OHqVxNI4ihpzr90zDtjYwn z/hQ== X-Gm-Message-State: AIkVDXLCmSiPus0VFLZLR+cXAlrOorwUsP7LXx6/d8kw0V/Z0tCDGmfBkO83PQa/m+ZbWA== X-Received: by 10.28.191.139 with SMTP id o11mr8949837wmi.97.1485034579201; Sat, 21 Jan 2017 13:36:19 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id a35sm6248065wra.21.2017.01.21.13.36.17 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 21 Jan 2017 13:36:17 -0800 (PST) Date: Sat, 21 Jan 2017 22:36:15 +0100 From: Mateusz Guzik To: Konstantin Belousov Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312600 - head/sys/kern Message-ID: <20170121213614.GB20930@dft-labs.eu> References: <201701211838.v0LIcHIv072626@repo.freebsd.org> <20170121195114.GA2349@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170121195114.GA2349@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Sat, 21 Jan 2017 21:36:22 -0000 On Sat, Jan 21, 2017 at 09:51:14PM +0200, Konstantin Belousov wrote: > On Sat, Jan 21, 2017 at 06:38:17PM +0000, Mateusz Guzik wrote: > > + if (flags & LK_RETRY) { > Stylish test is > if ((flags & LK_RETRY) != 0) { > > + if ((error != 0)) > Too many (). > > > + goto retry; > > + if ((vp->v_iflag & VI_DOOMED)) { > Too many braces again, or missed != 0. This was a side effect of putting these into __predict_false and then removing it, albeit not fully. > > VOP_UNLOCK(vp, 0); > > error = ENOENT; > > - break; > Also, this does the functional change, it seems to completely break LK_RERY > logic. If LK_RETRY is specified, VI_DOOMED must not result in ENOENT. > Yea, this was a weird-ass brainfart on my part. Fixed in r312606 The gist of the actual change I wanted to make is postponing the read from the vnode. > > } > > - } while (flags & LK_RETRY && error != 0); > > + } > > return (error); > > } > > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sat Jan 21 23:07:17 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 2FB59CBBE65; Sat, 21 Jan 2017 23:07:17 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D963CFA6; Sat, 21 Jan 2017 23:07:16 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LN7Ff4083913; Sat, 21 Jan 2017 23:07:15 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LN7FpS083912; Sat, 21 Jan 2017 23:07:15 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701212307.v0LN7FpS083912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 21 Jan 2017 23:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312608 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 23:07:17 -0000 Author: loos Date: Sat Jan 21 23:07:15 2017 New Revision: 312608 URL: https://svnweb.freebsd.org/changeset/base/312608 Log: Handle the rx queue stall while reading the packets from NIC (when the descriptor state will not change anymore). This seems to eliminate the race where we can miss a stalled queue under high load. While here remove the unnecessary curly brackets. Reported by: Konstantin Kormashev MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Sat Jan 21 21:03:26 2017 (r312607) +++ head/sys/arm/ti/cpsw/if_cpsw.c Sat Jan 21 23:07:15 2017 (r312608) @@ -1652,6 +1652,14 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) } } + if (STAILQ_FIRST(&sc->rx.active) != NULL && + (bd.flags & (CPDMA_BD_EOP | CPDMA_BD_EOQ)) == + (CPDMA_BD_EOP | CPDMA_BD_EOQ)) { + cpsw_write_hdp_slot(sc, &sc->rx, + STAILQ_FIRST(&sc->rx.active)); + sc->rx.queue_restart++; + } + /* Add mbuf to packet list to be returned. */ if (mb_tail) { mb_tail->m_nextpkt = slot->mbuf; @@ -1684,7 +1692,6 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) struct cpsw_cpdma_bd bd; struct cpsw_slot *first_new_slot, *last_old_slot, *next, *slot; int error, nsegs, added = 0; - uint32_t flags; /* Register new mbufs with hardware. */ first_new_slot = NULL; @@ -1750,22 +1757,13 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) } else { /* Add buffers to end of current queue. */ cpsw_cpdma_write_bd_next(sc, last_old_slot, first_new_slot); - /* If underrun, restart queue. */ - if ((flags = cpsw_cpdma_read_bd_flags(sc, last_old_slot)) & - CPDMA_BD_EOQ) { - flags &= ~CPDMA_BD_EOQ; - cpsw_cpdma_write_bd_flags(sc, last_old_slot, flags); - cpsw_write_hdp_slot(sc, &sc->rx, first_new_slot); - sc->rx.queue_restart++; - } } sc->rx.queue_adds += added; sc->rx.avail_queue_len -= added; sc->rx.active_queue_len += added; cpsw_write_4(sc, CPSW_CPDMA_RX_FREEBUFFER(0), added); - if (sc->rx.active_queue_len > sc->rx.max_active_queue_len) { + if (sc->rx.active_queue_len > sc->rx.max_active_queue_len) sc->rx.max_active_queue_len = sc->rx.active_queue_len; - } } static void From owner-svn-src-head@freebsd.org Sat Jan 21 23:35:55 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 A237BCBBB83; Sat, 21 Jan 2017 23:35:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71DC787B; Sat, 21 Jan 2017 23:35:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LNZsAj095946; Sat, 21 Jan 2017 23:35:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LNZsHe095945; Sat, 21 Jan 2017 23:35:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701212335.v0LNZsHe095945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Jan 2017 23:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312609 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sat, 21 Jan 2017 23:35:55 -0000 Author: adrian Date: Sat Jan 21 23:35:54 2017 New Revision: 312609 URL: https://svnweb.freebsd.org/changeset/base/312609 Log: [ath] improve the debugging when looking into the maximum A-MPDU size being chosen. This is how I caught the "why are we only sending 8K aggregates?" problem. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 23:07:15 2017 (r312608) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 23:35:54 2017 (r312609) @@ -589,8 +589,14 @@ ath_get_aggr_limit(struct ath_softc *sc, amin = MIN(amin, bf->bf_state.bfs_rc[i].max4msframelen); } - DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: max frame len= %d\n", - __func__, amin); + DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, + "%s: aggr_limit=%d, iv_ampdu_limit=%d, " + "peer maxrxampdu=%d, max frame len=%d\n", + __func__, + sc->sc_aggr_limit, + vap->iv_ampdu_limit, + MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), + amin); return amin; #undef MS