svn commit: r235461 - head/sys/dev/ath
Author: adrian Date: Tue May 15 04:55:15 2012 New Revision: 235461 URL: http://svn.freebsd.org/changeset/base/235461 Log: Handle non-xretry errors the same as xretry errors for now. Although I _should_ handle the other errors in various ways (specifically errors like FILT), treating them as having transmitted successfully is completely wrong. Here, they'd be counted as successful and the BAW would be advanced.. but the RX side wouldn't have received them. The specific errors I've been seeing here are HAL_TXERR_FILT. This patch does fix the issue - I've tested it using -i 0.001 pings (enough to start aggregation) and now the behaviour is correct: * The RX side never sees a "moved window" error, and * The TX side sends BARs as needed, with the RX side correctly handling them. PR: kern/167902 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cTue May 15 03:21:36 2012 (r235460) +++ head/sys/dev/ath/if_ath_tx.cTue May 15 04:55:15 2012 (r235461) @@ -3597,9 +3597,16 @@ ath_tx_aggr_comp_aggr(struct ath_softc * pktlen = bf_first->bf_state.bfs_pktlen; /* -* handle errors first +* Handle errors first! +* +* Here, handle _any_ error as a "exceeded retries" error. +* Later on (when filtered frames are to be specially handled) +* it'll have to be expanded. */ +#if 0 if (ts.ts_status & HAL_TXERR_XRETRY) { +#endif + if (ts.ts_status != 0) { ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); ath_tx_comp_aggr_error(sc, bf_first, atid); return; @@ -3839,7 +3846,10 @@ ath_tx_aggr_comp_unaggr(struct ath_softc * Don't bother with the retry check if all frames * are being failed (eg during queue deletion.) */ +#if 0 if (fail == 0 && ts->ts_status & HAL_TXERR_XRETRY) { +#endif + if (fail == 0 && ts->ts_status != 0) { ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: retry_unaggr\n", __func__); ___ 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: r235459 - in head/sys: kern sys
Author: rstone Date: Tue May 15 01:30:25 2012 New Revision: 235459 URL: http://svn.freebsd.org/changeset/base/235459 Log: Implement the DTrace sched provider. This implementation aims to be compatible with the sched provider implemented by Solaris and its open- source derivatives. Full documentation of the sched provider can be found on Oracle's DTrace wiki pages. Note that for compatibility with scripts originally written for Solaris, serveral probes are defined that will never fire. These probes are defined to fire when Solaris-specific features perform certain actions. As these features are not present in FreeBSD, the probes can never fire. Also, I have added a two probes that are not defined in Solaris, lend-pri and load-change. These probes have been added to make it possible to collect schedgraph data with DTrace. Finally, a few probes are defined in Solaris to take a cpuinfo_t * argument. As it was not immediately clear to me how to translate that to FreeBSD, currently those probes are passed NULL in place of a cpuinfo_t *. Sponsored by: Sandvine Incorporated MFC after:2 weeks Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_turnstile.c head/sys/sys/sdt.h Modified: head/sys/kern/kern_clock.c == --- head/sys/kern/kern_clock.c Tue May 15 00:42:12 2012(r235458) +++ head/sys/kern/kern_clock.c Tue May 15 01:30:25 2012(r235459) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kdb.h" #include "opt_device_polling.h" #include "opt_hwpmc_hooks.h" +#include "opt_kdtrace.h" #include "opt_ntp.h" #include "opt_watchdog.h" @@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -88,6 +90,9 @@ SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_ /* Spin-lock protecting profiling statistics. */ static struct mtx time_lock; +SDT_PROVIDER_DECLARE(sched); +SDT_PROBE_DEFINE2(sched, , , tick, tick, "struct thread *", "struct proc *"); + static int sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS) { @@ -760,6 +765,7 @@ statclock_cnt(int cnt, int usermode) ru->ru_maxrss = rss; KTR_POINT2(KTR_SCHED, "thread", sched_tdname(td), "statclock", "prio:%d", td->td_priority, "stathz:%d", (stathz)?stathz:hz); + SDT_PROBE2(sched, , , tick, td, td->td_proc); thread_lock_flags(td, MTX_QUIET); for ( ; cnt > 0; cnt--) sched_clock(td); Modified: head/sys/kern/kern_synch.c == --- head/sys/kern/kern_synch.c Tue May 15 00:42:12 2012(r235458) +++ head/sys/kern/kern_synch.c Tue May 15 01:30:25 2012(r235459) @@ -37,6 +37,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_sched.h" @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -105,6 +107,20 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLF static voidloadav(void *arg); +SDT_PROVIDER_DECLARE(sched); +SDT_PROBE_DEFINE(sched, , , preempt, preempt); + +/* + * These probes reference Solaris features that are not implemented in FreeBSD. + * Create the probes anyway for compatibility with existing D scripts; they'll + * just never fire. + */ +SDT_PROBE_DEFINE(sched, , , cpucaps_sleep, cpucaps-sleep); +SDT_PROBE_DEFINE(sched, , , cpucaps_wakeup, cpucaps-wakeup); +SDT_PROBE_DEFINE(sched, , , schedctl_nopreempt, schedctl-nopreempt); +SDT_PROBE_DEFINE(sched, , , schedctl_preempt, schedctl-preempt); +SDT_PROBE_DEFINE(sched, , , schedctl_yield, schedctl-yield); + void sleepinit(void) { @@ -462,6 +478,7 @@ mi_switch(int flags, struct thread *newt "prio:%d", td->td_priority, "wmesg:\"%s\"", td->td_wmesg, "lockname:\"%s\"", td->td_lockname); #endif + SDT_PROBE0(sched, , , preempt); #ifdef XEN PT_UPDATES_FLUSH(); #endif Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Tue May 15 00:42:12 2012(r235458) +++ head/sys/kern/kern_thread.c Tue May 15 01:30:25 2012(r235459) @@ -27,6 +27,7 @@ */ #include "opt_witness.h" +#include "opt_kdtrace.h" #include "opt_hwpmc_hooks.h" #include @@ -39,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,6 +61,10 @@ __FBSDID("$FreeBSD$"); #include #include +SDT_PROVIDER_DECLARE(proc); +SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp-exit); + + /* * thread related storage. */ Modified: head/sys/kern/sched_4bsd.c ==
svn commit: r235457 - head/cddl/contrib/dtracetoolkit
Author: gnn Date: Mon May 14 22:02:01 2012 New Revision: 235457 URL: http://svn.freebsd.org/changeset/base/235457 Log: Move sh to the correct path for FreeBSD. Modified: head/cddl/contrib/dtracetoolkit/dtruss Modified: head/cddl/contrib/dtracetoolkit/dtruss == --- head/cddl/contrib/dtracetoolkit/dtruss Mon May 14 22:00:24 2012 (r235456) +++ head/cddl/contrib/dtracetoolkit/dtruss Mon May 14 22:02:01 2012 (r235457) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # dtruss - print process system call time details. # Written using DTrace (Solaris 10 3/05). ___ 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: r235456 - head/cddl/contrib/dtracetoolkit
Author: gnn Date: Mon May 14 22:00:24 2012 New Revision: 235456 URL: http://svn.freebsd.org/changeset/base/235456 Log: Move sh to the correct location for FreeBS (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/procsystime Modified: head/cddl/contrib/dtracetoolkit/procsystime == --- head/cddl/contrib/dtracetoolkit/procsystime Mon May 14 21:59:47 2012 (r235455) +++ head/cddl/contrib/dtracetoolkit/procsystime Mon May 14 22:00:24 2012 (r235456) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # procsystime - print process system call time details. # Written using DTrace (Solaris 10 3/05). ___ 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: r235455 - head/cddl/contrib/dtracetoolkit
Author: gnn Date: Mon May 14 21:59:47 2012 New Revision: 235455 URL: http://svn.freebsd.org/changeset/base/235455 Log: Fix execsnoop by changing exece and exec to be FreeBSD's execve. Reference sh in the correct location (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/execsnoop Modified: head/cddl/contrib/dtracetoolkit/execsnoop == --- head/cddl/contrib/dtracetoolkit/execsnoop Mon May 14 21:58:22 2012 (r235454) +++ head/cddl/contrib/dtracetoolkit/execsnoop Mon May 14 21:59:47 2012 (r235455) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # execsnoop - snoop process execution as it occurs. # Written using DTrace (Solaris 10 3/05). @@ -155,7 +155,7 @@ fi /* * Print exec event */ - syscall::exec:return, syscall::exece:return + syscall::execve:return /(FILTER == 0) || (OPT_cmd == 1 && COMMAND == execname)/ { /* print optional fields */ ___ 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: r235454 - head/cddl/contrib/dtracetoolkit
Author: gnn Date: Mon May 14 21:58:22 2012 New Revision: 235454 URL: http://svn.freebsd.org/changeset/base/235454 Log: Fix opensnoop for FreeBSD by removing probes with 64 at the end as these are unnecessary. Reference sh in the correct location (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/opensnoop Modified: head/cddl/contrib/dtracetoolkit/opensnoop == --- head/cddl/contrib/dtracetoolkit/opensnoop Mon May 14 18:06:51 2012 (r235453) +++ head/cddl/contrib/dtracetoolkit/opensnoop Mon May 14 21:58:22 2012 (r235454) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # opensnoop - snoop file opens as they occur. # Written using DTrace (Solaris 10 3/05). @@ -189,7 +189,7 @@ fi /* * Print open event */ - syscall::open:entry, syscall::open64:entry + syscall::open:entry { /* save pathname */ self->pathp = arg0; @@ -203,7 +203,7 @@ fi /* OPT_file is checked on return to ensure pathp is mapped */ } - syscall::open:return, syscall::open64:return + syscall::open:return /self->ok && (! OPT_failonly || (int)arg0 < 0) && ((OPT_file == 0) || (OPT_file == 1 && PATHNAME == copyinstr(self->pathp)))/ { @@ -235,7 +235,7 @@ fi /* * Cleanup */ - syscall::open:return, syscall::open64:return + syscall::open:return /self->ok/ { self->pathp = 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: r235453 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Mon May 14 18:06:51 2012 New Revision: 235453 URL: http://svn.freebsd.org/changeset/base/235453 Log: Style fixes. Submitted by: kmoore Obtained from:PC-BSD MFC after:3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh == --- head/usr.sbin/pc-sysinstall/backend/functions.shMon May 14 18:03:59 2012(r235452) +++ head/usr.sbin/pc-sysinstall/backend/functions.shMon May 14 18:06:51 2012(r235453) @@ -208,15 +208,11 @@ fetch_file() FETCHOUTFILE="$2" EXITFAILED="$3" - SIZEFILE="${TMPDIR}/.fetchSize" EXITFILE="${TMPDIR}/.fetchExit" - rm ${SIZEFILE} 2>/dev/null >/dev/null rm ${FETCHOUTFILE} 2>/dev/null >/dev/null - fetch -s "${FETCHFILE}" >${SIZEFILE} - SIZE="`cat ${SIZEFILE}`" - SIZE=$((SIZE/1024)) + SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) echo "FETCH: ${FETCHFILE}" echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} @@ -278,12 +274,10 @@ get_zpool_name() NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` # Is it used in another zpool? -while -z=1 +while : do NEWNAME="${BASENAME}${NUM}" - zpool import | grep -q "${NEWNAME}" - if [ $? -ne 0 ] ; then break ; fi + zpool import | grep -qw "${NEWNAME}" && break NUM=$((NUM+1)) done ___ 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: r235452 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Mon May 14 18:03:59 2012 New Revision: 235452 URL: http://svn.freebsd.org/changeset/base/235452 Log: Set the MBR partition to active when doing a full disk MBR. Submitted by: kmoore Obtained from:PC-BSD Sponsored by: iXsystems MFC after:3 days Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 17:00:32 2012(r235451) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 18:03:59 2012(r235452) @@ -689,6 +689,9 @@ init_mbr_full_disk() echo_log "Cleaning up ${_intDISK}s1" rc_halt "dd if=/dev/zero of=${_intDISK}s1 count=1024" + # Make the partition active + rc_halt "gpart set -a active -i 1 ${_intDISK}" + if [ "$_intBOOT" = "bsd" ] ; then echo_log "Stamping boot0 on ${_intDISK}" rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}" ___ 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: r235451 - head/sys/dev/usb/input
Author: hselasky Date: Mon May 14 17:00:32 2012 New Revision: 235451 URL: http://svn.freebsd.org/changeset/base/235451 Log: Move reset of USB mouse parameters from the USB mouse attach to the USB mouse device open. Protect against multi character device open. Some other nits. MFC after:1 week Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c == --- head/sys/dev/usb/input/ums.cMon May 14 16:25:17 2012 (r235450) +++ head/sys/dev/usb/input/ums.cMon May 14 17:00:32 2012 (r235451) @@ -134,6 +134,7 @@ struct ums_softc { struct usb_xfer *sc_xfer[UMS_N_TRANSFER]; int sc_pollrate; + int sc_fflags; uint8_t sc_buttons; uint8_t sc_iid; @@ -677,32 +678,13 @@ ums_attach(device_t dev) DPRINTF("size=%d, id=%d\n", isize, sc->sc_iid); #endif - if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) - sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; - else - sc->sc_hw.buttons = sc->sc_buttons; - - sc->sc_hw.iftype = MOUSE_IF_USB; - sc->sc_hw.type = MOUSE_MOUSE; - sc->sc_hw.model = MOUSE_MODEL_GENERIC; - sc->sc_hw.hwid = 0; - - sc->sc_mode.protocol = MOUSE_PROTO_MSC; - sc->sc_mode.rate = -1; - sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; - sc->sc_mode.accelfactor = 0; - sc->sc_mode.level = 0; - sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; - sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; - sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; - err = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ums_fifo_methods, &sc->sc_fifo, device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); - if (err) { + if (err) goto detach; - } + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, @@ -825,7 +807,7 @@ ums_put_queue(struct ums_softc *sc, int3 static void ums_reset_buf(struct ums_softc *sc) { - /* reset read queue */ + /* reset read queue, must be called locked */ usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]); } @@ -836,7 +818,33 @@ ums_open(struct usb_fifo *fifo, int ffla DPRINTFN(2, "\n"); - if (fflags & FREAD) { + /* check for duplicate open, should not happen */ + if (sc->sc_fflags & fflags) + return (EBUSY); + + /* check for first open */ + if (sc->sc_fflags == 0) { + + /* reset all USB mouse parameters */ + + if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) + sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; + else + sc->sc_hw.buttons = sc->sc_buttons; + + sc->sc_hw.iftype = MOUSE_IF_USB; + sc->sc_hw.type = MOUSE_MOUSE; + sc->sc_hw.model = MOUSE_MODEL_GENERIC; + sc->sc_hw.hwid = 0; + + sc->sc_mode.protocol = MOUSE_PROTO_MSC; + sc->sc_mode.rate = -1; + sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; + sc->sc_mode.accelfactor = 0; + sc->sc_mode.level = 0; + sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; + sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; + sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; /* reset status */ @@ -847,21 +855,31 @@ ums_open(struct usb_fifo *fifo, int ffla sc->sc_status.dy = 0; sc->sc_status.dz = 0; /* sc->sc_status.dt = 0; */ + } + if (fflags & FREAD) { + /* allocate RX buffer */ if (usb_fifo_alloc_buffer(fifo, UMS_BUF_SIZE, UMS_IFQ_MAXLEN)) { return (ENOMEM); } } + + sc->sc_fflags |= fflags & (FREAD | FWRITE); return (0); } static void ums_close(struct usb_fifo *fifo, int fflags) { - if (fflags & FREAD) { + struct ums_softc *sc = usb_fifo_softc(fifo); + + DPRINTFN(2, "\n"); + + if (fflags & FREAD) usb_fifo_free_buffer(fifo); - } + + sc->sc_fflags &= ~(fflags & (FREAD | FWRITE)); } static int @@ -891,7 +909,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long /* don't change the current setting */ } else if ((mode.level < 0) || (mode.level > 1)) { error = EINVAL; - goto done; + break; } else { sc->sc_mode.level = mode.level; } @@ -928,7 +946,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long case MOUSE_SETLEVEL: if (*(int *)addr < 0 || *(int *)addr > 1) { er
svn commit: r235450 - head/share/man/man4
Author: joel (doc committer) Date: Mon May 14 16:25:17 2012 New Revision: 235450 URL: http://svn.freebsd.org/changeset/base/235450 Log: mdoc: Avoid playing tricks with Ns: If Nm is present in the SYNOPSIS section, it will be output on its own line. Ns cancels this effect however. This change is also consistent with the rest of our manual pages. Modified: head/share/man/man4/divert.4 head/share/man/man4/gre.4 head/share/man/man4/ipfirewall.4 head/share/man/man4/send.4 head/share/man/man4/siftr.4 Modified: head/share/man/man4/divert.4 == --- head/share/man/man4/divert.4Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/divert.4Mon May 14 16:25:17 2012 (r235450) @@ -21,7 +21,7 @@ kernel configuration file: .Ed .Pp Alternatively, to load -.Ns Nm +the driver as a module at boot time, add the following lines into the .Xr loader.conf 5 file: Modified: head/share/man/man4/gre.4 == --- head/share/man/man4/gre.4 Mon May 14 15:46:37 2012(r235449) +++ head/share/man/man4/gre.4 Mon May 14 16:25:17 2012(r235450) @@ -37,16 +37,14 @@ .Nd encapsulating network device .Sh SYNOPSIS To compile the -.Ns Nm -device into the kernel, place the following line in the kernel +driver into the kernel, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "device gre" .Ed .Pp Alternatively, to load the -.Ns Nm -device as a module at boot time, place the following line in +driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_gre_load="YES" Modified: head/share/man/man4/ipfirewall.4 == --- head/share/man/man4/ipfirewall.4Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/ipfirewall.4Mon May 14 16:25:17 2012 (r235450) @@ -9,15 +9,14 @@ .Nd IP packet filter and traffic accounting .Sh SYNOPSIS To compile -.Ns Nm +the driver into the kernel, place the following option in the kernel configuration file: .Bd -ragged -offset indent .Cd "options IPFIREWALL" .Ed .Pp -Other kernel options related to -.Ns Nm +Other related kernel options which may also be useful are: .Bd -ragged -offset indent .Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT" @@ -27,7 +26,7 @@ which may also be useful are: .Ed .Pp To load -.Ns Nm +the driver as a module at boot time, add the following line into the .Xr loader.conf 5 file: Modified: head/share/man/man4/send.4 == --- head/share/man/man4/send.4 Mon May 14 15:46:37 2012(r235449) +++ head/share/man/man4/send.4 Mon May 14 16:25:17 2012(r235450) @@ -38,10 +38,7 @@ .Ft int .Fn socket PF_INET6 SOCK_RAW IPPROTO_SEND .Pp -To enable -.Ns Nm -support, load the kernel side SeND as a module. -To load it at boot time, add the following line to +To load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent send_load="YES" Modified: head/share/man/man4/siftr.4 == --- head/share/man/man4/siftr.4 Mon May 14 15:46:37 2012(r235449) +++ head/share/man/man4/siftr.4 Mon May 14 16:25:17 2012(r235450) @@ -38,14 +38,14 @@ .Nd Statistical Information For TCP Research .Sh SYNOPSIS To load -.Ns Nm +the driver as a module at run-time, run the following command as root: .Bd -literal -offset indent kldload siftr .Ed .Pp Alternatively, to load -.Ns Nm +the driver as a module at boot time, add the following line into the .Xr loader.conf 5 file: @@ -53,13 +53,16 @@ file: siftr_load="YES" .Ed .Sh DESCRIPTION +The .Nm -.Ns ( Em S Ns tatistical +.Po +.Em S Ns tatistical .Em I Ns nformation .Em F Ns or .Em T Ns CP -.Em R Ns esearch ) -is a kernel module that logs a range of statistics on active TCP connections to +.Em R Ns esearch +.Pc +kernel module logs a range of statistics on active TCP connections to a log file. It provides the ability to make highly granular measurements of TCP connection state, aimed at system administrators, developers and researchers. ___ 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: r235441 - head/share/man/man8
Author: gjb (doc committer) Date: Mon May 14 14:33:08 2012 New Revision: 235441 URL: http://svn.freebsd.org/changeset/base/235441 Log: Fix an mdoc(7) formatting nit. Modified: head/share/man/man8/rc.8 Modified: head/share/man/man8/rc.8 == --- head/share/man/man8/rc.8Mon May 14 13:49:06 2012(r235440) +++ head/share/man/man8/rc.8Mon May 14 14:33:08 2012(r235441) @@ -452,7 +452,7 @@ before starting the daemon. Following tradition, all startup files reside in .Pa /etc . .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/rc .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local ___ 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: r235435 - head/usr.bin/sort
Author: gabor Date: Mon May 14 10:06:49 2012 New Revision: 235435 URL: http://svn.freebsd.org/changeset/base/235435 Log: - Eliminate initializations if global variables. Compilers are not required to optimize these so it may result in larger binary size. Pointed out by: kib Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cMon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/bwstring.cMon May 14 10:06:49 2012 (r235435) @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include "bwstring.h" #include "sort.h" -bool byte_sort = false; +bool byte_sort; -static wchar_t **wmonths = NULL; -static unsigned char **cmonths = NULL; +static wchar_t **wmonths; +static unsigned char **cmonths; /* initialise months */ Modified: head/usr.bin/sort/coll.c == --- head/usr.bin/sort/coll.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/coll.cMon May 14 10:06:49 2012(r235435) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "vsort.h" -struct key_specs *keys = NULL; +struct key_specs *keys; size_t keys_num = 0; wchar_t symbol_decimal_point = L'.'; Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/file.cMon May 14 10:06:49 2012(r235435) @@ -54,7 +54,7 @@ unsigned long long free_memory = 100 unsigned long long available_free_memory = 100; const char *tmpdir = "/var/tmp"; -const char* compress_program = NULL; +const char *compress_program; size_t max_open_files = 16; Modified: head/usr.bin/sort/radixsort.c == --- head/usr.bin/sort/radixsort.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/radixsort.c Mon May 14 10:06:49 2012 (r235435) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define SMALL_NODE(sl) ((sl)->tosort_num < 5) /* are we sorting in reverse order ? */ -static bool reverse_sort = false; +static bool reverse_sort; /* sort sub-levels array size */ static const size_t slsz = 256 * sizeof(struct sort_level*); @@ -77,14 +77,14 @@ struct level_stack { struct sort_level*sl; }; -static struct level_stack *g_ls = NULL; +static struct level_stack *g_ls; #if defined(SORT_THREADS) /* stack guarding mutex */ static pthread_mutex_t g_ls_mutex; /* counter: how many items are left */ -static size_t sort_left = 0; +static size_t sort_left; /* guarding mutex */ static pthread_mutex_t sort_left_mutex; Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/sort.cMon May 14 10:06:49 2012(r235435) @@ -62,10 +62,10 @@ nl_catd catalog; #define DEFAULT_RANDOM_SORT_SEED_FILE ("/dev/random") #define MAX_DEFAULT_RANDOM_SEED_DATA_SIZE (1024) -static bool need_random = false; -static const char* random_source = DEFAULT_RANDOM_SORT_SEED_FILE; -static const void* random_seed = NULL; -static size_t random_seed_size = 0; +static bool need_random; +static const char *random_source = DEFAULT_RANDOM_SORT_SEED_FILE; +static const void *random_seed; +static size_t random_seed_size; MD5_CTX md5_ctx; @@ -98,26 +98,26 @@ const char *nlsstr[] = { "", struct sort_opts sort_opts_vals; -bool debug_sort = false; -bool need_hint = false; +bool debug_sort; +bool need_hint; #if defined(SORT_THREADS) size_t ncpu = 1; size_t nthreads = 1; #endif -static bool gnusort_numeric_compatibility = false; +static bool gnusort_numeric_compatibility; static struct sort_mods default_sort_mods_object; struct sort_mods * const default_sort_mods = &default_sort_mods_object; -static bool print_symbols_on_debug = false; +static bool print_symbols_on_debug; /* * Arguments from file (when file0-from option is used: */ static int argc_from_file0 = -1; -static char **argv_from_file0 = NULL; +static char **argv_from_file0; /* * Placeholder symbols for options which have no single-character equivalent ___ 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: r235434 - head/usr.bin/sort/nls
Author: gabor Date: Mon May 14 09:55:23 2012 New Revision: 235434 URL: http://svn.freebsd.org/changeset/base/235434 Log: - Update catalogs Modified: head/usr.bin/sort/nls/C.msg head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Modified: head/usr.bin/sort/nls/C.msg == --- head/usr.bin/sort/nls/C.msg Mon May 14 09:54:16 2012(r235433) +++ head/usr.bin/sort/nls/C.msg Mon May 14 09:55:23 2012(r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "you cannot use -%c and -%c together" +1 "mutually exclusive flags" 2 "extra argument not allowed with -c" -3 "Unknown feature: %s\n" +3 "Unknown feature" 4 "Wrong memory buffer specification" -5 "0 field in key specs\n" -6 "0 column in key specs\n" +5 "0 field in key specs" +6 "0 column in key specs" +7 "Wrong file mode" +8 "Cannot open file for reading" +9 "Radix sort cannot be used with these sort options" +10 "The chosen sort method cannot be used with stable and/or unique sort" +11 "Invalid key position" +12 "Usage: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S memsize] [-T tmpdir] [-t separator] [-o outfile] [--batch-size size] [--files0-from file] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads thread_no] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source file]] [--compress-program program] [file ...]\n" Modified: head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg == --- head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:54:16 2012 (r235433) +++ head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:55:23 2012 (r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "a -%c �s -%c opci�k nem haszn�lhat�k egy�tt" +1 "egym�st kiz�r� opci�k" 2 "extra argumentum a -%c opci�val" -3 "Ismeretlen funkci�: %s\n" +3 "Ismeretlen funkci�\n" 4 "Rossz mem�ria puffer �rt�k" 5 "0 mez� a kulcsspecifik�ci�ban\n" 6 "0 oszlop a kulcsspecifik�ci�ban\n" +7 "Helytelen f�jl m�d" +8 "A f�jl nem nyithat� meg olvas�sra" +9 "A radix rendez�s nem haszn�lhat� a megadott rendez�si opci�kkal" +10 "A v�lasztott rendez�si m�d nem haszn�lhat� a --stable �s --unique opci�kkal" +11 "�rv�nytelen kulcs poz�ci�" +12 "Haszn�lat: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S mem�riam�ret] [-T ideiglenes_k�nyvt�r] [-t elv�laszt�] [-o kimeneti_f�jl] [--batch-size m�ret] [--files0-from f�jl] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads sz�lak_sz�ma] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source f�jl]] [--compress-program program] [f�jl ...]\n" ___ 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: r235432 - head/usr.bin/sort
Author: gabor Date: Mon May 14 09:53:54 2012 New Revision: 235432 URL: http://svn.freebsd.org/changeset/base/235432 Log: - Fix build with clang Modified: head/usr.bin/sort/file.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cMon May 14 09:51:43 2012(r235431) +++ head/usr.bin/sort/file.cMon May 14 09:53:54 2012(r235432) @@ -598,7 +598,7 @@ openfile(const char *fn, const char *mod snprintf(cmd, cmdsz - 1, "%s > %s", compress_program, fn); else - err(2, getstr(7)); + err(2, "%s", getstr(7)); if ((file = popen(cmd, mode)) == NULL) err(2, NULL); @@ -939,7 +939,7 @@ file_header_init(struct file_header **fh (*fh)->fr = file_reader_init(fn); if ((*fh)->fr == NULL) { perror(fn); - err(2, getstr(8)); + err(2, "%s", getstr(8)); } line = file_reader_readline((*fh)->fr); if (line == NULL) { @@ -1276,7 +1276,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_RADIXSORT; } else if (sort_opts_vals.sort_method == SORT_RADIXSORT) - err(2, getstr(9)); + err(2, "%s", getstr(9)); /* * to handle stable sort and the unique cases in the @@ -1292,7 +1292,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_MERGESORT; break; default: - errx(2, getstr(10)); + errx(2, "%s", getstr(10)); }; } Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cMon May 14 09:51:43 2012(r235431) +++ head/usr.bin/sort/sort.cMon May 14 09:53:54 2012(r235432) @@ -74,9 +74,9 @@ MD5_CTX md5_ctx; * is found. */ const char *nlsstr[] = { "", -/* 1*/"you cannot use -%c and -%c together", +/* 1*/"mutually exclusive flags", /* 2*/"extra argument not allowed with -c", -/* 3*/"Unknown feature: %s", +/* 3*/"Unknown feature", /* 4*/"Wrong memory buffer specification", /* 5*/"0 field in key specs", /* 6*/"0 column in key specs", @@ -396,7 +396,7 @@ parse_memory_buffer_value(const char *va membuf = strtoll(value, &endptr, 10); if (errno != 0) { - warn(getstr(4)); + warn("%s",getstr(4)); membuf = available_free_memory; } else { switch (*endptr){ @@ -445,12 +445,10 @@ parse_memory_buffer_value(const char *va * Signal handler that clears the temporary files. */ static void -sig_handler(int sig, siginfo_t *siginfo, void *context) +sig_handler(int sig __unused, siginfo_t *siginfo __unused, +void *context __unused) { - sig = sig; - siginfo = siginfo; - context = context; clear_tmp_files(); exit(-1); } @@ -512,7 +510,7 @@ static void unknown(const char *what) { - errx(2, getstr(3), what); + errx(2, "%s: %s", getstr(3), what); } /* @@ -533,14 +531,13 @@ check_mutually_exclusive_flags(char c, b if (mec != c) { if (mef_flags[i]) { if (found_this) - errx(1, getstr(1), c, mec); + errx(1, "%c:%c: %s", c, mec, getstr(1)); found_others = true; fo_index = i; } } else { if (found_others) - errx(1, getstr(1), c, - mutually_exclusive_flags[fo_index]); + errx(1, "%c:%c: %s", c, mutually_exclusive_flags[fo_index], getstr(1)); mef_flags[i] = true; found_this = true; } @@ -661,7 +658,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f2 == 0) { - warn(getstr(5)); + warn("%s",getstr(5)); goto end; } } else { @@ -670,7 +667,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f1 == 0) { - warn(getstr(5)); + warn("%s",getstr(5
svn commit: r235429 - head/contrib/libpcap
Author: delphij Date: Mon May 14 09:32:10 2012 New Revision: 235429 URL: http://svn.freebsd.org/changeset/base/235429 Log: Add 3 missing files that was generated but not included with the initial commit. Reported by: buganini via IRC MFC after:2 weeks Added: head/contrib/libpcap/pcap-tstamp.manmisc head/contrib/libpcap/pcap_list_tstamp_types.3pcap head/contrib/libpcap/pcap_set_tstamp_type.3pcap Added: head/contrib/libpcap/pcap-tstamp.manmisc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libpcap/pcap-tstamp.manmiscMon May 14 09:32:10 2012 (r235429) @@ -0,0 +1,132 @@ +.\" +.\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997 +.\"The Regents of the University of California. All rights reserved. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that: (1) source code distributions +.\" retain the above copyright notice and this paragraph in its entirety, (2) +.\" distributions including binary code include the above copyright notice and +.\" this paragraph in its entirety in the documentation or other materials +.\" provided with the distribution, and (3) all advertising materials mentioning +.\" features or use of this software display the following acknowledgement: +.\" ``This product includes software developed by the University of California, +.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of +.\" the University nor the names of its contributors may be used to endorse +.\" or promote products derived from this software without specific prior +.\" written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.TH PCAP-TSTAMP 7 "22 August 2010" +.SH NAME +pcap-tstamp \- packet time stamps in libpcap +.SH DESCRIPTION +When capturing traffic, each packet is given a time stamp representing, +for incoming packets, the arrival time of the packet and, for outgoing +packets, the transmission time of the packet. This time is an +approximation of the arrival or transmission time. If it is supplied by +the operating system running on the host on which the capture is being +done, there are several reasons why it might not precisely represent the +arrival or transmission time: +.IP +if the time stamp is applied to the packet when the networking stack +receives the packet, the networking stack might not see the packet until +an interrupt is delivered for the packet or a timer event causes the +networking device driver to poll for packets, and the time stamp might +not be applied until the packet has had some processing done by other +code in the networking stack, so there might be a significant delay +between the time when the last bit of the packet is received by the +capture device and when the networking stack time-stamps the packet; +.IP +the timer used to generate the time stamps might have low resolution, +for example, it might be a timer updated once per host operating system +timer tick, with the host operating system timer ticking once every few +milliseconds; +.IP +a high-resolution timer might use a counter that runs at a rate +dependent on the processor clock speed, and that clock speed might be +adjusted upwards or downwards over time and the timer might not be able +to compensate for all those adjustments; +.IP +the host operating system's clock might be adjusted over time to match a +time standard to which the host is being synchronized, which might be +done by temporarily slowing down or speeding up the clock or by making a +single adjustment; +.IP +different CPU cores on a multi-core or multi-processor system might be +running at different speeds, or might not have time counters all +synchronized, so packets time-stamped by different cores might not have +consistent time stamps. +.LP +In addition, packets time-stamped by different cores might be +time-stamped in one order and added to the queue of packets for libpcap +to read in another order, so time stamps might not be monotonically +increasing. +.LP +Some capture devices on some platforms can provide time stamps for +packets; those time stamps are usually high-resolution time stamps, and +are usually applied to the packet when the first or last bit of the +packet arrives, and are thus more accurate than time stamps provided by +the host operating system. Those time stamps might not, however, be +synchronized with the host operating system's clock, so that, for +example, the time stamp of a packet might not correspond to the time +stamp of an event on the host triggered by the arrival of that packet. +.LP +Depending on the capture device and the software on the host, libpcap +mig