Re: svn commit: r294778 - in head: lib/libc/sys sys/kern
On 26/01/2016 6:57 PM, Konstantin Belousov wrote: > Author: kib > Date: Tue Jan 26 07:57:44 2016 > New Revision: 294778 > URL: https://svnweb.freebsd.org/changeset/base/294778 > > Log: > Restore flushing of output for revoke(2) again. Document revoke()'s > intended behaviour in its man page. Simplify tty_drain() to match. > Don't call ttydevsw methods in tty_flush() if the device is gone > since we now sometimes call it then. > > The flushing was supposed to be implemented by passing the FNONBLOCK > flag to VOP_CLOSE() for revoke(). The tty driver is one of the few > that can block in close and was one of the fewer that knew about this. > > This almost worked in FreeBSD-1 and similarly in Net/2. These > versions only almost worked because there was and is considerable > confusion between IO_NDELAY and FNONBLOCK (aka O_NONBLOCK). IO_NDELAY > is only valid for VOP_READ() and VOP_WRITE(). For other VOPs it has > the same value as O_SHLOCK. But since vfs_subr.c and tty.c > consistently used the wrong flag and the O_SHLOCK flag is rarely set, > this mostly worked. It also gave the feature than applications could > get the non-blocking close by abusing O_SHLOCK. > > This was first broken then fixed in 1995. I changed only the tty > driver to use FNONBLOCK, as a hack to get non-blocking via the normal > flag FNONBLOCK for last closes. I didn't know about revoke()'s use > of IO_NDELAY or change it to be consistent, so revoke() was broken. > Then I changed revoke() to match. Seems like > This was next broken in 1997 then fixed in 1998. Importing Lite2 made > the flags inconsistent again by undoing the fix only in vfs_subr.c. A fantastic > This was next broken in 2008 by replacing everything in tty.c and not > checking any flags in last close. Other bugs in draining limited the > resulting unbounded waits to drain in some cases. Regression test candidate :) > It is now possible to fix this better using the new FREVOKE flag. > Just restore flushing for revoke() for now. Don't restore or undo any > hacks for ordinary last closes yet. But remove dead code in the > 1-second relative timeout (r272789). This did extra work to extend > the buggy draining for revoke() for as long as possible. The 1-second > timeout made this not very long by usually flushing after 1 second. > > Submitted by: bde > MFC after: 2 weeks > > Modified: > head/lib/libc/sys/revoke.2 > head/sys/kern/tty.c > > Modified: head/lib/libc/sys/revoke.2 > == > --- head/lib/libc/sys/revoke.2Tue Jan 26 07:49:11 2016 > (r294777) > +++ head/lib/libc/sys/revoke.2Tue Jan 26 07:57:44 2016 > (r294778) > @@ -31,7 +31,7 @@ > .\" @(#)revoke.2 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd June 4, 1993 > +.Dd Jan 25, 2016 > .Dt REVOKE 2 > .Os > .Sh NAME > @@ -59,7 +59,8 @@ and a > system call will succeed. > If the file is a special file for a device which is open, > the device close function > -is called as if all open references to the file had been closed. > +is called as if all open references to the file had been closed > +using a special close method which does not block. > .Pp > Access to a file may be revoked only by its owner or the super user. > The > @@ -104,3 +105,6 @@ The > .Fn revoke > system call first appeared in > .Bx 4.3 Reno . > +.Sh BUGS > +The non-blocking close method is only correctly implemented for > +terminal devices. > > Modified: head/sys/kern/tty.c > == > --- head/sys/kern/tty.c Tue Jan 26 07:49:11 2016(r294777) > +++ head/sys/kern/tty.c Tue Jan 26 07:57:44 2016(r294778) > @@ -126,7 +126,7 @@ static int > tty_drain(struct tty *tp, int leaving) > { > size_t bytesused; > - int error, revokecnt; > + int error; > > if (ttyhook_hashook(tp, getc_inject)) > /* buffer is inaccessible */ > @@ -141,18 +141,10 @@ tty_drain(struct tty *tp, int leaving) > > /* Wait for data to be drained. */ > if (leaving) { > - revokecnt = tp->t_revokecnt; > error = tty_timedwait(tp, &tp->t_outwait, hz); > - switch (error) { > - case ERESTART: > - if (revokecnt != tp->t_revokecnt) > - error = 0; > - break; > - case EWOULDBLOCK: > - if (ttyoutq_bytesused(&tp->t_outq) < bytesused) > - error = 0; > - break; > - } > + if (error == EWOULDBLOCK && > + ttyoutq_bytesused(&tp->t_outq) < bytesused) > +
svn commit: r294788 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Jan 26 09:42:13 2016 New Revision: 294788 URL: https://svnweb.freebsd.org/changeset/base/294788 Log: hyperv/hn: Improve sending performance - Avoid main lock contention by trylock for if_start, if that fails, schedule TX taskqueue for if_start - Don't do direct sending if the packet to be sent is large, e.g. TSO packet. This change gives me stable 9.1Gbps TCP sending performance w/ TSO over a 10Gbe directly connected network (the performance fluctuated between 4Gbps and 9Gbps before this commit). It also improves non- TSO TCP sending performance a lot. Reviewed by: adrian, royger Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5074 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Jan 26 09:09:20 2016 (r294787) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Jan 26 09:42:13 2016 (r294788) @@ -39,9 +39,11 @@ #define __HV_NET_VSC_H__ #include +#include #include #include #include +#include #include #include @@ -1008,7 +1010,6 @@ typedef struct hn_softc { struct hv_device *hn_dev_obj; netvsc_dev *net_dev; - int hn_txdesc_cnt; struct hn_txdesc *hn_txdesc; bus_dma_tag_t hn_tx_data_dtag; bus_dma_tag_t hn_tx_rndis_dtag; @@ -1017,9 +1018,15 @@ typedef struct hn_softc { struct mtx hn_txlist_spin; struct hn_txdesc_list hn_txlist; + int hn_txdesc_cnt; int hn_txdesc_avail; int hn_txeof; + int hn_direct_tx_size; + struct taskqueue *hn_tx_taskq; + struct task hn_start_task; + struct task hn_txeof_task; + struct lro_ctrl hn_lro; int hn_lro_hiwat; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Jan 26 09:09:20 2016(r294787) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Jan 26 09:42:13 2016(r294788) @@ -146,6 +146,8 @@ __FBSDID("$FreeBSD$"); #define HN_TX_DATA_SEGCNT_MAX \ (NETVSC_PACKET_MAXPAGE - HV_RF_NUM_TX_RESERVED_PAGE_BUFS) +#define HN_DIRECT_TX_SIZE_DEF 128 + struct hn_txdesc { SLIST_ENTRY(hn_txdesc) link; struct mbuf *m; @@ -194,6 +196,7 @@ struct hn_txdesc { #define NV_LOCK_INIT(_sc, _name) \ mtx_init(&(_sc)->hn_lock, _name, MTX_NETWORK_LOCK, MTX_DEF) #define NV_LOCK(_sc) mtx_lock(&(_sc)->hn_lock) +#define NV_TRYLOCK(_sc)mtx_trylock(&(_sc)->hn_lock) #define NV_LOCK_ASSERT(_sc)mtx_assert(&(_sc)->hn_lock, MA_OWNED) #define NV_UNLOCK(_sc) mtx_unlock(&(_sc)->hn_lock) #define NV_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->hn_lock) @@ -219,6 +222,10 @@ TUNABLE_INT("dev.hn.tso_maxlen", &hn_tso static int hn_tx_chimney_size = 0; TUNABLE_INT("dev.hn.tx_chimney_size", &hn_tx_chimney_size); +/* Limit the size of packet for direct transmission */ +static int hn_direct_tx_size = HN_DIRECT_TX_SIZE_DEF; +TUNABLE_INT("dev.hn.direct_tx_size", &hn_direct_tx_size); + /* * Forward declarations */ @@ -226,8 +233,9 @@ static void hn_stop(hn_softc_t *sc); static void hn_ifinit_locked(hn_softc_t *sc); static void hn_ifinit(void *xsc); static int hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); -static void hn_start_locked(struct ifnet *ifp); +static int hn_start_locked(struct ifnet *ifp, int len); static void hn_start(struct ifnet *ifp); +static void hn_start_txeof(struct ifnet *ifp); static int hn_ifmedia_upd(struct ifnet *ifp); static void hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); #ifdef HN_LRO_HIWAT @@ -237,6 +245,8 @@ static int hn_tx_chimney_size_sysctl(SYS static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *sc); static void hn_destroy_tx_ring(struct hn_softc *sc); +static void hn_start_taskfunc(void *xsc, int pending); +static void hn_txeof_taskfunc(void *xsc, int pending); static __inline void hn_set_lro_hiwat(struct hn_softc *sc, int hiwat) @@ -384,6 +394,14 @@ netvsc_attach(device_t dev) sc->hn_dev = dev; sc->hn_lro_hiwat = HN_LRO_HIWAT_DEF; sc->hn_trust_hosttcp = hn_trust_hosttcp; + sc->hn_direct_tx_size = hn_direct_tx_size; + + sc->hn_tx_taskq = taskqueue_create_fast("hn_tx", M_WAITOK, + taskqueue_thread_enqueue, &sc->hn_tx_taskq); + taskqueue_start_threads(&sc->hn_tx_taskq, 1, PI_NET, "%s tx", + device_get_nameunit(dev)); + TASK_INIT(&sc->
svn commit: r294789 - head/sys/arm/arm
Author: skra Date: Tue Jan 26 09:50:23 2016 New Revision: 294789 URL: https://svnweb.freebsd.org/changeset/base/294789 Log: Make code more compact and readable better in pmap_extract() like functions. No functional change. This is a follow up to r294722. Suggested by: kib Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap-v6.c == --- head/sys/arm/arm/pmap-v6.c Tue Jan 26 09:42:13 2016(r294788) +++ head/sys/arm/arm/pmap-v6.c Tue Jan 26 09:50:23 2016(r294789) @@ -3446,14 +3446,10 @@ pmap_extract_locked(pmap_t pmap, vm_offs pte = ptep[l2pte_index(va)]; if (pte == 0) return (0); - switch (pte & L2_TYPE_MASK) { - case L2_TYPE_L: + if ((pte & L2_TYPE_MASK) == L2_TYPE_L) pa = (pte & L2_L_FRAME) | (va & L2_L_OFFSET); - break; - default: + else pa = (pte & L2_S_FRAME) | (va & L2_S_OFFSET); - break; - } } return (pa); } @@ -3515,20 +3511,15 @@ retry: PMAP_UNLOCK(pmap); return (NULL); } else { - switch (pte & L2_TYPE_MASK) { - case L2_TYPE_L: + if ((pte & L2_TYPE_MASK) == L2_TYPE_L) panic("extract and hold section mapping"); - break; - default: + else pa = (pte & L2_S_FRAME) | (va & L2_S_OFFSET); - break; - } if (vm_page_pa_tryrelock(pmap, pa & PG_FRAME, &paddr)) goto retry; m = PHYS_TO_VM_PAGE(pa); vm_page_hold(m); } - } PMAP_UNLOCK(pmap); @@ -3567,14 +3558,10 @@ pmap_dump_kextract(vm_offset_t va, pt2_e pa = 0; goto out; } - switch (pte & L2_TYPE_MASK) { - case L2_TYPE_L: + if ((pte & L2_TYPE_MASK) == L2_TYPE_L) pa = (pte & L2_L_FRAME) | (va & L2_L_OFFSET); - break; - default: + else pa = (pte & L2_S_FRAME) | (va & L2_S_OFFSET); - break; - } } out: if (pte2p != NULL) Modified: head/sys/arm/arm/pmap.c == --- head/sys/arm/arm/pmap.c Tue Jan 26 09:42:13 2016(r294788) +++ head/sys/arm/arm/pmap.c Tue Jan 26 09:50:23 2016(r294789) @@ -2787,18 +2787,14 @@ pmap_kremove(vm_offset_t va) pte = &l2b->l2b_kva[l2pte_index(va)]; opte = *pte; if (l2pte_valid(opte)) { - /* pa = vtophs(va) taken from pmap_extract() */ - switch (opte & L2_TYPE_MASK) { - case L2_TYPE_L: + /* pa = vtophs(va) taken from pmap_extract() */ + if ((opte & L2_TYPE_MASK) == L2_TYPE_L) pa = (opte & L2_L_FRAME) | (va & L2_L_OFFSET); - break; - default: + else pa = (opte & L2_S_FRAME) | (va & L2_S_OFFSET); - break; - } - /* note: should never have to remove an allocation -* before the pvzone is initialized. -*/ + /* note: should never have to remove an allocation +* before the pvzone is initialized. +*/ rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap_kernel()); if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa)) && @@ -3645,14 +3641,10 @@ pmap_extract_locked(pmap_t pmap, vm_offs pte = ptep[l2pte_index(va)]; if (pte == 0) return (0); - switch (pte & L2_TYPE_MASK) { - case L2_TYPE_L: + if ((pte & L2_TYPE_MASK) == L2_TYPE_L) pa = (pte & L2_L_FRAME) | (va & L2_L_OFFSET); - break; - default: + else pa = (pte & L2_S_FRAME) | (va & L2_S_OFFSET); - break; - } } return (pa); } @@ -3717,15 +3709,10 @@ retry: return (NULL); } if (pte & L2_S_PROT_W || (prot & VM_PROT_WRITE) == 0) { - switch (pte & L2_TYPE_MASK) { - case L2_TYPE_L: +
svn commit: r294791 - head/sys/arm/arm
Author: skra Date: Tue Jan 26 10:24:18 2016 New Revision: 294791 URL: https://svnweb.freebsd.org/changeset/base/294791 Log: Don't do icache sync on kernel memory and keep in line with comment in elf_cpu_load_file(). The only time when the sync is needed is after kernel module is loaded and the relocation info is processed. And it's done in elf_cpu_load_file(). Modified: head/sys/arm/arm/pmap-v6-new.c Modified: head/sys/arm/arm/pmap-v6-new.c == --- head/sys/arm/arm/pmap-v6-new.c Tue Jan 26 09:50:36 2016 (r294790) +++ head/sys/arm/arm/pmap-v6-new.c Tue Jan 26 10:24:18 2016 (r294791) @@ -3799,14 +3799,19 @@ validate: * is set. Do it now, before the mapping is stored and made * valid for hardware table walk. If done later, there is a race * for other threads of current process in lazy loading case. +* Don't do it for kernel memory which is mapped with exec +* permission even if the memory isn't going to hold executable +* code. The only time when icache sync is needed is after +* kernel module is loaded and the relocation info is processed. +* And it's done in elf_cpu_load_file(). * * QQQ: (1) Does it exist any better way where * or how to sync icache? * (2) Now, we do it on a page basis. */ - if ((prot & VM_PROT_EXECUTE) && - (m->md.pat_mode == PTE2_ATTR_WB_WA) && - ((opa != pa) || (opte2 & PTE2_NX))) + if ((prot & VM_PROT_EXECUTE) && pmap != kernel_pmap && + m->md.pat_mode == PTE2_ATTR_WB_WA && + (opa != pa || (opte2 & PTE2_NX))) cache_icache_sync_fresh(va, pa, PAGE_SIZE); npte2 |= PTE2_A; @@ -4405,7 +4410,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ l2prot |= PTE2_U | PTE2_NG; if ((prot & VM_PROT_EXECUTE) == 0) l2prot |= PTE2_NX; - else if (m->md.pat_mode == PTE2_ATTR_WB_WA) { + else if (m->md.pat_mode == PTE2_ATTR_WB_WA && pmap != kernel_pmap) { /* * Sync icache if exec permission and attribute PTE2_ATTR_WB_WA * is set. QQQ: For more info, see comments in pmap_enter(). @@ -4476,7 +4481,7 @@ pmap_enter_pte1(pmap_t pmap, vm_offset_t l1prot |= PTE1_U | PTE1_NG; if ((prot & VM_PROT_EXECUTE) == 0) l1prot |= PTE1_NX; - else if (m->md.pat_mode == PTE2_ATTR_WB_WA) { + else if (m->md.pat_mode == PTE2_ATTR_WB_WA && pmap != kernel_pmap) { /* * Sync icache if exec permission and attribute PTE2_ATTR_WB_WA * is set. QQQ: For more info, see comments in pmap_enter(). ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294767 - head/sys/boot/efi/loader
No plan to MFC these changes? On 26/01/2016 06:26, Warner Losh wrote: Author: imp Date: Tue Jan 26 06:26:46 2016 New Revision: 294767 URL: https://svnweb.freebsd.org/changeset/base/294767 Log: Parse the command line arguments, and do it before we initialize the console so it can be changed by the command line arguments. Differential Revision: https://reviews.freebsd.org/D5038 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c == --- head/sys/boot/efi/loader/main.c Tue Jan 26 06:26:44 2016 (r294766) +++ head/sys/boot/efi/loader/main.c Tue Jan 26 06:26:46 2016 (r294767) @@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -83,13 +85,22 @@ print_str16(const CHAR16 *str) printf("%c", (char)str[i]); } +static void +cp16to8(const CHAR16 *src, char *dst, size_t len) +{ + size_t i; + + for (i = 0; i < len && src[i]; i++) + dst[i] = (char)src[i]; +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { char var[128]; EFI_LOADED_IMAGE *img; EFI_GUID *guid; - int i, j, vargood, unit; + int i, j, vargood, unit, howto; struct devsw *dev; uint64_t pool_guid; UINTN k; @@ -113,27 +124,97 @@ main(int argc, CHAR16 *argv[]) cons_probe(); /* +* Parse the args to set the console settings, etc +* boot1.efi passes these in, if it can read /boot.config or /boot/config +* or iPXE may be setup to pass these in. +* * Loop through the args, and for each one that contains an '=' that is * not the first character, add it to the environment. This allows * loader and kernel env vars to be passed on the command line. Convert * args from UCS-2 to ASCII (16 to 8 bit) as they are copied. */ + howto = 0; for (i = 1; i < argc; i++) { - vargood = 0; - for (j = 0; argv[i][j] != 0; j++) { - if (j == sizeof(var)) { - vargood = 0; - break; + if (argv[i][0] == '-') { + for (j = 1; argv[i][j] != 0; j++) { + int ch; + + ch = argv[i][j]; + switch (ch) { + case 'a': + howto |= RB_ASKNAME; + break; + case 'd': + howto |= RB_KDB; + break; + case 'D': + howto |= RB_MULTIPLE; + break; + case 'm': + howto |= RB_MUTE; + break; + case 'h': + howto |= RB_SERIAL; + break; + case 'p': + howto |= RB_PAUSE; + break; + case 'r': + howto |= RB_DFLTROOT; + break; + case 's': + howto |= RB_SINGLE; + break; + case 'S': + if (argv[i][j + 1] == 0) { + if (i + 1 == argc) { + setenv("comconsole_speed", "115200", 1); + } else { + cp16to8(&argv[i + 1][0], var, + sizeof(var)); + setenv("comconsole_speedspeed", var, 1); + } + i++; + break; + } else { + cp16to8(&argv[i][j + 1], var, + sizeof(var)); + setenv("comconsole_speed", var, 1); + break; + } + case 'v': + howto |= RB_VERBOSE; + break; +
svn commit: r294792 - head/sys/kern
Author: trasz Date: Tue Jan 26 11:28:55 2016 New Revision: 294792 URL: https://svnweb.freebsd.org/changeset/base/294792 Log: Fix the way RCTL handles rules' rrl_exceeded on credenials change. Because of what this variable does, it was probably harmless - but still incorrect. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_rctl.c == --- head/sys/kern/kern_rctl.c Tue Jan 26 10:24:18 2016(r294791) +++ head/sys/kern/kern_rctl.c Tue Jan 26 11:28:55 2016(r294792) @@ -1745,6 +1745,7 @@ again: for (i = 0; i < rulecnt; i++) { newlink = uma_zalloc(rctl_rule_link_zone, M_WAITOK); newlink->rrl_rule = NULL; + newlink->rrl_exceeded = 0; LIST_INSERT_HEAD(&newrules, newlink, rrl_next); } @@ -1761,6 +1762,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1771,6 +1773,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1780,6 +1783,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1789,6 +1793,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294778 - in head: lib/libc/sys sys/kern
On Tue, 26 Jan 2016, Kubilay Kocak wrote: Log: Restore flushing of output for revoke(2) again. Document revoke()'s intended behaviour in its man page. Simplify tty_drain() to match. Don't call ttydevsw methods in tty_flush() if the device is gone since we now sometimes call it then. ... This was first broken then fixed in 1995. I changed only the tty ... Seems like This was next broken in 1997 then fixed in 1998. Importing Lite2 made ... A fantastic This was next broken in 2008 by replacing everything in tty.c and not ... Regression test candidate :) It is now possible to fix this better using the new FREVOKE flag. Regression tests for devices are difficult to write and more difficult to run. Simpler for ttys than for networking or disks, but you still need at least 2 generic tty ports just to test things that are not very related to hardware. Bugs in flushing and draining are sometimes obvious by observing if echo 123 >/dev/ttyXx works when it should fail or fails when it should work. For more arcane bugs, I use the old NIST POSIX test suite. This is badly written and hard to use and not very complete, but it finds about 30 regressions between FreeBSD-5 and FreeBSD-9. 30 over-counts for error cascades but undercounts for blocking and some other timing bugs, and of course strict POSIX tests don't get near FreeBSD features like revoke() or bidrectional devices. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294794 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:28:53 2016 New Revision: 294794 URL: https://svnweb.freebsd.org/changeset/base/294794 Log: MFV r294793: 6367 spa_config_tryenter incorrectly handles the multiple-lock case Reviewed by: Alek Pinchuk Reviewed by: Josef 'Jeff' Sipek Reviewed by: Prashanth Sreenivasa Reviewed by: Matthew Ahrens Reviewed by: Dan McDonald Reviewed by: Steven Hartland Approved by: Matthew Ahrens illumos/illumos-gate@e495b6e6735b803e422025a630352ef9bba788c5 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jan 26 12:26:32 2016(r294793) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jan 26 12:28:53 2016(r294794) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. @@ -449,14 +449,16 @@ spa_config_tryenter(spa_t *spa, int lock if (rw == RW_READER) { if (scl->scl_writer || scl->scl_write_wanted) { mutex_exit(&scl->scl_lock); - spa_config_exit(spa, locks ^ (1 << i), tag); + spa_config_exit(spa, locks & ((1 << i) - 1), + tag); return (0); } } else { ASSERT(scl->scl_writer != curthread); if (!refcount_is_zero(&scl->scl_count)) { mutex_exit(&scl->scl_lock); - spa_config_exit(spa, locks ^ (1 << i), tag); + spa_config_exit(spa, locks & ((1 << i) - 1), + tag); return (0); } scl->scl_writer = curthread; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294795 - head/sys/dev/ixgbe
Author: smh Date: Tue Jan 26 12:30:17 2016 New Revision: 294795 URL: https://svnweb.freebsd.org/changeset/base/294795 Log: ixgbe sysctl hardware defaults Added hw.ix.flow_control which enables the default flow_control of all ix interfaces to be set in loader.conf. Added hw.ix.advertise_speed which enables the default advertised_speed of all ix interfaces to be set in loader.conf. Made enable_aim device independent based on hw.ix.enable_aim default. Reviewed by: erj MFC after:1 week Sponsored by: Multiplay Differential Revision:https://reviews.freebsd.org/D5060 Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/if_ix.c == --- head/sys/dev/ixgbe/if_ix.c Tue Jan 26 12:28:53 2016(r294794) +++ head/sys/dev/ixgbe/if_ix.c Tue Jan 26 12:30:17 2016(r294795) @@ -166,12 +166,14 @@ static void ixgbe_unregister_vlan(void * static voidixgbe_add_device_sysctls(struct adapter *); static void ixgbe_add_hw_stats(struct adapter *); +static int ixgbe_set_flowcntl(struct adapter *, int); +static int ixgbe_set_advertise(struct adapter *, int); /* Sysctl handlers */ static voidixgbe_set_sysctl_value(struct adapter *, const char *, const char *, int *, int); -static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); -static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_thermal_test(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_phy_temp(SYSCTL_HANDLER_ARGS); @@ -290,6 +292,16 @@ SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_ "Maximum number of sent packets to process at a time," "-1 means unlimited"); +/* Flow control setting, default to full */ +static int ixgbe_flow_control = ixgbe_fc_full; +SYSCTL_INT(_hw_ix, OID_AUTO, flow_control, CTLFLAG_RDTUN, +&ixgbe_flow_control, 0, "Default flow control used for all adapters"); + +/* Advertise Speed, default to 0 (auto) */ +static int ixgbe_advertise_speed = 0; +SYSCTL_INT(_hw_ix, OID_AUTO, advertise_speed, CTLFLAG_RDTUN, +&ixgbe_advertise_speed, 0, "Default advertised speed for all adapters"); + /* ** Smart speed setting, default to on ** this only works as a compile option @@ -568,6 +580,11 @@ ixgbe_attach(device_t dev) break; } + /* hw.ix defaults init */ + ixgbe_set_advertise(adapter, ixgbe_advertise_speed); + ixgbe_set_flowcntl(adapter, ixgbe_flow_control); + adapter->enable_aim = ixgbe_enable_aim; + if ((adapter->msix > 1) && (ixgbe_enable_msix)) error = ixgbe_allocate_msix(adapter); else @@ -1553,7 +1570,7 @@ ixgbe_msix_que(void *arg) /* Do AIM now? */ - if (ixgbe_enable_aim == FALSE) + if (adapter->enable_aim == FALSE) goto no_calc; /* ** Do Adaptive Interrupt Moderation: @@ -4276,7 +4293,7 @@ ixgbe_add_device_sysctls(struct adapter /* Sysctls for all devices */ SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, - ixgbe_set_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); + ixgbe_sysctl_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "enable_aim", CTLFLAG_RW, @@ -4284,7 +4301,7 @@ ixgbe_add_device_sysctls(struct adapter SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, - ixgbe_set_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); + ixgbe_sysctl_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "thermal_test", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, @@ -4649,41 +4666,51 @@ ixgbe_set_sysctl_value(struct adapter *a ** 3 - full */ static int -ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS) +ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS) { - int error, last; - struct adapter *adapter = (struct adapter *) arg1; + int error, fc; + struct adapter *adapter; + + adapter = (struct adapter *) arg1; + fc = adapter->fc; - last = adapter->fc; - error = sysctl_handle_int(oidp, &adapter->fc, 0, req); + error = sysctl_handle_int(oidp, &fc, 0, req); if ((error) || (req->newptr == NULL)) return (error); /* Don't bother if it's not changed */ - if (adapter->fc == last) + if (adapter->fc == fc) return (0); - switch (adapter->fc) { - case ixgbe_fc_rx_pause: - case ixgbe_fc_tx_pause: - c
svn commit: r294797 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:33:58 2016 New Revision: 294797 URL: https://svnweb.freebsd.org/changeset/base/294797 Log: MFV r294796: 6319 assertion failed in zio_ddt_write: bp->blk_birth == txg Reviewed by: George Wilson Approved by: Dan McDonald illumos/illumos-gate@b39b744be78c6327db43c1f69d11c2f5909f73cb This is revert of 5693. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jan 26 12:32:46 2016(r294796) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jan 26 12:33:58 2016(r294797) @@ -1217,6 +1217,8 @@ zio_write_bp_init(zio_t *zio) zio->io_pipeline |= ZIO_STAGE_DDT_WRITE; return (ZIO_PIPELINE_CONTINUE); } + zio->io_bp_override = NULL; + BP_ZERO(bp); } if (!BP_IS_HOLE(bp) && bp->blk_birth == zio->io_txg) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294799 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:37:23 2016 New Revision: 294799 URL: https://svnweb.freebsd.org/changeset/base/294799 Log: MFV r294798: 6292 exporting a pool while an async destroy is running can leave entries in the deferred tree Reviewed by: Paul Dagnelie Reviewed by: Matthew Ahrens Reviewed by: Andriy Gapon Reviewed by: Fabian Keil Approved by: Gordon Ross illumos/illumos-gate@a443cc80c742af740aa82130db840f02b4389365 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jan 26 12:36:30 2016(r294798) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue Jan 26 12:37:23 2016(r294799) @@ -1441,10 +1441,23 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * } /* +* Only process scans in sync pass 1. +*/ + if (spa_sync_pass(dp->dp_spa) > 1) + return; + + /* +* If the spa is shutting down, then stop scanning. This will +* ensure that the scan does not dirty any new data during the +* shutdown phase. +*/ + if (spa_shutting_down(spa)) + return; + + /* * If the scan is inactive due to a stalled async destroy, try again. */ - if ((!scn->scn_async_stalled && !dsl_scan_active(scn)) || - spa_sync_pass(dp->dp_spa) > 1) + if (!scn->scn_async_stalled && !dsl_scan_active(scn)) return; scn->scn_visited_this_txg = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294801 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:44:49 2016 New Revision: 294801 URL: https://svnweb.freebsd.org/changeset/base/294801 Log: MFV r294800: 6385 Fix unlocking order in zfs_zget Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Reviewed by: Andriy Gapon Approved by: Robert Mustacchi Author: Richard Yao illumos/illumos-gate@eaef6a96de3f6afbbccc69bd7a0aed4463689d0a Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Jan 26 12:39:07 2016(r294800) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Jan 26 12:44:49 2016(r294801) @@ -1175,13 +1175,13 @@ again: *zpp = zp; err = 0; } - sa_buf_rele(db, NULL); /* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */ if (err == 0) VN_HOLD(vp); mutex_exit(&zp->z_lock); + sa_buf_rele(db, NULL); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); if (err == 0) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294803 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:48:10 2016 New Revision: 294803 URL: https://svnweb.freebsd.org/changeset/base/294803 Log: MFV r294802: 6334 Cannot unlink files when over quota Reviewed by: Matthew Ahrens Reviewed by: Toomas Soome Approved by: Dan McDonald Author: Simon Klinkert illumos/illumos-gate@6575bca01367958c7237253d88e5fa9ef0b1650a Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jan 26 12:47:33 2016(r294802) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jan 26 12:48:10 2016(r294803) @@ -2009,12 +2009,9 @@ top: dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL); /* -* Mark this transaction as typically resulting in a net free of -* space, unless object removal will be delayed indefinitely -* (due to active holds on the vnode due to the file being open). +* Mark this transaction as typically resulting in a net free of space */ - if (may_delete_now) - dmu_tx_mark_netfree(tx); + dmu_tx_mark_netfree(tx); error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT); if (error) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294805 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:50:14 2016 New Revision: 294805 URL: https://svnweb.freebsd.org/changeset/base/294805 Log: MFV r294804: 6386 Fix function call with uninitialized value in vdev_inuse Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Richard Yao illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.cTue Jan 26 12:49:31 2016(r294804) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.cTue Jan 26 12:50:14 2016(r294805) @@ -602,7 +602,8 @@ vdev_inuse(vdev_t *vd, uint64_t crtxg, v * read-only. Instead we look to see if the pools is marked * read-only in the namespace and set the state to active. */ - if ((spa = spa_by_guid(pool_guid, device_guid)) != NULL && + if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && + (spa = spa_by_guid(pool_guid, device_guid)) != NULL && spa_mode(spa) == FREAD) state = POOL_STATE_ACTIVE; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294807 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:52:16 2016 New Revision: 294807 URL: https://svnweb.freebsd.org/changeset/base/294807 Log: MFV r294806: 6388 Failure of userland copy should return EFAULT Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Richard Yao illumos/illumos-gate@c71c00bbe8a9cdc7e3f4048b751f48e80441d506 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jan 26 12:51:41 2016(r294806) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jan 26 12:52:16 2016(r294807) @@ -1339,7 +1339,7 @@ get_nvlist(uint64_t nvl, uint64_t size, if ((error = ddi_copyin((void *)(uintptr_t)nvl, packed, size, iflag)) != 0) { kmem_free(packed, size); - return (error); + return (SET_ERROR(EFAULT)); } if ((error = nvlist_unpack(packed, size, &list, 0)) != 0) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294809 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 12:54:03 2016 New Revision: 294809 URL: https://svnweb.freebsd.org/changeset/base/294809 Log: MFV r294808: 6421 Add missing multilist_destroy calls to arc_fini Reviewed by: Dan Kimmel Reviewed by: Matthew Ahrens Reviewed by: Jorgen Lundman Approved by: Robert Mustacchi Author: Prakash Surya illumos/illumos-gate@57deb2328260c447bf1db25fe74e0eece102733e Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 26 12:53:23 2016(r294808) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 26 12:54:03 2016(r294809) @@ -5567,10 +5567,12 @@ arc_fini(void) multilist_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA]); multilist_destroy(&arc_mfu->arcs_list[ARC_BUFC_METADATA]); multilist_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA]); + multilist_destroy(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA]); multilist_destroy(&arc_mru->arcs_list[ARC_BUFC_DATA]); multilist_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA]); multilist_destroy(&arc_mfu->arcs_list[ARC_BUFC_DATA]); multilist_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]); + multilist_destroy(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]); buf_fini(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294811 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Tue Jan 26 12:58:58 2016 New Revision: 294811 URL: https://svnweb.freebsd.org/changeset/base/294811 Log: MFV r294810: 6414 vdev_config_sync could be simpler Reviewed by: George Wilson Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Will Andrews illumos/illumos-gate@eb5bb58421f46cee79155a55688e6c675e7dd361 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jan 26 12:55:43 2016(r294810) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jan 26 12:58:58 2016(r294811) @@ -6768,16 +6768,10 @@ spa_sync(spa_t *spa, uint64_t txg) if (svdcount == SPA_DVAS_PER_BP) break; } - error = vdev_config_sync(svd, svdcount, txg, B_FALSE); - if (error != 0) - error = vdev_config_sync(svd, svdcount, txg, - B_TRUE); + error = vdev_config_sync(svd, svdcount, txg); } else { error = vdev_config_sync(rvd->vdev_child, - rvd->vdev_children, txg, B_FALSE); - if (error != 0) - error = vdev_config_sync(rvd->vdev_child, - rvd->vdev_children, txg, B_TRUE); + rvd->vdev_children, txg); } if (error == 0) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Tue Jan 26 12:55:43 2016(r294810) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Tue Jan 26 12:58:58 2016(r294811) @@ -127,8 +127,7 @@ extern void vdev_queue_register_lastoffs extern void vdev_config_dirty(vdev_t *vd); extern void vdev_config_clean(vdev_t *vd); -extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg, -boolean_t); +extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg); extern void vdev_state_dirty(vdev_t *vd); extern void vdev_state_clean(vdev_t *vd); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.cTue Jan 26 12:55:43 2016(r294810) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.cTue Jan 26 12:58:58 2016(r294811) @@ -1194,15 +1194,16 @@ vdev_label_sync_list(spa_t *spa, int l, * at any time, you can just call it again, and it will resume its work. */ int -vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg, boolean_t tryhard) +vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg) { spa_t *spa = svd[0]->vdev_spa; uberblock_t *ub = &spa->spa_uberblock; vdev_t *vd; zio_t *zio; - int error; + int error = 0; int flags = ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_CANFAIL; +retry: /* * Normally, we don't want to try too hard to write every label and * uberblock. If there is a flaky disk, we don't want the rest of the @@ -1210,8 +1211,11 @@ vdev_config_sync(vdev_t **svd, int svdco * single label out, we should retry with ZIO_FLAG_TRYHARD before * bailing out and declaring the pool faulted. */ - if (tryhard) + if (error != 0) { + if ((flags & ZIO_FLAG_TRYHARD) != 0) + return (error); flags |= ZIO_FLAG_TRYHARD; + } ASSERT(ub->ub_txg <= txg); @@ -1255,7 +1259,7 @@ vdev_config_sync(vdev_t **svd, int svdco * are committed to stable storage before the uberblock update. */ if ((error = vdev_label_sync_list(spa, 0, txg, flags)) != 0) - return (error); + goto retry; /* * Sync the uberblocks to all vdevs in svd[]. @@ -1273,7 +1277,7 @@ vdev_config_sync(vdev_t **svd, int svdco * to the new uberblocks. */ if ((error = vdev_uberblock_sync_list(svd, svdcount, ub, flags)) != 0) - return (error); + goto retry; /* * Sync out odd labels for every dirty vdev. If the system dies @@ -1286,7 +1290,7 @@ vdev_config_sync(vdev_t **svd, in
svn commit: r294813 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 13:03:01 2016 New Revision: 294813 URL: https://svnweb.freebsd.org/changeset/base/294813 Log: MFV r294812: 6434 sa_find_sizes() may compute wrong SA header size Reviewed-by: Ned Bass Reviewed-by: Brian Behlendorf Reviewed by: Andriy Gapon Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: James Pan illumos/illumos-gate@3502ed6e7cb3f3d2e781960ab8fe465fdc884834 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.cTue Jan 26 13:02:16 2016(r294812) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.cTue Jan 26 13:03:01 2016(r294813) @@ -547,10 +547,9 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ { int var_size = 0; int i; - int j = -1; int full_space; int hdrsize; - boolean_t done = B_FALSE; + int extra_hdrsize; if (buftype == SA_BONUS && sa->sa_force_spill) { *total = 0; @@ -561,10 +560,9 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ *index = -1; *total = 0; + *will_spill = B_FALSE; - if (buftype == SA_BONUS) - *will_spill = B_FALSE; - + extra_hdrsize = 0; hdrsize = (SA_BONUSTYPE_FROM_DB(db) == DMU_OT_ZNODE) ? 0 : sizeof (sa_hdr_phys_t); @@ -576,8 +574,8 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ *total = P2ROUNDUP(*total, 8); *total += attr_desc[i].sa_length; - if (done) - goto next; + if (*will_spill) + continue; is_var_sz = (SA_REGISTERED_LEN(sa, attr_desc[i].sa_attr) == 0); if (is_var_sz) { @@ -585,21 +583,28 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ } if (is_var_sz && var_size > 1) { - if (P2ROUNDUP(hdrsize + sizeof (uint16_t), 8) + + /* +* Don't worry that the spill block might overflow. +* It will be resized if needed in sa_build_layouts(). +*/ + if (buftype == SA_SPILL || + P2ROUNDUP(hdrsize + sizeof (uint16_t), 8) + *total < full_space) { /* * Account for header space used by array of * optional sizes of variable-length attributes. -* Record the index in case this increase needs -* to be reversed due to spill-over. +* Record the extra header size in case this +* increase needs to be reversed due to +* spill-over. */ hdrsize += sizeof (uint16_t); - j = i; + if (*index != -1) + extra_hdrsize += sizeof (uint16_t); } else { - done = B_TRUE; - *index = i; - if (buftype == SA_BONUS) - *will_spill = B_TRUE; + ASSERT(buftype == SA_BONUS); + if (*index == -1) + *index = i; + *will_spill = B_TRUE; continue; } } @@ -614,22 +619,15 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ (*total + P2ROUNDUP(hdrsize, 8)) > (full_space - sizeof (blkptr_t))) { *index = i; - done = B_TRUE; } -next: if ((*total + P2ROUNDUP(hdrsize, 8)) > full_space && buftype == SA_BONUS) *will_spill = B_TRUE; } - /* -* j holds the index of the last variable-sized attribute for -* which hdrsize was increased. Reverse the increase if that -* attribute will be relocated to the spill block. -*/ - if (*will_spill && j == *index) - hdrsize -= sizeof (uint16_t); + if (*will_spill) + hdrsize -= extra_hdrsize; hdrsize = P2ROUNDUP(hdrsize, 8); return (hdrsize); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any
svn commit: r294815 - in head: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: mav Date: Tue Jan 26 13:14:39 2016 New Revision: 294815 URL: https://svnweb.freebsd.org/changeset/base/294815 Log: MFV r294814: 6393 zfs receive a full send as a clone Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Richard Elling Approved by: Dan McDonald Author: Paul Dagnelie illumos/illumos-gate@68ecb2ec930c4b0f00acaf8e0abb2b19c4b8b76f This allows to do a full (non-incremental send) and receive it as a clone of an existing dataset. It can leverage nopwrite to share blocks with the origin. This can be used to change the relationship of datasets on the target. For example, maybe on the source you have: A B C And you have sent to the target a full of B, and the incremental B->C: B C You later realize that you want to have A on the target. You will have to do a full send of A, but nopwrite can save you space on the target if you receive it as a clone of B, assuming that A and B have some blocks inxi common: B C \ A Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jan 26 13:09:16 2016 (r294814) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jan 26 13:14:39 2016 (r294815) @@ -2841,8 +2841,11 @@ Do not actually receive the stream. This option to verify the name the receive operation would use. .It Fl o Sy origin Ns = Ns Ar snapshot Forces the stream to be received as a clone of the given snapshot. -This is only valid if the stream is an incremental stream whose source -is the same as the provided origin. +If the stream is a full send stream, this will create the filesystem +described by the stream as a clone of the specified snapshot. Which +snapshot was specified will not affect the success or failure of the +receive, as long as the snapshot does exist. If the stream is an +incremental send stream, all the normal verification will be performed. .It Fl F Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jan 26 13:09:16 2016(r294814) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jan 26 13:14:39 2016(r294815) @@ -158,6 +158,14 @@ dump_record(dmu_sendarg_t *dsp, void *pa return (0); } +/* + * Fill in the drr_free struct, or perform aggregation if the previous record is + * also a free record, and the two are adjacent. + * + * Note that we send free records even for a full send, because we want to be + * able to receive a full send as a clone, which requires a list of all the free + * and freeobject records that were generated on the source. + */ static int dump_free(dmu_sendarg_t *dsp, uint64_t object, uint64_t offset, uint64_t length) @@ -181,15 +189,6 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o (object == dsp->dsa_last_data_object && offset > dsp->dsa_last_data_offset)); - /* -* If we are doing a non-incremental send, then there can't -* be any data in the dataset we're receiving into. Therefore -* a free record would simply be a no-op. Save space by not -* sending it to begin with. -*/ - if (!dsp->dsa_incremental) - return (0); - if (length != -1ULL && offset + length < offset) length = -1ULL; @@ -368,10 +367,6 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin { struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects); - /* See comment in dump_free(). */ - if (!dsp->dsa_incremental) - return (0); - /* * If there is a pending op, but it's not PENDING_FREEOBJECTS, * push it out, since free block aggregation can only be done for @@ -776,6 +771,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, drr->drr_u.drr_begin.drr_toguid = dsl_dataset_phys(to_ds)->ds_guid; if (dsl_dataset_phys(to_ds)->ds_flags & DS_FLAG_CI_DATASET) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CI_DATA; + drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_FREERECORDS; if (ancestor_zb != NULL) { drr->drr_u.drr_begin.drr_fromguid = @@ -799,7 +795,6 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_off
svn commit: r294817 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 13:37:30 2016 New Revision: 294817 URL: https://svnweb.freebsd.org/changeset/base/294817 Log: MFV r294816: 4986 receiving replication stream fails if any snapshot exceeds refquota Reviewed by: John Kennedy Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Dan McDonald illumos/illumos-gate@5878fad70d76d8711f6608c1f80b0447601261c6 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jan 26 13:20:31 2016(r294816) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jan 26 13:37:30 2016(r294817) @@ -26,6 +26,7 @@ * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. */ #include @@ -67,7 +68,7 @@ extern void zfs_setprop_error(libzfs_han static int zfs_receive_impl(libzfs_handle_t *, const char *, const char *, recvflags_t *, int, const char *, nvlist_t *, avl_tree_t *, char **, int, -uint64_t *); +uint64_t *, const char *); static int guid_to_name(libzfs_handle_t *, const char *, uint64_t, boolean_t, char *); @@ -2602,6 +2603,7 @@ zfs_receive_package(libzfs_handle_t *hdl nvlist_t *stream_nv = NULL; avl_tree_t *stream_avl = NULL; char *fromsnap = NULL; + char *sendsnap = NULL; char *cp; char tofs[ZFS_MAXNAMELEN]; char sendfs[ZFS_MAXNAMELEN]; @@ -2750,8 +2752,16 @@ zfs_receive_package(libzfs_handle_t *hdl */ (void) strlcpy(sendfs, drr->drr_u.drr_begin.drr_toname, ZFS_MAXNAMELEN); - if ((cp = strchr(sendfs, '@')) != NULL) + if ((cp = strchr(sendfs, '@')) != NULL) { *cp = '\0'; + /* +* Find the "sendsnap", the final snapshot in a replication +* stream. zfs_receive_one() handles certain errors +* differently, depending on if the contained stream is the +* last one or not. +*/ + sendsnap = (cp + 1); + } /* Finally, receive each contained stream */ do { @@ -2764,7 +2774,7 @@ zfs_receive_package(libzfs_handle_t *hdl */ error = zfs_receive_impl(hdl, destname, NULL, flags, fd, sendfs, stream_nv, stream_avl, top_zfs, cleanup_fd, - action_handlep); + action_handlep, sendsnap); if (error == ENODATA) { error = 0; break; @@ -2930,7 +2940,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in const char *originsnap, recvflags_t *flags, dmu_replay_record_t *drr, dmu_replay_record_t *drr_noswap, const char *sendfs, nvlist_t *stream_nv, avl_tree_t *stream_avl, char **top_zfs, int cleanup_fd, -uint64_t *action_handlep) +uint64_t *action_handlep, const char *finalsnap) { zfs_cmd_t zc = { 0 }; time_t begin_time; @@ -2947,6 +2957,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in nvlist_t *snapprops_nvlist = NULL; zprop_errflags_t prop_errflags; boolean_t recursive; + char *snapname = NULL; begin_time = time(NULL); @@ -2957,7 +2968,6 @@ zfs_receive_one(libzfs_handle_t *hdl, in ENOENT); if (stream_avl != NULL) { - char *snapname; nvlist_t *fs = fsavl_find(stream_avl, drrb->drr_toguid, &snapname); nvlist_t *props; @@ -3313,7 +3323,21 @@ zfs_receive_one(libzfs_handle_t *hdl, in ZPROP_N_MORE_ERRORS) == 0) { trunc_prop_errs(intval); break; - } else { + } else if (snapname == NULL || finalsnap == NULL || + strcmp(finalsnap, snapname) == 0 || + strcmp(nvpair_name(prop_err), + zfs_prop_to_name(ZFS_PROP_REFQUOTA)) != 0) { + /* +* Skip the special case of, for example, +* "refquota", errors on intermediate +* snapshots leading up to a final one. +* That's why we have all of the checks above. +* +
svn commit: r294820 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Jan 26 13:45:41 2016 New Revision: 294820 URL: https://svnweb.freebsd.org/changeset/base/294820 Log: MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp Reviewed by: George Wilson Reviewed by: Matthew Ahrens Approved by: Albert Lee Author: Steven Hartland illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cTue Jan 26 13:44:47 2016(r294819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cTue Jan 26 13:45:41 2016(r294820) @@ -1789,6 +1789,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 * thread suffices. For now, stay single threaded. */ dmu_objset_find_dp_impl(dcp); + mutex_destroy(&err_lock); return (error); } @@ -1800,6 +1801,8 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 INT_MAX, 0); if (tq == NULL) { kmem_free(dcp, sizeof (*dcp)); + mutex_destroy(&err_lock); + return (SET_ERROR(ENOMEM)); } dcp->dc_tq = tq; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294822 - head/sys/arm/arm
Author: skra Date: Tue Jan 26 13:50:44 2016 New Revision: 294822 URL: https://svnweb.freebsd.org/changeset/base/294822 Log: Make pmap_fault() return values vm subsystem compliant to simplify their handling in abort_handler(). While here, remove one extra initialization of pcb variable. Modified: head/sys/arm/arm/pmap-v6-new.c head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/pmap-v6-new.c == --- head/sys/arm/arm/pmap-v6-new.c Tue Jan 26 13:49:46 2016 (r294821) +++ head/sys/arm/arm/pmap-v6-new.c Tue Jan 26 13:50:44 2016 (r294822) @@ -6151,7 +6151,7 @@ pmap_fault(pmap_t pmap, vm_offset_t far, __func__, pmap, pmap->pm_pt1, far); panic("%s: pm_pt1 abort", __func__); } - return (EFAULT); + return (KERN_INVALID_ADDRESS); } if (__predict_false(IN_RANGE2(far, PT2MAP, PT2MAP_SIZE))) { /* @@ -6167,7 +6167,7 @@ pmap_fault(pmap_t pmap, vm_offset_t far, __func__, pmap, PT2MAP, far); panic("%s: PT2MAP abort", __func__); } - return (EFAULT); + return (KERN_INVALID_ADDRESS); } /* @@ -6187,7 +6187,7 @@ pte2_seta: if (!pte2_cmpset(pte2p, pte2, pte2 | PTE2_A)) { goto pte2_seta; } - return (0); + return (KERN_SUCCESS); } } if (idx == FAULT_ACCESS_L1) { @@ -6198,7 +6198,7 @@ pte1_seta: if (!pte1_cmpset(pte1p, pte1, pte1 | PTE1_A)) { goto pte1_seta; } - return (0); + return (KERN_SUCCESS); } } @@ -6222,7 +6222,7 @@ pte2_setrw: goto pte2_setrw; } tlb_flush(trunc_page(far)); - return (0); + return (KERN_SUCCESS); } } if ((fsr & FSR_WNR) && (idx == FAULT_PERM_L1)) { @@ -6235,7 +6235,7 @@ pte1_setrw: goto pte1_setrw; } tlb_flush(pte1_trunc(far)); - return (0); + return (KERN_SUCCESS); } } @@ -6274,7 +6274,7 @@ pte1_setrw: } } #endif - return (EAGAIN); + return (KERN_FAILURE); } /* REMOVE */ Modified: head/sys/arm/arm/trap-v6.c == --- head/sys/arm/arm/trap-v6.c Tue Jan 26 13:49:46 2016(r294821) +++ head/sys/arm/arm/trap-v6.c Tue Jan 26 13:50:44 2016(r294822) @@ -336,14 +336,10 @@ abort_handler(struct trapframe *tf, int #ifdef ARM_NEW_PMAP rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode); - if (rv == 0) { + if (rv == KERN_SUCCESS) return; - } else if (rv == EFAULT) { - - call_trapsignal(td, SIGSEGV, SEGV_MAPERR, far); - userret(td, tf); - return; - } + if (rv == KERN_INVALID_ADDRESS) + goto nogo; #endif /* * Now, when we handled imprecise and debug aborts, the rest of @@ -452,7 +448,6 @@ abort_handler(struct trapframe *tf, int */ /* fusubailout is used by [fs]uswintr to avoid page faulting. */ - pcb = td->td_pcb; if (__predict_false(pcb->pcb_onfault == fusubailout)) { tf->tf_r0 = EFAULT; tf->tf_pc = (register_t)pcb->pcb_onfault; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294823 - head/secure/lib/libcrypto
Author: br Date: Tue Jan 26 14:17:39 2016 New Revision: 294823 URL: https://svnweb.freebsd.org/changeset/base/294823 Log: Add the openssl header for RISC-V. Copied from aarch64 as we can't generate it yet. Added: head/secure/lib/libcrypto/opensslconf-riscv.h (contents, props changed) Added: head/secure/lib/libcrypto/opensslconf-riscv.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/lib/libcrypto/opensslconf-riscv.h Tue Jan 26 14:17:39 2016(r294823) @@ -0,0 +1,254 @@ +/* $FreeBSD$ */ +/* opensslconf.h */ +/* RISCVTODO: generate from opensslconf.h.in by Configure. */ + +#ifdef __cplusplus +extern "C" { +#endif +/* OpenSSL was configured with the following options: */ +#ifndef OPENSSL_DOING_MAKEDEPEND + + +#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +# define OPENSSL_NO_EC_NISTP_64_GCC_128 +#endif +#ifndef OPENSSL_NO_GMP +# define OPENSSL_NO_GMP +#endif +#ifndef OPENSSL_NO_JPAKE +# define OPENSSL_NO_JPAKE +#endif +#ifndef OPENSSL_NO_KRB5 +# define OPENSSL_NO_KRB5 +#endif +#ifndef OPENSSL_NO_LIBUNBOUND +# define OPENSSL_NO_LIBUNBOUND +#endif +#ifndef OPENSSL_NO_MD2 +# define OPENSSL_NO_MD2 +#endif +#ifndef OPENSSL_NO_SCTP +# define OPENSSL_NO_SCTP +#endif +#ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +#endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif +#ifndef OPENSSL_NO_STORE +# define OPENSSL_NO_STORE +#endif +#ifndef OPENSSL_NO_UNIT_TEST +# define OPENSSL_NO_UNIT_TEST +#endif + +#endif /* OPENSSL_DOING_MAKEDEPEND */ + +#ifndef OPENSSL_THREADS +# define OPENSSL_THREADS +#endif +#ifndef OPENSSL_NO_ASM +# define OPENSSL_NO_ASM +#endif +#ifndef OPENSSL_NO_STATIC_ENGINE +# define OPENSSL_NO_STATIC_ENGINE +#endif + +/* The OPENSSL_NO_* macros are also defined as NO_* if the application + asks for it. This is a transient feature that is provided for those + who haven't had the time to do the appropriate changes in their + applications. */ +#ifdef OPENSSL_ALGORITHM_DEFINES +# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128) +# define NO_EC_NISTP_64_GCC_128 +# endif +# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) +# define NO_GMP +# endif +# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) +# define NO_JPAKE +# endif +# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) +# define NO_KRB5 +# endif +# if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND) +# define NO_LIBUNBOUND +# endif +# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) +# define NO_MD2 +# endif +# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) +# define NO_SCTP +# endif +# if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE) +# define NO_SSL_TRACE +# endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif +# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) +# define NO_STORE +# endif +# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST) +# define NO_UNIT_TEST +# endif +#endif + +/* crypto/opensslconf.h.in */ + +/* Generate 80386 code? */ +#undef I386_ONLY + +#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ +#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) +#define ENGINESDIR "/usr/lib/engines" +#define OPENSSLDIR "/etc/ssl" +#endif +#endif + +#undef OPENSSL_UNISTD +#define OPENSSL_UNISTD + +#undef OPENSSL_EXPORT_VAR_AS_FUNCTION + +#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) +#define IDEA_INT unsigned int +#endif + +#if defined(HEADER_MD2_H) && !defined(MD2_INT) +#define MD2_INT unsigned int +#endif + +#if defined(HEADER_RC2_H) && !defined(RC2_INT) +/* I need to put in a mod for the alpha - eay */ +#define RC2_INT unsigned int +#endif + +#if defined(HEADER_RC4_H) +#if !defined(RC4_INT) +/* using int types make the structure larger but make the code faster + * on most boxes I have tested - up to %20 faster. */ +/* + * I don't know what does "most" mean, but declaring "int" is a must on: + * - Intel P6 because partial register stalls are very expensive; + * - elder Alpha because it lacks byte load/store instructions; + */ +#define RC4_INT unsigned int +#endif +#if !defined(RC4_CHUNK) +/* + * This enables code handling data aligned at natural CPU word + * boundary. See crypto/rc4/rc4_enc.c for further details. + */ +#undef RC4_CHUNK +#endif +#endif + +#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) +/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a + * %20 speed up (longs are 8 bytes, int's are 4). */ +#ifndef DES_LONG +#define DES_LONG unsigned int +#endif +#endif + +#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) +#define CONFIG_HEADER_BN_H +#undef BN_LLONG + +/* Should we define BN_DIV2W here? */ + +/* Only one for the following should be defined */ +#define SIXTY_FOUR_BIT_LONG +#undef SIXTY_FOUR_BIT +#undef THIRTY_TWO_BIT +#endif + +#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HE
svn commit: r294824 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:20:25 2016 New Revision: 294824 URL: https://svnweb.freebsd.org/changeset/base/294824 Log: Add more LinuxKPI PCI related functions and defines. Removed comments deriving from Linux. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h == --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jan 26 14:17:39 2016(r294823) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jan 26 14:20:25 2016(r294824) @@ -114,14 +114,29 @@ struct pci_device_id { #definePCI_EXP_TYPE_DOWNSTREAM PCIEM_TYPE_DOWNSTREAM_PORT /* Downstream Port */ #definePCI_EXP_FLAGS_SLOT PCIEM_FLAGS_SLOT/* Slot implemented */ #definePCI_EXP_TYPE_RC_EC PCIEM_TYPE_ROOT_EC /* Root Complex Event Collector */ - +#definePCI_EXP_LNKCAP_SLS_2_5GB 0x01 /* Supported Link Speed 2.5GT/s */ +#definePCI_EXP_LNKCAP_SLS_5_0GB 0x02 /* Supported Link Speed 5.0GT/s */ +#definePCI_EXP_LNKCAP_MLW 0x03f0 /* Maximum Link Width */ +#definePCI_EXP_LNKCAP2_SLS_2_5GB 0x02 /* Supported Link Speed 2.5GT/s */ +#definePCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ +#definePCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ #defineIORESOURCE_MEM SYS_RES_MEMORY #defineIORESOURCE_IO SYS_RES_IOPORT #defineIORESOURCE_IRQ SYS_RES_IRQ -struct pci_dev; +enum pci_bus_speed { + PCI_SPEED_UNKNOWN = -1, + PCIE_SPEED_2_5GT, + PCIE_SPEED_5_0GT, + PCIE_SPEED_8_0GT, +}; + +enum pcie_link_width { + PCIE_LNK_WIDTH_UNKNOWN = -1, +}; +struct pci_dev; struct pci_driver { struct list_headlinks; @@ -351,20 +366,6 @@ pci_find_capability(struct pci_dev *pdev return (reg); } - - - -/** - * pci_pcie_cap - get the saved PCIe capability offset - * @dev: PCI device - * - * PCIe capability offset is calculated at PCI device initialization - * time and saved in the data structure. This function returns saved - * PCIe capability offset. Using this instead of pci_find_capability() - * reduces unnecessary search in the PCI configuration space. If you - * need to calculate PCIe capability offset from raw device for some - * reasons, please use pci_find_capability() instead. - */ static inline int pci_pcie_cap(struct pci_dev *dev) { return pci_find_capability(dev, PCI_CAP_ID_EXP); @@ -505,13 +506,6 @@ static inline void pci_disable_sriov(str { } -/** - * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table - * @_table: device table name - * - * This macro is used to create a struct pci_device_id array (a device table) - * in a generic manner. - */ #define DEFINE_PCI_DEVICE_TABLE(_table) \ const struct pci_device_id _table[] __devinitdata @@ -569,54 +563,31 @@ typedef unsigned int __bitwise pci_chann typedef unsigned int __bitwise pci_ers_result_t; enum pci_channel_state { -/* I/O channel is in normal state */ -pci_channel_io_normal = (__force pci_channel_state_t) 1, - -/* I/O to channel is blocked */ -pci_channel_io_frozen = (__force pci_channel_state_t) 2, - -/* PCI card is dead */ -pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, +pci_channel_io_normal = 1, +pci_channel_io_frozen = 2, +pci_channel_io_perm_failure = 3, }; enum pci_ers_result { -/* no result/none/not supported in device driver */ -PCI_ERS_RESULT_NONE = (__force pci_ers_result_t) 1, - -/* Device driver can recover without slot reset */ -PCI_ERS_RESULT_CAN_RECOVER = (__force pci_ers_result_t) 2, - -/* Device driver wants slot to be reset. */ -PCI_ERS_RESULT_NEED_RESET = (__force pci_ers_result_t) 3, - -/* Device has completely failed, is unrecoverable */ -PCI_ERS_RESULT_DISCONNECT = (__force pci_ers_result_t) 4, - -/* Device driver is fully recovered and operational */ -PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, +PCI_ERS_RESULT_NONE = 1, +PCI_ERS_RESULT_CAN_RECOVER = 2, +PCI_ERS_RESULT_NEED_RESET = 3, +PCI_ERS_RESULT_DISCONNECT = 4, +PCI_ERS_RESULT_RECOVERED = 5, }; /* PCI bus error event callbacks */ struct pci_error_handlers { -/* PCI bus error detected on this device */ pci_ers_result_t (*error_detected)(struct pci_dev *dev, enum pci_channel_state error); - -/* MMIO has been re-enabled, but not DMA */ pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev); - -/* PCI Express link has been reset */ pci_ers_result_t (*link_reset)(struct pci_dev *d
svn commit: r294825 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:21:30 2016 New Revision: 294825 URL: https://svnweb.freebsd.org/changeset/base/294825 Log: Define __get_user() and __put_user() for the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h Modified: head/sys/compat/linuxkpi/common/include/linux/uaccess.h == --- head/sys/compat/linuxkpi/common/include/linux/uaccess.h Tue Jan 26 14:20:25 2016(r294824) +++ head/sys/compat/linuxkpi/common/include/linux/uaccess.h Tue Jan 26 14:21:30 2016(r294825) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * Copyright (c) 2015 François Tigeot * All rights reserved. * @@ -34,6 +34,17 @@ #include +#define__get_user(_x, _p) ({ \ + int __err; \ + __typeof(*(_p)) __x;\ + __err = -copyin((_p), &(__x), sizeof(*(_p))); \ + (_x) = __x; \ + __err; \ +}) +#define__put_user(_x, _p) ({ \ + __typeof(*(_p)) __x = (_x); \ + -copyout(&(__x), (_p), sizeof(*(_p))); \ +}) #defineget_user(_x, _p)-copyin((_p), &(_x), sizeof(*(_p))) #defineput_user(_x, _p)-copyout(&(_x), (_p), sizeof(*(_p))) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294826 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:27:00 2016 New Revision: 294826 URL: https://svnweb.freebsd.org/changeset/base/294826 Log: Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI notifier header file a bit while at it. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/notifier.h Modified: head/sys/compat/linuxkpi/common/include/linux/notifier.h == --- head/sys/compat/linuxkpi/common/include/linux/notifier.hTue Jan 26 14:21:30 2016(r294825) +++ head/sys/compat/linuxkpi/common/include/linux/notifier.hTue Jan 26 14:27:00 2016(r294826) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,26 +34,24 @@ #include #include -/* - * Max number of FreeBSD events to map to Linux events per notify type. - */ #defineNOTIFY_DONE 0 -#define_NOTIFY_COUNT 7 -struct notifier_block { - int (*notifier_call)(struct notifier_block *, unsigned long, void *); - struct notifier_block *next; - int priority; - eventhandler_tagtags[_NOTIFY_COUNT]; +enum { + NETDEV_CHANGE, + NETDEV_UP, + NETDEV_DOWN, + NETDEV_REGISTER, + NETDEV_UNREGISTER, + NETDEV_CHANGEADDR, + NETDEV_CHANGEIFADDR, + LINUX_NOTIFY_TAGS /* must be last */ }; -/* Values must be less than NOTIFY_COUNT */ -#defineNETDEV_UP 0x0001 -#defineNETDEV_DOWN 0x0002 -#defineNETDEV_REGISTER 0x0003 -#defineNETDEV_UNREGISTER 0x0004 -#defineNETDEV_CHANGEADDR 0x0005 -#defineNETDEV_CHANGEIFADDR 0x0006 - +struct notifier_block { + int (*notifier_call) (struct notifier_block *, unsigned long, void *); + struct notifier_block *next; + int priority; + eventhandler_tag tags[LINUX_NOTIFY_TAGS]; +}; -#endif /* _LINUX_NOTIFIER_H_ */ +#endif /* _LINUX_NOTIFIER_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294827 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:29:50 2016 New Revision: 294827 URL: https://svnweb.freebsd.org/changeset/base/294827 Log: Add more network related macros and functions to the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/netdevice.h Modified: head/sys/compat/linuxkpi/common/include/linux/netdevice.h == --- head/sys/compat/linuxkpi/common/include/linux/netdevice.h Tue Jan 26 14:27:00 2016(r294826) +++ head/sys/compat/linuxkpi/common/include/linux/netdevice.h Tue Jan 26 14:29:50 2016(r294827) @@ -58,6 +58,9 @@ extern struct net init_net; #definedev_get_by_index(n, idx)ifnet_byindex_ref((idx)) #definedev_hold(d) if_ref((d)) #definedev_put(d) if_rele((d)) +#definedev_net(d) (&init_net) + +#definenet_eq(a,b) ((a) == (b)) #definenetif_running(dev) !!((dev)->if_drv_flags & IFF_DRV_RUNNING) #definenetif_oper_up(dev) !!((dev)->if_flags & IFF_UP) @@ -69,6 +72,12 @@ netdev_priv(const struct net_device *dev return (dev->if_softc); } +static inline struct net_device * +netdev_notifier_info_to_dev(void *ifp) +{ + return (ifp); +} + intregister_netdevice_notifier(struct notifier_block *); intregister_inetaddr_notifier(struct notifier_block *); intunregister_netdevice_notifier(struct notifier_block *); @@ -94,6 +103,12 @@ dev_mc_delete(struct net_device *dev, vo } static inline int +dev_mc_del(struct net_device *dev, void *addr) +{ + return (dev_mc_delete(dev, addr, 6, 0)); +} + +static inline int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly) { struct sockaddr_dl sdl; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294829 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:31:20 2016 New Revision: 294829 URL: https://svnweb.freebsd.org/changeset/base/294829 Log: Implement bitmap_weight() and bitmap_equal() for the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h == --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Jan 26 14:30:03 2016(r294828) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Jan 26 14:31:20 2016(r294829) @@ -467,10 +467,40 @@ bitmap_release_region(unsigned long *bit __reg_op(bitmap, pos, order, REG_OP_RELEASE); } - #define for_each_set_bit(bit, addr, size) \ for ((bit) = find_first_bit((addr), (size));\ (bit) < (size);\ (bit) = find_next_bit((addr), (size), (bit) + 1)) +static inline unsigned +bitmap_weight(unsigned long *bitmap, unsigned nbits) +{ + unsigned bit; + unsigned retval = 0; + + for_each_set_bit(bit, bitmap, nbits) + retval++; + return (retval); +} + +static inline int +bitmap_equal(const unsigned long *pa, +const unsigned long *pb, unsigned bits) +{ + unsigned x; + unsigned y = bits / BITS_PER_LONG; + + for (x = 0; x != y; x++) { + if (pa[x] != pb[x]) + return (0); + } + + y = bits % BITS_PER_LONG; + if (y != 0) { + if ((pa[x] ^ pb[x]) & BITMAP_LAST_WORD_MASK(y)) + return (0); + } + return (1); +} + #endif /* _LINUX_BITOPS_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294830 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:33:20 2016 New Revision: 294830 URL: https://svnweb.freebsd.org/changeset/base/294830 Log: Implement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/if_vlan.h Modified: head/sys/compat/linuxkpi/common/include/linux/if_vlan.h == --- head/sys/compat/linuxkpi/common/include/linux/if_vlan.h Tue Jan 26 14:31:20 2016(r294829) +++ head/sys/compat/linuxkpi/common/include/linux/if_vlan.h Tue Jan 26 14:33:20 2016(r294830) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,25 @@ #include #include #include +#include #include +#include #define VLAN_N_VID 4096 +static inline int +is_vlan_dev(struct ifnet *ifp) +{ + return (ifp->if_type == IFT_L2VLAN); +} + +static inline uint16_t +vlan_dev_vlan_id(struct ifnet *ifp) +{ + uint16_t vtag; + if (VLAN_TAG(ifp, &vtag) == 0) + return (vtag); + return (0); +} + #endif /* _LINUX_IF_VLAN_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294831 - head/usr.sbin
Author: br Date: Tue Jan 26 14:34:40 2016 New Revision: 294831 URL: https://svnweb.freebsd.org/changeset/base/294831 Log: Remove uathload from build due to issue with GCC 5.2.0: "ld: --relax and -r may not be used together." Requires fixing ld command line arguments and testing. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile == --- head/usr.sbin/Makefile Tue Jan 26 14:33:20 2016(r294830) +++ head/usr.sbin/Makefile Tue Jan 26 14:34:40 2016(r294831) @@ -194,7 +194,9 @@ SUBDIR.${MK_TIMED}+=timed SUBDIR.${MK_TOOLCHAIN}+= config SUBDIR.${MK_TOOLCHAIN}+= crunch SUBDIR.${MK_UNBOUND}+= unbound +.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200) SUBDIR.${MK_USB}+= uathload +.endif SUBDIR.${MK_USB}+= uhsoctl SUBDIR.${MK_USB}+= usbconfig SUBDIR.${MK_USB}+= usbdump ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294832 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jan 26 14:36:16 2016 New Revision: 294832 URL: https://svnweb.freebsd.org/changeset/base/294832 Log: Implement ether_addr_equal(), ether_addr_equal_64bits() and random_ether_addr() for the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h == --- head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Tue Jan 26 14:34:40 2016(r294831) +++ head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Tue Jan 26 14:36:16 2016(r294832) @@ -29,6 +29,9 @@ #include +#include +#include + #defineETH_MODULE_SFF_8079 1 #defineETH_MODULE_SFF_8079_LEN 256 #defineETH_MODULE_SFF_8472 2 @@ -78,4 +81,25 @@ ether_addr_copy(u8 * dst, const u8 * src memcpy(dst, src, 6); } +static inline bool +ether_addr_equal(const u8 *pa, const u8 *pb) +{ + return (memcmp(pa, pb, 6) == 0); +} + +static inline bool +ether_addr_equal_64bits(const u8 *pa, const u8 *pb) +{ + return (memcmp(pa, pb, 6) == 0); +} + +static inline void +random_ether_addr(u8 * dst) +{ + read_random(dst, 6); + + dst[0] &= 0xfe; + dst[0] |= 0x02; +} + #endif /* _LINUX_ETHERDEVICE */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294833 - head/lib/msun/riscv
Author: br Date: Tue Jan 26 14:40:41 2016 New Revision: 294833 URL: https://svnweb.freebsd.org/changeset/base/294833 Log: Add fenv.c for RISC-V. Copied from MIPS. Added: head/lib/msun/riscv/fenv.c (contents, props changed) Added: head/lib/msun/riscv/fenv.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/riscv/fenv.c Tue Jan 26 14:40:41 2016(r294833) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2004 David Schultz + * 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$ + */ + +#define__fenv_static +#include "fenv.h" + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ +const fenv_t __fe_dfl_env = 0; + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294834 - head/gnu/lib/libgcc
Author: br Date: Tue Jan 26 14:45:21 2016 New Revision: 294834 URL: https://svnweb.freebsd.org/changeset/base/294834 Log: Make libgcc compilable on RISC-V. Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileTue Jan 26 14:40:41 2016 (r294833) +++ head/gnu/lib/libgcc/MakefileTue Jan 26 14:45:21 2016 (r294834) @@ -58,8 +58,10 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. -.if ${TARGET_CPUARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" -# These are implemented in an ARM specific file but will not be filtered out +.if ${TARGET_CPUARCH} != "aarch64" && ${TARGET_CPUARCH} != "arm" && \ +${TARGET_CPUARCH} != "riscv64" +# These are implemented in an ARM specific file but will not be filtered out. +# RISCVTODO: can't compile .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di LIB2FUNCS+= _floatdi${mode} _floatundi${mode} @@ -322,7 +324,10 @@ EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/} EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/} EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/} EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN +.if ${TARGET_CPUARCH} != "riscv64" +# RISCVTODO: unwinding support SOBJS+= ${EH_OBJS_S} +.endif .for _src in ${LIB2ADDEHSTATIC:M*.c} ${_src:R:S/$/.o/}: ${_src} ${COMMONHDRS} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294836 - head/sys/kern
Author: kib Date: Tue Jan 26 14:46:39 2016 New Revision: 294836 URL: https://svnweb.freebsd.org/changeset/base/294836 Log: Don't clear the software flow control flag before draining for last close or assert the bug that it is clear when leaving. Remove an unrelated rotted comment that was attached to the buggy clearing. Since draining is not done in more cases, flushing is needed in more cases, so start fixing flushing: - do a full flush in ttydisc_close(). State what POSIX requires more clearly. This was missing ttydevsw_pktnotify() calls to tell the devsw layer to flush. Hardware tty drivers don't actually flush since they don't understand this API. - fix 2 missing wakeups in tty_flush(). Most of the wakeups here are unnecessary for last close. But ttydisc_close() did one of the missing ones. This flow control bug ameliorated the design bug of requiring potentially unbounded waits in draining. Software flow control is the easiest way to get an unbounded wait, and a long wait is sometimes actually useful. Users can type the xoff character on the receiver and (if ixon is set on the sender) expect the output to be held until the user is ready for more. Hardware flow control can also give the unbounded wait, and this bug didn't affect hardware flow control. Unbounded waits from hardware flow control take a more unusual configuration. E.g., a terminal program that controls the modem status lines, or unplugging the cable in a configuration where this doesn't break the connection. The design bug is still ameliorated by a newer bug in draining for last close -- the 1 second timeout. E.g., if the user types the xoff character and the sender reaches last close, then output is not resumed and the wait times out after just 1 second. This is broken, but preferable to an unbounded wait. Before this change, the output was resumed immediately and usually completed. Submitted by: bde MFC after:2 weeks Modified: head/sys/kern/tty.c head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty.c == --- head/sys/kern/tty.c Tue Jan 26 14:45:25 2016(r294835) +++ head/sys/kern/tty.c Tue Jan 26 14:46:39 2016(r294836) @@ -201,7 +201,6 @@ ttydev_leave(struct tty *tp) constty_clear(); /* Drain any output. */ - MPASS((tp->t_flags & TF_STOPPED) == 0); if (!tty_gone(tp)) tty_drain(tp, 1); @@ -352,11 +351,7 @@ ttydev_close(struct cdev *dev, int fflag if (fflag & FREVOKE) tty_flush(tp, FWRITE); - /* -* This can only be called once. The callin and the callout -* devices cannot be opened at the same time. -*/ - tp->t_flags &= ~(TF_EXCLUDE|TF_STOPPED); + tp->t_flags &= ~TF_EXCLUDE; /* Properly wake up threads that are stuck - revoke(). */ tp->t_revokecnt++; @@ -1456,12 +1451,15 @@ tty_flush(struct tty *tp, int flags) tp->t_flags &= ~TF_HIWAT_OUT; ttyoutq_flush(&tp->t_outq); tty_wakeup(tp, FWRITE); - if (!tty_gone(tp)) + if (!tty_gone(tp)) { + ttydevsw_outwakeup(tp); ttydevsw_pktnotify(tp, TIOCPKT_FLUSHWRITE); + } } if (flags & FREAD) { tty_hiwat_in_unblock(tp); ttyinq_flush(&tp->t_inq); + tty_wakeup(tp, FREAD); if (!tty_gone(tp)) { ttydevsw_inwakeup(tp); ttydevsw_pktnotify(tp, TIOCPKT_FLUSHREAD); Modified: head/sys/kern/tty_ttydisc.c == --- head/sys/kern/tty_ttydisc.c Tue Jan 26 14:45:25 2016(r294835) +++ head/sys/kern/tty_ttydisc.c Tue Jan 26 14:46:39 2016(r294836) @@ -94,14 +94,11 @@ ttydisc_close(struct tty *tp) /* Clean up our flags when leaving the discipline. */ tp->t_flags &= ~(TF_STOPPED|TF_HIWAT|TF_ZOMBIE); - /* POSIX states we should flush when close() is called. */ - ttyinq_flush(&tp->t_inq); - ttyoutq_flush(&tp->t_outq); - - if (!tty_gone(tp)) { - ttydevsw_inwakeup(tp); - ttydevsw_outwakeup(tp); - } + /* +* POSIX states that we must drain output and flush input on +* last close. Draining has already been done if possible. +*/ + tty_flush(tp, FREAD | FWRITE); if (ttyhook_hashook(tp, close)) ttyhook_close(tp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294767 - head/sys/boot/efi/loader
Just forgot to add Mac after 1week. But with all the churn here, predicting when may be tough. Warner On January 26, 2016, at 3:29 AM, Steven Hartland wrote: No plan to MFC these changes? On 26/01/2016 06:26, Warner Losh wrote: > Author: imp > Date: Tue Jan 26 06:26:46 2016 > New Revision: 294767 > URL: https://svnweb.freebsd.org/changeset/base/294767 > > Log: >Parse the command line arguments, and do it before we initialize the >console so it can be changed by the command line arguments. > >Differential Revision: https://reviews.freebsd.org/D5038 > > Modified: >head/sys/boot/efi/loader/main.c > > Modified: head/sys/boot/efi/loader/main.c > == > --- head/sys/boot/efi/loader/main.c Tue Jan 26 06:26:44 2016 > (r294766) > +++ head/sys/boot/efi/loader/main.c Tue Jan 26 06:26:46 2016 > (r294767) > @@ -29,6 +29,8 @@ > __FBSDID("$FreeBSD$"); > > #include > +#include > +#include > #include > #include > #include > @@ -83,13 +85,22 @@ print_str16(const CHAR16 *str) > printf("%c", (char)str[i]); > } > > +static void > +cp16to8(const CHAR16 *src, char *dst, size_t len) > +{ > + size_t i; > + > + for (i = 0; i < len && src[i]; i++) > + dst[i] = (char)src[i]; > +} > + > EFI_STATUS > main(int argc, CHAR16 *argv[]) > { > char var[128]; > EFI_LOADED_IMAGE *img; > EFI_GUID *guid; > - int i, j, vargood, unit; > + int i, j, vargood, unit, howto; > struct devsw *dev; > uint64_t pool_guid; > UINTN k; > @@ -113,27 +124,97 @@ main(int argc, CHAR16 *argv[]) > cons_probe(); > > /* > + * Parse the args to set the console settings, etc > + * boot1.efi passes these in, if it can read /boot.config or > /boot/config > + * or iPXE may be setup to pass these in. > + * >* Loop through the args, and for each one that contains an '=' that is >* not the first character, add it to the environment. This allows >* loader and kernel env vars to be passed on the command line. Convert >* args from UCS-2 to ASCII (16 to 8 bit) as they are copied. >*/ > + howto = 0; > for (i = 1; i < argc; i++) { > - vargood = 0; > - for (j = 0; argv[i][j] != 0; j++) { > - if (j == sizeof(var)) { > - vargood = 0; > - break; > + if (argv[i][0] == '-') { > + for (j = 1; argv[i][j] != 0; j++) { > + int ch; > + > + ch = argv[i][j]; > + switch (ch) { > + case 'a': > + howto |= RB_ASKNAME; > + break; > + case 'd': > + howto |= RB_KDB; > + break; > + case 'D': > + howto |= RB_MULTIPLE; > + break; > + case 'm': > + howto |= RB_MUTE; > + break; > + case 'h': > + howto |= RB_SERIAL; > + break; > + case 'p': > + howto |= RB_PAUSE; > + break; > + case 'r': > + howto |= RB_DFLTROOT; > + break; > + case 's': > + howto |= RB_SINGLE; > + break; > + case 'S': > + if (argv[i][j + 1] == 0) { > + if (i + 1 == argc) { > + > setenv("comconsole_speed", "115200", 1); > + } else { > + cp16to8(&argv[i + > 1][0], var, > + sizeof(var)); > + > setenv("comconsole_speedspeed", var, 1); > + } > + i++; > + break; > + } else { > + cp16to8(&argv[i][j + 1], var, > + sizeof(var)); > + setenv("comconsole_speed", var, > 1); > +
svn commit: r294837 - in head/sys: compat/linuxkpi/common/include/linux ofed/drivers/net/mlx4
Author: hselasky Date: Tue Jan 26 15:12:31 2016 New Revision: 294837 URL: https://svnweb.freebsd.org/changeset/base/294837 Log: LinuxKPI list updates: - Add some new hlist macros. - Update existing hlist macros removing the need for a temporary iteration variable. - Properly define the RCU hlist macros to be SMP safe with regard to RCU. - Safe list macro arguments by adding a pair of parentheses. - Prefix the _list_add() and _list_splice() functions with "linux" to reflect they are LinuxKPI internal functions. Obtained from:Linux MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/list.h head/sys/compat/linuxkpi/common/include/linux/rcupdate.h head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/compat/linuxkpi/common/include/linux/list.h == --- head/sys/compat/linuxkpi/common/include/linux/list.hTue Jan 26 14:46:39 2016(r294836) +++ head/sys/compat/linuxkpi/common/include/linux/list.hTue Jan 26 15:12:31 2016(r294837) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -109,7 +109,7 @@ list_replace(struct list_head *old, stru } static inline void -_list_add(struct list_head *new, struct list_head *prev, +linux_list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { @@ -136,47 +136,55 @@ list_del_init(struct list_head *entry) list_entry(((ptr)->member.next), typeof(*(ptr)), member) #definelist_for_each(p, head) \ - for (p = (head)->next; p != (head); p = p->next) + for (p = (head)->next; p != (head); p = (p)->next) #definelist_for_each_safe(p, n, head) \ - for (p = (head)->next, n = p->next; p != (head); p = n, n = p->next) + for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next) #define list_for_each_entry(p, h, field) \ - for (p = list_entry((h)->next, typeof(*p), field); &p->field != (h); \ - p = list_entry(p->field.next, typeof(*p), field)) + for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \ + p = list_entry((p)->field.next, typeof(*p), field)) #define list_for_each_entry_safe(p, n, h, field) \ for (p = list_entry((h)->next, typeof(*p), field), \ - n = list_entry(p->field.next, typeof(*p), field); &p->field != (h);\ + n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ p = n, n = list_entry(n->field.next, typeof(*n), field)) +#definelist_for_each_entry_from(p, h, field) \ + for ( ; &(p)->field != (h); \ + p = list_entry((p)->field.next, typeof(*p), field)) + #definelist_for_each_entry_continue(p, h, field) \ - for (p = list_next_entry((p), field); &p->field != (h); \ + for (p = list_next_entry((p), field); &(p)->field != (h); \ p = list_next_entry((p), field)) #definelist_for_each_entry_safe_from(pos, n, head, member) \ - for (n = list_entry(pos->member.next, typeof(*pos), member); \ -&pos->member != (head); \ + for (n = list_entry((pos)->member.next, typeof(*pos), member); \ +&(pos)->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) #definelist_for_each_entry_reverse(p, h, field) \ - for (p = list_entry((h)->prev, typeof(*p), field); &p->field != (h); \ - p = list_entry(p->field.prev, typeof(*p), field)) + for (p = list_entry((h)->prev, typeof(*p), field); &(p)->field != (h); \ + p = list_entry((p)->field.prev, typeof(*p), field)) + +#definelist_for_each_entry_continue_reverse(p, h, field) \ + for (p = list_entry((p)->field.prev, typeof(*p), field); &(p)->field != (h); \ + p = list_entry((p)->field.prev, typeof(*p), field)) -#definelist_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = p->prev) +#definelist_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev) static inline void list_add(struct list_head *new, struct list_head *head) { - _list_add(new, head, head->next); + linux_list_add(new, head, head->next); } static inline void list_add_tail(struct list
svn commit: r294838 - in head/sys/contrib/alpine-hal: . eth
Author: zbb Date: Tue Jan 26 15:22:04 2016 New Revision: 294838 URL: https://svnweb.freebsd.org/changeset/base/294838 Log: Import Annapurna Labs Alpine HAL for networking Files required for the NIC driver Import from vendor-sys/alpine-hal/2.7 SVN rev.: 294828 HAL version: 2.7 Obtained from: Semihalf Sponsored by: Annapurna Labs Added: head/sys/contrib/alpine-hal/al_hal_iofic.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_serdes.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_serdes.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_serdes_internal_regs.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_serdes_regs.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_config.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_config.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_debug.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_debug.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_iofic.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_iofic.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_iofic_regs.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_main.c (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_regs.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_regs_gen.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_regs_m2s.h (contents, props changed) head/sys/contrib/alpine-hal/al_hal_udma_regs_s2m.h (contents, props changed) head/sys/contrib/alpine-hal/eth/ head/sys/contrib/alpine-hal/eth/al_hal_an_lt_wrapper_regs.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_alu.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_ec_regs.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_kr.c (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_kr.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_mac_regs.h (contents, props changed) head/sys/contrib/alpine-hal/eth/al_hal_eth_main.c (contents, props changed) Added: head/sys/contrib/alpine-hal/al_hal_iofic.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/alpine-hal/al_hal_iofic.c Tue Jan 26 15:22:04 2016 (r294838) @@ -0,0 +1,291 @@ +/*- +*** +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, 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. + +***/ + +/** + * @{ + * @file al_hal_iofic.c + * + * @brief interrupt controller hal + * + */ + +#include "al_hal_iofic.h" +#include "al_hal_iofic_regs.h" + +/* + * configure the interrupt registers, interrupts will are kept masked + */ +int al_iofic_config(void __iomem *regs_base, int group, uint32_t flags) +{ + struct al_iofic_regs __iomem *regs = (struct al_iofic_regs __iomem *)(regs_base); + + al_assert(re
svn commit: r294839 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux dev/cxgb
Author: hselasky Date: Tue Jan 26 15:26:35 2016 New Revision: 294839 URL: https://svnweb.freebsd.org/changeset/base/294839 Log: Update and add various macros to the LinuxKPI and resolve a macro redefinition issue in the cxgb driver. MFC after:1 week Sponsored by: Mellanox Technologies Reviewed by: np @ Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h head/sys/compat/linuxkpi/common/include/linux/clocksource.h head/sys/compat/linuxkpi/common/include/linux/completion.h head/sys/compat/linuxkpi/common/include/linux/gfp.h head/sys/compat/linuxkpi/common/include/linux/kernel.h head/sys/dev/cxgb/cxgb_osdep.h Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h == --- head/sys/compat/linuxkpi/common/include/asm/atomic.hTue Jan 26 15:22:04 2016(r294838) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.hTue Jan 26 15:26:35 2016(r294839) @@ -35,6 +35,8 @@ #include #include +#defineATOMIC_INIT(x) { .counter = (x) } + typedef struct { volatile int counter; } atomic_t; Modified: head/sys/compat/linuxkpi/common/include/linux/clocksource.h == --- head/sys/compat/linuxkpi/common/include/linux/clocksource.h Tue Jan 26 15:22:04 2016(r294838) +++ head/sys/compat/linuxkpi/common/include/linux/clocksource.h Tue Jan 26 15:26:35 2016(r294839) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,12 +29,13 @@ * $FreeBSD$ */ #ifndef _LINUX_CLOCKSOURCE_H -#define _LINUX_CLOCKSOURCE_H +#define_LINUX_CLOCKSOURCE_H #include +#defineCLOCKSOURCE_MASK(x) ((cycle_t)(-1ULL >> ((-(x)) & 63))) + /* clocksource cycle base type */ typedef u64 cycle_t; - -#endif /* _LINUX_CLOCKSOURCE_H */ +#endif /* _LINUX_CLOCKSOURCE_H */ Modified: head/sys/compat/linuxkpi/common/include/linux/completion.h == --- head/sys/compat/linuxkpi/common/include/linux/completion.h Tue Jan 26 15:22:04 2016(r294838) +++ head/sys/compat/linuxkpi/common/include/linux/completion.h Tue Jan 26 15:26:35 2016(r294839) @@ -40,7 +40,9 @@ struct completion { #defineINIT_COMPLETION(c) \ ((c).done = 0) #defineinit_completion(c) \ - ((c)->done = 0) + do { (c)->done = 0; } while (0) +#definereinit_completion(c) \ + do { (c)->done = 0; } while (0) #definecomplete(c) \ linux_complete_common((c), 0) #definecomplete_all(c) \ Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h == --- head/sys/compat/linuxkpi/common/include/linux/gfp.h Tue Jan 26 15:22:04 2016(r294838) +++ head/sys/compat/linuxkpi/common/include/linux/gfp.h Tue Jan 26 15:26:35 2016(r294839) @@ -54,6 +54,7 @@ #defineGFP_HIGHUSERM_WAITOK #defineGFP_HIGHUSER_MOVABLEM_WAITOK #defineGFP_IOFSM_NOWAIT +#defineGFP_NOIOM_NOWAIT static inline void * page_address(struct page *page) Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h == --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jan 26 15:22:04 2016(r294838) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jan 26 15:26:35 2016(r294839) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * Copyright (c) 2014-2015 François Tigeot * All rights reserved. * @@ -159,9 +159,10 @@ #defineARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#definesimple_strtoul strtoul -#definesimple_strtol strtol -#define kstrtol(a,b,c) ({*(c) = strtol(a,0,b);}) +#definesimple_strtoul(...) strtoul(__VA_ARGS__) +#definesimple_strtol(...) strtol(__VA_ARGS__) +#definekstrtol(a,b,c) ({*(c) = strtol(a,0,b); 0;}) +#definekstrtoint(a,b,c) ({*(c) = strtol(a,0,b); 0;}) #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) @@ -185,6 +186,7 @@ #define round_up(x, y) x)-1) | __round_mask(x, y))+1) #define round_down(x, y) ((x) & ~__r
Re: svn commit: r294839 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux dev/cxgb
On Tue, Jan 26, 2016 at 03:26:36PM +, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Jan 26 15:26:35 2016 > New Revision: 294839 > URL: https://svnweb.freebsd.org/changeset/base/294839 > > Log: > Update and add various macros to the LinuxKPI and resolve a macro > redefinition issue in the cxgb driver. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > Reviewed by:np @ only the cxgb_osdep.h part. Regards, Navdeep > > Modified: > head/sys/compat/linuxkpi/common/include/asm/atomic.h > head/sys/compat/linuxkpi/common/include/linux/clocksource.h > head/sys/compat/linuxkpi/common/include/linux/completion.h > head/sys/compat/linuxkpi/common/include/linux/gfp.h > head/sys/compat/linuxkpi/common/include/linux/kernel.h > head/sys/dev/cxgb/cxgb_osdep.h > > > > Modified: head/sys/dev/cxgb/cxgb_osdep.h > == > --- head/sys/dev/cxgb/cxgb_osdep.hTue Jan 26 15:22:04 2016 > (r294838) > +++ head/sys/dev/cxgb/cxgb_osdep.hTue Jan 26 15:26:35 2016 > (r294839) > @@ -231,7 +231,9 @@ static const int debug_flags = DBG_RX; > #define le16_to_cpu(x) le16toh(x) > #define cpu_to_le32(x) htole32(x) > #define swab32(x) bswap32(x) > -#define simple_strtoul strtoul > +#ifndef simple_strtoul > +#define simple_strtoul(...) strtoul(__VA_ARGS__) > +#endif > > > #ifndef LINUX_TYPES_DEFINED > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294840 - head/sys/netinet
Author: hiren Date: Tue Jan 26 16:33:38 2016 New Revision: 294840 URL: https://svnweb.freebsd.org/changeset/base/294840 Log: Persist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and 60 seconds, respectively. Turn them into sysctls that can be tuned live. The default values of 5 seconds and 60 seconds have been retained. Submitted by: Jason Wolfe (j at nitrology dot com) Reviewed by: gnn, rrs, hiren, bz MFC after:1 week Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D5024 Modified: head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Tue Jan 26 15:26:35 2016 (r294839) +++ head/sys/netinet/tcp_output.c Tue Jan 26 16:33:38 2016 (r294840) @@ -1626,7 +1626,7 @@ tcp_setpersist(struct tcpcb *tp) * Start/restart persistance timer. */ TCPT_RANGESET(tt, t * tcp_backoff[tp->t_rxtshift], - TCPTV_PERSMIN, TCPTV_PERSMAX); + tcp_persmin, tcp_persmax); tcp_timer_activate(tp, TT_PERSIST, tt); if (tp->t_rxtshift < TCP_MAXRXTSHIFT) tp->t_rxtshift++; Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Tue Jan 26 15:26:35 2016(r294839) +++ head/sys/netinet/tcp_subr.c Tue Jan 26 16:33:38 2016(r294840) @@ -675,6 +675,8 @@ tcp_init(void) tcp_rexmit_min = TCPTV_MIN; if (tcp_rexmit_min < 1) tcp_rexmit_min = 1; + tcp_persmin = TCPTV_PERSMIN; + tcp_persmax = TCPTV_PERSMAX; tcp_rexmit_slop = TCPTV_CPU_VAR; tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT; tcp_tcbhashsize = hashsize; Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cTue Jan 26 15:26:35 2016 (r294839) +++ head/sys/netinet/tcp_timer.cTue Jan 26 16:33:38 2016 (r294840) @@ -77,6 +77,14 @@ __FBSDID("$FreeBSD$"); #include #endif +inttcp_persmin; +SYSCTL_PROC(_net_inet_tcp, OID_AUTO, persmin, CTLTYPE_INT|CTLFLAG_RW, +&tcp_persmin, 0, sysctl_msec_to_ticks, "I", "minimum persistence interval"); + +inttcp_persmax; +SYSCTL_PROC(_net_inet_tcp, OID_AUTO, persmax, CTLTYPE_INT|CTLFLAG_RW, +&tcp_persmax, 0, sysctl_msec_to_ticks, "I", "maximum persistence interval"); + inttcp_keepinit; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit, CTLTYPE_INT|CTLFLAG_RW, &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", "time to establish connection"); Modified: head/sys/netinet/tcp_timer.h == --- head/sys/netinet/tcp_timer.hTue Jan 26 15:26:35 2016 (r294839) +++ head/sys/netinet/tcp_timer.hTue Jan 26 16:33:38 2016 (r294840) @@ -77,7 +77,7 @@ if 0, no idea yet */ #defineTCPTV_RTOBASE ( 3*hz)/* assumed RTO if no info */ -#defineTCPTV_PERSMIN ( 5*hz)/* retransmit persistence */ +#defineTCPTV_PERSMIN ( 5*hz)/* minimum persist interval */ #defineTCPTV_PERSMAX ( 60*hz)/* maximum persist interval */ #defineTCPTV_KEEP_INIT ( 75*hz)/* initial connect keepalive */ @@ -173,6 +173,8 @@ struct tcp_timer { #defineTP_KEEPCNT(tp) ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt) #defineTP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) +extern int tcp_persmin;/* minimum persist interval */ +extern int tcp_persmax;/* maximum persist interval */ extern int tcp_keepinit; /* time to establish connection */ extern int tcp_keepidle; /* time before keepalive probes begin */ extern int tcp_keepintvl; /* time between keepalive probes */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294841 - head/sys/dev/rtwn
Author: avos Date: Tue Jan 26 16:34:27 2016 New Revision: 294841 URL: https://svnweb.freebsd.org/changeset/base/294841 Log: rtwn: use ieee80211_restart_all() for device reset Tested by:kevlo Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D5057 Modified: head/sys/dev/rtwn/if_rtwn.c head/sys/dev/rtwn/if_rtwnreg.h Modified: head/sys/dev/rtwn/if_rtwn.c == --- head/sys/dev/rtwn/if_rtwn.c Tue Jan 26 16:33:38 2016(r294840) +++ head/sys/dev/rtwn/if_rtwn.c Tue Jan 26 16:34:27 2016(r294841) @@ -186,11 +186,9 @@ static voidrtwn_iq_calib(struct rtwn_so static voidrtwn_lc_calib(struct rtwn_softc *); static voidrtwn_temp_calib(struct rtwn_softc *); static voidrtwn_init_locked(struct rtwn_softc *); -static voidrtwn_init(struct rtwn_softc *); static voidrtwn_stop_locked(struct rtwn_softc *); static voidrtwn_stop(struct rtwn_softc *); static voidrtwn_intr(void *); -static voidrtwn_hw_reset(void *, int); /* Aliases. */ #definertwn_bb_write rtwn_write_4 @@ -295,7 +293,6 @@ rtwn_attach(device_t dev) RTWN_LOCK_INIT(sc); callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); - TASK_INIT(&sc->sc_reinit_task, 0, rtwn_hw_reset, sc); mbufq_init(&sc->sc_snd, ifqmaxlen); error = rtwn_read_chipid(sc); @@ -406,7 +403,6 @@ rtwn_detach(device_t dev) int i; if (sc->sc_ic.ic_softc != NULL) { - ieee80211_draintask(&sc->sc_ic, &sc->sc_reinit_task); rtwn_stop(sc); callout_drain(&sc->calib_to); @@ -1899,7 +1895,7 @@ rtwn_watchdog(void *arg) if (sc->sc_tx_timer != 0 && --sc->sc_tx_timer == 0) { ic_printf(ic, "device timeout\n"); - ieee80211_runtask(ic, &sc->sc_reinit_task); + ieee80211_restart_all(ic); return; } callout_reset(&sc->watchdog_to, hz, rtwn_watchdog, sc); @@ -3361,18 +3357,6 @@ fail: } static void -rtwn_init(struct rtwn_softc *sc) -{ - - RTWN_LOCK(sc); - rtwn_init_locked(sc); - RTWN_UNLOCK(sc); - - if (sc->sc_flags & RTWN_RUNNING) - ieee80211_start_all(&sc->sc_ic); -} - -static void rtwn_stop_locked(struct rtwn_softc *sc) { uint16_t reg; @@ -3481,14 +3465,3 @@ rtwn_intr(void *arg) RTWN_UNLOCK(sc); } - -static void -rtwn_hw_reset(void *arg0, int pending) -{ - struct rtwn_softc *sc = arg0; - struct ieee80211com *ic = &sc->sc_ic; - - rtwn_stop(sc); - rtwn_init(sc); - ieee80211_notify_radio(ic, 1); -} Modified: head/sys/dev/rtwn/if_rtwnreg.h == --- head/sys/dev/rtwn/if_rtwnreg.h Tue Jan 26 16:33:38 2016 (r294840) +++ head/sys/dev/rtwn/if_rtwnreg.h Tue Jan 26 16:34:27 2016 (r294841) @@ -1295,7 +1295,6 @@ struct rtwn_softc { bus_size_t sc_mapsize; int sc_cap_off; - struct task sc_reinit_task; struct callout calib_to; struct callout watchdog_to; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294842 - head/sys/dev/rtwn
Author: avos Date: Tue Jan 26 16:50:59 2016 New Revision: 294842 URL: https://svnweb.freebsd.org/changeset/base/294842 Log: rtwn: do not start vap when initialization fails - Start vap(s) (via ieee80211_start_all()) only when initialization succeeds; stop the first vap otherwise (via ieee80211_stop()); - Do not try to stop a device multiple times (move (sc->sc_flags & RTWN_RUNNING) check to urtwn_stop_locked()). Tested by:kevlo Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D5058 Modified: head/sys/dev/rtwn/if_rtwn.c Modified: head/sys/dev/rtwn/if_rtwn.c == --- head/sys/dev/rtwn/if_rtwn.c Tue Jan 26 16:34:27 2016(r294841) +++ head/sys/dev/rtwn/if_rtwn.c Tue Jan 26 16:50:59 2016(r294842) @@ -185,7 +185,7 @@ static void rtwn_iq_calib_write_results( static voidrtwn_iq_calib(struct rtwn_softc *); static voidrtwn_lc_calib(struct rtwn_softc *); static voidrtwn_temp_calib(struct rtwn_softc *); -static voidrtwn_init_locked(struct rtwn_softc *); +static int rtwn_init(struct rtwn_softc *); static voidrtwn_stop_locked(struct rtwn_softc *); static voidrtwn_stop(struct rtwn_softc *); static voidrtwn_intr(void *); @@ -1845,19 +1845,15 @@ static void rtwn_parent(struct ieee80211com *ic) { struct rtwn_softc *sc = ic->ic_softc; - int startall = 0; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - RTWN_LOCK(sc); - if (ic->ic_nrunning> 0) { - if (!(sc->sc_flags & RTWN_RUNNING)) { - rtwn_init_locked(sc); - startall = 1; - } - } else if (sc->sc_flags & RTWN_RUNNING) -rtwn_stop_locked(sc); - RTWN_UNLOCK(sc); - if (startall) - ieee80211_start_all(ic); + if (ic->ic_nrunning > 0) { + if (rtwn_init(sc) == 0) + ieee80211_start_all(ic); + else + ieee80211_stop(vap); + } else + rtwn_stop(sc); } static void @@ -3218,8 +3214,8 @@ rtwn_temp_calib(struct rtwn_softc *sc) } } -static void -rtwn_init_locked(struct rtwn_softc *sc) +static int +rtwn_init(struct rtwn_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); @@ -3227,7 +3223,13 @@ rtwn_init_locked(struct rtwn_softc *sc) uint8_t macaddr[IEEE80211_ADDR_LEN]; int i, error; - RTWN_LOCK_ASSERT(sc); + RTWN_LOCK(sc); + + if (sc->sc_flags & RTWN_RUNNING) { + RTWN_UNLOCK(sc); + return 0; + } + sc->sc_flags |= RTWN_RUNNING; /* Init firmware commands ring. */ sc->fwcur = 0; @@ -3347,13 +3349,15 @@ rtwn_init_locked(struct rtwn_softc *sc) /* Enable interrupts. */ rtwn_write_4(sc, R92C_HIMR, RTWN_INT_ENABLE); - sc->sc_flags |= RTWN_RUNNING; - callout_reset(&sc->watchdog_to, hz, rtwn_watchdog, sc); - return; fail: - rtwn_stop_locked(sc); + if (error != 0) + rtwn_stop_locked(sc); + + RTWN_UNLOCK(sc); + + return error; } static void @@ -3364,6 +3368,9 @@ rtwn_stop_locked(struct rtwn_softc *sc) RTWN_LOCK_ASSERT(sc); + if (!(sc->sc_flags & RTWN_RUNNING)) + return; + sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294844 - head/sys/sys
Author: emaste Date: Tue Jan 26 18:20:25 2016 New Revision: 294844 URL: https://svnweb.freebsd.org/changeset/base/294844 Log: Add STT_SPARC_REGISTER ELF definition MFC after:1 week Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h == --- head/sys/sys/elf_common.h Tue Jan 26 17:00:31 2016(r294843) +++ head/sys/sys/elf_common.h Tue Jan 26 18:20:25 2016(r294844) @@ -771,8 +771,9 @@ typedef struct { #defineSTT_LOOS10 /* Reserved range for operating system */ #defineSTT_GNU_IFUNC 10 #defineSTT_HIOS12 /* specific semantics. */ -#defineSTT_LOPROC 13 /* reserved range for processor */ -#defineSTT_HIPROC 15 /* specific semantics. */ +#defineSTT_LOPROC 13 /* Start of processor reserved range. */ +#defineSTT_SPARC_REGISTER 13 /* SPARC register information. */ +#defineSTT_HIPROC 15 /* End of processor reserved range. */ /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ #defineSTV_DEFAULT 0x0 /* Default visibility (see binding). */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294847 - in head/sys/boot: mips/beri/boot2 pc98/boot2
Author: imp Date: Tue Jan 26 18:39:30 2016 New Revision: 294847 URL: https://svnweb.freebsd.org/changeset/base/294847 Log: Remove static from these two. They slipped through the cracks. MFC After: 1 week Modified: head/sys/boot/mips/beri/boot2/boot2.c head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/mips/beri/boot2/boot2.c == --- head/sys/boot/mips/beri/boot2/boot2.c Tue Jan 26 18:39:23 2016 (r294846) +++ head/sys/boot/mips/beri/boot2/boot2.c Tue Jan 26 18:39:30 2016 (r294847) @@ -132,7 +132,7 @@ static struct dsk { } dsk; static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname; -static uint32_t opts; +uint32_t opts; #if 0 static int comspeed = SIOSPD; #endif Modified: head/sys/boot/pc98/boot2/boot2.c == --- head/sys/boot/pc98/boot2/boot2.cTue Jan 26 18:39:23 2016 (r294846) +++ head/sys/boot/pc98/boot2/boot2.cTue Jan 26 18:39:30 2016 (r294847) @@ -104,7 +104,7 @@ static struct dsk { } dsk; static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname; -static uint32_t opts; +uint32_t opts; static struct bootinfo bootinfo; #if SERIAL static int comspeed = SIOSPD; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294846 - head/sys/mips/mips
Author: imp Date: Tue Jan 26 18:39:23 2016 New Revision: 294846 URL: https://svnweb.freebsd.org/changeset/base/294846 Log: Add a comment about why at is turned off in the exception handler. Only k0 and k1 may be touched until we save registers somewhere. MFC After: 2 days Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S == --- head/sys/mips/mips/exception.S Tue Jan 26 18:32:48 2016 (r294845) +++ head/sys/mips/mips/exception.S Tue Jan 26 18:39:23 2016 (r294846) @@ -177,6 +177,12 @@ MipsDoTLBMiss: VECTOR(MipsException, unknown) /* * Find out what mode we came from and jump to the proper handler. + * + * Note: at turned off here because we cannot trash the at register + * in this exception code. Only k0 and k1 may be modified before + * we save registers. This is true of all functions called through + * the pointer magic: Mips{User,Kern}Intr, Mips{User,Kern}GenException + * and MipsTLBInvalidException */ .setnoat mfc0k0, MIPS_COP_0_STATUS # Get the status register ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294848 - head/tools/tools/nanobsd
Author: imp Date: Tue Jan 26 18:39:31 2016 New Revision: 294848 URL: https://svnweb.freebsd.org/changeset/base/294848 Log: Default NANO_DRIVE to ada0 not ad0. This shouldn't affect working configs (since they'd have to change NANO_DRIVE to be ada0 to work), but will fix old ones that used to work. MFC After: 1 week Modified: head/tools/tools/nanobsd/defaults.sh (contents, props changed) Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shTue Jan 26 18:39:30 2016 (r294847) +++ head/tools/tools/nanobsd/defaults.shTue Jan 26 18:39:31 2016 (r294848) @@ -93,7 +93,7 @@ NANO_LATE_CUSTOMIZE="" NANO_NEWFS="-b 4096 -f 512 -i 8192 -U" # The drive name of the media at runtime -NANO_DRIVE=ad0 +NANO_DRIVE=ada0 # Target media size in 512 bytes sectors NANO_MEDIASIZE=200 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294849 - in head: lib/libsysdecode usr.bin/kdump usr.bin/truss
Author: jhb Date: Tue Jan 26 19:07:09 2016 New Revision: 294849 URL: https://svnweb.freebsd.org/changeset/base/294849 Log: Add support to libsysdecode for decoding system call names. A new sysdecode_syscallname() function accepts a system call code and returns a string of the corresponding name (or NULL if the code is unknown). To support different process ABIs, the new function accepts a value from a new sysdecode_abi enum as its first argument to select the ABI in use. Current ABIs supported include FREEBSD (native binaries), FREEBSD32, LINUX, LINUX32, and CLOUDABI64. Note that not all ABIs are supported by all platforms. In general, a given ABI is only supported if a platform can execute binaries for that ABI. To simplify the implementation, libsysdecode's build reuses the existing pre-generated files from the kernel source tree rather than duplicating new copies of said files during the build. kdump(1) and truss(1) now use these functions to map system call identifiers to names. For kdump(1), a new 'syscallname()' function consolidates duplicated code from ktrsyscall() and ktrsyscallret(). The Linux ABI no longer requires custom handling for ktrsyscall() and linux_ktrsyscall() has been removed as a result. Reviewed by: bdrewery Differential Revision:https://reviews.freebsd.org/D4823 Added: head/lib/libsysdecode/syscallnames.c (contents, props changed) head/lib/libsysdecode/sysdecode_syscallnames.3 (contents, props changed) Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/sysdecode.3 head/lib/libsysdecode/sysdecode.h head/usr.bin/kdump/Makefile head/usr.bin/kdump/kdump.c head/usr.bin/truss/Makefile head/usr.bin/truss/aarch64-cloudabi64.c head/usr.bin/truss/aarch64-freebsd.c head/usr.bin/truss/amd64-cloudabi64.c head/usr.bin/truss/amd64-freebsd.c head/usr.bin/truss/amd64-freebsd32.c head/usr.bin/truss/amd64-linux32.c head/usr.bin/truss/arm-freebsd.c head/usr.bin/truss/i386-freebsd.c head/usr.bin/truss/i386-linux.c head/usr.bin/truss/main.c head/usr.bin/truss/mips-freebsd.c head/usr.bin/truss/powerpc-freebsd.c head/usr.bin/truss/powerpc64-freebsd.c head/usr.bin/truss/powerpc64-freebsd32.c head/usr.bin/truss/setup.c head/usr.bin/truss/sparc64-freebsd.c head/usr.bin/truss/truss.h Modified: head/lib/libsysdecode/Makefile == --- head/lib/libsysdecode/Makefile Tue Jan 26 18:39:31 2016 (r294848) +++ head/lib/libsysdecode/Makefile Tue Jan 26 19:07:09 2016 (r294849) @@ -4,11 +4,14 @@ LIB= sysdecode -SRCS= ioctl.c utrace.c +SRCS= ioctl.c syscallnames.c utrace.c INCS= sysdecode.h +CFLAGS+= -I${.CURDIR}/../../sys + MAN+= sysdecode.3 \ sysdecode_ioctlname.3 \ + sysdecode_syscallnames.3 \ sysdecode_utrace.3 CLEANFILES= ioctl.c @@ -23,6 +26,10 @@ CFLAGS+=-DPF # Workaround duplicate declarations in CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls + +# Workaround warning for unused ssi_cables[] in +CFLAGS.gcc.ioctl.c+= -Wno-unused + CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} ioctl.c: mkioctls Added: head/lib/libsysdecode/syscallnames.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libsysdecode/syscallnames.cTue Jan 26 19:07:09 2016 (r294849) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2015 John H. Baldwin + * 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$"); + +/* + * Map system call codes to names for the supported ABIs on ea
svn commit: r294851 - head/sys/kern
Author: jhb Date: Tue Jan 26 21:24:49 2016 New Revision: 294851 URL: https://svnweb.freebsd.org/changeset/base/294851 Log: Various style fixes. - Wrap long lines. - Fix indentation. - Remove excessive parens. - Whitespace fixes in struct definitions. Reviewed by: kib Differential Revision:https://reviews.freebsd.org/D5025 Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c == --- head/sys/kern/vfs_aio.c Tue Jan 26 20:45:41 2016(r294850) +++ head/sys/kern/vfs_aio.c Tue Jan 26 21:24:49 2016(r294851) @@ -125,17 +125,16 @@ FEATURE(aio, "Asynchronous I/O"); static MALLOC_DEFINE(M_LIO, "lio", "listio aio control block list"); -static SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management"); +static SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, +"Async IO management"); static int max_aio_procs = MAX_AIO_PROCS; -SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs, - CTLFLAG_RW, &max_aio_procs, 0, - "Maximum number of kernel processes to use for handling async IO "); +SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs, CTLFLAG_RW, &max_aio_procs, 0, +"Maximum number of kernel processes to use for handling async IO "); static int num_aio_procs = 0; -SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_procs, - CTLFLAG_RD, &num_aio_procs, 0, - "Number of presently active kernel processes for async IO"); +SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_procs, CTLFLAG_RD, &num_aio_procs, 0, +"Number of presently active kernel processes for async IO"); /* * The code will adjust the actual number of AIO processes towards this @@ -143,7 +142,8 @@ SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_p */ static int target_aio_procs = TARGET_AIO_PROCS; SYSCTL_INT(_vfs_aio, OID_AUTO, target_aio_procs, CTLFLAG_RW, &target_aio_procs, - 0, "Preferred number of ready kernel processes for async IO"); +0, +"Preferred number of ready kernel processes for async IO"); static int max_queue_count = MAX_AIO_QUEUE; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_queue, CTLFLAG_RW, &max_queue_count, 0, @@ -172,7 +172,8 @@ SYSCTL_INT(_vfs_aio, OID_AUTO, unloadabl static int max_aio_per_proc = MAX_AIO_PER_PROC; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_per_proc, CTLFLAG_RW, &max_aio_per_proc, -0, "Maximum active aio requests per process (stored in the process)"); +0, +"Maximum active aio requests per process (stored in the process)"); static int max_aio_queue_per_proc = MAX_AIO_QUEUE_PER_PROC; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_queue_per_proc, CTLFLAG_RW, @@ -231,7 +232,7 @@ struct aiocblist { struct vm_page *pages[btoc(MAXPHYS)+1]; /* BIO backend pages */ int npages; /* BIO backend number of pages */ struct proc *userproc; /* (*) user process */ - struct ucred *cred;/* (*) active credential when created */ + struct ucred *cred;/* (*) active credential when created */ struct file *fd_file; /* (*) pointer to file structure */ struct aioliojob *lio; /* (*) optional lio job */ struct aiocb *uuaiocb; /* (*) pointer in userspace of aiocb */ @@ -254,9 +255,9 @@ struct aiocblist { #define AIOP_FREE 0x1 /* proc on free queue */ struct aioproc { - int aioprocflags; /* (c) AIO proc flags */ + int aioprocflags; /* (c) AIO proc flags */ TAILQ_ENTRY(aioproc) list; /* (c) list of processes */ - struct proc *aioproc; /* (*) the AIO proc */ + struct proc *aioproc; /* (*) the AIO proc */ }; /* @@ -268,7 +269,7 @@ struct aioliojob { int lioj_finished_count;/* (a) listio flags */ struct sigevent lioj_signal; /* (a) signal on all I/O done */ TAILQ_ENTRY(aioliojob) lioj_list; /* (a) lio list */ - struct knlist klist; /* (a) list of knotes */ + struct knlist klist; /* (a) list of knotes */ ksiginfo_t lioj_ksi;/* (a) Realtime signal info */ }; @@ -280,7 +281,7 @@ struct aioliojob { * per process aio data structure */ struct kaioinfo { - struct mtx kaio_mtx; /* the lock to protect this struct */ + struct mtx kaio_mtx; /* the lock to protect this struct */ int kaio_flags; /* (a) per process kaio flags */ int kaio_maxactive_count; /* (*) maximum number of AIOs */ int kaio_active_count; /* (c) number of currently used AIOs */ @@ -288,13 +289,13 @@ struct kaioinfo { int kaio_count; /* (a) size of AIO queue */ int kaio_ballowed_count;/* (*) maximum number of buffers */ int kaio_buffer_count;
svn commit: r294854 - head/sys/dev/qlxgbe
Author: davidcs Date: Tue Jan 26 22:32:58 2016 New Revision: 294854 URL: https://svnweb.freebsd.org/changeset/base/294854 Log: Upgrade FW to 5.4.56 Update driver version to 3.10.26 Modified: head/sys/dev/qlxgbe/ql_fw.c head/sys/dev/qlxgbe/ql_ver.h Modified: head/sys/dev/qlxgbe/ql_fw.c == --- head/sys/dev/qlxgbe/ql_fw.c Tue Jan 26 22:14:55 2016(r294853) +++ head/sys/dev/qlxgbe/ql_fw.c Tue Jan 26 22:32:58 2016(r294854) @@ -35,31 +35,31 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_firmware_version_major = 5; unsigned int ql83xx_firmware_version_minor = 4; -unsigned int ql83xx_firmware_version_sub = 55; +unsigned int ql83xx_firmware_version_sub = 56; unsigned char ql83xx_firmware[] = { - 0x03, 0x00, 0x40, 0x40, 0x05, 0x04, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa4, 0x44, 0x1b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdf, 0xab, 0xb2, 0x6d, 0x14, 0xbc, 0xac, 0x79, + 0x03, 0x00, 0x40, 0x40, 0x05, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x44, 0x1b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0xa5, 0xc3, 0x36, 0x3d, 0x7d, 0x98, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xea, 0x03, 0x00, + 0xe0, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xea, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x2c, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0xf3, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x45, 0x8f, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf3, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf7, 0x8e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x9b, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x34, 0x83, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe7, 0x82, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -69,117 +69,117 @@ unsigned char ql83xx_firmware[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xab, 0x8d, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5e, 0x8d, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x29, 0xa3, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x04, 0x00, 0x00, + 0xdc, 0xa2, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xa7, 0x17, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0xa7, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Re: svn commit: r294788 - head/sys/dev/hyperv/netvsc
Sepherosa, On Tue, Jan 26, 2016 at 09:42:13AM +, Sepherosa Ziehau wrote: S> Author: sephe S> Date: Tue Jan 26 09:42:13 2016 S> New Revision: 294788 S> URL: https://svnweb.freebsd.org/changeset/base/294788 S> S> Log: S> hyperv/hn: Improve sending performance S> S> - Avoid main lock contention by trylock for if_start, if that fails, S> schedule TX taskqueue for if_start S> - Don't do direct sending if the packet to be sent is large, e.g. S> TSO packet. S> S> This change gives me stable 9.1Gbps TCP sending performance w/ TSO S> over a 10Gbe directly connected network (the performance fluctuated S> between 4Gbps and 9Gbps before this commit). It also improves non- S> TSO TCP sending performance a lot. S> S> Reviewed by: adrian, royger S> Approved by: adrian (mentor) S> Sponsored by: Microsoft OSTC S> Differential Revision: https://reviews.freebsd.org/D5074 Why do you actually use if_start, not if_transmit? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294855 - head/sys/netpfil/ipfw
Author: luigi Date: Tue Jan 26 22:45:05 2016 New Revision: 294855 URL: https://svnweb.freebsd.org/changeset/base/294855 Log: avoid warnings for signed/unsigned comparison and unused arguments Modified: head/sys/netpfil/ipfw/dn_heap.c Modified: head/sys/netpfil/ipfw/dn_heap.c == --- head/sys/netpfil/ipfw/dn_heap.c Tue Jan 26 22:32:58 2016 (r294854) +++ head/sys/netpfil/ipfw/dn_heap.c Tue Jan 26 22:45:05 2016 (r294855) @@ -81,7 +81,7 @@ heap_resize(struct dn_heap *h, unsigned { struct dn_heap_entry *p; - if (h->size >= new_size ) /* have enough room */ + if ((unsigned int)h->size >= new_size ) /* have enough room */ return 0; #if 1 /* round to the next power of 2 */ new_size |= new_size >> 1; @@ -419,6 +419,8 @@ dn_ht_init(struct dn_ht *ht, int buckets static int do_del(void *obj, void *arg) { + (void)obj; + (void)arg; return DNHT_SCAN_DEL; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294856 - head/sys/netpfil/ipfw
Author: luigi Date: Tue Jan 26 22:45:45 2016 New Revision: 294856 URL: https://svnweb.freebsd.org/changeset/base/294856 Log: prevent warning for unused argument Modified: head/sys/netpfil/ipfw/dn_sched_fifo.c Modified: head/sys/netpfil/ipfw/dn_sched_fifo.c == --- head/sys/netpfil/ipfw/dn_sched_fifo.c Tue Jan 26 22:45:05 2016 (r294855) +++ head/sys/netpfil/ipfw/dn_sched_fifo.c Tue Jan 26 22:45:45 2016 (r294856) @@ -61,6 +61,7 @@ fifo_enqueue(struct dn_sch_inst *si, str * re-enqueue from an existing scheduler, which we should * handle. */ + (void)q; return dn_enqueue((struct dn_queue *)(si+1), m, 0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294857 - head/sys/netpfil/ipfw
Author: luigi Date: Tue Jan 26 22:46:58 2016 New Revision: 294857 URL: https://svnweb.freebsd.org/changeset/base/294857 Log: prevent warnings for signed/unsigned comparisons and unused arguments. Add checks for parameters overflowing 32 bit. Modified: head/sys/netpfil/ipfw/dn_sched_rr.c Modified: head/sys/netpfil/ipfw/dn_sched_rr.c == --- head/sys/netpfil/ipfw/dn_sched_rr.c Tue Jan 26 22:45:45 2016 (r294856) +++ head/sys/netpfil/ipfw/dn_sched_rr.c Tue Jan 26 22:46:58 2016 (r294857) @@ -52,8 +52,8 @@ struct rr_queue { struct dn_queue q; /* Standard queue */ int status; /* 1: queue is in the list */ - int credit; /* Number of bytes to transmit */ - int quantum;/* quantum * C */ + uint32_t credit;/* max bytes we can transmit */ + uint32_t quantum; /* quantum * weight */ struct rr_queue *qnext; /* */ }; @@ -61,9 +61,9 @@ struct rr_queue { * and is right after dn_schk */ struct rr_schk { - int min_q; /* Min quantum */ - int max_q; /* Max quantum */ - int q_bytes;/* Bytes per quantum */ + uint32_t min_q; /* Min quantum */ + uint32_t max_q; /* Max quantum */ + uint32_t q_bytes; /* default quantum in bytes */ }; /* per-instance round robin list, right after dn_sch_inst */ @@ -227,6 +227,7 @@ rr_new_sched(struct dn_sch_inst *_si) static int rr_free_sched(struct dn_sch_inst *_si) { + (void)_si; ND("called"); /* Nothing to do? */ return 0; @@ -237,6 +238,7 @@ rr_new_fsk(struct dn_fsk *fs) { struct rr_schk *schk = (struct rr_schk *)(fs->sched + 1); /* par[0] is the weight, par[1] is the quantum step */ + /* make sure the product fits an uint32_t */ ipdn_bound_var(&fs->fs.par[0], 1, 1, 65536, "RR weight"); ipdn_bound_var(&fs->fs.par[1], schk->q_bytes, @@ -248,10 +250,16 @@ static int rr_new_queue(struct dn_queue *_q) { struct rr_queue *q = (struct rr_queue *)_q; + uint64_t quantum; _q->ni.oid.subtype = DN_SCHED_RR; - q->quantum = _q->fs->fs.par[0] * _q->fs->fs.par[1]; + quantum = (uint64_t)_q->fs->fs.par[0] * _q->fs->fs.par[1]; + if (quantum >= (1ULL<< 32)) { + D("quantum too large, truncating to 4G - 1"); + quantum = (1ULL<< 32) - 1; + } + q->quantum = quantum; ND("called, q->quantum %d", q->quantum); q->credit = q->quantum; q->status = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294840 - head/sys/netinet
Hiren, On Tue, Jan 26, 2016 at 04:33:38PM +, Hiren Panchasara wrote: H> Author: hiren H> Date: Tue Jan 26 16:33:38 2016 H> New Revision: 294840 H> URL: https://svnweb.freebsd.org/changeset/base/294840 H> H> Log: H> Persist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and H> 60 seconds, respectively. Turn them into sysctls that can be tuned live. The H> default values of 5 seconds and 60 seconds have been retained. H> H> Submitted by: Jason Wolfe (j at nitrology dot com) H> Reviewed by: gnn, rrs, hiren, bz H> MFC after: 1 week H> Sponsored by: Limelight Networks H> Differential Revision: https://reviews.freebsd.org/D5024 A theoretical question: could it be useful to make them socket options like the TCP_KEEP* timeouts? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294855 - head/sys/netpfil/ipfw
Luigi, On Tue, Jan 26, 2016 at 10:45:05PM +, Luigi Rizzo wrote: L> Modified: head/sys/netpfil/ipfw/dn_heap.c L> == L> --- head/sys/netpfil/ipfw/dn_heap.c Tue Jan 26 22:32:58 2016 (r294854) L> +++ head/sys/netpfil/ipfw/dn_heap.c Tue Jan 26 22:45:05 2016 (r294855) L> @@ -81,7 +81,7 @@ heap_resize(struct dn_heap *h, unsigned L> { L> struct dn_heap_entry *p; L> L> -if (h->size >= new_size ) /* have enough room */ L> +if ((unsigned int)h->size >= new_size ) /* have enough room */ L> return 0; L> #if 1 /* round to the next power of 2 */ L> new_size |= new_size >> 1; L> @@ -419,6 +419,8 @@ dn_ht_init(struct dn_ht *ht, int buckets L> static int L> do_del(void *obj, void *arg) L> { L> +(void)obj; L> +(void)arg; L> return DNHT_SCAN_DEL; L> } Are there any benefits of this syntax comparing to __unused macro that expands to proper attribute? The latter syntax is used in FreeBSD more often. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294858 - head/sys/netpfil/ipfw
Author: luigi Date: Tue Jan 26 23:36:18 2016 New Revision: 294858 URL: https://svnweb.freebsd.org/changeset/base/294858 Log: fix various warnings (signed/unsigned, printf types, unused arguments) Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c == --- head/sys/netpfil/ipfw/dn_sched_qfq.cTue Jan 26 22:46:58 2016 (r294857) +++ head/sys/netpfil/ipfw/dn_sched_qfq.cTue Jan 26 23:36:18 2016 (r294858) @@ -48,6 +48,7 @@ #endif #ifdef QFQ_DEBUG +#define _P64 unsigned long long /* cast for printing uint64_t */ struct qfq_sched; static void dump_sched(struct qfq_sched *q, const char *msg); #defineNO(x) x @@ -84,19 +85,19 @@ static inline unsigned long __fls(unsign #if !defined(_KERNEL) || !defined(__linux__) #ifdef QFQ_DEBUG -int test_bit(int ix, bitmap *p) +static int test_bit(int ix, bitmap *p) { if (ix < 0 || ix > 31) D("bad index %d", ix); return *p & (1< 31) D("bad index %d", ix); *p |= (1< 31) D("bad index %d", ix); @@ -230,9 +231,9 @@ struct qfq_sched { uint64_tV; /* Precise virtual time. */ uint32_twsum; /* weight sum */ uint32_tiwsum; /* inverse weight sum */ - NO(uint32_t i_wsum; /* ONE_FP/w_sum */ - uint32_t_queued;/* debugging */ - uint32_tloops; /* debugging */) + NO(uint32_t i_wsum;)/* ONE_FP/w_sum */ + NO(uint32_t queued;)/* debugging */ + NO(uint32_t loops;) /* debugging */ bitmap bitmaps[QFQ_MAX_STATE]; /* Group bitmaps. */ struct qfq_group groups[QFQ_MAX_INDEX + 1]; /* The groups. */ }; @@ -486,6 +487,7 @@ qfq_slot_rotate(struct qfq_sched *q, str { unsigned int i = (grp->S - roundedS) >> grp->slot_shift; + (void)q; grp->full_slots <<= i; grp->front = (grp->front - i) % QFQ_MAX_SLOTS; } @@ -516,6 +518,7 @@ qfq_update_class(struct qfq_sched *q, st struct qfq_class *cl) { + (void)q; cl->S = cl->F; if (cl->_q.mq.head == NULL) { qfq_front_slot_remove(grp); @@ -853,9 +856,9 @@ dump_groups(struct qfq_sched *q, uint32_ if (g->slots[j]) D("bucket %d %p", j, g->slots[j]); } - D("full_slots 0x%x", g->full_slots); + D("full_slots 0x%llx", (_P64)g->full_slots); D("%2d S 0x%20llx F 0x%llx %c", i, - g->S, g->F, + (_P64)g->S, (_P64)g->F, mask & (1queued, q->V); - D("ER 0x%08x", q->bitmaps[ER]); - D("EB 0x%08x", q->bitmaps[EB]); - D("IR 0x%08x", q->bitmaps[IR]); - D("IB 0x%08x", q->bitmaps[IB]); + D("loops %d queued %d V 0x%llx", q->loops, q->queued, (_P64)q->V); + D("ER 0x%08x", (unsigned)q->bitmaps[ER]); + D("EB 0x%08x", (unsigned)q->bitmaps[EB]); + D("IR 0x%08x", (unsigned)q->bitmaps[IR]); + D("IB 0x%08x", (unsigned)q->bitmaps[IB]); dump_groups(q, 0x); }; #endif /* QFQ_DEBUG */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294859 - head/sys/netpfil/ipfw/test
Author: luigi Date: Tue Jan 26 23:37:07 2016 New Revision: 294859 URL: https://svnweb.freebsd.org/changeset/base/294859 Log: fix various warnings to compile the test code with -Wextra Modified: head/sys/netpfil/ipfw/test/Makefile head/sys/netpfil/ipfw/test/main.c head/sys/netpfil/ipfw/test/test_dn_sched.c Modified: head/sys/netpfil/ipfw/test/Makefile == --- head/sys/netpfil/ipfw/test/Makefile Tue Jan 26 23:36:18 2016 (r294858) +++ head/sys/netpfil/ipfw/test/Makefile Tue Jan 26 23:37:07 2016 (r294859) @@ -20,7 +20,7 @@ HEAP_OBJS=$(HEAP_SRCS:.c=.o) VPATH= .:.. -CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW +CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW -Wextra TARGETS= test_sched # no test_heap by default all: $(TARGETS) Modified: head/sys/netpfil/ipfw/test/main.c == --- head/sys/netpfil/ipfw/test/main.c Tue Jan 26 23:36:18 2016 (r294858) +++ head/sys/netpfil/ipfw/test/main.c Tue Jan 26 23:37:07 2016 (r294859) @@ -594,9 +594,9 @@ controller(struct cfg_s *c) int flow_id; /* histeresis between max and min */ - if (c->state == 0 && c->pending >= c->th_max) + if (c->state == 0 && c->pending >= (uint32_t)c->th_max) c->state = 1; - else if (c->state == 1 && c->pending <= c->th_min) + else if (c->state == 1 && c->pending <= (uint32_t)c->th_min) c->state = 0; ND(1, "state %d pending %2d", c->state, c->pending); c->can_dequeue = c->state; Modified: head/sys/netpfil/ipfw/test/test_dn_sched.c == --- head/sys/netpfil/ipfw/test/test_dn_sched.c Tue Jan 26 23:36:18 2016 (r294858) +++ head/sys/netpfil/ipfw/test/test_dn_sched.c Tue Jan 26 23:37:07 2016 (r294859) @@ -15,6 +15,9 @@ m_freem(struct mbuf *m) int dn_sched_modevent(module_t mod, int cmd, void *arg) { + (void)mod; + (void)cmd; + (void)arg; return 0; } @@ -32,6 +35,8 @@ int dn_delete_queue(void *_q, void *do_free) { struct dn_queue *q = _q; + + (void)do_free; if (q->mq.head) dn_free_pkts(q->mq.head); free(q); @@ -66,6 +71,7 @@ drop: int ipdn_bound_var(int *v, int dflt, int lo, int hi, const char *msg) { + (void)msg; if (*v < lo) { *v = dflt; } else if (*v > hi) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294860 - in head: lib/libdpv sys/sys
Author: dteske Date: Tue Jan 26 23:56:27 2016 New Revision: 294860 URL: https://svnweb.freebsd.org/changeset/base/294860 Log: Add keep_tite configuration option Similar to dialog(3) keep_tite option used to prevent visually disturbing initialization or exit that could occur when run from a script using dpv(3) by way of dpv(1) in sequence with other dialog(1) invocations. Modified: head/lib/libdpv/dpv.3 head/lib/libdpv/dpv.c head/lib/libdpv/dpv.h head/lib/libdpv/dpv_private.h head/sys/sys/param.h Modified: head/lib/libdpv/dpv.3 == --- head/lib/libdpv/dpv.3 Tue Jan 26 23:37:07 2016(r294859) +++ head/lib/libdpv/dpv.3 Tue Jan 26 23:56:27 2016(r294860) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 3 .Os .Sh NAME @@ -64,6 +64,7 @@ argument contains the following properti features: .Bd -literal -offset indent struct dpv_config { +uint8_t keep_tite; /* Cleaner exit for scripts */ enum dpv_display display_type; /* Def. DPV_DISPLAY_LIBDIALOG */ enum dpv_output output_type; /* Default DPV_OUTPUT_NONE */ int debug; /* Enable debug on stderr */ Modified: head/lib/libdpv/dpv.c == --- head/lib/libdpv/dpv.c Tue Jan 26 23:37:07 2016(r294859) +++ head/lib/libdpv/dpv.c Tue Jan 26 23:56:27 2016(r294860) @@ -69,6 +69,7 @@ long long dpv_overall_read = 0; static char pathbuf[PATH_MAX]; /* Extra display information */ +uint8_t keep_tite = FALSE; /* dpv_config.keep_tite */ uint8_t no_labels = FALSE; /* dpv_config.options & DPV_NO_LABELS */ uint8_t wide = FALSE; /* dpv_config.options & DPV_WIDE_MODE */ char *aprompt = NULL; /* dpv_config.aprompt */ @@ -150,6 +151,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = DIALOG_UPDATES_PER_SEC; display_limit = DISPLAY_LIMIT_DEFAULT; display_type= DPV_DISPLAY_LIBDIALOG; + keep_tite = FALSE; label_size = LABEL_SIZE_DEFAULT; msg_done= NULL; msg_fail= NULL; @@ -193,6 +195,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = config->dialog_updates_per_second; display_limit = config->display_limit; display_type= config->display_type; + keep_tite = config->keep_tite; label_size = config->label_size; msg_done= (char *)config->msg_done; msg_fail= (char *)config->msg_fail; @@ -695,7 +698,7 @@ dpv(struct dpv_config *config, struct dp close(dialog_out); waitpid(pid, (int *)NULL, 0); } - if (!dpv_interrupt) + if (!keep_tite && !dpv_interrupt) printf("\n"); } else warnx("%s: %lli overall read", __func__, dpv_overall_read); Modified: head/lib/libdpv/dpv.h == --- head/lib/libdpv/dpv.h Tue Jan 26 23:37:07 2016(r294859) +++ head/lib/libdpv/dpv.h Tue Jan 26 23:56:27 2016(r294860) @@ -97,6 +97,7 @@ struct dpv_file_node { * Anatomy of config option to pass as dpv() config argument */ struct dpv_config { + uint8_t keep_tite; /* Prevent visually distracting exit */ enum dpv_display display_type; /* Display (default TYPE_LIBDIALOG) */ enum dpv_output output_type; /* Output (default TYPE_NONE) */ int debug; /* Enable debugging output on stderr */ Modified: head/lib/libdpv/dpv_private.h == --- head/lib/libdpv/dpv_private.h Tue Jan 26 23:37:07 2016 (r294859) +++ head/lib/libdpv/dpv_private.h Tue Jan 26 23:56:27 2016 (r294860) @@ -38,6 +38,7 @@ extern uint8_t debug; extern unsigned int dpv_nfiles; /* Extra display information */ +extern uint8_t keep_tite; extern uint8_t no_labels; extern uint8_t wide; extern char *msg_done, *msg_fail, *msg_pending; Modified: head/sys/sys/param.h == --- head/sys/sys/param.hTue Jan 26 23:37:07 2016(r294859) +++ head/sys/sys/param.hTue Jan 26 23:56:27 2016(r294860) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100096 /* Master, propagated to newvers */ +#
svn commit: r294861 - head/usr.bin/dpv
Author: dteske Date: Tue Jan 26 23:59:30 2016 New Revision: 294861 URL: https://svnweb.freebsd.org/changeset/base/294861 Log: Add `-k' for dpv(3) `keep_tite' config option For scripts using dialog(1) several times, it can be visually distracting running dpv(1) several times amidst other dialogs. The `-k' option, similar to dialog(1) `--keep-tite', enables the same functionality to smooth ti/te. Modified: head/usr.bin/dpv/dpv.1 head/usr.bin/dpv/dpv.c Modified: head/usr.bin/dpv/dpv.1 == --- head/usr.bin/dpv/dpv.1 Tue Jan 26 23:56:27 2016(r294860) +++ head/usr.bin/dpv/dpv.1 Tue Jan 26 23:59:30 2016(r294861) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 1 .Os .Sh NAME @@ -138,6 +138,11 @@ Default value is .Dq Li %'10lli bytes read @ %'9.1f bytes/sec. [%i/%i busy/wait] . This format is used when handling more than one file. +.It Fl k +Keep tite. +Prevent visually distracting initialization/exit routines for scripts running +.Xr dialog 1 +several times. .It Fl l Line mode. Read lines from input instead of bytes. .It Fl L Ar size Modified: head/usr.bin/dpv/dpv.c == --- head/usr.bin/dpv/dpv.c Tue Jan 26 23:56:27 2016(r294860) +++ head/usr.bin/dpv/dpv.c Tue Jan 26 23:59:30 2016(r294861) @@ -271,7 +271,7 @@ main(int argc, char *argv[]) * Process command-line options */ while ((ch = getopt(argc, argv, - "a:b:dDhi:I:lL:mn:No:p:P:t:TU:wx:X")) != -1) { + "a:b:dDhi:I:klL:mn:No:p:P:t:TU:wx:X")) != -1) { switch(ch) { case 'a': /* additional message text to append */ if (config->aprompt == NULL) { @@ -307,6 +307,9 @@ main(int argc, char *argv[]) case 'I': /* status line format string for many-files */ config->status_many = optarg; break; + case 'k': /* keep tite */ + config->keep_tite = TRUE; + break; case 'l': /* Line mode */ line_mode = TRUE; break; @@ -467,7 +470,8 @@ main(int argc, char *argv[]) if (dpv(config, file_list) != 0 && debug) warnx("dpv(3) returned error!?"); - end_dialog(); + if (!config->keep_tite) + end_dialog(); dpv_free(); exit(EXIT_SUCCESS); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294862 - head/lib/libdpv
Author: dteske Date: Wed Jan 27 00:02:51 2016 New Revision: 294862 URL: https://svnweb.freebsd.org/changeset/base/294862 Log: Bump copyrights Modified: head/lib/libdpv/dpv.c head/lib/libdpv/dpv.h head/lib/libdpv/dpv_private.h Modified: head/lib/libdpv/dpv.c == --- head/lib/libdpv/dpv.c Tue Jan 26 23:59:30 2016(r294861) +++ head/lib/libdpv/dpv.c Wed Jan 27 00:02:51 2016(r294862) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libdpv/dpv.h == --- head/lib/libdpv/dpv.h Tue Jan 26 23:59:30 2016(r294861) +++ head/lib/libdpv/dpv.h Wed Jan 27 00:02:51 2016(r294862) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libdpv/dpv_private.h == --- head/lib/libdpv/dpv_private.h Tue Jan 26 23:59:30 2016 (r294861) +++ head/lib/libdpv/dpv_private.h Wed Jan 27 00:02:51 2016 (r294862) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294863 - head/usr.bin/dpv
Author: dteske Date: Wed Jan 27 00:03:43 2016 New Revision: 294863 URL: https://svnweb.freebsd.org/changeset/base/294863 Log: Bump copyright Modified: head/usr.bin/dpv/dpv.c Modified: head/usr.bin/dpv/dpv.c == --- head/usr.bin/dpv/dpv.c Wed Jan 27 00:02:51 2016(r294862) +++ head/usr.bin/dpv/dpv.c Wed Jan 27 00:03:43 2016(r294863) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294864 - head/usr.sbin/bsdconfig/share/packages
Author: dteske Date: Wed Jan 27 00:08:23 2016 New Revision: 294864 URL: https://svnweb.freebsd.org/changeset/base/294864 Log: Change incorrect path Modified: head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/share/packages/index.subr == --- head/usr.sbin/bsdconfig/share/packages/index.subr Wed Jan 27 00:03:43 2016(r294863) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Wed Jan 27 00:08:23 2016(r294864) @@ -1,6 +1,6 @@ if [ ! "$_PACKAGES_INDEX_SUBR" ]; then _PACKAGES_INDEX_SUBR=1 # -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ _INDEX_INITTED= # # Default path to pkg(8) repo-packagesite.sqlite database # -SQLITE_REPO="/var/db/pkg/repo-packagesite.sqlite" +SQLITE_REPO="/var/db/pkg/repo-FreeBSD.sqlite" # # Default path to on-disk cache INDEX file ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294865 - head/usr.sbin/bsdconfig/share/packages
Author: dteske Date: Wed Jan 27 00:09:53 2016 New Revision: 294865 URL: https://svnweb.freebsd.org/changeset/base/294865 Log: Fix ABI parsing Modified: head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Modified: head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr == --- head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Wed Jan 27 00:08:23 2016(r294864) +++ head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Wed Jan 27 00:09:53 2016(r294865) @@ -1,6 +1,6 @@ if [ ! "$_PACKAGES_MUSTHAVEPKG_SUBR" ]; then _PACKAGES_MUSTHAVEPKG_SUBR=1 # -# Copyright (c) 2014 Devin Teske +# Copyright (c) 2014-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -45,7 +45,11 @@ f_include $BSDCFG_SHARE/mustberoot.subr f_musthavepkg_init() { local funcname=f_musthavepkg_init - local pkg_abi_awk='$1~/^ABI/{print $NF; exit}' + local pkg_abi_awk=' # BEGIN-AWK + $1 ~ /^ABI/ && $0 = $NF, sub(/^"/, "") && sub(/".*/, "") { + print; found = 1; exit + } END { exit ! found } + ' # END-AWK if [ "$PKG_ABI" ]; then # Already set f_dprintf "PKG_ABI=[%s]" "$PKG_ABI" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294866 - in head/usr.sbin/bsdconfig: include share/packages
Author: dteske Date: Wed Jan 27 00:12:58 2016 New Revision: 294866 URL: https://svnweb.freebsd.org/changeset/base/294866 Log: Use dpv(1) in `bsdconfig packages' Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr Modified: head/usr.sbin/bsdconfig/include/messages.subr == --- head/usr.sbin/bsdconfig/include/messages.subr Wed Jan 27 00:09:53 2016(r294865) +++ head/usr.sbin/bsdconfig/include/messages.subr Wed Jan 27 00:12:58 2016(r294866) @@ -1,5 +1,5 @@ # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -60,6 +60,7 @@ msg_biology_desc="Software related to bi msg_bootstrapping_pkg="Bootstrapping pkg(8)..." msg_brazil="Brazil" msg_building_package_menus="Building package menu(s)..." +msg_building_package_main_menu="Building package main menu..." msg_cad_desc="Computer Aided Design utilities." msg_canada="Canada" msg_cancel="Cancel" @@ -201,7 +202,6 @@ msg_linux_desc="Linux programs that can msg_lisp_desc="Software related to the Lisp language." msg_lithuania="Lithuania" msg_loading_of_dependent_package_failed="Loading of dependent package %s failed" -msg_located_index_now_reading_package_data_from_it="Located INDEX, now reading package data from it..." msg_logging_in_to_user_at_host="Logging in to %s@%s.." msg_looking_for_keymap_files="Looking for keymap files..." msg_looking_up_host="Looking up host %s" @@ -313,6 +313,7 @@ msg_proceed="Proceed" msg_processing_selection="Processing selection..." msg_python_desc="Software related to the Python language." msg_quick_start_how_to_use_this_menu_system="Quick start - How to use this menu system" +msg_reading_package_index_data="Reading package index data" msg_reinstall="Reinstall" msg_reinstall_desc="Mark this package for reinstall" msg_release_name="Release Name" Modified: head/usr.sbin/bsdconfig/share/packages/index.subr == --- head/usr.sbin/bsdconfig/share/packages/index.subr Wed Jan 27 00:09:53 2016(r294865) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Wed Jan 27 00:12:58 2016(r294866) @@ -162,8 +162,6 @@ f_index_initialize() fi ) < "$PACKAGES_INDEX_CACHEFILE" 2> /dev/null )'; then - f_show_info \ - "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then f_show_err \ "$msg_io_or_format_error_on_index_file" @@ -179,8 +177,11 @@ f_index_initialize() # If we reach this point, we need to generate the data from scratch # - f_show_info "$msg_generating_index_from_pkg_database" - eval "$__var_to_set"='$( pkg rquery -I | sort )' + eval "$__var_to_set"='$( pkg rquery -I | ( + exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \ + -b "$DIALOG_BACKTITLE" \ + -- "$msg_generating_index_from_pkg_database" + ) | sort )' # # Attempt to create the persistant on-disk cache @@ -204,7 +205,6 @@ f_index_initialize() "$__tmpfile" "$PACKAGES_INDEX_CACHEFILE" fi - f_show_info "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then f_show_err "$msg_io_or_format_error_on_index_file" return $FAILURE @@ -329,7 +329,9 @@ f_index_read() sub(/^ /, "", category_list) print "PACKAGE_CATEGORIES=\"" category_list "\"" - }' )" # End-Quote + }' | ( exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \ + -b "$DIALOG_BACKTITLE" -- "$msg_reading_package_index_data" + ) )" # End-Quote } # f_index_extract_pages $var_to_get $var_basename $pagesize [$category] Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr == --- head/usr.sbin/bsdconfig/share/packages/packages.subrWed Jan 27 00:09:53 2016(r294865) +++ head/usr.sbin/bsdconfig/share/packages/packages.subrWed Jan 27 00:12:58 2016(r294866) @@ -1,6 +1,6 @@ if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1 # -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -668,6 +668,8 @@ f_package_config() # CATEGORY_MENU_LI
svn commit: r294867 - in head/sys: net netinet
Author: glebius Date: Wed Jan 27 00:20:07 2016 New Revision: 294867 URL: https://svnweb.freebsd.org/changeset/base/294867 Log: Provide TCPSTAT_DEC() and TCPSTAT_FETCH() macros. Modified: head/sys/net/vnet.h head/sys/netinet/tcp_var.h Modified: head/sys/net/vnet.h == --- head/sys/net/vnet.h Wed Jan 27 00:12:58 2016(r294866) +++ head/sys/net/vnet.h Wed Jan 27 00:20:07 2016(r294867) @@ -101,6 +101,9 @@ struct vnet { #defineVNET_PCPUSTAT_ADD(type, name, f, v) \ counter_u64_add(VNET(name)[offsetof(type, f) / sizeof(uint64_t)], (v)) +#defineVNET_PCPUSTAT_FETCH(type, name, f) \ +counter_u64_fetch(VNET(name)[offsetof(type, f) / sizeof(uint64_t)]) + #defineVNET_PCPUSTAT_SYSINIT(name) \ static void\ vnet_##name##_init(const void *unused) \ Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Wed Jan 27 00:12:58 2016(r294866) +++ head/sys/netinet/tcp_var.h Wed Jan 27 00:20:07 2016(r294867) @@ -605,6 +605,9 @@ VNET_PCPUSTAT_DECLARE(struct tcpstat, tc #defineTCPSTAT_ADD(name, val) \ VNET_PCPUSTAT_ADD(struct tcpstat, tcpstat, name, (val)) #defineTCPSTAT_INC(name) TCPSTAT_ADD(name, 1) +#defineTCPSTAT_DEC(name) TCPSTAT_ADD(name, -1) +#defineTCPSTAT_FETCH(name) VNET_PCPUSTAT_FETCH(struct tcpstat, tcpstat, \ + name) /* * Kernel module consumers must use this accessor macro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294868 - head/lib/libc
Author: bdrewery Date: Wed Jan 27 00:24:24 2016 New Revision: 294868 URL: https://svnweb.freebsd.org/changeset/base/294868 Log: Remove excess whitespace Modified: head/lib/libc/Makefile Modified: head/lib/libc/Makefile == --- head/lib/libc/Makefile Wed Jan 27 00:20:07 2016(r294867) +++ head/lib/libc/Makefile Wed Jan 27 00:24:24 2016(r294868) @@ -173,7 +173,7 @@ CFLAGS+= -I${SRCTOP}/lib/libutil # Same issue with libm MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${SRCTOP}/lib/msun -V ARCH_SUBDIR # unfortunately msun/src contains both private and public headers -CFLAGS+= -I${SRCTOP}/lib/msun/${MSUN_ARCH_SUBDIR} +CFLAGS+= -I${SRCTOP}/lib/msun/${MSUN_ARCH_SUBDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -I${SRCTOP}/lib/msun/x86 .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294869 - in head: sys/dev/cxgbe/tom sys/netinet usr.bin/systat
Author: glebius Date: Wed Jan 27 00:45:46 2016 New Revision: 294869 URL: https://svnweb.freebsd.org/changeset/base/294869 Log: Augment struct tcpstat with tcps_states[], which is used for book-keeping the amount of TCP connections by state. Provides a cheap way to get connection count without traversing the whole pcb list. Sponsored by: Netflix Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/netinet/tcp_offload.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/usr.bin/systat/netstat.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c == --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jan 27 00:24:24 2016 (r294868) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jan 27 00:45:46 2016 (r294869) @@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #define TCPSTATES #include #include +#include #include #include "common/common.h" Modified: head/sys/netinet/tcp_offload.c == --- head/sys/netinet/tcp_offload.c Wed Jan 27 00:24:24 2016 (r294868) +++ head/sys/netinet/tcp_offload.c Wed Jan 27 00:45:46 2016 (r294869) @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #defineTCPOUTFLAGS #include +#include #include int registered_toedevs; Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Wed Jan 27 00:24:24 2016(r294868) +++ head/sys/netinet/tcp_subr.c Wed Jan 27 00:45:46 2016(r294869) @@ -1468,6 +1468,7 @@ tcp_close(struct tcpcb *tp) #endif in_pcbdrop(inp); TCPSTAT_INC(tcps_closed); + TCPSTAT_DEC(tcps_states[tp->t_state]); KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); so = inp->inp_socket; soisdisconnected(so); @@ -2910,6 +2911,8 @@ tcp_state_change(struct tcpcb *tp, int n int pstate = tp->t_state; #endif + TCPSTAT_DEC(tcps_states[tp->t_state]); + TCPSTAT_INC(tcps_states[newstate]); tp->t_state = newstate; TCP_PROBE6(state__change, NULL, tp, NULL, tp, NULL, pstate); } Modified: head/sys/netinet/tcp_syncache.c == --- head/sys/netinet/tcp_syncache.c Wed Jan 27 00:24:24 2016 (r294868) +++ head/sys/netinet/tcp_syncache.c Wed Jan 27 00:45:46 2016 (r294869) @@ -351,6 +351,7 @@ syncache_insert(struct syncache *sc, str SCH_UNLOCK(sch); + TCPSTAT_INC(tcps_states[TCPS_SYN_RECEIVED]); TCPSTAT_INC(tcps_sc_added); } @@ -364,6 +365,7 @@ syncache_drop(struct syncache *sc, struc SCH_LOCK_ASSERT(sch); + TCPSTAT_DEC(tcps_states[TCPS_SYN_RECEIVED]); TAILQ_REMOVE(&sch->sch_bucket, sc, sc_hash); sch->sch_length--; @@ -992,7 +994,16 @@ syncache_expand(struct in_conninfo *inc, goto failed; } } else { - /* Pull out the entry to unlock the bucket row. */ + /* +* Pull out the entry to unlock the bucket row. +* +* NOTE: We must decrease TCPS_SYN_RECEIVED count here, not +* tcp_state_change(). The tcpcb is not existent at this +* moment. A new one will be allocated via syncache_socket-> +* sonewconn->tcp_usr_attach in TCPS_CLOSED state, then +* syncache_socket() will change it to TCPS_SYN_RECEIVED. +*/ + TCPSTAT_DEC(tcps_states[TCPS_SYN_RECEIVED]); TAILQ_REMOVE(&sch->sch_bucket, sc, sc_hash); sch->sch_length--; #ifdef TCP_OFFLOAD Modified: head/sys/netinet/tcp_timewait.c == --- head/sys/netinet/tcp_timewait.c Wed Jan 27 00:24:24 2016 (r294868) +++ head/sys/netinet/tcp_timewait.c Wed Jan 27 00:45:46 2016 (r294869) @@ -660,6 +660,7 @@ tcp_tw_2msl_stop(struct tcptw *tw, int r if (!reuse) uma_zfree(V_tcptw_zone, tw); + TCPSTAT_DEC(tcps_states[TCPS_TIME_WAIT]); } struct tcptw * Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Wed Jan 27 00:24:24 2016 (r294868) +++ head/sys/netinet/tcp_usrreq.c Wed Jan 27 00:45:46 2016 (r294869) @@ -1883,6 +1883,7 @@ tcp_attach(struct socket *so) tp->t_state = TCPS_CLOSED; INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + TCPSTAT_INC(tcps_states[TCPS_CLOSED]); r
svn commit: r294870 - head/sys/netinet
Author: glebius Date: Wed Jan 27 00:48:05 2016 New Revision: 294870 URL: https://svnweb.freebsd.org/changeset/base/294870 Log: Grab a snap amount of TCP connections in syncache from tcpstat. Modified: head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_syncache.h Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Wed Jan 27 00:45:46 2016(r294869) +++ head/sys/netinet/tcp_subr.c Wed Jan 27 00:48:05 2016(r294870) @@ -1590,7 +1590,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) * resource-intensive to repeat twice on every request. */ if (req->oldptr == NULL) { - n = V_tcbinfo.ipi_count + syncache_pcbcount(); + n = V_tcbinfo.ipi_count + + TCPSTAT_FETCH(tcps_states[TCPS_SYN_RECEIVED]); n += imax(n / 8, 10); req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xtcpcb); return (0); @@ -1607,7 +1608,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) n = V_tcbinfo.ipi_count; INP_LIST_RUNLOCK(&V_tcbinfo); - m = syncache_pcbcount(); + m = TCPSTAT_FETCH(tcps_states[TCPS_SYN_RECEIVED]); error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) + (n + m) * sizeof(struct xtcpcb)); Modified: head/sys/netinet/tcp_syncache.c == --- head/sys/netinet/tcp_syncache.c Wed Jan 27 00:45:46 2016 (r294869) +++ head/sys/netinet/tcp_syncache.c Wed Jan 27 00:48:05 2016 (r294870) @@ -2100,25 +2100,6 @@ syncookie_reseed(void *arg) } /* - * Returns the current number of syncache entries. This number - * will probably change before you get around to calling - * syncache_pcblist. - */ -int -syncache_pcbcount(void) -{ - struct syncache_head *sch; - int count, i; - - for (count = 0, i = 0; i < V_tcp_syncache.hashsize; i++) { - /* No need to lock for a read. */ - sch = &V_tcp_syncache.hashbase[i]; - count += sch->sch_length; - } - return count; -} - -/* * Exports the syncache entries to userland so that netstat can display * them alongside the other sockets. This function is intended to be * called only from tcp_pcblist. Modified: head/sys/netinet/tcp_syncache.h == --- head/sys/netinet/tcp_syncache.h Wed Jan 27 00:45:46 2016 (r294869) +++ head/sys/netinet/tcp_syncache.h Wed Jan 27 00:48:05 2016 (r294870) @@ -46,7 +46,6 @@ intsyncache_add(struct in_conninfo *, void *, void *); voidsyncache_chkrst(struct in_conninfo *, struct tcphdr *); voidsyncache_badack(struct in_conninfo *); -int syncache_pcbcount(void); int syncache_pcblist(struct sysctl_req *req, int max_pcbs, int *pcbs_exported); struct syncache { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294871 - head/contrib/bsnmp/snmp_mibII
Author: glebius Date: Wed Jan 27 00:50:27 2016 New Revision: 294871 URL: https://svnweb.freebsd.org/changeset/base/294871 Log: Grab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of net.inet.tcp.pcblist, which is much cheaper. Modified: head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_tcp.c == --- head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Wed Jan 27 00:48:05 2016 (r294870) +++ head/contrib/bsnmp/snmp_mibII/mibII_tcp.c Wed Jan 27 00:50:27 2016 (r294871) @@ -45,10 +45,10 @@ struct tcp_index { }; static uint64_t tcp_tick; +static uint64_t tcp_stats_tick; static struct tcpstat tcpstat; static struct xinpgen *xinpgen; static size_t xinpgen_len; -static u_int tcp_count; static u_int tcp_total; static u_int oidnum; @@ -64,13 +64,9 @@ tcp_compare(const void *p1, const void * } static int -fetch_tcp(void) +fetch_tcp_stats(void) { size_t len; - struct xinpgen *ptr; - struct xtcpcb *tp; - struct tcp_index *oid; - in_addr_t inaddr; len = sizeof(tcpstat); if (sysctlbyname("net.inet.tcp.stats", &tcpstat, &len, NULL, 0) == -1) { @@ -82,6 +78,20 @@ fetch_tcp(void) return (-1); } + tcp_stats_tick = get_ticks(); + + return (0); +} + +static int +fetch_tcp(void) +{ + size_t len; + struct xinpgen *ptr; + struct xtcpcb *tp; + struct tcp_index *oid; + in_addr_t inaddr; + len = 0; if (sysctlbyname("net.inet.tcp.pcblist", NULL, &len, NULL, 0) == -1) { syslog(LOG_ERR, "net.inet.tcp.pcblist: %m"); @@ -102,7 +112,6 @@ fetch_tcp(void) tcp_tick = get_ticks(); - tcp_count = 0; tcp_total = 0; for (ptr = (struct xinpgen *)(void *)((char *)xinpgen + xinpgen->xig_len); ptr->xig_len > sizeof(struct xinpgen); @@ -114,10 +123,6 @@ fetch_tcp(void) if (tp->xt_inp.inp_vflag & INP_IPV4) tcp_total++; - - if (tp->xt_tp.t_state == TCPS_ESTABLISHED || - tp->xt_tp.t_state == TCPS_CLOSE_WAIT) - tcp_count++; } if (oidnum < tcp_total) { @@ -184,8 +189,8 @@ op_tcp(struct snmp_context *ctx __unused abort(); } - if (tcp_tick < this_tick) - if (fetch_tcp() == -1) + if (tcp_stats_tick < this_tick) + if (fetch_tcp_stats() == -1) return (SNMP_ERR_GENERR); switch (value->var.subs[sub - 1]) { @@ -226,7 +231,8 @@ op_tcp(struct snmp_context *ctx __unused break; case LEAF_tcpCurrEstab: - value->v.uint32 = tcp_count; + value->v.uint32 = tcpstat.tcps_states[TCPS_ESTABLISHED] + + tcpstat.tcps_states[TCPS_CLOSE_WAIT]; break; case LEAF_tcpInSegs: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294872 - head/share/mk
Author: bdrewery Date: Wed Jan 27 01:24:05 2016 New Revision: 294872 URL: https://svnweb.freebsd.org/changeset/base/294872 Log: Fix DIRDEPS_BUILD after r294752. DIRDEPS_BUILD does not yet support PROGS having their own dependency file. Overriding .MAKE.DEPENDFILE here causes major problems with the meta mode logic since it creates the Makefile.depend as '.depend' resulting in infinite loops in make due to dirdeps.mk including .depend endlessly. X-MFC-With: r294752 MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Jan 27 00:50:27 2016(r294871) +++ head/share/mk/bsd.dep.mkWed Jan 27 01:24:05 2016(r294872) @@ -56,7 +56,9 @@ _MKDEPCC+=${DEPFLAGS} .endif MKDEPCMD?= CC='${_MKDEPCC}' mkdep DEPENDFILE?= .depend +.if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= ${DEPENDFILE} +.endif DEPENDFILES= ${DEPENDFILE} # Keep `tags' here, before SRCS are mangled below for `depend'. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294874 - head/sys/conf
Author: bdrewery Date: Wed Jan 27 01:24:11 2016 New Revision: 294874 URL: https://svnweb.freebsd.org/changeset/base/294874 Log: FAST_DEPEND: Apply missed nofilemon fix from r294351. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Wed Jan 27 01:24:08 2016(r294873) +++ head/sys/conf/kern.post.mk Wed Jan 27 01:24:11 2016(r294874) @@ -200,7 +200,8 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} DEPENDFILES= .depend -.if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Unormal:Mmeta*} == "" +.if ${MK_FAST_DEPEND} == "yes" && \ +(${.MAKE.MODE:Unormal:Mmeta} == "" || ${.MAKE.MODE:Unormal:Mnofilemon} != "") DEPENDFILES+= .depend.* DEPEND_CFLAGS+=-MD -MP -MF.depend.${.TARGET} DEPEND_CFLAGS+=-MT${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294873 - head/share/mk
Author: bdrewery Date: Wed Jan 27 01:24:08 2016 New Revision: 294873 URL: https://svnweb.freebsd.org/changeset/base/294873 Log: Set a value for _RECURSING_PROGS for debugging. MFC after:3 days Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Wed Jan 27 01:24:05 2016(r294872) +++ head/share/mk/bsd.progs.mk Wed Jan 27 01:24:08 2016(r294873) @@ -119,7 +119,7 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. @@ -127,7 +127,7 @@ $p ${p}_p: .PHONY .MAKE $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ PROG=$p ${x.$p} ${@:E}) .endfor .endfor ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294875 - head/sys/conf
Author: bdrewery Date: Wed Jan 27 01:24:14 2016 New Revision: 294875 URL: https://svnweb.freebsd.org/changeset/base/294875 Log: FAST_DEPEND: Mark some unneeded code for later removal. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Wed Jan 27 01:24:11 2016(r294874) +++ head/sys/conf/kern.pre.mk Wed Jan 27 01:24:14 2016(r294875) @@ -64,7 +64,7 @@ NOSTDINC= -nostdinc INCLUDES= ${NOSTDINC} ${INCLMAGIC} -I. -I$S -.if make(depend) || make(kernel-depend) +.if ${MK_FAST_DEPEND} == "no" && (make(depend) || make(kernel-depend)) # This hack lets us use the ipfilter code without spamming a new # include path into contrib'ed source files. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294876 - head/lib/libc/net
Author: bdrewery Date: Wed Jan 27 01:33:19 2016 New Revision: 294876 URL: https://svnweb.freebsd.org/changeset/base/294876 Log: nslexer.c does not depend on nsparser.h. nslexer.o depends on nsparser.h, which is already added by bsd.lib.mk and .depend. This reverts r237402. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/net/Makefile.inc Modified: head/lib/libc/net/Makefile.inc == --- head/lib/libc/net/Makefile.inc Wed Jan 27 01:24:14 2016 (r294875) +++ head/lib/libc/net/Makefile.inc Wed Jan 27 01:33:19 2016 (r294876) @@ -36,7 +36,7 @@ LFLAGS+=-P_nsyy CLEANFILES+=nslexer.c nslexer.c.* -nslexer.c: nslexer.l nsparser.h +nslexer.c: nslexer.l ${LEX} ${LFLAGS} -o${.TARGET}.tmp1 ${.IMPSRC} sed -e '/YY_BUF_SIZE/s/16384/1024/' ${.TARGET}.tmp1 >${.TARGET}.tmp2 rm -f ${.TARGET}.tmp1 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294878 - head/share/mk
Author: bdrewery Date: Wed Jan 27 01:33:26 2016 New Revision: 294878 URL: https://svnweb.freebsd.org/changeset/base/294878 Log: Revert yacc dependency back to pre-r241298. Several attempts to fix this logic was done after r241298, which were all reverted, yet this change was not. The .h file does not depend on the .c file, so do not impose such a dependency on it. They are generated by the same command but do not depend on each other. Restore the .ORDER which should handle parallel build issues. This fixes an actual bug where the .h file is not recreated when missing [1]. For example: cd lib/libc make cleanobj make nsparser.h rm nsparser.h make nsparser.h # will not rebuild nsparser.h I have been trying to track down a build problem where nsparser.h is missing when nslexer.o is built. It is possible this is related. Reported by: bde [1] https://lists.freebsd.org/pipermail/svn-src-all/2012-October/059481.html https://lists.freebsd.org/pipermail/svn-src-all/2012-October/060038.html MFC after:3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Jan 27 01:33:23 2016(r294877) +++ head/share/mk/bsd.dep.mkWed Jan 27 01:33:26 2016(r294878) @@ -110,8 +110,8 @@ ${_YC} y.tab.h: ${_YSRC} CLEANFILES+= y.tab.c y.tab.h .elif !empty(YFLAGS:M-d) .for _YH in ${_YC:R}.h -${_YH}: ${_YC} -${_YC}: ${_YSRC} +.ORDER: ${_YC} ${_YH} +${_YC} ${_YH}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} SRCS+= ${_YH} CLEANFILES+= ${_YH} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294877 - head/lib/libc/net
Author: bdrewery Date: Wed Jan 27 01:33:23 2016 New Revision: 294877 URL: https://svnweb.freebsd.org/changeset/base/294877 Log: Replace nslexer.l->nslexer.c custom rule with a -D CFLAG. This avoids reproducing the lex logic which had dependencies set wrong and used an intermediate file for modifying the YY_BUF_SIZE. This has only been possible since flex 2.5.37 was imported in r250873, which uses #ifndef YY_BUF_SIZE. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/net/Makefile.inc Modified: head/lib/libc/net/Makefile.inc == --- head/lib/libc/net/Makefile.inc Wed Jan 27 01:33:19 2016 (r294876) +++ head/lib/libc/net/Makefile.inc Wed Jan 27 01:33:23 2016 (r294877) @@ -12,7 +12,7 @@ SRCS+=base64.c ether_addr.c eui64.c \ getproto.c getprotoent.c getprotoname.c getservent.c \ if_indextoname.c if_nameindex.c if_nametoindex.c \ ip6opt.c linkaddr.c map_v4v6.c name6.c ntoh.c \ - nsdispatch.c nslexer.c nsparser.y nss_compat.c \ + nsdispatch.c nslexer.l nsparser.y nss_compat.c \ rcmd.c rcmdsh.c recv.c rthdr.c sctp_sys_calls.c send.c \ sockatmark.c sourcefilter.c vars.c @@ -34,13 +34,8 @@ CFLAGS+=-I${LIBC_SRCTOP}/resolv YFLAGS+=-p_nsyy LFLAGS+=-P_nsyy -CLEANFILES+=nslexer.c nslexer.c.* - -nslexer.c: nslexer.l - ${LEX} ${LFLAGS} -o${.TARGET}.tmp1 ${.IMPSRC} - sed -e '/YY_BUF_SIZE/s/16384/1024/' ${.TARGET}.tmp1 >${.TARGET}.tmp2 - rm -f ${.TARGET}.tmp1 - mv -f ${.TARGET}.tmp2 ${.TARGET} +CFLAGS.nslexer.c= -DYY_BUF_SIZE=1024 +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} MAN+= byteorder.3 ethers.3 eui64.3 \ getaddrinfo.3 gai_strerror.3 gethostbyname.3 \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294879 - head/sys/netpfil/ipfw
Author: luigi Date: Wed Jan 27 02:08:30 2016 New Revision: 294879 URL: https://svnweb.freebsd.org/changeset/base/294879 Log: bugfix: the scheduler template (dn_schk) for the round robin scheduler is followed by another structure (rr_schk) whose size must be set in the schk_datalen field of the descriptor. Not allocating the memory may cause other memory to be overwritten (though dn_schk is 192 bytes and rr_schk only 12 so we may be lucky and end up in the padding after the dn_schk). This is a merge candidate for stable and 10.3 MFC after:3 days Modified: head/sys/netpfil/ipfw/dn_sched_rr.c Modified: head/sys/netpfil/ipfw/dn_sched_rr.c == --- head/sys/netpfil/ipfw/dn_sched_rr.c Wed Jan 27 01:33:26 2016 (r294878) +++ head/sys/netpfil/ipfw/dn_sched_rr.c Wed Jan 27 02:08:30 2016 (r294879) @@ -294,7 +294,7 @@ static struct dn_alg rr_desc = { _SI( .name = ) "RR", _SI( .flags = ) DN_MULTIQUEUE, - _SI( .schk_datalen = ) 0, + _SI( .schk_datalen = ) sizeof(struct rr_schk), _SI( .si_datalen = ) sizeof(struct rr_si), _SI( .q_datalen = ) sizeof(struct rr_queue) - sizeof(struct dn_queue), @@ -311,5 +311,6 @@ static struct dn_alg rr_desc = { _SI( .free_queue = ) rr_free_queue, }; +_Static_assert(sizeof(struct dn_schk) < 193, "a"); DECLARE_DNSCHED_MODULE(dn_rr, &rr_desc); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294880 - head/usr.sbin/bsdconfig/share
Author: dteske Date: Wed Jan 27 02:11:58 2016 New Revision: 294880 URL: https://svnweb.freebsd.org/changeset/base/294880 Log: Replace awk with more efficient builtins-only algo Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr == --- head/usr.sbin/bsdconfig/share/strings.subr Wed Jan 27 02:08:30 2016 (r294879) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Jan 27 02:11:58 2016 (r294880) @@ -70,17 +70,63 @@ f_substr() # f_snprintf() { + local __funcname=f_snprintf local __var_to_set="$1" __size="$2" shift 2 # var_to_set size - eval "$__var_to_set"=\$\( printf -- \"\$@\" \| \ - awk -v max=\"\$__size\" \'' - { - len = length($0) - max -= len - print substr($0,0,(max > 0 ? len : max + len)) - if ( max < 0 ) exit - max-- - }'\' \) + + if [ "$__size" -eq 0 ] 2> /dev/null; then + setvar "$__var_to_set" "" + return ${SUCCESS:-0} + elif [ $? -ge 2 ] || [ $__size -lt 0 ]; then + setvar "$__var_to_set" "" + echo "$__funcname: invalid size argument \`__size'" >&2 + return ${FAILURE:-1} + fi + + local __f_snprintf_tmp + f_sprintf __f_snprintf_tmp "$@" + + local __tmp_size=${#__f_snprintf_tmp} + local __trim=$(( $__tmp_size - $__size )) __trimq + local __tbuf __tbuf_len + local __mask __mask_len + while [ $__trim -gt 0 ]; do + __tbuf="?" + __tbuf_len=1 + if [ $__trim -le $__size ]; then + while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ] + do + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + done + __trimq=$(( $__trim / $__tbuf_len )) + __trim=$(( $__trim - $__tbuf_len * $__trimq )) + while [ $__trimq -gt 0 ]; do + __f_snprintf_tmp="${__f_snprintf_tmp%$__tbuf}" + __trimq=$(( $__trimq - 1 )) + done + else + __mask="$__f_snprintf_tmp" + while [ $__tbuf_len -lt $(( $__size / $__tbuf_len )) ] + do + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + done + __trimq=$(( $__size / $__tbuf_len )) + if [ $(( $__trimq * $__tbuf_len )) -ne $__size ]; then + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + fi + __mask_len=$(( $__tmp_size - $__tbuf_len * $__trimq )) + __trim=$(( $__tmp_size - $__mask_len - $__size )) + while [ $__trimq -gt 0 ]; do + __mask="${__mask#$__tbuf}" + __trimq=$(( $__trimq - 1 )) + done + __f_snprintf_tmp="${__f_snprintf_tmp%"$__mask"}" + fi + done + setvar "$__var_to_set" "$__f_snprintf_tmp" } # f_sprintf $var_to_set $format [$arguments ...] ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294881 - head/sys/netpfil/ipfw
Author: luigi Date: Wed Jan 27 02:14:08 2016 New Revision: 294881 URL: https://svnweb.freebsd.org/changeset/base/294881 Log: the _Static_assert was not supposed to be in the commit. Modified: head/sys/netpfil/ipfw/dn_sched_rr.c Modified: head/sys/netpfil/ipfw/dn_sched_rr.c == --- head/sys/netpfil/ipfw/dn_sched_rr.c Wed Jan 27 02:11:58 2016 (r294880) +++ head/sys/netpfil/ipfw/dn_sched_rr.c Wed Jan 27 02:14:08 2016 (r294881) @@ -311,6 +311,5 @@ static struct dn_alg rr_desc = { _SI( .free_queue = ) rr_free_queue, }; -_Static_assert(sizeof(struct dn_schk) < 193, "a"); DECLARE_DNSCHED_MODULE(dn_rr, &rr_desc); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294882 - head/sys/netpfil/ipfw/test
Author: luigi Date: Wed Jan 27 02:22:31 2016 New Revision: 294882 URL: https://svnweb.freebsd.org/changeset/base/294882 Log: cleanup and document in some detail the internals of the testing code for dummynet schedulers Modified: head/sys/netpfil/ipfw/test/Makefile head/sys/netpfil/ipfw/test/dn_test.h head/sys/netpfil/ipfw/test/main.c head/sys/netpfil/ipfw/test/mylist.h head/sys/netpfil/ipfw/test/test_dn_sched.c Modified: head/sys/netpfil/ipfw/test/Makefile == --- head/sys/netpfil/ipfw/test/Makefile Wed Jan 27 02:14:08 2016 (r294881) +++ head/sys/netpfil/ipfw/test/Makefile Wed Jan 27 02:22:31 2016 (r294882) @@ -20,7 +20,7 @@ HEAP_OBJS=$(HEAP_SRCS:.c=.o) VPATH= .:.. -CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW -Wextra +CFLAGS = -I.. -I. -Wall -Werror -O3 -Wextra TARGETS= test_sched # no test_heap by default all: $(TARGETS) Modified: head/sys/netpfil/ipfw/test/dn_test.h == --- head/sys/netpfil/ipfw/test/dn_test.hWed Jan 27 02:14:08 2016 (r294881) +++ head/sys/netpfil/ipfw/test/dn_test.hWed Jan 27 02:22:31 2016 (r294882) @@ -23,8 +23,8 @@ extern "C" { extern int debug; #define ND(fmt, args...) do {} while (0) #define D1(fmt, args...) do {} while (0) -#define D(fmt, args...) fprintf(stderr, "%-8s " fmt "\n", \ -__FUNCTION__, ## args) +#define D(fmt, args...) fprintf(stderr, "%-10s %4d %-8s " fmt "\n", \ +__FILE__, __LINE__, __FUNCTION__, ## args) #define DX(lev, fmt, args...) do { \ if (debug > lev) D(fmt, ## args); } while (0) @@ -53,11 +53,24 @@ enum{ DN_SCHED_WF2QP, }; +/* from ip_dummynet.h, fields used in ip_dn_private.h */ struct dn_id { - int type, subtype, len, id; + uint16_tlen; /* total len inc. this header */ + uint8_t type; + uint8_t subtype; +// uint32_tid; /* generic id */ }; +/* (from ip_dummynet.h) + * A flowset, which is a template for flows. Contains parameters + * from the command line: id, target scheduler, queue sizes, plr, + * flow masks, buckets for the flow hash, and possibly scheduler- + * specific parameters (weight, quantum and so on). + */ struct dn_fs { +/* generic scheduler parameters. Leave them at -1 if unset. + * Now we use 0: weight, 1: lmax, 2: priority + */ int par[4]; /* flowset parameters */ /* simulation entries. @@ -78,16 +91,29 @@ struct dn_fs { int cur; }; +/* (ip_dummynet.h) + * scheduler template, indicating nam, number, mask and buckets + */ struct dn_sch { }; +/* (from ip_dummynet.h) + * dn_flow collects flow_id and stats for queues and scheduler + * instances, and is used to pass these info to userland. + * oid.type/oid.subtype describe the object, oid.id is number + * of the parent object. + */ struct dn_flow { struct dn_id oid; - int length; - int len_bytes; - int drops; + uint64_t tot_pkts; uint64_t tot_bytes; - uint32_t flow_id; + uint32_t length;/* Queue length, in packets */ + uint32_t len_bytes; /* Queue length, in bytes */ + uint32_t drops; + //uint32_t flow_id; + + /* the following fields are used by the traffic generator. +*/ struct list_head h; /* used by the generator */ /* bytes served by the flow since the last backlog time */ @@ -96,6 +122,7 @@ struct dn_flow { uint64_t sch_bytes; }; +/* the link */ struct dn_link { }; @@ -107,9 +134,9 @@ struct mbuf { int len; } m_pkthdr; struct mbuf *m_nextpkt; - int flow_id;/* for testing, index of a flow */ + uint32_t flow_id; /* for testing, index of a flow */ //int flowset_id; /* for testing, index of a flowset */ - void *cfg; /* config args */ + //void *cfg;/* config args */ }; #define MALLOC_DECLARE(x) extern volatile int __dummy__ ## x @@ -131,36 +158,9 @@ typedef struct _md_t moduledata_t; moduledata_t *_g_##name = & b #define MODULE_DEPEND(a, b, c, d, e) -#ifdef IPFW #include #include #include -#else -struct dn_queue { -struct dn_fsk *fs; /* parent flowset. */ -struct dn_sch_inst *_si; /* parent sched instance. */ -}; -struct dn_schk { -}; -struct dn_fsk { - struct dn_fs fs; - struct dn_schk *sched; -}; -struct dn_sch_inst { - struct dn_schk *sched; -}; -struct dn_alg { - int type; - const char *name; - void *enqueue, *dequeue; - int q_datalen, si_datalen, schk_datalen; - int (*config)(struct dn_schk *); - int (*new_sched)(struct dn_sch_inst *); - int (*new_fsk)(struct dn_fsk *); -int (*new_queue)(struct dn_queue *q); -}; - -#endif
svn commit: r294883 - in head: lib/libdevinfo share/man/man9 sys/arm/arm sys/arm/at91 sys/arm/cavium/cns11xx sys/arm/mv sys/arm/versatile sys/arm/xscale/i8134x sys/arm/xscale/ixp425 sys/arm/xscale/...
Author: jhibbits Date: Wed Jan 27 02:23:54 2016 New Revision: 294883 URL: https://svnweb.freebsd.org/changeset/base/294883 Log: Convert rman to use rman_res_t instead of u_long Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Modified: head/lib/libdevinfo/devinfo.3 head/lib/libdevinfo/devinfo.h head/share/man/man9/bus_adjust_resource.9 head/share/man/man9/bus_alloc_resource.9 head/share/man/man9/bus_get_resource.9 head/share/man/man9/bus_set_resource.9 head/share/man/man9/rman.9 head/sys/arm/arm/nexus.c head/sys/arm/at91/at91.c head/sys/arm/cavium/cns11xx/econa.c head/sys/arm/mv/mv_localbus.c head/sys/arm/mv/mv_pci.c head/sys/arm/versatile/versatile_pci.c head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/i8134x/i81342_pci.c head/sys/arm/xscale/i8134x/obio.c head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425_pci.c head/sys/arm/xscale/pxa/pxa_obio.c head/sys/arm/xscale/pxa/pxa_smi.c head/sys/arm64/arm64/gic_v3_fdt.c head/sys/arm64/arm64/nexus.c head/sys/arm64/cavium/thunder_pcie.c head/sys/arm64/cavium/thunder_pcie_pem.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_hpet.c head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpi_resource.c head/sys/dev/acpica/acpi_timer.c head/sys/dev/acpica/acpivar.h head/sys/dev/advansys/adv_isa.c head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ata/ata-cbus.c head/sys/dev/ata/ata-isa.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h head/sys/dev/atkbdc/atkbdc_ebus.c head/sys/dev/atkbdc/atkbdc_isa.c head/sys/dev/atkbdc/atkbdc_subr.c head/sys/dev/cs/if_cs.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c head/sys/dev/ed/if_ed_3c503.c head/sys/dev/ed/if_ed_cbus.c head/sys/dev/ed/if_ed_hpp.c head/sys/dev/ed/if_ed_wd80x3.c head/sys/dev/eisa/eisaconf.c head/sys/dev/fdt/simplebus.c head/sys/dev/fe/if_fe_cbus.c head/sys/dev/fe/if_fe_isa.c head/sys/dev/gpio/gpiobus.c head/sys/dev/mca/mca_bus.c head/sys/dev/mvs/mvs_pci.c head/sys/dev/mvs/mvs_soc.c head/sys/dev/ncv/ncr53c500_pccard.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/ofw/ofwbus.c head/sys/dev/pccard/pccard.c head/sys/dev/pccard/pccardvarp.h head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h head/sys/dev/pcf/pcf_isa.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_host_generic.c head/sys/dev/pci/pci_iov.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pci_private.h head/sys/dev/pci/pci_subr.c head/sys/dev/pci/pcib_private.h head/sys/dev/pci/pcivar.h head/sys/dev/pci/vga_pci.c head/sys/dev/ppc/ppc.c head/sys/dev/ppc/ppcvar.h head/sys/dev/puc/puc.c head/sys/dev/puc/puc_bfe.h head/sys/dev/quicc/quicc_bfe.h head/sys/dev/quicc/quicc_core.c head/sys/dev/scc/scc_bfe.h head/sys/dev/scc/scc_core.c head/sys/dev/siba/siba.c head/sys/dev/siba/siba_bwn.c head/sys/dev/siba/siba_pcib.c head/sys/dev/siis/siis.c head/sys/dev/snc/if_snc_cbus.c head/sys/dev/sound/isa/gusc.c head/sys/dev/sound/isa/sbc.c head/sys/dev/sound/pci/csa.c head/sys/dev/sound/pci/fm801.c head/sys/dev/sound/pci/vibes.c head/sys/dev/stg/tmc18c30_subr.c head/sys/dev/wl/if_wl.c head/sys/isa/isa_common.c head/sys/isa/isa_common.h head/sys/kern/bus_if.m head/sys/kern/subr_bus.c head/sys/kern/subr_rman.c head/sys/mips/adm5120/admpci.c head/sys/mips/adm5120/obio.c head/sys/mips/alchemy/obio.c head/sys/mips/atheros/apb.c head/sys/mips/atheros/ar71xx_pci.c head/sys/mips/atheros/ar724x_pci.c head/sys/mips/atheros/qca955x_pci.c head/sys/mips/beri/beri_simplebus.c head/sys/mips/cavium/ciu.c head/sys/mips/cavium/obio.c head/sys/mips/cavium/octopci.c head/sys/mips/idt/idtpci.c head/sys/mips/idt/obio.c head/sys/mips/malta/gt.c head/sys/mips/malta/gt_pci.c head/sys/mips/malta/obio.c head/sys/mips/mips/cpu.c head/sys/mips/mips/nexus.c head/sys/mips/nlm/xlp_simplebus.c head/sys/mips/rmi/iodi.c head/sys/mips/rmi/xlr_pci.c head/sys/mips/rt305x/obio.c head/sys/mips/rt305x/rt305x_gpio.c head/sys/mips/rt305x/rt305x_pci.c head/sys/mips/sentry5/obio.c head/sys/mips/sibyte/sb_zbbus.c head/sys/mips/sibyte/sb_zbpci.c head/sys/pc98/pc98/canbus.c head/sys/powerpc/mpc85xx/lbc.c he
svn commit: r294884 - in head/etc: defaults rc.d
Author: cy Date: Wed Jan 27 02:25:25 2016 New Revision: 294884 URL: https://svnweb.freebsd.org/changeset/base/294884 Log: Allow specification of fetch options for ntp leap-seconds fetch. MFC after:1 week X-MFC with: r289421, r293037, r294773 Modified: head/etc/defaults/rc.conf head/etc/rc.d/ntpd Modified: head/etc/defaults/rc.conf == --- head/etc/defaults/rc.conf Wed Jan 27 02:23:54 2016(r294883) +++ head/etc/defaults/rc.conf Wed Jan 27 02:25:25 2016(r294884) @@ -368,6 +368,8 @@ ntp_db_leapfile="/var/db/ntpd.leap-secon # Working copy (updated weekly) leapfile ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list"; # Source from which to fetch leapfile +ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, + # e.g. --no-verify-peer ntp_leapfile_expiry_days=30# Check for new leapfile 30 days prior to # expiry. ntp_leapfile_fetch_verbose="NO"# Be verbose during NTP leapfile fetch Modified: head/etc/rc.d/ntpd == --- head/etc/rc.d/ntpd Wed Jan 27 02:23:54 2016(r294883) +++ head/etc/rc.d/ntpd Wed Jan 27 02:25:25 2016(r294884) @@ -105,7 +105,7 @@ ntpd_fetch_leapfile() { $verbose Within ntp leapfile expiry limit, initiating fetch for url in $ntp_leapfile_sources ; do $verbose fetching $url - fetch -mqo $ntp_tmp_leapfile $url && break + fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break done ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile) if [ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294470 - head/libexec/rtld-elf
On Sat, 23 Jan 2016 12:00:23 + Antoine Brodin wrote: > On Thu, Jan 21, 2016 at 11:36 PM, Alexander Kabaev > wrote: > > On Thu, 21 Jan 2016 22:20:12 +0100 > > Antoine Brodin wrote: > > > >> On Thu, Jan 21, 2016 at 12:26 AM, Alexander Kabaev > >> wrote: > >> > Author: kan > >> > Date: Wed Jan 20 23:26:35 2016 > >> > New Revision: 294470 > >> > URL: https://svnweb.freebsd.org/changeset/base/294470 > >> > > >> > Log: > >> > Fix initlist_add_object invocation parameters. > >> > > >> > The tail parameter should point to the last object for > >> > which dependencies should be processed. In most cases, > >> > this is the object itself. > >> > > >> > Modified: > >> > head/libexec/rtld-elf/rtld.c > >> > >> Hi, > >> > >> It seems there are still some hangs after this fix (seen on the > >> -head package builders, tar -xf hanging for instance). > >> > >> Cheers, > >> > >> Antoine > > > > I've seen hangs _before_ this fix but none after. You'd have to > > collect some backtraces and share with me and kib@. > > False alarm, for unknown reasons java/eclipse eats all CPU on head and > other ports were starving. > > Cheers, > > Antoine For the record, we have reitroduced the bug fixed once already eight years ago in r178807. The symptoms are exacty that: multi-threaded processed spinning in userland wasting CPU time. The fix is out for review to kib@ and if he does no object, I'll check it in tomorrow. -- Alexander Kabaev pgpT_MRcCgh78.pgp Description: Цифровая подпись OpenPGP
Re: svn commit: r294869 - in head: sys/dev/cxgbe/tom sys/netinet usr.bin/systat
This seems to break i386 LINT: /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1021:20: error: use of undeclared identifier 'tcpstates'; did you mean 'tcpstat'? toep->tp_tid, tcpstates[tp->t_state], toep, inp); ^ tcpstat /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, p2, p3, p4, p5, 0) ^ /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' (u_long)(p1), (u_long)(p2), (u_long)(p3), \ ^ /usr/freebsd-svn/head/sys/netinet/tcp_var.h:604:39: note: 'tcpstat' declared here VNET_PCPUSTAT_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ ^ --- all_subdir_ctl --- --- ctl_error.o --- cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/i386.i386/usr/freebsd-svn/head/sys/LINT/opt_global.h -I. -I/usr/freebsd-svn/head/sys -fno-common -I/usr/obj/i386.i386/usr/freebsd-svn/head/sys/LINT -fno-builtin -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -mno-aes -mno-avx -std=iso9899:1999 -c /usr/freebsd-svn/head/sys/modules/ctl/../../cam/ctl/ctl_error.c -o ctl_error.o --- all_subdir_cxgb --- /usr/freebsd-svn/head/sys/net/vnet.h:89:33: note: expanded from macro 'VNET_PCPUSTAT_DECLARE' VNET_DECLARE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) ^ /usr/freebsd-svn/head/sys/net/vnet.h:399:37: note: expanded from macro 'VNET_DECLARE' #define VNET_DECLARE(t, n) extern t n ^ /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1230:16: error: use of undeclared identifier 'tcpstates'; did you mean 'tcpstat'? tid, tp ? tcpstates[tp->t_state] : "no tp" , toep->tp_flags, inp); ^ tcpstat /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, p2, p3, p4, p5, 0) ^ /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' (u_long)(p1), (u_long)(p2), (u_long)(p3), \ ^ /usr/freebsd-svn/head/sys/netinet/tcp_var.h:604:39: note: 'tcpstat' declared here VNET_PCPUSTAT_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ ^ /usr/freebsd-svn/head/sys/net/vnet.h:89:33: note: expanded from macro 'VNET_PCPUSTAT_DECLARE' VNET_DECLARE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) ^ /usr/freebsd-svn/head/sys/net/vnet.h:399:37: note: expanded from macro 'VNET_DECLARE' #define VNET_DECLARE(t, n) extern t n ^ /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1230:14: error: pointer type mismatch ('counter_u64_t' (aka 'unsigned long long *') and 'char *') [-Werror,-Wpointer-type-mismatch] tid, tp ? tcpstates[tp->t_state] : "no tp" , toep->tp_flags, inp); ^ ~~ ~~~ /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, p2, p3, p4, p5, 0) ^ /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' (u_long)(p1), (u_long)(p2), (u_long)(p3), \ ^ /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1293:11: error: use of undeclared identifier 'tcpstates'; did you mean 'tcpstat'? tp ? tcpstates[tp->t_state] : "no tp", toep->tp_flags); ^ tcpstat /usr/freebsd-svn/head/sys/sys/ktr.h:88:65: note: expanded from macro 'CTR4' #define CTR4(m, format, p1, p2, p3, p4) CTR6(m, format, p1, p2, p3, p4, 0, 0) ^ /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6'
Re: svn commit: r294869 - in head: sys/dev/cxgbe/tom sys/netinet usr.bin/systat
BTW, amd64 LINT builds fine. On Wed, Jan 27, 2016 at 11:50 AM, Sepherosa Ziehau wrote: > This seems to break i386 LINT: > > /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1021:20: > error: use of undeclared identifier 'tcpstates'; did you mean > 'tcpstat'? > toep->tp_tid, tcpstates[tp->t_state], toep, inp); > ^ > tcpstat > /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' > #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, > p2, p3, p4, p5, 0) > ^ > /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' > (u_long)(p1), (u_long)(p2), (u_long)(p3), \ > ^ > /usr/freebsd-svn/head/sys/netinet/tcp_var.h:604:39: note: 'tcpstat' > declared here > VNET_PCPUSTAT_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ > ^ > --- all_subdir_ctl --- > --- ctl_error.o --- > cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE > -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include > /usr/obj/i386.i386/usr/freebsd-svn/head/sys/LINT/opt_global.h -I. > -I/usr/freebsd-svn/head/sys -fno-common > -I/usr/obj/i386.i386/usr/freebsd-svn/head/sys/LINT -fno-builtin > -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv > -fstack-protector -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual -Wundef -Wno-pointer-sign > -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -Wno-error-shift-negative-value -mno-aes > -mno-avx -std=iso9899:1999 -c > /usr/freebsd-svn/head/sys/modules/ctl/../../cam/ctl/ctl_error.c -o > ctl_error.o > --- all_subdir_cxgb --- > /usr/freebsd-svn/head/sys/net/vnet.h:89:33: note: expanded from macro > 'VNET_PCPUSTAT_DECLARE' > VNET_DECLARE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) > ^ > /usr/freebsd-svn/head/sys/net/vnet.h:399:37: note: expanded from macro > 'VNET_DECLARE' > #define VNET_DECLARE(t, n) extern t n > ^ > /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1230:16: > error: use of undeclared identifier 'tcpstates'; did you mean > 'tcpstat'? > tid, tp ? tcpstates[tp->t_state] : "no tp" , toep->tp_flags, inp); > ^ > tcpstat > /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' > #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, > p2, p3, p4, p5, 0) > ^ > /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' > (u_long)(p1), (u_long)(p2), (u_long)(p3), \ > ^ > /usr/freebsd-svn/head/sys/netinet/tcp_var.h:604:39: note: 'tcpstat' > declared here > VNET_PCPUSTAT_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ > ^ > /usr/freebsd-svn/head/sys/net/vnet.h:89:33: note: expanded from macro > 'VNET_PCPUSTAT_DECLARE' > VNET_DECLARE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) > ^ > /usr/freebsd-svn/head/sys/net/vnet.h:399:37: note: expanded from macro > 'VNET_DECLARE' > #define VNET_DECLARE(t, n) extern t n > ^ > /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1230:14: > error: pointer type mismatch ('counter_u64_t' (aka 'unsigned long long > *') and 'char *') [-Werror,-Wpointer-type-mismatch] > tid, tp ? tcpstates[tp->t_state] : "no tp" , toep->tp_flags, inp); > ^ ~~ ~~~ > /usr/freebsd-svn/head/sys/sys/ktr.h:89:69: note: expanded from macro 'CTR5' > #define CTR5(m, format, p1, p2, p3, p4, p5) CTR6(m, format, p1, > p2, p3, p4, p5, 0) > ^ > /usr/freebsd-svn/head/sys/sys/ktr.h:81:44: note: expanded from macro 'CTR6' > (u_long)(p1), (u_long)(p2), (u_long)(p3), \ > ^ > /usr/freebsd-svn/head/sys/modules/cxgb/tom/../../../dev/cxgb/ulp/tom/cxgb_cpl_io.c:1293:11: > error: use of undeclared identifier 'tcpstates'; did you mean > 'tcpstat'? > tp ? tcpstates[tp->t_state] : "no tp", toep->tp_flags); > ^ > tcpstat > /usr/freebsd-svn/head/sys/sys/k
svn commit: r294886 - in head/sys/dev/hyperv: include vmbus
Author: sephe Date: Wed Jan 27 03:53:30 2016 New Revision: 294886 URL: https://svnweb.freebsd.org/changeset/base/294886 Log: hyperv/vmbus: Event handling code refactor. - Use taskqueue instead of swi for event handling. - Scan the interrupt flags in filter - Disable ringbuffer interrupt mask in filter to ensure no unnecessary interrupts. Submitted by: Jun Su Reviewed by: adrian, sephe, Dexuan Approved by: adrian (mentor) MFC after:2 weeks Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D4920 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/vmbus/hv_channel.c head/sys/dev/hyperv/vmbus/hv_connection.c head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Modified: head/sys/dev/hyperv/include/hyperv.h == --- head/sys/dev/hyperv/include/hyperv.hWed Jan 27 03:51:24 2016 (r294885) +++ head/sys/dev/hyperv/include/hyperv.hWed Jan 27 03:53:30 2016 (r294886) @@ -755,6 +755,8 @@ typedef struct hv_vmbus_channel { struct mtx inbound_lock; + struct taskqueue * rxq; + struct task channel_task; hv_vmbus_pfn_channel_callback on_channel_callback; void* channel_callback_context; Modified: head/sys/dev/hyperv/vmbus/hv_channel.c == --- head/sys/dev/hyperv/vmbus/hv_channel.c Wed Jan 27 03:51:24 2016 (r294885) +++ head/sys/dev/hyperv/vmbus/hv_channel.c Wed Jan 27 03:53:30 2016 (r294886) @@ -51,6 +51,7 @@ static intvmbus_channel_create_gpadl_h uint32_t* message_count); static voidvmbus_channel_set_event(hv_vmbus_channel* channel); +static voidVmbusProcessChannelEvent(void* channel, int pending); /** * @brief Trigger an event notification on the specified channel @@ -114,6 +115,9 @@ hv_vmbus_channel_open( new_channel->on_channel_callback = pfn_on_channel_callback; new_channel->channel_callback_context = context; + new_channel->rxq = hv_vmbus_g_context.hv_event_queue[new_channel->target_cpu]; + TASK_INIT(&new_channel->channel_task, 0, VmbusProcessChannelEvent, new_channel); + /* Allocate the ring buffer */ out = contigmalloc((send_ring_buffer_size + recv_ring_buffer_size), M_DEVBUF, M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); @@ -517,6 +521,7 @@ static void hv_vmbus_channel_close_internal(hv_vmbus_channel *channel) { int ret = 0; + struct taskqueue *rxq = channel->rxq; hv_vmbus_channel_close_channel* msg; hv_vmbus_channel_msg_info* info; @@ -524,6 +529,11 @@ hv_vmbus_channel_close_internal(hv_vmbus channel->sc_creation_callback = NULL; /* +* set rxq to NULL to avoid more requests be scheduled +*/ + channel->rxq = NULL; + taskqueue_drain(rxq, &channel->channel_task); + /* * Grab the lock to prevent race condition when a packet received * and unloading driver is in the process. */ @@ -876,3 +886,67 @@ hv_vmbus_channel_recv_packet_raw( return (0); } + + +/** + * Process a channel event notification + */ +static void +VmbusProcessChannelEvent(void* context, int pending) +{ + void* arg; + uint32_t bytes_to_read; + hv_vmbus_channel* channel = (hv_vmbus_channel*)context; + boolean_t is_batched_reading; + + /** +* Find the channel based on this relid and invokes +* the channel callback to process the event +*/ + + if (channel == NULL) { + return; + } + /** +* To deal with the race condition where we might +* receive a packet while the relevant driver is +* being unloaded, dispatch the callback while +* holding the channel lock. The unloading driver +* will acquire the same channel lock to set the +* callback to NULL. This closes the window. +*/ + + /* +* Disable the lock due to newly added WITNESS check in r277723. +* Will seek other way to avoid race condition. +* -- whu +*/ + // mtx_lock(&channel->inbound_lock); + if (channel->on_channel_callback != NULL) { + arg = channel->channel_callback_context; + is_batched_reading = channel->batched_reading; + /* +* Optimize host to guest signaling by ensuring: +* 1. While reading the channel, we disable interrupts from +*host. +* 2. Ensure that we process all posted messages from the host +*before returning from this callb
svn commit: r294885 - head/sys/sys
Author: jhibbits Date: Wed Jan 27 03:51:24 2016 New Revision: 294885 URL: https://svnweb.freebsd.org/changeset/base/294885 Log: Fix the build post-r294883. Pointy-hat to:jhibbits X-MFC with: r294883 Modified: head/sys/sys/rman.h Modified: head/sys/sys/rman.h == --- head/sys/sys/rman.h Wed Jan 27 02:25:25 2016(r294884) +++ head/sys/sys/rman.h Wed Jan 27 03:51:24 2016(r294885) @@ -82,7 +82,7 @@ struct u_rman { charrm_descr[RM_TEXTLEN]; /* rman description */ rman_res_t rm_start; /* base of managed region */ - bus_size_t rm_size;/* size of managed region */ + rman_res_t rm_size;/* size of managed region */ enum rman_type rm_type;/* region type */ }; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294887 - head/sys/dev/cxgb/ulp/tom
Author: glebius Date: Wed Jan 27 04:59:28 2016 New Revision: 294887 URL: https://svnweb.freebsd.org/changeset/base/294887 Log: Fix build on i386. I can't yet understand why does it build on amd64. Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c == --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Jan 27 03:53:30 2016 (r294886) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Jan 27 04:59:28 2016 (r294887) @@ -62,9 +62,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define TCPSTATES #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294889 - in head/sys/dev: cxgb/ulp/tom cxgbe/tom
Author: glebius Date: Wed Jan 27 05:15:53 2016 New Revision: 294889 URL: https://svnweb.freebsd.org/changeset/base/294889 Log: More fixes to the build. Modified: head/sys/dev/cxgb/ulp/tom/cxgb_listen.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgb/ulp/tom/cxgb_listen.c == --- head/sys/dev/cxgb/ulp/tom/cxgb_listen.c Wed Jan 27 05:04:17 2016 (r294888) +++ head/sys/dev/cxgb/ulp/tom/cxgb_listen.c Wed Jan 27 05:15:53 2016 (r294889) @@ -44,9 +44,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #define TCPSTATES #include +#include #include #include "cxgb_include.h" Modified: head/sys/dev/cxgbe/tom/t4_connect.c == --- head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 27 05:04:17 2016 (r294888) +++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 27 05:15:53 2016 (r294889) @@ -49,9 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #define TCPSTATES #include +#include #include #include "common/common.h" Modified: head/sys/dev/cxgbe/tom/t4_listen.c == --- head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 27 05:04:17 2016 (r294888) +++ head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 27 05:15:53 2016 (r294889) @@ -56,9 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #define TCPSTATES #include +#include #include #include "common/common.h" Modified: head/sys/dev/cxgbe/tom/t4_tom.c == --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 27 05:04:17 2016 (r294888) +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 27 05:15:53 2016 (r294889) @@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #define TCPSTATES #include +#include #include #ifdef TCP_OFFLOAD ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294889 - in head/sys/dev: cxgb/ulp/tom cxgbe/tom
Thanks! On Wed, Jan 27, 2016 at 1:15 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Jan 27 05:15:53 2016 > New Revision: 294889 > URL: https://svnweb.freebsd.org/changeset/base/294889 > > Log: > More fixes to the build. > > Modified: > head/sys/dev/cxgb/ulp/tom/cxgb_listen.c > head/sys/dev/cxgbe/tom/t4_connect.c > head/sys/dev/cxgbe/tom/t4_listen.c > head/sys/dev/cxgbe/tom/t4_tom.c > > Modified: head/sys/dev/cxgb/ulp/tom/cxgb_listen.c > == > --- head/sys/dev/cxgb/ulp/tom/cxgb_listen.c Wed Jan 27 05:04:17 2016 > (r294888) > +++ head/sys/dev/cxgb/ulp/tom/cxgb_listen.c Wed Jan 27 05:15:53 2016 > (r294889) > @@ -44,9 +44,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #define TCPSTATES > #include > +#include > #include > > #include "cxgb_include.h" > > Modified: head/sys/dev/cxgbe/tom/t4_connect.c > == > --- head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 27 05:04:17 2016 > (r294888) > +++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 27 05:15:53 2016 > (r294889) > @@ -49,9 +49,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #define TCPSTATES > #include > +#include > #include > > #include "common/common.h" > > Modified: head/sys/dev/cxgbe/tom/t4_listen.c > == > --- head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 27 05:04:17 2016 > (r294888) > +++ head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 27 05:15:53 2016 > (r294889) > @@ -56,9 +56,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #define TCPSTATES > #include > +#include > #include > > #include "common/common.h" > > Modified: head/sys/dev/cxgbe/tom/t4_tom.c > == > --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 27 05:04:17 2016 > (r294888) > +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 27 05:15:53 2016 > (r294889) > @@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #define TCPSTATES > #include > +#include > #include > > #ifdef TCP_OFFLOAD > ___ > svn-src-...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" -- Tomorrow Will Never Die ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r294535 - in head/sys/netinet: . cc tcp_stacks
On 01/24/16 19:07, Gleb Smirnoff wrote: > Lawrence, > > On Sat, Jan 23, 2016 at 05:19:36PM +1100, Lawrence Stewart wrote: > L> > The problem is that cc.h (or tcp_cc.h) is already depening on many > L> > TCP types. So, the structures defined inside are not agnostic, including > L> > tcp headers before cc.h is required. > L> > L> Not in any significant way that tightly couples the API to TCP from > L> consumers' perspective. > L> > L> > The old cc.h used to include tcp.h implicitly, which is a bad style. > L> > > L> > Since many developers sorted netinet/* includes in a .c file using > L> > sort(1), that lead to cc.h always come before actual tcp includes, > L> > hiding the real requirement for tcp.h in a .c file. > L> > L> To provide some more context, I considered that choice to be a lesser > L> evil at the time. Linux had set the defacto standard macro naming and > L> location so even though I would have put the CC related defines in cc.h > L> given the choice, I wanted third-party software which checked for > L> modular CC the Linux way to work on FreeBSD. The alphabetical ordering > L> of includes is what prompted me to include tcp.h in cc.h so that cc.h > L> could happily sit at the top of the list. I probably could have just > L> moved cc.h to the cc subdir, in which case it would always come > L> logically after the TCP includes as - perhaps that's > L> the right solution. > > Well, if the intent was to provide some sort of compatibility with Linux, > then my rename is even more valid! Look what left in the cc.h in the > Netflix source (which is kinda forward of FreeBSD): almost the whole > file is under _KERNEL. Only the tcp.h pollution left for userland. > > If Linux has cc.h and we want to put same definitions in cc.h, then > we should start new cc.h and keep this one renamed. Because if we > provided that one, we won't provide any compatibility, but would > just pollute with tcp.h. They do not have cc.h, they stuffed things into tcp.h. When I say I was trying to keep compat with Linux, I meant that I wanted to leave TCP_CA_NAME_MAX in tcp.h rather than move it to cc.h where it logically belongs and is required. This has no bearing on the naming of our cc.h file, but is the reason why I included tcp.h in cc.h, bad as that may be. > I am fine with netinet/cc/cc.h. If you agree I can run the rename. I think this is the right option. Please go ahead and move tcp_cc.h to netinet/cc/cc.h and update ifdef guard, src includes and man page accordingly. Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294891 - head/usr.sbin/makefs/tests
Author: ngie Date: Wed Jan 27 06:14:20 2016 New Revision: 294891 URL: https://svnweb.freebsd.org/changeset/base/294891 Log: Require /sbin/mount_cd9660 when running the cd9660 tests In some cases the test system might not have mount_cd9660(8). Don't implicitly rely on it while testing cd9660 support; explicitly rely on it MFC after: 1 week Reported by: mjohnston Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/Makefile Modified: head/usr.sbin/makefs/tests/Makefile == --- head/usr.sbin/makefs/tests/Makefile Wed Jan 27 05:19:05 2016 (r294890) +++ head/usr.sbin/makefs/tests/Makefile Wed Jan 27 06:14:20 2016 (r294891) @@ -8,6 +8,8 @@ BINDIR= ${TESTSDIR} SCRIPTS+= makefs_tests_common.sh SCRIPTSNAME_makefs_tests_common.sh=makefs_tests_common.sh +TEST_METADATA.makefs_cd9660_tests+=required_files="/sbin/mount_cd9660" + .for t in ${ATF_TESTS_SH} TEST_METADATA.$t+= required_user="root" .endfor ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294892 - head/lib/libdpv
Author: dteske Date: Wed Jan 27 06:16:53 2016 New Revision: 294892 URL: https://svnweb.freebsd.org/changeset/base/294892 Log: Remove unused function prototype MFC after:3 days X-MFC-to: stable/10 Modified: head/lib/libdpv/dialog_util.h Modified: head/lib/libdpv/dialog_util.h == --- head/lib/libdpv/dialog_util.h Wed Jan 27 06:14:20 2016 (r294891) +++ head/lib/libdpv/dialog_util.h Wed Jan 27 06:16:53 2016 (r294892) @@ -55,7 +55,6 @@ extern int dheight, dwidth; __BEGIN_DECLS uint8_t dialog_prompt_nlstate(const char *_prompt); -voiddialog_gauge_free(void); voiddialog_maxsize_free(void); char *dialog_prompt_lastline(char *_prompt, uint8_t _nlstate); int dialog_maxcols(void); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294893 - head/lib/libdpv
Author: dteske Date: Wed Jan 27 06:21:35 2016 New Revision: 294893 URL: https://svnweb.freebsd.org/changeset/base/294893 Log: Fix a crash if `-D' is used without `-t title' dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s dialog_gauge() and dialog(1)'s `--gauge', will segmentation fault in strlen(3) if no title is set for the widget. Reproducible with `dialog --gauge hi 6 20' (adding `--title ""' is enough to prevent segmentation fault). MFC after:3 days X-MFC-to: stable/10 Modified: head/lib/libdpv/dialog_util.c Modified: head/lib/libdpv/dialog_util.c == --- head/lib/libdpv/dialog_util.c Wed Jan 27 06:16:53 2016 (r294892) +++ head/lib/libdpv/dialog_util.c Wed Jan 27 06:21:35 2016 (r294893) @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi errx(EXIT_FAILURE, "Out of memory?!"); sprintf(dargv[n++], "--title"); dargv[n++] = title; + } else { + if ((dargv[n] = malloc(8)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + sprintf(dargv[n++], "--title"); + if ((dargv[n] = malloc(8)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + sprintf(dargv[n++], ""); } if (backtitle != NULL) { if ((dargv[n] = malloc(12)) == NULL) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294894 - head/contrib/netbsd-tests/lib/libc/sys
Author: ngie Date: Wed Jan 27 06:24:19 2016 New Revision: 294894 URL: https://svnweb.freebsd.org/changeset/base/294894 Log: Adjust vm.max_wired in order to avoid hitting EAGAIN artificially Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to avoid hitting EAGAIN artificially on the system when running the tests Require root privileges in order to set the sysctl Add allow_sysctl_side_effects to require.config as this test is now adjusting sysctls that can affect the global system state Unlike the version submitted by cem in OneFS, this version uses a scratch file to save/restore the previous value of the sysctl. I _really_, _really_ wish there were better hooks in atf/kyua for per test suite setup/teardown -- using a file is kludgy, but it's the best I can do to avoid situations where (for instance), sysctl(3) may fail and drop a core outside the kyua sandbox. Based on a patch submitted by cem, but modified to take business logic out of ATF_TP_ADD_TCS(3). Differential Revision: https://reviews.freebsd.org/D4779 MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mlock.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mlock.c == --- head/contrib/netbsd-tests/lib/libc/sys/t_mlock.cWed Jan 27 06:21:35 2016(r294893) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mlock.cWed Jan 27 06:24:19 2016(r294894) @@ -47,12 +47,89 @@ __RCSID("$NetBSD: t_mlock.c,v 1.5 2014/0 #include #ifdef __FreeBSD__ +#include #define _KMEMUSER #include #endif static long page = 0; +#ifdef __FreeBSD__ +#defineVM_MAX_WIRED "vm.max_wired" + +static void +vm_max_wired_sysctl(int *old_value, int *new_value) +{ + size_t old_len; + size_t new_len = (new_value == NULL ? 0 : sizeof(int)); + + if (old_value == NULL) + printf("Setting the new value to %d\n", *new_value); + else { + ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, NULL, &old_len, + new_value, new_len) == 0, + "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); + } + + ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, old_value, &old_len, + new_value, new_len) == 0, + "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); + + if (old_value != NULL) + printf("Saved the old value (%d)\n", *old_value); +} + +static void +set_vm_max_wired(int new_value) +{ + FILE *fp; + int old_value; + + fp = fopen(VM_MAX_WIRED, "w"); + if (fp == NULL) { + atf_tc_skip("could not open %s for writing: %s", + VM_MAX_WIRED, strerror(errno)); + return; + } + + vm_max_wired_sysctl(&old_value, NULL); + + ATF_REQUIRE_MSG(fprintf(fp, "%d", old_value) > 0, + "saving %s failed", VM_MAX_WIRED); + + fclose(fp); + + vm_max_wired_sysctl(NULL, &new_value); +} + +static void +restore_vm_max_wired(void) +{ + FILE *fp; + int saved_max_wired; + + fp = fopen(VM_MAX_WIRED, "r"); + if (fp == NULL) { + perror("fopen failed\n"); + return; + } + + if (fscanf(fp, "%d", &saved_max_wired) != 1) { + perror("fscanf failed\n"); + fclose(fp); + return; + } + + fclose(fp); + printf("old value in %s: %d\n", VM_MAX_WIRED, saved_max_wired); + + if (saved_max_wired == 0) /* This will cripple the test host */ + return; + + vm_max_wired_sysctl(NULL, &saved_max_wired); +} +#endif + ATF_TC(mlock_clip); ATF_TC_HEAD(mlock_clip, tc) { @@ -78,11 +155,19 @@ ATF_TC_BODY(mlock_clip, tc) free(buf); } +#ifdef __FreeBSD__ +ATF_TC_WITH_CLEANUP(mlock_err); +#else ATF_TC(mlock_err); +#endif ATF_TC_HEAD(mlock_err, tc) { atf_tc_set_md_var(tc, "descr", "Test error conditions in mlock(2) and munlock(2)"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(mlock_err, tc) @@ -99,6 +184,8 @@ ATF_TC_BODY(mlock_err, tc) if ((uintptr_t)VM_MIN_ADDRESS > 0) null_errno = EINVAL;/* NULL is not inside user VM */ #endif + /* Set max_wired really really high to avoid EAGAIN */ + set_vm_max_wired(INT_MAX); #else if (sysctlbyname("vm.minaddress", &vmin, &len, NULL, 0) != 0) atf_tc_fail("failed to read vm.minaddress"); @@ -139,6 +226,14 @@ ATF_TC_BODY(mlock_err, tc) ATF_REQUIRE_ERRNO(ENOMEM, munlock(invalid_ptr, page) == -1); } +#ifdef __FreeBSD__ +ATF_TC_CLEANUP(mlock_err, tc) +{ + + restore_vm_max_wired(); +} +#endif + ATF_TC(mlock_limits); ATF_TC_HEAD(mlock_limits, t
svn commit: r294896 - head/etc
Author: araujo Date: Wed Jan 27 06:28:56 2016 New Revision: 294896 URL: https://svnweb.freebsd.org/changeset/base/294896 Log: Fix regression introduced on r293801. The UID/GID 93 is in using by jaber on PORTS, we will use UID/GID 160 for ypldap(8). Reported by: antoine Approved by: bapt (mentor) Differential Revision:https://reviews.freebsd.org/D5062 Modified: head/etc/group head/etc/master.passwd Modified: head/etc/group == --- head/etc/group Wed Jan 27 06:25:59 2016(r294895) +++ head/etc/group Wed Jan 27 06:28:56 2016(r294896) @@ -29,6 +29,7 @@ dialer:*:68: network:*:69: audit:*:77: www:*:80: +_ypldap:*:160: hast:*:845: nogroup:*:65533: nobody:*:65534: Modified: head/etc/master.passwd == --- head/etc/master.passwd Wed Jan 27 06:25:59 2016(r294895) +++ head/etc/master.passwd Wed Jan 27 06:28:56 2016(r294896) @@ -22,6 +22,6 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/ pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin -_ypldap:*:93:93::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin +_ypldap:*:160:160::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294899 - head/contrib/netbsd-tests/lib/libc/sys
Author: ngie Date: Wed Jan 27 07:06:49 2016 New Revision: 294899 URL: https://svnweb.freebsd.org/changeset/base/294899 Log: Add debug output via ATF_REQUIRE_MSG when the first call to mlock(2) fails This helps identify the problem with running this test on my VM hosts (ENOMEM) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c == --- head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 27 06:38:03 2016(r294898) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 27 07:06:49 2016(r294899) @@ -206,7 +206,8 @@ ATF_TC_BODY(mincore_resid, tc) "might be low on memory"); #ifdef __FreeBSD__ - ATF_REQUIRE(mlock(addr, npgs * page) == 0); + ATF_REQUIRE_MSG(mlock(addr, npgs * page) == 0, "mlock failed: %s", + strerror(errno)); #endif ATF_REQUIRE(check_residency(addr, npgs) == npgs); ATF_REQUIRE(munmap(addr, npgs * page) == 0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r294900 - in head/sys: amd64/linux amd64/linux32 i386/linux
Author: delphij Date: Wed Jan 27 07:20:55 2016 New Revision: 294900 URL: https://svnweb.freebsd.org/changeset/base/294900 Log: Implement AT_SECURE properly. AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a boolean flag indicating whether secure mode should be enabled. 1 means that the program has changes its credentials during the execution. Being exported AT_SECURE used by glibc issetugid() call. Submitted by: imp, dchagin Security: FreeBSD-SA-16:10.linux Security: CVE-2016-1883 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Wed Jan 27 07:06:49 2016 (r294899) +++ head/sys/amd64/linux/linux_sysvec.c Wed Jan 27 07:20:55 2016 (r294900) @@ -271,6 +271,7 @@ elf_linux_fixup(register_t **stack_base, Elf_Addr *pos; struct ps_strings *arginfo; struct proc *p; + int issetugid; p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; @@ -281,6 +282,7 @@ elf_linux_fixup(register_t **stack_base, args = (Elf64_Auxargs *)imgp->auxargs; pos = base + (imgp->args->argc + imgp->args->envc + 2); + issetugid = p->p_flag & P_SUGID ? 1 : 0; AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); @@ -296,7 +298,7 @@ elf_linux_fixup(register_t **stack_base, AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, 0); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Wed Jan 27 07:06:49 2016 (r294899) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Jan 27 07:20:55 2016 (r294900) @@ -230,6 +230,7 @@ elf_linux_fixup(register_t **stack_base, Elf32_Addr *base; Elf32_Addr *pos; struct linux32_ps_strings *arginfo; + int issetugid; arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; @@ -239,6 +240,7 @@ elf_linux_fixup(register_t **stack_base, args = (Elf32_Auxargs *)imgp->auxargs; pos = base + (imgp->args->argc + imgp->args->envc + 2); + issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO, linux32_vsyscall); @@ -261,7 +263,7 @@ elf_linux_fixup(register_t **stack_base, AUXARGS_ENTRY_32(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY_32(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY_32(pos, AT_BASE, args->base); - AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, 0); + AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY_32(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); AUXARGS_ENTRY_32(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY_32(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); Modified: head/sys/i386/linux/linux_sysvec.c == --- head/sys/i386/linux/linux_sysvec.c Wed Jan 27 07:06:49 2016 (r294899) +++ head/sys/i386/linux/linux_sysvec.c Wed Jan 27 07:20:55 2016 (r294900) @@ -238,11 +238,13 @@ elf_linux_fixup(register_t **stack_base, Elf32_Addr *uplatform; struct ps_strings *arginfo; register_t *pos; + int issetugid; KASSERT(curthread->td_proc == imgp->proc, ("unsafe elf_linux_fixup(), should be curproc")); p = imgp->proc; + issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szplatform); args = (Elf32_Auxargs *)imgp->auxargs; @@ -270,7 +272,7 @@ elf_linux_fixup(register_t **stack_base, AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, 0); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucre
svn commit: r294902 - head/sys/netinet
Author: glebius Date: Wed Jan 27 07:34:00 2016 New Revision: 294902 URL: https://svnweb.freebsd.org/changeset/base/294902 Log: Fix issues with TCP_CONGESTION handling after r294540: o Return back the buf[TCP_CA_NAME_MAX] for TCP_CONGESTION, for TCP_CCALGOOPT use dynamically allocated *pbuf. o For SOPT_SET TCP_CONGESTION do NULL terminating of string taking from userland. o For SOPT_SET TCP_CONGESTION do the search for the algorithm keeping the inpcb lock. o For SOPT_GET TCP_CONGESTION first strlcpy() the name holding the inpcb lock into temporary buffer, then copyout. Together with:lstewart Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Wed Jan 27 07:28:55 2016 (r294901) +++ head/sys/netinet/tcp_usrreq.c Wed Jan 27 07:34:00 2016 (r294902) @@ -1479,7 +1479,8 @@ tcp_default_ctloutput(struct socket *so, u_int ui; struct tcp_info ti; struct cc_algo *algo; - char*buf; + char*pbuf, buf[TCP_CA_NAME_MAX]; + size_t len; /* * For TCP_CCALGOOPT forward the control to CC module, for both @@ -1488,22 +1489,22 @@ tcp_default_ctloutput(struct socket *so, switch (sopt->sopt_name) { case TCP_CCALGOOPT: INP_WUNLOCK(inp); - buf = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK | M_ZERO); - error = sooptcopyin(sopt, buf, sopt->sopt_valsize, + pbuf = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK | M_ZERO); + error = sooptcopyin(sopt, pbuf, sopt->sopt_valsize, sopt->sopt_valsize); if (error) { - free(buf, M_TEMP); + free(pbuf, M_TEMP); return (error); } INP_WLOCK_RECHECK(inp); if (CC_ALGO(tp)->ctl_output != NULL) - error = CC_ALGO(tp)->ctl_output(tp->ccv, sopt, buf); + error = CC_ALGO(tp)->ctl_output(tp->ccv, sopt, pbuf); else error = ENOENT; INP_WUNLOCK(inp); if (error == 0 && sopt->sopt_dir == SOPT_GET) - error = sooptcopyout(sopt, buf, sopt->sopt_valsize); - free(buf, M_TEMP); + error = sooptcopyout(sopt, pbuf, sopt->sopt_valsize); + free(pbuf, M_TEMP); return (error); } @@ -1600,24 +1601,22 @@ unlock_and_done: case TCP_CONGESTION: INP_WUNLOCK(inp); - buf = malloc(TCP_CA_NAME_MAX, M_TEMP, M_WAITOK|M_ZERO); - error = sooptcopyin(sopt, buf, TCP_CA_NAME_MAX, 1); - if (error) { - free(buf, M_TEMP); + error = sooptcopyin(sopt, buf, TCP_CA_NAME_MAX - 1, 1); + if (error) break; - } + buf[sopt->sopt_valsize] = '\0'; + INP_WLOCK_RECHECK(inp); CC_LIST_RLOCK(); STAILQ_FOREACH(algo, &cc_list, entries) if (strncmp(buf, algo->name, TCP_CA_NAME_MAX) == 0) break; CC_LIST_RUNLOCK(); - free(buf, M_TEMP); if (algo == NULL) { + INP_WUNLOCK(inp); error = EINVAL; break; } - INP_WLOCK_RECHECK(inp); /* * We hold a write lock over the tcb so it's safe to * do these things without ordering concerns. @@ -1786,9 +1785,9 @@ unlock_and_done: error = sooptcopyout(sopt, &ti, sizeof ti); break; case TCP_CONGESTION: + len = strlcpy(buf, CC_ALGO(tp)->name, TCP_CA_NAME_MAX); INP_WUNLOCK(inp); - error = sooptcopyout(sopt, CC_ALGO(tp)->name, - TCP_CA_NAME_MAX); + error = sooptcopyout(sopt, buf, len + 1); break; case TCP_KEEPIDLE: case TCP_KEEPINTVL: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"