Re: svn commit: r258328 - head/sys/net
On Tue, 19 Nov 2013 22:08:21 +0100, Luigi Rizzo wrote: On Mon, Nov 18, 2013 at 10:58:14PM +, George V. Neville-Neil wrote: Author: gnn Date: Mon Nov 18 22:58:14 2013 New Revision: 258328 URL: http://svnweb.freebsd.org/changeset/base/258328 Log: Allow ethernet drivers to pass in packets connected via the nextpkt pointer. Handling packets in this way allows drivers to amortize work during packet reception. yes. This is only a first step and eventually we should pass the entire batch to the netisr handler to further reduce overhead. Some of the followup emails suggested to change the argument from struct mbuf * to something else. I do think we should change it, but what we need is a struct with head and tail pointers _and_ a counter, because sometimes the code downstream may have to append the mbuf/batch to a queue, and these extra fields would save iterating through the chain. Related to this: at some point we should also address batching in the transmit path, and for that we will eventually need to introduce a 'more packets to come' flag to the API/mbuf so that intermediate functions in the path will build batches before passing them down. cheers luigi The Apache webserver works like this also. It has a 'bucket'-list which chains all data of a request and can also contain flush-commands in between. Probably nice to look what they do and in what ways. Ronald. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258365 - in head/sys: kern vm
Author: kib Date: Wed Nov 20 08:45:26 2013 New Revision: 258365 URL: http://svnweb.freebsd.org/changeset/base/258365 Log: Revert back to use int for the page counts. In vn_io_fault(), the i/o is chunked to pieces limited by integer io_hold_cnt tunable, while vm_fault_quick_hold_pages() takes integer max_count as the upper bound. Rearrange the checks to correctly handle overflowing address arithmetic. Submitted by: bde Tested by:pho Discussed with: alc MFC after:1 week Modified: head/sys/kern/vfs_vnops.c head/sys/vm/vm_fault.c Modified: head/sys/kern/vfs_vnops.c == --- head/sys/kern/vfs_vnops.c Wed Nov 20 02:20:27 2013(r258364) +++ head/sys/kern/vfs_vnops.c Wed Nov 20 08:45:26 2013(r258365) @@ -933,9 +933,8 @@ vn_io_fault(struct file *fp, struct uio void *rl_cookie; struct mount *mp; vm_page_t *prev_td_ma; - int error, save, saveheld, prev_td_ma_cnt; + int error, cnt, save, saveheld, prev_td_ma_cnt; vm_offset_t addr, end; - vm_size_t cnt; vm_prot_t prot; size_t len, resid; ssize_t adv; @@ -1008,21 +1007,20 @@ vn_io_fault(struct file *fp, struct uio uio_clone->uio_iovcnt--; continue; } - - addr = (vm_offset_t)uio_clone->uio_iov->iov_base; + if (len > io_hold_cnt * PAGE_SIZE) + len = io_hold_cnt * PAGE_SIZE; + addr = (uintptr_t)uio_clone->uio_iov->iov_base; end = round_page(addr + len); - cnt = howmany(end - trunc_page(addr), PAGE_SIZE); + if (end < addr) { + error = EFAULT; + break; + } + cnt = atop(end - trunc_page(addr)); /* * A perfectly misaligned address and length could cause * both the start and the end of the chunk to use partial * page. +2 accounts for such a situation. */ - if (cnt > io_hold_cnt + 2) { - len = io_hold_cnt * PAGE_SIZE; - KASSERT(howmany(round_page(addr + len) - - trunc_page(addr), PAGE_SIZE) <= io_hold_cnt + 2, - ("cnt overflow")); - } cnt = vm_fault_quick_hold_pages(&td->td_proc->p_vmspace->vm_map, addr, len, prot, ma, io_hold_cnt + 2); if (cnt == -1) { Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Wed Nov 20 02:20:27 2013(r258364) +++ head/sys/vm/vm_fault.c Wed Nov 20 08:45:26 2013(r258365) @@ -1074,12 +1074,12 @@ vm_fault_quick_hold_pages(vm_map_t map, { vm_offset_t end, va; vm_page_t *mp; - vm_size_t count; + int count; boolean_t pmap_failed; if (len == 0) return (0); - end = round_page(addr + len); + end = round_page(addr + len); addr = trunc_page(addr); /* @@ -1088,9 +1088,9 @@ vm_fault_quick_hold_pages(vm_map_t map, if (addr < vm_map_min(map) || addr > end || end > vm_map_max(map)) return (-1); - count = howmany(end - addr, PAGE_SIZE); - if (count > max_count) + if (atop(end - addr) > max_count) panic("vm_fault_quick_hold_pages: count > max_count"); + count = atop(end - addr); /* * Most likely, the physical pages are resident in the pmap, so it is ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258366 - head/sys/vm
Author: kib Date: Wed Nov 20 08:47:54 2013 New Revision: 258366 URL: http://svnweb.freebsd.org/changeset/base/258366 Log: Add assertions to cover all places in the wiring and unwiring code where MAP_ENTRY_IN_TRANSITION is set or cleared. Tested by:pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cWed Nov 20 08:45:26 2013(r258365) +++ head/sys/vm/vm_map.cWed Nov 20 08:47:54 2013(r258366) @@ -2288,6 +2288,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; /* @@ -2356,7 +2359,9 @@ done: } } KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0, - ("vm_map_unwire: in-transition flag missing")); + ("vm_map_unwire: in-transition flag missing %p", entry)); + KASSERT(entry->wiring_thread == curthread, + ("vm_map_unwire: alien wire %p", entry)); entry->eflags &= ~MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = NULL; if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) { @@ -2456,6 +2461,9 @@ vm_map_wire(vm_map_t map, vm_offset_t st * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; if ((entry->protection & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258367 - head/sys/vm
Author: kib Date: Wed Nov 20 09:03:48 2013 New Revision: 258367 URL: http://svnweb.freebsd.org/changeset/base/258367 Log: Vm map code performs clipping when map entry covers region which is larger than the operational region. If the op region size is zero, clipping would create a zero-sized map entry. The result is that vm map splay starts behaving inconsistently, sometimes returning zero-sized entry, sometimes the next (or previous) entry. One step further, it could result in e.g. vm_map_wire() setting MAP_ENTRY_IN_TRANSITION on the zero-sized entry, but failing to clear it in the done part. The vm_map_delete() than hangs forever waiting for the flag removal. Verify for zero-length requests and act as if it is always successfull without performing any action on the address space. Diagnosed by: pho Tested by:pho (previous version) Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cWed Nov 20 08:47:54 2013(r258366) +++ head/sys/vm/vm_map.cWed Nov 20 09:03:48 2013(r258367) @@ -1876,6 +1876,9 @@ vm_map_protect(vm_map_t map, vm_offset_t struct ucred *cred; vm_prot_t old_prot; + if (start == end) + return (KERN_SUCCESS); + vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2030,12 +2033,16 @@ vm_map_madvise( case MADV_AUTOSYNC: case MADV_NOCORE: case MADV_CORE: + if (start == end) + return (KERN_SUCCESS); modify_map = 1; vm_map_lock(map); break; case MADV_WILLNEED: case MADV_DONTNEED: case MADV_FREE: + if (start == end) + return (KERN_SUCCESS); vm_map_lock_read(map); break; default: @@ -2190,6 +2197,8 @@ vm_map_inherit(vm_map_t map, vm_offset_t default: return (KERN_INVALID_ARGUMENT); } + if (start == end) + return (KERN_SUCCESS); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); if (vm_map_lookup_entry(map, start, &temp_entry)) { @@ -,6 +2231,8 @@ vm_map_unwire(vm_map_t map, vm_offset_t int rv; boolean_t need_wakeup, result, user_unwire; + if (start == end) + return (KERN_SUCCESS); user_unwire = (flags & VM_MAP_WIRE_USER) ? TRUE : FALSE; vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2392,6 +2403,8 @@ vm_map_wire(vm_map_t map, vm_offset_t st boolean_t fictitious, need_wakeup, result, user_wire; vm_prot_t prot; + if (start == end) + return (KERN_SUCCESS); prot = 0; if (flags & VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; @@ -2833,6 +2846,8 @@ vm_map_delete(vm_map_t map, vm_offset_t vm_map_entry_t first_entry; VM_MAP_ASSERT_LOCKED(map); + if (start == end) + return (KERN_SUCCESS); /* * Find the start of the region, and clip it ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258387 - head/sys/dev/nand
Author: gber Date: Wed Nov 20 11:10:23 2013 New Revision: 258387 URL: http://svnweb.freebsd.org/changeset/base/258387 Log: Split raw reading/programming into smaller chunks to avoid allocating too big chunk of kernel memory. Validate size of data. Add error handling to avoid calling copyout() when data has not been read correctly. Reviewed by:zbb Reported by:x90c MFC after: 2 days Modified: head/sys/dev/nand/nand_cdev.c head/sys/dev/nand/nand_geom.c Modified: head/sys/dev/nand/nand_cdev.c == --- head/sys/dev/nand/nand_cdev.c Wed Nov 20 11:09:12 2013 (r258386) +++ head/sys/dev/nand/nand_cdev.c Wed Nov 20 11:10:23 2013 (r258387) @@ -294,19 +294,39 @@ nand_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize, len, raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)dev->si_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK); + raw_size = cg->pgs_per_blk * (cg->page_size + cg->oob_size); + + /* Check if len is not bigger than chip size */ + if (raw_rw->len > raw_size) + return (EFBIG); + + /* +* Do not ask for too much memory, in case of large transfers +* read/write in 16-pages chunks +*/ + bufsize = 16 * (cg->page_size + cg->oob_size); + if (raw_rw->len < bufsize) + bufsize = raw_rw->len; + + buf = malloc(bufsize, M_NAND, M_WAITOK); + len = raw_rw->len; + off = 0; } switch(cmd) { case NAND_IO_ERASE: @@ -335,19 +355,37 @@ nand_ioctl(struct cdev *dev, u_long cmd, break; case NAND_IO_RAW_PROG: - ret = copyin(raw_rw->data, buf, raw_rw->len); - if (ret) - break; - ret = nand_prog_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + ret = copyin(raw_rw->data + off, buf, bufsize); + if (ret) + break; + ret = nand_prog_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_RAW_READ: - ret = nand_read_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); - if (ret) - break; - ret = copyout(buf, raw_rw->data, raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = nand_read_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + + ret = copyout(buf, raw_rw->data + off, bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_PAGE_STAT: Modified: head/sys/dev/nand/nand_geom.c == --- head/sys/dev/nand/nand_geom.c Wed Nov 20 11:09:12 2013 (r258386) +++ head/sys/dev/nand/nand_geom.c Wed Nov 20 11:10:23 2013 (r258387) @@ -193,20 +193,41 @@ nand_ioctl(struct disk *ndisk, u_long cm struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize, len, raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)ndisk->d_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK
svn commit: r258388 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Wed Nov 20 11:47:50 2013 New Revision: 258388 URL: http://svnweb.freebsd.org/changeset/base/258388 Log: MFV r258377: 4088 use after free in arc_release() illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 MFC after:5 days 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 Wed Nov 20 11:10:23 2013(r258387) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Nov 20 11:47:50 2013(r258388) @@ -3540,6 +3540,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3627,7 +3628,6 @@ arc_release(arc_buf_t *buf, void *tag) ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258389 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Wed Nov 20 11:52:32 2013 New Revision: 258389 URL: http://svnweb.freebsd.org/changeset/base/258389 Log: MFV r258378: 4089 NULL pointer dereference in arc_read() illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea Tested by:adrian MFC after:4 days 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 Wed Nov 20 11:47:50 2013(r258388) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Nov 20 11:52:32 2013(r258389) @@ -20,9 +20,9 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -3173,6 +3173,8 @@ top: vdev_t *vd = NULL; uint64_t addr = 0; boolean_t devw = B_FALSE; + enum zio_compress b_compress = ZIO_COMPRESS_OFF; + uint64_t b_asize = 0; if (hdr == NULL) { /* this block is not in the cache */ @@ -3242,10 +3244,12 @@ top: hdr->b_acb = acb; hdr->b_flags |= ARC_IO_IN_PROGRESS; - if (HDR_L2CACHE(hdr) && hdr->b_l2hdr != NULL && + if (hdr->b_l2hdr != NULL && (vd = hdr->b_l2hdr->b_dev->l2ad_vdev) != NULL) { devw = hdr->b_l2hdr->b_dev->l2ad_writing; addr = hdr->b_l2hdr->b_daddr; + b_compress = hdr->b_l2hdr->b_compress; + b_asize = hdr->b_l2hdr->b_asize; /* * Lock out device removal. */ @@ -3296,7 +3300,7 @@ top: cb->l2rcb_bp = *bp; cb->l2rcb_zb = *zb; cb->l2rcb_flags = zio_flags; - cb->l2rcb_compress = hdr->b_l2hdr->b_compress; + cb->l2rcb_compress = b_compress; ASSERT(addr >= VDEV_LABEL_START_SIZE && addr + size < vd->vdev_psize - @@ -3308,8 +3312,7 @@ top: * Issue a null zio if the underlying buffer * was squashed to zero size by compression. */ - if (hdr->b_l2hdr->b_compress == - ZIO_COMPRESS_EMPTY) { + if (b_compress == ZIO_COMPRESS_EMPTY) { rzio = zio_null(pio, spa, vd, l2arc_read_done, cb, zio_flags | ZIO_FLAG_DONT_CACHE | @@ -3318,8 +3321,8 @@ top: ZIO_FLAG_DONT_RETRY); } else { rzio = zio_read_phys(pio, vd, addr, - hdr->b_l2hdr->b_asize, - buf->b_data, ZIO_CHECKSUM_OFF, + b_asize, buf->b_data, + ZIO_CHECKSUM_OFF, l2arc_read_done, cb, priority, zio_flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_CANFAIL | @@ -3328,8 +3331,7 @@ top: } DTRACE_PROBE2(l2arc__read, vdev_t *, vd, zio_t *, rzio); - ARCSTAT_INCR(arcstat_l2_read_bytes, - hdr->b_l2hdr->b_asize); + ARCSTAT_INCR(arcstat_l2_read_bytes, b_asize); if (*arc_flags & ARC_NOWAIT) { zio_nowait(rzio); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258390 - head/tools/tools/umastat
Author: mav Date: Wed Nov 20 12:32:34 2013 New Revision: 258390 URL: http://svnweb.freebsd.org/changeset/base/258390 Log: Print some more flags. Modified: head/tools/tools/umastat/umastat.c Modified: head/tools/tools/umastat/umastat.c == --- head/tools/tools/umastat/umastat.c Wed Nov 20 11:52:32 2013 (r258389) +++ head/tools/tools/umastat/umastat.c Wed Nov 20 12:32:34 2013 (r258390) @@ -117,6 +117,9 @@ static const struct flaginfo { u_int32_tfi_flag; const char *fi_name; } flaginfo[] = { + { UMA_ZFLAG_MULTI, "multi" }, + { UMA_ZFLAG_DRAINING, "draining" }, + { UMA_ZFLAG_BUCKET, "bucket" }, { UMA_ZFLAG_INTERNAL, "internal" }, { UMA_ZFLAG_FULL, "full" }, { UMA_ZFLAG_CACHEONLY, "cacheonly" }, @@ -132,6 +135,10 @@ static const struct flaginfo { { UMA_ZONE_SECONDARY, "secondary" }, { UMA_ZONE_REFCNT, "refcnt" }, { UMA_ZONE_MAXBUCKET, "maxbucket" }, + { UMA_ZONE_CACHESPREAD, "cachespread" }, + { UMA_ZONE_VTOSLAB, "vtoslab" }, + { UMA_ZONE_NODUMP, "nodump" }, + { UMA_ZONE_PCPU, "pcpu" }, }; static const int flaginfo_count = sizeof(flaginfo) / sizeof(struct flaginfo); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258391 - head/sys/sys
Author: glebius Date: Wed Nov 20 13:22:22 2013 New Revision: 258391 URL: http://svnweb.freebsd.org/changeset/base/258391 Log: Fix comment after r250551. Modified: head/sys/sys/bufobj.h Modified: head/sys/sys/bufobj.h == --- head/sys/sys/bufobj.h Wed Nov 20 12:32:34 2013(r258390) +++ head/sys/sys/bufobj.h Wed Nov 20 13:22:22 2013(r258391) @@ -63,7 +63,7 @@ extern struct buf_ops buf_ops_bio; TAILQ_HEAD(buflists, buf); -/* A Buffer splay list */ +/* A Buffer list & trie */ struct bufv { struct buflists bv_hd; /* Sorted blocklist */ struct pctrie bv_root;/* Buf trie */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r257831 - head/sys/cam/scsi
On Thu, Nov 07, 2013 at 11:21:52PM +, Steven Hartland wrote: > Author: smh > Date: Thu Nov 7 23:21:52 2013 > New Revision: 257831 > URL: http://svnweb.freebsd.org/changeset/base/257831 > > Log: > Corrected definition for old_rate to match d_rotation_rate > > MFC after: 2 Days > X-MFC-With: r256956 MFC? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r257831 - head/sys/cam/scsi
- Original Message - From: "Slawa Olhovchenkov" To: "Steven Hartland" Cc: ; ; Sent: Wednesday, November 20, 2013 2:05 PM Subject: Re: svn commit: r257831 - head/sys/cam/scsi On Thu, Nov 07, 2013 at 11:21:52PM +, Steven Hartland wrote: Author: smh Date: Thu Nov 7 23:21:52 2013 New Revision: 257831 URL: http://svnweb.freebsd.org/changeset/base/257831 Log: Corrected definition for old_rate to match d_rotation_rate MFC after: 2 Days X-MFC-With: r256956 MFC? I have stable/9 done locally just pending me fixing my svn install so it uses the FreeBSD fields again which it appears to have lost for some unknown reason :( This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmas...@multiplay.co.uk. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r257831 - head/sys/cam/scsi
On Wed, Nov 20, 2013 at 02:17:32PM -, Steven Hartland wrote: > - Original Message - > From: "Slawa Olhovchenkov" > To: "Steven Hartland" > Cc: ; ; > > Sent: Wednesday, November 20, 2013 2:05 PM > Subject: Re: svn commit: r257831 - head/sys/cam/scsi > > > > On Thu, Nov 07, 2013 at 11:21:52PM +, Steven Hartland wrote: > > > >> Author: smh > >> Date: Thu Nov 7 23:21:52 2013 > >> New Revision: 257831 > >> URL: http://svnweb.freebsd.org/changeset/base/257831 > >> > >> Log: > >> Corrected definition for old_rate to match d_rotation_rate > >> > >> MFC after: 2 Days > >> X-MFC-With: r256956 > > > > MFC? > > I have stable/9 done locally just pending me fixing my svn install > so it uses the FreeBSD fields again which it appears to have lost > for some unknown reason :( Can you fix this before next release cycle of 10.0? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r257831 - head/sys/cam/scsi
- Original Message - From: "Slawa Olhovchenkov" > On Thu, Nov 07, 2013 at 11:21:52PM +, Steven Hartland wrote: > >> Author: smh >> Date: Thu Nov 7 23:21:52 2013 >> New Revision: 257831 >> URL: http://svnweb.freebsd.org/changeset/base/257831 >> >> Log: >> Corrected definition for old_rate to match d_rotation_rate >> >> MFC after: 2 Days >> X-MFC-With: r256956 > > MFC? I have stable/9 done locally just pending me fixing my svn install so it uses the FreeBSD fields again which it appears to have lost for some unknown reason :( Can you fix this before next release cycle of 10.0? As the original change didnt make the 10 cut off it wont be in 10 I'm afraid. I did request consideration of re@ for it due the confusion about the change request process but it was denied :( If you feel strongly it should be in 10 you might want to ask re@ for reconsideration. Regards Steve This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmas...@multiplay.co.uk. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258392 - head/sys/arm/arm
Author: ian Date: Wed Nov 20 15:53:50 2013 New Revision: 258392 URL: http://svnweb.freebsd.org/changeset/base/258392 Log: Call cpu_setup() immediately after the page tables are installed. This enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled. A nice side effect of enabling caching earlier is that it eliminates the multi-second pause that used to happen early in boot while physical memory and pmap and vm were being set up. On boards with 1 GB or more of ram this pause was very noticible, sometimes 5-6 seconds. PR: arm/183740 Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Wed Nov 20 13:22:22 2013(r258391) +++ head/sys/arm/arm/machdep.c Wed Nov 20 15:53:50 2013(r258392) @@ -361,7 +361,6 @@ cpu_startup(void *dummy) #endif #endif - cpu_setup(""); identify_arm_cpu(); printf("real memory = %ju (%ju MB)\n", (uintmax_t)ptoa(physmem), @@ -1431,6 +1430,12 @@ initarm(struct arm_boot_params *abp) cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)); /* +* Now that proper page tables are installed, call cpu_setup() to enable +* instruction and data caches and other chip-specific features. +*/ + cpu_setup(""); + + /* * Only after the SOC registers block is mapped we can perform device * tree fixups, as they may attempt to read parameters from hardware. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258393 - head/sys/arm/conf
Author: ian Date: Wed Nov 20 16:42:01 2013 New Revision: 258393 URL: http://svnweb.freebsd.org/changeset/base/258393 Log: Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes. Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE == --- head/sys/arm/conf/BEAGLEBONEWed Nov 20 15:53:50 2013 (r258392) +++ head/sys/arm/conf/BEAGLEBONEWed Nov 20 16:42:01 2013 (r258393) @@ -104,6 +104,7 @@ device gpio # USB support device usb +optionsUSB_HOST_ALIGN=64 # Cacheline size is 64 on AM335x. optionsUSB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258395 - head/usr.bin/uname
Author: peter Date: Wed Nov 20 17:48:38 2013 New Revision: 258395 URL: http://svnweb.freebsd.org/changeset/base/258395 Log: Change introduction history. Modified: head/usr.bin/uname/uname.1 Modified: head/usr.bin/uname/uname.1 == --- head/usr.bin/uname/uname.1 Wed Nov 20 17:46:23 2013(r258394) +++ head/usr.bin/uname/uname.1 Wed Nov 20 17:48:38 2013(r258395) @@ -28,7 +28,7 @@ .\"@(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd November 20, 2013 .Dt UNAME 1 .Os .Sh NAME @@ -128,4 +128,4 @@ The and .Fl U extension flags appeared in -.Fx 11.0 . +.Fx 10.0 . ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258397 - head/sys/fs/pseudofs
Author: kib Date: Wed Nov 20 19:41:00 2013 New Revision: 258397 URL: http://svnweb.freebsd.org/changeset/base/258397 Log: Redo r258088 to avoid relying on signed arithmetic overflow, since compiler interprets this as an undefined behaviour. Instead, ensure that the sum of uio_offset and uio_resid is below OFF_MAX using the operation which cannot overflow. Reported and tested by: pho Discussed with: bde Approved by: des (pseudofs maintainer) Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c == --- head/sys/fs/pseudofs/pseudofs_vnops.c Wed Nov 20 18:58:07 2013 (r258396) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Wed Nov 20 19:41:00 2013 (r258397) @@ -616,8 +616,7 @@ pfs_read(struct vop_read_args *va) struct proc *proc; struct sbuf *sb = NULL; int error, locked; - off_t offset; - ssize_t buflen, resid; + off_t buflen; PFS_TRACE(("%s", pn->pn_name)); pfs_assert_not_owned(pn); @@ -654,16 +653,12 @@ pfs_read(struct vop_read_args *va) goto ret; } - resid = uio->uio_resid; - offset = uio->uio_offset; - buflen = offset + resid; - - /* beaucoup sanity checks so we don't ask for bogus allocation */ - if (resid < 0 || buflen < offset || buflen < resid || - buflen >= INT_MAX) { + if (uio->uio_resid < 0 || uio->uio_offset < 0 || + uio->uio_resid > OFF_MAX - uio->uio_offset) { error = EINVAL; goto ret; } + buflen = uio->uio_offset + uio->uio_resid; if (buflen > MAXPHYS) buflen = MAXPHYS; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On 11/19/13, 3:04 AM, Robert Watson wrote: On Mon, 18 Nov 2013, George V. Neville-Neil wrote: Allow ethernet drivers to pass in packets connected via the nextpkt pointer. Handling packets in this way allows drivers to amortize work during packet reception. Submitted by:Vijay Singh Sponsored by:NetApp Currently, it is quite easy to make mistakes regarding individual mbuf chains vs. lists of mbuf chains. This leads me to wonder whether a new type, perhaps simply constructed on the stack before passing in, should be used for KPIs that accept lists of packets. E.g., /* * This structure is almost always allocated on a caller stack, so * cannot itself be queued without memory allocation in most cases. */ struct mbuf_queue { struct mbuf*mq_head; }; It's hard to believe that we don't have a structure around already that we can't use. With Luigi's comment, I wonder that there isn't an mbuf_list structure already we can just steal. it could almost be the current interface input queue structure. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On 11/19/13, 3:04 AM, Robert Watson wrote: On Mon, 18 Nov 2013, George V. Neville-Neil wrote: Allow ethernet drivers to pass in packets connected via the nextpkt pointer. Handling packets in this way allows drivers to amortize work during packet reception. Submitted by:Vijay Singh Sponsored by:NetApp Currently, it is quite easy to make mistakes regarding individual mbuf chains vs. lists of mbuf chains. This leads me to wonder whether a new type, perhaps simply constructed on the stack before passing in, should be used for KPIs that accept lists of packets. E.g., /* * This structure is almost always allocated on a caller stack, so * cannot itself be queued without memory allocation in most cases. */ struct mbuf_queue { struct mbuf*mq_head; }; int ether_input(struct ifnet *ifp, struct mbuf_queue *m) { ... } or separate entrypoints, old and and new ... struct mbuf_queue mq = { m }; return (ether_input(ifp, &mq)); ... That way the compiler can help us figure out where we expect an individual packet but have accidentally leaked a queue. Functions that accept only a single packet could also more agressively assert that m->m_nextpkt is NULL: M_ASSERT_ONEPACKET(m); Robert ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On 20 Nov 2013, at 20:11, Julian Elischer wrote: >> Currently, it is quite easy to make mistakes regarding individual mbuf >> chains vs. lists of mbuf chains. This leads me to wonder whether a new >> type, perhaps simply constructed on the stack before passing in, should be >> used for KPIs that accept lists of packets. E.g., >> >>/* >> * This structure is almost always allocated on a caller stack, so >> * cannot itself be queued without memory allocation in most cases. >> */ >>struct mbuf_queue { >>struct mbuf*mq_head; >>}; >> >> > It's hard to believe that we don't have a structure around already that we > can't use. With Luigi's comment, I wonder that there isn't an mbuf_list > structure already we can just steal. it could almost be the current interface > input queue structure. The exact details don't matter; what does matter is that we make it as easy as possible to detect mistakes using the compiler (e.g., queue passed where mbuf expected, or vice versa) and that those situations we can't check statically, we try to check dynamically (multi-entry queue passed where mbuf expected). In the past we've had bugs along similar lines, where code expects m->m_nextpkt to be NULL when it isn't leading to very unhappy times in socket buffers, etc. Ideally what we did would have no expense at runtime unless debugging features were turned on (INVARIANTS). Robert ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258399 - head/sys/crypto/aesni
Author: jmg Date: Wed Nov 20 20:25:27 2013 New Revision: 258399 URL: http://svnweb.freebsd.org/changeset/base/258399 Log: flag that the aesni driver is sync... This means we don't waste a context switch just to call the done callback... On my machine, this improves geli/gzero decrypt performance by ~27% from 550MB/sec to ~700MB/sec... MFC after:3 days Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c == --- head/sys/crypto/aesni/aesni.c Wed Nov 20 20:24:59 2013 (r258398) +++ head/sys/crypto/aesni/aesni.c Wed Nov 20 20:25:27 2013 (r258399) @@ -92,7 +92,8 @@ aesni_attach(device_t dev) sc = device_get_softc(dev); TAILQ_INIT(&sc->sessions); sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); + sc->cid = crypto_get_driverid(dev, + CRYPTOCAP_F_HARDWARE|CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255736 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe
+ Eric On Fri, Sep 20, 2013 at 1:18 PM, David Christensen wrote: > Author: davidch > Date: Fri Sep 20 20:18:49 2013 > New Revision: 255736 > URL: http://svnweb.freebsd.org/changeset/base/255736 > > Log: > Substantial rewrite of bxe(4) to add support for the BCM57712 and > BCM578XX controllers. > > Approved by: re > MFC after:4 weeks David/Eric, Are you guys planning to mfc this back to 9? cheers, Hiren ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258400 - in head/usr.sbin/bsdconfig: . includes includes/include share
Author: dteske Date: Wed Nov 20 20:37:21 2013 New Revision: 258400 URL: http://svnweb.freebsd.org/changeset/base/258400 Log: Add new `includes' module for exploring the bsdconfig(8) API. Added: head/usr.sbin/bsdconfig/includes/ head/usr.sbin/bsdconfig/includes/INDEX (contents, props changed) head/usr.sbin/bsdconfig/includes/Makefile (contents, props changed) head/usr.sbin/bsdconfig/includes/USAGE (contents, props changed) head/usr.sbin/bsdconfig/includes/include/ head/usr.sbin/bsdconfig/includes/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/includes/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/includes/includes (contents, props changed) Modified: head/usr.sbin/bsdconfig/Makefile head/usr.sbin/bsdconfig/share/variable.subr Modified: head/usr.sbin/bsdconfig/Makefile == --- head/usr.sbin/bsdconfig/MakefileWed Nov 20 20:25:27 2013 (r258399) +++ head/usr.sbin/bsdconfig/MakefileWed Nov 20 20:37:21 2013 (r258400) @@ -6,6 +6,7 @@ SUBDIR= console \ dot \ examples \ include \ + includes \ mouse \ networking \ packages \ Added: head/usr.sbin/bsdconfig/includes/INDEX == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/includes/INDEX Wed Nov 20 20:37:21 2013 (r258400) @@ -0,0 +1,56 @@ +# Copyright (c) 2013 Devin Teske +# 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$ + +# +# Title that will be shown in the bsdconfig menu. +# +menu_title="" + +# +# A short descriptive line shown at the bottom of the bsdconfig menu. keep it +# short because any line longer than the terminal width will be truncated. +# +menu_help="" + +# +# Two-part variable that defines an action to take when `keyword' is passed on +# a bsdconfig command line. Variable takes the form "keyword|command" and +# multiple occurrences of the variable (with different `keyword's, or different +# `keyword's AND `command's) are allowed. If `command' begins with a '/' then +# the full path to the program is needed. If `command' begins with anything +# else it is a path relative to the directory this INDEX file is in. `keyword' +# can be i18n'ed but `command' is the name of a script. +# +menu_selection="includes|includes" + +# +# Items below this line do NOT need i18n translation +# +# Name of the program to be run when this menu choice is selected. If it begins +# with a '/' then the full path to the program is needed. If it begins with +# anything else it is a path relative to the directory this INDEX file is in. +# +menu_program="" Added: head/usr.sbin/bsdconfig/includes/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/includes/Makefile Wed Nov 20 20:37:21 2013 (r258400) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +NO_OBJ= + +SUBDIR= include + +FILESDIR= ${LIBEXECDIR}/bsdconfig/includes +FILES= INDEX USAGE + +SCRIPTSDIR=${FILESDIR} +SCRIPTS= includes + +beforeinstall: + mkdir -p ${DESTDIR}${FILESDIR} + +.include Added: head/usr.sbin/bsdconfig/includes/USAGE == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 20:37:21 2013 (r258400) @@ -0,0 +1,66 @@ +# Copyright (c) 2013 Devin Teske +# All ri
Re: svn commit: r258328 - head/sys/net
On Wed, Nov 20, 2013 at 12:11:20PM -0800, Julian Elischer wrote: > On 11/19/13, 3:04 AM, Robert Watson wrote: > > On Mon, 18 Nov 2013, George V. Neville-Neil wrote: > > > >> Allow ethernet drivers to pass in packets connected via the > >> nextpkt pointer. > >> Handling packets in this way allows drivers to amortize work > >> during packet reception. > >> > >> Submitted by:Vijay Singh > >> Sponsored by:NetApp > > > > Currently, it is quite easy to make mistakes regarding individual > > mbuf chains vs. lists of mbuf chains. This leads me to wonder > > whether a new type, perhaps simply constructed on the stack before > > passing in, should be used for KPIs that accept lists of packets. E.g., > > > > /* > > * This structure is almost always allocated on a caller stack, so > > * cannot itself be queued without memory allocation in most cases. > > */ > > struct mbuf_queue { > > struct mbuf*mq_head; > > }; > > > > > It's hard to believe that we don't have a structure around already > that we can't use. With Luigi's comment, I wonder that there isn't an > mbuf_list structure already we can just steal. it could almost be the > current interface input queue structure. The fact is that the structure is so simple that every piece of code seems to have its own implementation. The closest thing is "struct ifqueue" in sys/net/ifq.h, but it has some unnecessary fields (e.g. a struct mtx and a few counters). sys/sys/sockbuf.h has a queue embedded in struct sockbuf sys/netinet/tcp_lro.h has one in struct lro_entry sctp and dummynet redefine their own queues, as well as a number of device drivers (dev/xen/netfrnt/mbufq.h, cxgb, ...) I am not sure I see anything worth reusing. cheers luigi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255736 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe
Hi Hiren, Yes I am planning on it. - eric On Wed, Nov 20, 2013 at 12:27 PM, hiren panchasara wrote: > + Eric > > On Fri, Sep 20, 2013 at 1:18 PM, David Christensen > wrote: > > Author: davidch > > Date: Fri Sep 20 20:18:49 2013 > > New Revision: 255736 > > URL: http://svnweb.freebsd.org/changeset/base/255736 > > > > Log: > > Substantial rewrite of bxe(4) to add support for the BCM57712 and > > BCM578XX controllers. > > > > Approved by: re > > MFC after:4 weeks > > David/Eric, > > Are you guys planning to mfc this back to 9? > > cheers, > Hiren > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258401 - head/usr.sbin/bsdconfig/includes
Author: dteske Date: Wed Nov 20 21:05:33 2013 New Revision: 258401 URL: http://svnweb.freebsd.org/changeset/base/258401 Log: Add a `-d' flag for printing the description of each function. Modified: head/usr.sbin/bsdconfig/includes/USAGE head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/USAGE == --- head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 20:37:21 2013 (r258400) +++ head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 21:05:33 2013 (r258401) @@ -28,6 +28,7 @@ Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS OPTIONS: -aAlways use color even when output is not to a terminal. + -dPrint the description for each function selected. -fShow functions for selected includes. -F pattern If `-f', only print functions matching pattern. Without `-f' @@ -64,3 +65,7 @@ EXAMPLES: bsdconfig @PROGRAM_NAME@ -F show common NB: The `.subr' suffix on the end of the include is optional. + + Show descriptions of each of the `show' functions: + + bsdconfig @PROGRAM_NAME@ -dfF show Modified: head/usr.sbin/bsdconfig/includes/includes == --- head/usr.sbin/bsdconfig/includes/includes Wed Nov 20 20:37:21 2013 (r258400) +++ head/usr.sbin/bsdconfig/includes/includes Wed Nov 20 21:05:33 2013 (r258401) @@ -29,7 +29,7 @@ INCLUDES # Prevent common.subr from auto initializing debugging (this is not an inter- -# active utility that requires debugging). +# active utility that requires debugging; also `-d' has been repurposed). # DEBUG_SELF_INITIALIZE=NO @@ -50,6 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # Options # USE_COLOR=1 +SHOW_DESC= SHOW_FUNCS= FUNC_PATTERN= @@ -64,20 +65,33 @@ show_include() local file="${1#./}" local pattern="${FUNC_PATTERN:-.*}" - output=$( awk -v use_color=${USE_COLOR:-0} -v re="$pattern" ' + output=$( awk \ + -v use_color=${USE_COLOR:-0} \ + -v re="$pattern" \ + -v show_desc=${SHOW_DESC:-0} ' /^$/,/^#/ { if ($0 ~ /^# f_/) { if (!match($2, re)) next if (use_color) - printf " %s[1;31m%s[0m%s\n", + printf "+%s[1;31m%s[0m%s\n", substr($0, 2, RSTART), substr($0, 2 + RSTART, RLENGTH), substr($0, 2 + RSTART + RLENGTH) else print substr($0, 2) - print_more = substr($0, length($0)) == "\\" + if (show_desc) + print_more = 1 + else + print_more = substr($0, length($0)) == "\\" } - while (print_more) { + if (show_desc && print_more) { + getline + while ($0 ~ /^#/) { + print substr($0, 2) + getline + } + print_more = 0 + } else while (print_more) { getline print substr($0, 2) print_more = substr($0, length($0)) == "\\" @@ -89,10 +103,10 @@ show_include() return $SUCCESS fi if [ "$FUNC_PATTERN" ]; then - printf "$msg_functions_in_matching\n" \ + printf ">>> $msg_functions_in_matching\n" \ "$file" "$FUNC_PATTERN" else - printf "$msg_functions_in\n" "$file" + printf ">>> $msg_functions_in\n" "$file" fi echo "$output" echo # blank line to simplify awk(1)-based reparse @@ -110,9 +124,10 @@ show_include() # # Process command-line arguments # -while getopts afF:hn flag; do +while getopts adfF:hn flag; do case "$flag" in a) USE_COLOR=1 ;; + d) SHOW_DESC=1 ;; f) SHOW_FUNCS=1 ;; F) FUNC_PATTERN="$OPTARG" ;; n) USE_COLOR= ;; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258402 - head/sys/ufs/ffs
Author: jmg Date: Wed Nov 20 21:16:53 2013 New Revision: 258402 URL: http://svnweb.freebsd.org/changeset/base/258402 Log: fix a use after free, jsegdep_merge will free wk, avoid the next check... CID: 1006098 Sponsored by: Imaginary Forces Reviewed by: mckusick MFC after:1 week Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c == --- head/sys/ufs/ffs/ffs_softdep.c Wed Nov 20 21:05:33 2013 (r258401) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Nov 20 21:16:53 2013 (r258402) @@ -1096,7 +1096,7 @@ jwork_move(dst, src) LIST_FOREACH_SAFE(wk, dst, wk_list, wkn) { if (wk->wk_type == D_JSEGDEP) jsegdep = jsegdep_merge(WK_JSEGDEP(wk), jsegdep); - if (wk->wk_type == D_FREEDEP) + else if (wk->wk_type == D_FREEDEP) freedep = freedep_merge(WK_FREEDEP(wk), freedep); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258403 - head/sys/ufs/ffs
Author: jmg Date: Wed Nov 20 21:21:29 2013 New Revision: 258403 URL: http://svnweb.freebsd.org/changeset/base/258403 Log: fix white space... MFC after:1 week Modified: head/sys/ufs/ffs/softdep.h Modified: head/sys/ufs/ffs/softdep.h == --- head/sys/ufs/ffs/softdep.h Wed Nov 20 21:16:53 2013(r258402) +++ head/sys/ufs/ffs/softdep.h Wed Nov 20 21:21:29 2013(r258403) @@ -132,7 +132,7 @@ #defineINPROGRESS 0x001000 /* dirrem, freeblks, freefrag, freefile only */ #defineUFS1FMT 0x002000 /* indirdep only */ #defineEXTDATA 0x004000 /* allocdirect only */ -#define ONWORKLIST 0x008000 +#defineONWORKLIST 0x008000 #defineIOWAITING 0x01 /* Thread is waiting for IO to complete. */ #defineONDEPLIST 0x02 /* Structure is on a dependency list. */ #defineUNLINKED0x04 /* inodedep has been unlinked. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258387 - head/sys/dev/nand
Grzegorz Bernacki wrote this message on Wed, Nov 20, 2013 at 11:10 +: > Author: gber > Date: Wed Nov 20 11:10:23 2013 > New Revision: 258387 > URL: http://svnweb.freebsd.org/changeset/base/258387 > > Log: > Split raw reading/programming into smaller chunks to avoid allocating too > big chunk of kernel memory. Validate size of data. Add error handling to > avoid calling copyout() when data has not been read correctly. > > Reviewed by:zbb > Reported by:x90c > MFC after: 2 days > > Modified: > head/sys/dev/nand/nand_cdev.c > head/sys/dev/nand/nand_geom.c Looks like this change errors w/ gcc: http://tinderbox.freebsd.org/tinderbox-head-noclang-build-HEAD-armv6-arm.brief -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
Can we revert this and just quickly put together something else that won't potentially come back to bite us with weird side effects? My suggestions (and I'm happy to do this work if needed): * create a lightweight mbuf queue representation so an mbuf list isn't just the mbuf header pointer; * create a new ether input (say, ether_input_multi) that takes an mbuf list, so existing driver code does the right thing. After that it'd be nice to write a set of mbuf list macros for abstract the whole queue, dequeue, concat, iterate, etc (like sys/queue.h, but for mbufs.) What do people think? (I've been doing it for m->next chained things, but not m->m_nextpkt things..) -adrian On 18 November 2013 14:58, George V. Neville-Neil wrote: > Author: gnn > Date: Mon Nov 18 22:58:14 2013 > New Revision: 258328 > URL: http://svnweb.freebsd.org/changeset/base/258328 > > Log: > Allow ethernet drivers to pass in packets connected via the nextpkt pointer. > Handling packets in this way allows drivers to amortize work during packet > reception. > > Submitted by: Vijay Singh > Sponsored by: NetApp > > Modified: > head/sys/net/if_ethersubr.c > > Modified: head/sys/net/if_ethersubr.c > == > --- head/sys/net/if_ethersubr.c Mon Nov 18 22:55:50 2013(r258327) > +++ head/sys/net/if_ethersubr.c Mon Nov 18 22:58:14 2013(r258328) > @@ -708,13 +708,25 @@ static void > ether_input(struct ifnet *ifp, struct mbuf *m) > { > > + struct mbuf *mn; > + > /* > -* We will rely on rcvif being set properly in the deferred context, > -* so assert it is correct here. > +* The drivers are allowed to pass in a chain of packets linked with > +* m_nextpkt. We split them up into separate packets here and pass > +* them up. This allows the drivers to amortize the receive lock. > */ > - KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", __func__)); > + while (m) { > + mn = m->m_nextpkt; > + m->m_nextpkt = NULL; > > - netisr_dispatch(NETISR_ETHER, m); > + /* > +* We will rely on rcvif being set properly in the deferred > context, > +* so assert it is correct here. > +*/ > + KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", > __func__)); > + netisr_dispatch(NETISR_ETHER, m); > + m = mn; > + } > } > > /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258406 - head/usr.sbin/bsdconfig/includes
Author: dteske Date: Wed Nov 20 22:11:42 2013 New Revision: 258406 URL: http://svnweb.freebsd.org/changeset/base/258406 Log: Make `-d' implicitly enable `-f' for simplification. Modified: head/usr.sbin/bsdconfig/includes/USAGE head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/USAGE == --- head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 21:59:24 2013 (r258405) +++ head/usr.sbin/bsdconfig/includes/USAGE Wed Nov 20 22:11:42 2013 (r258406) @@ -28,7 +28,7 @@ Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS OPTIONS: -aAlways use color even when output is not to a terminal. - -dPrint the description for each function selected. + -dPrint description for each function selected. Implies `-f'. -fShow functions for selected includes. -F pattern If `-f', only print functions matching pattern. Without `-f' @@ -68,4 +68,4 @@ EXAMPLES: Show descriptions of each of the `show' functions: - bsdconfig @PROGRAM_NAME@ -dfF show + bsdconfig @PROGRAM_NAME@ -dF show Modified: head/usr.sbin/bsdconfig/includes/includes == --- head/usr.sbin/bsdconfig/includes/includes Wed Nov 20 21:59:24 2013 (r258405) +++ head/usr.sbin/bsdconfig/includes/includes Wed Nov 20 22:11:42 2013 (r258406) @@ -127,7 +127,7 @@ show_include() while getopts adfF:hn flag; do case "$flag" in a) USE_COLOR=1 ;; - d) SHOW_DESC=1 ;; + d) SHOW_DESC=1 SHOW_FUNCS=1 ;; f) SHOW_FUNCS=1 ;; F) FUNC_PATTERN="$OPTARG" ;; n) USE_COLOR= ;; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258407 - head/usr.sbin/bsdconfig/share/media
Author: dteske Date: Wed Nov 20 22:12:21 2013 New Revision: 258407 URL: http://svnweb.freebsd.org/changeset/base/258407 Log: Update function description for API tool: bsdconfig includes -dF f_validate_hostname Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr == --- head/usr.sbin/bsdconfig/share/media/tcpip.subr Wed Nov 20 22:11:42 2013(r258406) +++ head/usr.sbin/bsdconfig/share/media/tcpip.subr Wed Nov 20 22:12:21 2013(r258407) @@ -110,10 +110,11 @@ f_struct_define DHCP_LEASE \ # begin or end with a hyphen). #3 One or more individual labels within the hostname are null. # -# f_dialog_validate_hostname $hostname +# To call this function and display an appropriate error message to the user +# based on the above error codes, use the following function defined in +# dialog.subr: # -# If the hostname is determined to be invalid, the appropriate error will be -# displayed using the f_show_msg function. +# f_dialog_validate_hostname $hostname # f_validate_hostname() { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On Nov 20, 2013, at 17:02 , Adrian Chadd wrote: > Can we revert this and just quickly put together something else that > won't potentially come back to bite us with weird side effects? > > My suggestions (and I'm happy to do this work if needed): > > * create a lightweight mbuf queue representation so an mbuf list isn't > just the mbuf header pointer; > * create a new ether input (say, ether_input_multi) that takes an mbuf > list, so existing driver code does the right thing. > > After that it'd be nice to write a set of mbuf list macros for > abstract the whole queue, dequeue, concat, iterate, etc (like > sys/queue.h, but for mbufs.) > > What do people think? > > (I've been doing it for m->next chained things, but not m->m_nextpkt things..) I think the right way to do this is to move forwards and not backwards. This change has the nice effect of not breaking anything else in the tree while providing us with a feature that will be useful. If you want to add an ether_input_multi() that might make sense as an adjunct to what’s there now. Best, Geoge signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r258410 - head/sys/arm/arm
Author: cognet Date: Wed Nov 20 23:06:54 2013 New Revision: 258410 URL: http://svnweb.freebsd.org/changeset/base/258410 Log: In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0, and for some strange reason it doesn't seem to like it. Modified: head/sys/arm/arm/devmap.c Modified: head/sys/arm/arm/devmap.c == --- head/sys/arm/arm/devmap.c Wed Nov 20 23:02:09 2013(r258409) +++ head/sys/arm/arm/devmap.c Wed Nov 20 23:06:54 2013(r258410) @@ -240,6 +240,7 @@ void pmap_unmapdev(vm_offset_t va, vm_size_t size) { vm_offset_t tmpva, offset; + vm_size_t origsize = size; offset = va & PAGE_MASK; va = trunc_page(va); @@ -251,6 +252,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t tmpva += PAGE_SIZE; } - kva_free(va, size); + kva_free(va, origsize); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On Wed, Nov 20, 2013 at 05:29:37PM -0500, George Neville-Neil wrote: > > On Nov 20, 2013, at 17:02 , Adrian Chadd wrote: > > > Can we revert this and just quickly put together something else that > > won't potentially come back to bite us with weird side effects? > > > > My suggestions (and I'm happy to do this work if needed): > > > > * create a lightweight mbuf queue representation so an mbuf list isn't > > just the mbuf header pointer; > > * create a new ether input (say, ether_input_multi) that takes an mbuf > > list, so existing driver code does the right thing. > > > > After that it'd be nice to write a set of mbuf list macros for > > abstract the whole queue, dequeue, concat, iterate, etc (like > > sys/queue.h, but for mbufs.) > > > > What do people think? > > > > (I've been doing it for m->next chained things, but not m->m_nextpkt > > things..) > > I think the right way to do this is to move forwards and not backwards. > This change has the nice effect of not breaking anything else in the > tree while providing us with a feature that will be useful. I am a bit torn on this. George is right - we should move forward, and we have been discussing this trivial change for two years. It is impossible to tell when someone will find the time to implement the mbuf queue and the new method (more on this later). So we should not back it out. At the same time: in principle this change does not break anything, but Robert is right that some of the 50-100 drivers we have might forget to clear m_nextpkt and cause trouble. So it would be nice to implement some protection, maybe something as simple as setting a flag in the first mbuf to tell that this is a chain and not a single mbuf. We have 12 M_PROTO* flags to use. For the next step: I am still wondering what is the best way to implement an alternate ifp->if_input_multi method (which takes an mbuf queue as an argument, and can be checked by the compiler). I am not too fond of having two different input methods, as it complicates life when one has to intercept packets. On the other hand, globally changing all drivers to use the if_input_multi() method is too much trouble, so i suspect we will have to come up with some nice trick, e.g. use a pseudo mbuf with m_type = MT_MBQUEUE and overload the m_hdr fields as queue pointers. cheers luigi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
Hi, We should migrate drivers to use a multi-input method where it's appropriate. It's the same pain as if_transmit() is/was. I'd really like to avoid having hacky solutions like mbufs with magic types. If we're going down that path, we should create a correct inline messaging mechanism that includes arbitrary messages in the stream, where some may or may not be mbufs. Magic mbufs just makes me want to tear out my eyes a little. So, the reason I'd like to back it out is because we should be doing it via a multi method with some type that represents an mbuf list. If George doesn't mind, I'll add a multi input method, move this stuff into it, and make ether_input just be single frames. -adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On Wed, Nov 20, 2013 at 04:07:07PM -0800, Adrian Chadd wrote: > Hi, > > We should migrate drivers to use a multi-input method where it's > appropriate. It's the same pain as if_transmit() is/was. right, and i think that is very confusing and i'd rather not replicate the experience. But what is your plan, have both if_input and if_input_multi ? And then make the vlan and all similar filters intercept both ? Because all of the existing options have pros and cons: 1. having both if_input and if_input_multi is visually cleaner but requires extending ifnet and some convoluted code in the initialization (same as if_transmit) 2. just if_input with typed mbufs is less clean but has the big advantage thay you only need to change ether_input() (and equivalent for other L2 protocols), and it is not error prone 3. having only if_input_multi (even without renaming if_input) requires you to change all the 100+ drivers. It seems to me that #2 at least preserves binary compatibility with driver modules and is easier to backport to other versions of FreeBSD, this is why i prefer it. my two cents... cheers luigi > I'd really like to avoid having hacky solutions like mbufs with magic > types. If we're going down that path, we should create a correct > inline messaging mechanism that includes arbitrary messages in the > stream, where some may or may not be mbufs. Magic mbufs just makes me > want to tear out my eyes a little. > > So, the reason I'd like to back it out is because we should be doing > it via a multi method with some type that represents an mbuf list. If > George doesn't mind, I'll add a multi input method, move this stuff > into it, and make ether_input just be single frames. > > > > -adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258411 - head/usr.sbin/sysrc
Author: dteske Date: Thu Nov 21 00:54:26 2013 New Revision: 258411 URL: http://svnweb.freebsd.org/changeset/base/258411 Log: Revert SVN r257830 -- that feature was annoying and was removed long ago. Was a momentary memory lapse induced by old code that was lying in my ~/bin Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 == --- head/usr.sbin/sysrc/sysrc.8 Wed Nov 20 23:06:54 2013(r258410) +++ head/usr.sbin/sysrc/sysrc.8 Thu Nov 21 00:54:26 2013(r258411) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Nov 7, 2013 +.Dd Nov 20, 2013 .Dt SYSRC 8 .Os .Sh NAME @@ -185,7 +185,7 @@ be called repeatedly). .Sh ENVIRONMENT The following environment variables are referenced by .Nm : -.Bl -tag -width ".Ev SYSRC_VERBOSE" +.Bl -tag -width ".Ev RC_DEFAULTS" .It Ev RC_CONFS Override default .Ql rc_conf_files @@ -194,9 +194,6 @@ Override default Location of .Ql /etc/defaults/rc.conf file. -.It Ev SYSRC_VERBOSE -Default verbosity. -Set to non-NULL to enable. .El .Sh DEPENDENCIES The following standard commands are required by ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258412 - in head/sys/arm: at91 econa s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa
Author: ian Date: Thu Nov 21 01:08:10 2013 New Revision: 258412 URL: http://svnweb.freebsd.org/changeset/base/258412 Log: Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c. Pointed out by:cognet Pointy hat to: ian Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/econa/econa_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/at91/at91_machdep.c == --- head/sys/arm/at91/at91_machdep.cThu Nov 21 00:54:26 2013 (r258411) +++ head/sys/arm/at91/at91_machdep.cThu Nov 21 01:08:10 2013 (r258412) @@ -604,6 +604,7 @@ initarm(struct arm_boot_params *abp) * of the stack memory. */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); + cpu_setup(""); set_stackptrs(0); Modified: head/sys/arm/econa/econa_machdep.c == --- head/sys/arm/econa/econa_machdep.c Thu Nov 21 00:54:26 2013 (r258411) +++ head/sys/arm/econa/econa_machdep.c Thu Nov 21 01:08:10 2013 (r258412) @@ -309,6 +309,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); /* Set stack for exception handlers */ data_abort_handler_address = (u_int)data_abort_handler; Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c == --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu Nov 21 00:54:26 2013 (r258411) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu Nov 21 01:08:10 2013 (r258412) @@ -355,6 +355,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); /* Disable all peripheral interrupts */ ioreg_write32(S3C24X0_INTCTL_BASE + INTCTL_INTMSK, ~0); Modified: head/sys/arm/sa11x0/assabet_machdep.c == --- head/sys/arm/sa11x0/assabet_machdep.c Thu Nov 21 00:54:26 2013 (r258411) +++ head/sys/arm/sa11x0/assabet_machdep.c Thu Nov 21 01:08:10 2013 (r258412) @@ -371,6 +371,7 @@ initarm(struct arm_boot_params *abp) cpufunc_control(0x337f, 0x107d); arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL); + cpu_setup(""); pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x40; Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c == --- head/sys/arm/xscale/i80321/ep80219_machdep.cThu Nov 21 00:54:26 2013(r258411) +++ head/sys/arm/xscale/i80321/ep80219_machdep.cThu Nov 21 01:08:10 2013(r258412) @@ -334,6 +334,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + /* * Fetch the SDRAM start/size from the i80321 SDRAM configration * registers. Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c == --- head/sys/arm/xscale/i80321/iq31244_machdep.cThu Nov 21 00:54:26 2013(r258411) +++ head/sys/arm/xscale/i80321/iq31244_machdep.cThu Nov 21 01:08:10 2013(r258412) @@ -335,6 +335,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + /* * Fetch the SDRAM start/size from the i80321 SDRAM configration * registers. Modified: head/sys/arm/xscale/i8134x/crb_machdep.c == --- head/sys/arm/xscale/i8134x/crb_machdep.cThu Nov 21 00:54:26 2013 (r258411) +++ head/sys/arm/xscale/i8134x/crb_machdep.cThu Nov 21 01:08:10 2013 (r258412) @@ -320,6 +320,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + i80321_calibrate_delay(); i81342_sdram_bounds(&obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); physmem = memsize / PAGE_SIZE; Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ==
Re: svn commit: r258328 - head/sys/net
On 11/20/13, 2:02 PM, Adrian Chadd wrote: Can we revert this and just quickly put together something else that won't potentially come back to bite us with weird side effects? My suggestions (and I'm happy to do this work if needed): * create a lightweight mbuf queue representation so an mbuf list isn't just the mbuf header pointer; * create a new ether input (say, ether_input_multi) that takes an mbuf list, so existing driver code does the right thing. After that it'd be nice to write a set of mbuf list macros for abstract the whole queue, dequeue, concat, iterate, etc (like sys/queue.h, but for mbufs.) What do people think? (I've been doing it for m->next chained things, but not m->m_nextpkt things..) I was thinking: new interfaces.. (your -multi names sound good). macros for handling said lists so that people don't screw them up Old drivers run with no change. -adrian On 18 November 2013 14:58, George V. Neville-Neil wrote: Author: gnn Date: Mon Nov 18 22:58:14 2013 New Revision: 258328 URL: http://svnweb.freebsd.org/changeset/base/258328 Log: Allow ethernet drivers to pass in packets connected via the nextpkt pointer. Handling packets in this way allows drivers to amortize work during packet reception. Submitted by: Vijay Singh Sponsored by: NetApp Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c == --- head/sys/net/if_ethersubr.c Mon Nov 18 22:55:50 2013(r258327) +++ head/sys/net/if_ethersubr.c Mon Nov 18 22:58:14 2013(r258328) @@ -708,13 +708,25 @@ static void ether_input(struct ifnet *ifp, struct mbuf *m) { + struct mbuf *mn; + /* -* We will rely on rcvif being set properly in the deferred context, -* so assert it is correct here. +* The drivers are allowed to pass in a chain of packets linked with +* m_nextpkt. We split them up into separate packets here and pass +* them up. This allows the drivers to amortize the receive lock. */ - KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", __func__)); + while (m) { + mn = m->m_nextpkt; + m->m_nextpkt = NULL; - netisr_dispatch(NETISR_ETHER, m); + /* +* We will rely on rcvif being set properly in the deferred context, +* so assert it is correct here. +*/ + KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", __func__)); + netisr_dispatch(NETISR_ETHER, m); + m = mn; + } } /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r258328 - head/sys/net
On 11/20/13, 4:35 PM, Luigi Rizzo wrote: On Wed, Nov 20, 2013 at 04:07:07PM -0800, Adrian Chadd wrote: Hi, We should migrate drivers to use a multi-input method where it's appropriate. It's the same pain as if_transmit() is/was. right, and i think that is very confusing and i'd rather not replicate the experience. But what is your plan, have both if_input and if_input_multi ? And then make the vlan and all similar filters intercept both ? Because all of the existing options have pros and cons: 1. having both if_input and if_input_multi is visually cleaner but requires extending ifnet and some convoluted code in the initialization (same as if_transmit) 2. just if_input with typed mbufs is less clean but has the big advantage thay you only need to change ether_input() (and equivalent for other L2 protocols), and it is not error prone if_input_multi() or whatever it is called is just this patch split into two bits. in the simple case it just calls the single one multiple times, just like this patch does. it is clean from teh compiler's point of view, 3. having only if_input_multi (even without renaming if_input) requires you to change all the 100+ drivers. It seems to me that #2 at least preserves binary compatibility with driver modules and is easier to backport to other versions of FreeBSD, this is why i prefer it. my two cents... cheers luigi I'd really like to avoid having hacky solutions like mbufs with magic types. If we're going down that path, we should create a correct inline messaging mechanism that includes arbitrary messages in the stream, where some may or may not be mbufs. Magic mbufs just makes me want to tear out my eyes a little. So, the reason I'd like to back it out is because we should be doing it via a multi method with some type that represents an mbuf list. If George doesn't mind, I'll add a multi input method, move this stuff into it, and make ether_input just be single frames. -adrian ___ freebsd-a...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscr...@freebsd.org" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258418 - head/usr.sbin/bsdconfig/networking/share
Author: dteske Date: Thu Nov 21 03:22:13 2013 New Revision: 258418 URL: http://svnweb.freebsd.org/changeset/base/258418 Log: Quote the interface name for good measure. Modified: head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr == --- head/usr.sbin/bsdconfig/networking/share/device.subrThu Nov 21 03:01:28 2013(r258417) +++ head/usr.sbin/bsdconfig/networking/share/device.subrThu Nov 21 03:22:13 2013(r258418) @@ -278,22 +278,23 @@ f_dialog_menu_netdev_edit() msg=$( printf "$msg_scanning_for_dhcp" "$interface" ) if [ "$USE_XDIALOG" ]; then ( - f_quietly ifconfig $interface delete - f_quietly dhclient $interface + f_quietly ifconfig "$interface" delete + f_quietly dhclient "$interface" ) | f_xdialog_info "$msg" else f_dialog_info "$msg" - f_quietly ifconfig $interface delete - f_quietly dhclient $interface + f_quietly ifconfig "$interface" delete + f_quietly dhclient "$interface" fi ) retval=$? trap 'interrupt' SIGINT if [ $retval -eq $DIALOG_OK ]; then dhcp=1 - ipaddr=$( f_ifconfig_inet $interface ) - netmask=$( f_ifconfig_netmask $interface ) + f_ifconfig_inet "$interface" ipaddr + f_ifconfig_inet6 "$interface" ipaddr6 + f_ifconfig_netmask "$interface" netmask options= # Fixup search/domain in resolv.conf(5) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258424 - head/sys/powerpc/aim
Author: jhibbits Date: Thu Nov 21 06:54:28 2013 New Revision: 258424 URL: http://svnweb.freebsd.org/changeset/base/258424 Log: Remove stale comment. The PID provider is handled elsewhere already. Modified: head/sys/powerpc/aim/trap.c Modified: head/sys/powerpc/aim/trap.c == --- head/sys/powerpc/aim/trap.c Thu Nov 21 05:17:36 2013(r258423) +++ head/sys/powerpc/aim/trap.c Thu Nov 21 06:54:28 2013(r258424) @@ -205,9 +205,6 @@ trap(struct trapframe *frame) * handled the trap and modified the trap frame so that this * function can return normally. */ - /* -* XXXDTRACE: add pid probe handler here (if ever) -*/ if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type)) return; #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"