svn commit: r228986 - in head: share/man/man4 sys/net

2011-12-30 Thread Lawrence Stewart
Author: lstewart
Date: Fri Dec 30 08:57:58 2011
New Revision: 228986
URL: http://svn.freebsd.org/changeset/base/228986

Log:
  - Introduce the net.bpf.tscfg sysctl tree and associated code so as to make 
one
aspect of time stamp configuration per interface rather than per BPF
descriptor. Prior to this, the order in which BPF devices were opened and 
the
per descriptor time stamp configuration settings could cause 
non-deterministic
and unintended behaviour with respect to time stamping. With the new 
scheme, a
BPF attached interface's tscfg sysctl entry can be set to default, none,
fast, normal or external. Setting default means use the system 
default
option (set with the net.bpf.tscfg.default sysctl), none means do not
generate time stamps for tapped packets, fast means generate time stamps 
for
tapped packets using a hz granularity system clock read, normal means
generate time stamps for tapped packets using a full timecounter granularity
system clock read and external (currently unimplemented) means use the 
time
stamp provided with the packet from an underlying source.
  
  - Utilise the recently introduced sysclock_getsnapshot() and
sysclock_snap2bintime() KPIs to ensure the system clock is only read once 
per
packet, regardless of the number of BPF descriptors and time stamp formats
requested. Use the per BPF attached interface time stamp configuration to
control if sysclock_getsnapshot() is called and whether the system clock 
read
is fast or normal. The per BPF descriptor time stamp configuration is then
used to control how the system clock snapshot is converted to a bintime by
sysclock_snap2bintime().
  
  - Remove all FAST related BPF descriptor flag variants. Performing a fast
read of the system clock is now controlled per BPF attached interface using
the net.bpf.tscfg sysctl tree.
  
  - Update the bpf.4 man page.
  
  Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
  Melbourne, Australia, as part of the FreeBSD Foundation funded Feed-Forward
  Clock Synchronization Algorithms project.
  
  For more information, see http://www.synclab.org/radclock/
  
  In collaboration with:Julien Ridoux (jridoux at unimelb edu au)

Modified:
  head/share/man/man4/bpf.4
  head/sys/net/bpf.c
  head/sys/net/bpf.h

Modified: head/share/man/man4/bpf.4
==
--- head/share/man/man4/bpf.4   Fri Dec 30 06:24:59 2011(r228985)
+++ head/share/man/man4/bpf.4   Fri Dec 30 08:57:58 2011(r228986)
@@ -49,7 +49,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd June 15, 2010
+.Dd December 30, 2011
 .Dt BPF 4
 .Os
 .Sh NAME
@@ -516,61 +516,48 @@ by default.
 .It Dv BIOCSTSTAMP
 .It Dv BIOCGTSTAMP
 .Pq Li u_int
-Set or get format and resolution of the time stamps returned by BPF.
+Set or get the format and resolution of time stamps returned by BPF.
+The per-BPF descriptor configuration provided by the
+.Dv BIOCSTSTAMP
+IOCTL complements the per-interface time stamp configuration detailed in the
+.Sx CONFIGURATION
+section.
+.Pp
 Set to
-.Dv BPF_T_MICROTIME ,
-.Dv BPF_T_MICROTIME_FAST ,
-.Dv BPF_T_MICROTIME_MONOTONIC ,
+.Dv BPF_T_MICROTIME
 or
-.Dv BPF_T_MICROTIME_MONOTONIC_FAST
+.Dv BPF_T_MICROTIME_MONOTONIC
 to get time stamps in 64-bit
 .Vt struct timeval
 format.
 Set to
-.Dv BPF_T_NANOTIME ,
-.Dv BPF_T_NANOTIME_FAST ,
-.Dv BPF_T_NANOTIME_MONOTONIC ,
+.Dv BPF_T_NANOTIME
 or
-.Dv BPF_T_NANOTIME_MONOTONIC_FAST
+.Dv BPF_T_NANOTIME_MONOTONIC
 to get time stamps in 64-bit
 .Vt struct timespec
 format.
 Set to
-.Dv BPF_T_BINTIME ,
-.Dv BPF_T_BINTIME_FAST ,
-.Dv BPF_T_NANOTIME_MONOTONIC ,
+.Dv BPF_T_BINTIME
 or
-.Dv BPF_T_BINTIME_MONOTONIC_FAST
+.Dv BPF_T_BINTIME_MONOTONIC
 to get time stamps in 64-bit
 .Vt struct bintime
 format.
 Set to
 .Dv BPF_T_NONE
-to ignore time stamp.
+to not set a time stamp.
+By default, time stamps are initilized to
+.Dv BPF_T_MICROTIME .
+.Pp
 All 64-bit time stamp formats are wrapped in
 .Vt struct bpf_ts .
 The
-.Dv BPF_T_MICROTIME_FAST ,
-.Dv BPF_T_NANOTIME_FAST ,
-.Dv BPF_T_BINTIME_FAST ,
-.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
-.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
-and
-.Dv BPF_T_BINTIME_MONOTONIC_FAST
-are analogs of corresponding formats without _FAST suffix but do not perform
-a full time counter query, so their accuracy is one timer tick.
-The
 .Dv BPF_T_MICROTIME_MONOTONIC ,
 .Dv BPF_T_NANOTIME_MONOTONIC ,
-.Dv BPF_T_BINTIME_MONOTONIC ,
-.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
-.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
 and
-.Dv BPF_T_BINTIME_MONOTONIC_FAST
+.Dv BPF_T_BINTIME_MONOTONIC
 store the time elapsed since kernel boot.
-This setting is initialized to
-.Dv BPF_T_MICROTIME
-by default.
 .It Dv BIOCFEEDBACK
 .Pq Li u_int
 Set packet feedback mode.
@@ -692,14 +679,14 @@ Currently,
 .Vt bpf_hdr
 is used when the time stamp is set to
 .Dv BPF_T_MICROTIME ,
-.Dv BPF_T_MICROTIME_FAST ,
 .Dv 

Re: svn commit: r228878 - head/include

2011-12-30 Thread Ed Schouten
Hello Sean,

* Sean C. Farley s...@freebsd.org, 20111230 03:54:
 I just thought of this while reviewing the change:  should
 __bool_true_false_are_defined be set only if __cplusplus is not set?
 It should be set for C99, but I wonder if it should be set for C++.

Even if the C++ standard doesn't mention it at all, I think it doesn't
mean it is forbidden to define it. It starts with __[a-z], so it is in
the reserved namespace.

 Also, is there a style requirement that the guard for a header file
 be based off of the name of the file?  I did not see anything obvious
 for this within style(9), but I am curious.

I am not aware of this.

-- 
 Ed Schouten e...@80386.nl
 WWW: http://80386.nl/


pgpC2dauwZxru.pgp
Description: PGP signature


svn commit: r228987 - head/sys/mips/conf

2011-12-30 Thread Adrian Chadd
Author: adrian
Date: Fri Dec 30 09:39:24 2011
New Revision: 228987
URL: http://svn.freebsd.org/changeset/base/228987

Log:
  Add a couple of missing wlan modules.

Modified:
  head/sys/mips/conf/AR71XX_BASE

Modified: head/sys/mips/conf/AR71XX_BASE
==
--- head/sys/mips/conf/AR71XX_BASE  Fri Dec 30 08:57:58 2011
(r228986)
+++ head/sys/mips/conf/AR71XX_BASE  Fri Dec 30 09:39:24 2011
(r228987)
@@ -25,7 +25,7 @@ hints AR71XX_BASE.hints
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
 
 # Also build these as modules, just to ensure the build gets tested.
-makeoptionsMODULES_OVERRIDE=wlan wlan_xauth wlan_acl wlan_wep wlan_tkip 
wlan_ccmp ath ath_pci
+makeoptionsMODULES_OVERRIDE=wlan wlan_xauth wlan_acl wlan_wep wlan_tkip 
wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci
 
 optionsDDB
 optionsKDB
___
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: r228988 - head/sys/mips/conf

2011-12-30 Thread Adrian Chadd
Author: adrian
Date: Fri Dec 30 09:48:35 2011
New Revision: 228988
URL: http://svn.freebsd.org/changeset/base/228988

Log:
  Add a configuration file for the Atheros PB47 reference board.
  This is an AR71xx based board with 8MB flash, 64MB RAM, a
  Mini-PCI+ slot (see below) and a single 10/100/1000baseT
  ethernet port.  It also has two USB ports.
  
  This is an easier board than most to add as it doesn't have a
  switch PHY on-board.  This made it (mostly) trivial to craft a
  working configuration.
  
  Things to note:
  
  * This, like most other reference boards, use uboot rather then
redboot.  It means that you typically have to manually flash
both the kernel and rootfs partitions.
  
  * Since there's currently no (nice) way to extract out the
ethernet MAC and RAM from the uboot environment, the RAM
will default to 32mb and the MAC will be something very
incorrect.   I'll try to fix this up in a subsequent commit
or two, even if it's just some hard-coded nonsense in
ar71xx_machdep.c for now.
  
  * The board is designed for a specific model of mini-PCI+
NIC which never made it into production.  Normal mini-PCI
NICs will work fine; if you happen to have the NIC in question
then it will work fine with this board.

Added:
  head/sys/mips/conf/PB47   (contents, props changed)
  head/sys/mips/conf/PB47.hints   (contents, props changed)

Added: head/sys/mips/conf/PB47
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/PB47 Fri Dec 30 09:48:35 2011(r228988)
@@ -0,0 +1,51 @@
+#
+# Atheros PB47 reference board.
+#
+# * one MiniPCI+ slot (modified to allow two idsel lines
+#   on the one slot, for a specific kind of internal-only
+#   NIC;
+# * one XMII slot
+# * One ethernet PHY
+# * Akros Silicon AS1834
+# * 8MB NOR SPI flash
+# * 64MB RAM
+#
+# $FreeBSD$
+#
+
+includeAR71XX_BASE
+ident  PB47
+hints  PB47.hints
+
+# Enable the uboot environment stuff rather then the
+# redboot stuff.
+optionsAR71XX_ENV_UBOOT
+
+# XXX TODO: add uboot boot parameter parsing to extract MAC, RAM.
+# Right now it will just detect 32mb out of 64mb, as well as
+# return a garbage MAC address.
+
+# don't compile these in - the default flash area for kernel space
+# is only 1.2 megabytes.  To keep the flash allocation in line with
+# what the documentation says for this board, we'll just have to keep
+# the kernel smaller than that.
+nodevice wlan, wlan_wep, wlan_ccmp, wlan_tkip, wlan_xauth
+nodevice ath, ath_pci, ath_hal, ath_rate_sample
+
+# Since the module build doesn't like TDMA..
+nooptions  IEEE80211_SUPPORT_TDMA
+
+# For DOS - enable if required
+#options   GEOM_PART_BSD
+#options   GEOM_PART_MBR
+#options   MSDOSFS
+
+# uzip - to boot natively from flash
+device geom_uzip
+optionsGEOM_UZIP
+
+# Used for the static uboot partition map
+device geom_map
+
+# Boot off of the rootfs, as defined in the geom_map setup.
+optionsROOTDEVNAME=\ufs:map/rootfs.uzip\

Added: head/sys/mips/conf/PB47.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/PB47.hints   Fri Dec 30 09:48:35 2011
(r228988)
@@ -0,0 +1,79 @@
+
+# $FreeBSD$
+
+# There's two interfaces, but only one socket is populated.
+#
+# There's an AR8021 PHY attached to arge1.
+#
+# XXX TODO: figure out where to extract the MAC from.
+hint.arge.1.phymask=0x01
+
+# XXX TODO: pass in hints for the GPIO - LED mapping for the
+# minipci slot.  The specific customer reference design NIC
+# wires GPIO5 from each AR9220 to one of two GPIO pins on the
+# MiniPCI bus.  However, this may be very specific to the NIC
+# being used.
+
+# The default flash layout:
+# uboot: 192k
+# env: 64k
+# rootfs: 6144k
+# uimage (kernel): 1728k
+# caldata: 64k
+#
+# We steal 64k from the end of rootfs to store the local config.
+
+hint.map.0.at=flash/spi0
+hint.map.0.start=0x
+hint.map.0.end=0x3
+hint.map.0.name=uboot
+hint.map.0.readonly=1
+
+hint.map.1.at=flash/spi0
+hint.map.1.start=0x0003
+hint.map.1.end=0x0004
+hint.map.1.name=uboot-env
+hint.map.1.readonly=1
+
+hint.map.2.at=flash/spi0
+hint.map.2.start=0x0004
+hint.map.2.end=0x0063
+hint.map.2.name=rootfs
+hint.map.2.readonly=1
+
+hint.map.3.at=flash/spi0
+hint.map.3.start=0x0063
+hint.map.3.end=0x0064
+hint.map.3.name=cfg
+hint.map.3.readonly=0
+
+hint.map.4.at=flash/spi0
+hint.map.4.start=0x0064
+hint.map.4.end=0x007f
+hint.map.4.name=kernel
+hint.map.4.readonly=1
+
+hint.map.5.at=flash/spi0
+hint.map.5.start=0x007f
+hint.map.5.end=0x0080
+hint.map.5.name=art
+hint.map.5.readonly=1
+
+# Don't flip on anything that isn't already enabled by the
+# 

svn commit: r228989 - head/lib

2011-12-30 Thread Robert Watson
Author: rwatson
Date: Fri Dec 30 10:45:00 2011
New Revision: 228989
URL: http://svn.freebsd.org/changeset/base/228989

Log:
  Fix typo in Makefile comment.
  
  MFC after:3 days

Modified:
  head/lib/Makefile

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Fri Dec 30 09:48:35 2011(r228988)
+++ head/lib/Makefile   Fri Dec 30 10:45:00 2011(r228989)
@@ -8,7 +8,7 @@
 #
 # csu must be built before all shared libaries for ELF.
 # libc must be built before all other shared libraries.
-# libbsm must be built before ibauditd.
+# libbsm must be built before libauditd.
 # libcom_err must be built before libpam.
 # libcrypt must be built before libpam.
 # libkvm must be built before libdevstat.
___
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: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp...

2011-12-30 Thread Ulrich Spoerlein
Author: uqs
Date: Fri Dec 30 10:58:14 2011
New Revision: 228990
URL: http://svn.freebsd.org/changeset/base/228990

Log:
  Spelling fixes for usr.sbin/

Modified:
  head/usr.sbin/IPXrouted/sap_input.c
  head/usr.sbin/IPXrouted/sap_tables.c
  head/usr.sbin/adduser/adduser.sh
  head/usr.sbin/bluetooth/btpand/event.h
  head/usr.sbin/bluetooth/sdpd/server.c
  head/usr.sbin/bootparamd/bootparamd/README
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c
  head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
  head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def
  head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1
  head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
  head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
  head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
  head/usr.sbin/cron/cron/do_command.c
  head/usr.sbin/cron/doc/CHANGES
  head/usr.sbin/cron/doc/MAIL
  head/usr.sbin/cron/lib/entry.c
  head/usr.sbin/edquota/edquota.c
  head/usr.sbin/fwcontrol/fwcontrol.c
  head/usr.sbin/fwcontrol/fwmpegts.c
  head/usr.sbin/ifmcstat/ifmcstat.c
  head/usr.sbin/inetd/builtins.c
  head/usr.sbin/kbdmap/kbdmap.c
  head/usr.sbin/kgmon/kgmon.c
  head/usr.sbin/lpr/common_source/rmjob.c
  head/usr.sbin/lpr/lpc/cmds.c
  head/usr.sbin/lpr/lpd/printjob.c
  head/usr.sbin/lpr/pac/pac.c
  head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
  head/usr.sbin/makefs/cd9660/cd9660_write.c
  head/usr.sbin/makefs/cd9660/iso9660_rrip.c
  head/usr.sbin/makefs/ffs.c
  head/usr.sbin/makefs/ffs/ffs_subr.c
  head/usr.sbin/makefs/walk.c
  head/usr.sbin/mount_portalfs/cred.c
  head/usr.sbin/mount_portalfs/pt_pipe.c
  head/usr.sbin/mount_portalfs/pt_tcplisten.c
  head/usr.sbin/mountd/mountd.c
  head/usr.sbin/moused/moused.c
  head/usr.sbin/mptutil/mpt_config.c
  head/usr.sbin/newsyslog/newsyslog.c
  head/usr.sbin/nscd/protocol.h
  head/usr.sbin/ntp/doc/ntp.conf.5
  head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh
  head/usr.sbin/pc-sysinstall/backend/functions-disk.sh
  head/usr.sbin/pc-sysinstall/backend/functions-parse.sh
  head/usr.sbin/pciconf/pciconf.c
  head/usr.sbin/pkg_install/README
  head/usr.sbin/pkg_install/add/add.h
  head/usr.sbin/pkg_install/add/extract.c
  head/usr.sbin/pkg_install/add/futil.c
  head/usr.sbin/pkg_install/add/main.c
  head/usr.sbin/pkg_install/add/perform.c
  head/usr.sbin/pkg_install/add/pkg_add.1
  head/usr.sbin/pkg_install/create/create.h
  head/usr.sbin/pkg_install/create/main.c
  head/usr.sbin/pkg_install/create/perform.c
  head/usr.sbin/pkg_install/create/pkg_create.1
  head/usr.sbin/pkg_install/create/pl.c
  head/usr.sbin/pkg_install/delete/delete.h
  head/usr.sbin/pkg_install/delete/main.c
  head/usr.sbin/pkg_install/delete/perform.c
  head/usr.sbin/pkg_install/delete/pkg_delete.1
  head/usr.sbin/pkg_install/info/info.h
  head/usr.sbin/pkg_install/info/main.c
  head/usr.sbin/pkg_install/info/perform.c
  head/usr.sbin/pkg_install/info/show.c
  head/usr.sbin/pkg_install/lib/deps.c
  head/usr.sbin/pkg_install/lib/exec.c
  head/usr.sbin/pkg_install/lib/file.c
  head/usr.sbin/pkg_install/lib/global.c
  head/usr.sbin/pkg_install/lib/lib.h
  head/usr.sbin/pkg_install/lib/match.c
  head/usr.sbin/pkg_install/lib/msg.c
  head/usr.sbin/pkg_install/lib/pen.c
  head/usr.sbin/pkg_install/lib/plist.c
  head/usr.sbin/pkg_install/lib/str.c
  head/usr.sbin/pkg_install/lib/url.c
  head/usr.sbin/pkg_install/version/main.c
  head/usr.sbin/pkg_install/version/perform.c
  head/usr.sbin/pkg_install/version/version.h
  head/usr.sbin/pmcstat/pmcpl_calltree.c
  head/usr.sbin/pmcstat/pmcpl_gprof.c
  head/usr.sbin/pmcstat/pmcstat.c
  head/usr.sbin/pmcstat/pmcstat_log.c
  head/usr.sbin/ppp/cbcp.c
  head/usr.sbin/ppp/chat.h
  head/usr.sbin/ppp/command.c
  head/usr.sbin/ppp/mp.c
  head/usr.sbin/ppp/ppp.8.m4
  head/usr.sbin/ppp/vjcomp.c
  head/usr.sbin/pw/cpdir.c
  head/usr.sbin/route6d/route6d.c
  head/usr.sbin/rpc.lockd/kern.c
  head/usr.sbin/rpc.lockd/lockd_lock.c
  head/usr.sbin/rpcbind/check_bound.c
  head/usr.sbin/rpcbind/rpcbind.c
  head/usr.sbin/rtadvd/config.c
  head/usr.sbin/rtadvd/rtadvd.c
  head/usr.sbin/rtsold/rtsold.8
  head/usr.sbin/sade/label.c
  head/usr.sbin/tcpdump/tcpdump/tcpdump.1
  head/usr.sbin/timed/timed/CHANGES
  head/usr.sbin/vidcontrol/vidcontrol.c
  head/usr.sbin/wpa/hostapd/driver_freebsd.c
  head/usr.sbin/ypserv/yp_access.c

Modified: head/usr.sbin/IPXrouted/sap_input.c
==
--- head/usr.sbin/IPXrouted/sap_input.c Fri Dec 30 10:45:00 2011
(r228989)
+++ 

svn commit: r228991 - in head/usr.bin: brandelf calendar/calendars logins sockstat unzip whereis

2011-12-30 Thread Ulrich Spoerlein
Author: uqs
Date: Fri Dec 30 10:59:15 2011
New Revision: 228991
URL: http://svn.freebsd.org/changeset/base/228991

Log:
  Reencode files from latin1 to UTF-8.
  
  This makes a tiny percentage of entries in calendars ugly for latin1
  users, but fixes them for UTF-8 users.
  
  This badly needs a solution involving locale-dependent re-encoding.

Modified:
  head/usr.bin/brandelf/brandelf.c
  head/usr.bin/calendar/calendars/calendar.birthday
  head/usr.bin/calendar/calendars/calendar.freebsd
  head/usr.bin/calendar/calendars/calendar.history
  head/usr.bin/calendar/calendars/calendar.music
  head/usr.bin/logins/logins.1
  head/usr.bin/logins/logins.c
  head/usr.bin/sockstat/sockstat.1
  head/usr.bin/sockstat/sockstat.c
  head/usr.bin/unzip/unzip.1
  head/usr.bin/unzip/unzip.c
  head/usr.bin/whereis/pathnames.h
  head/usr.bin/whereis/whereis.c

Modified: head/usr.bin/brandelf/brandelf.c
==
--- head/usr.bin/brandelf/brandelf.cFri Dec 30 10:58:14 2011
(r228990)
+++ head/usr.bin/brandelf/brandelf.cFri Dec 30 10:59:15 2011
(r228991)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2000, 2001 David O'Brien
- * Copyright (c) 1996 S�ren Schmidt
+ * Copyright (c) 1996 Søren Schmidt
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/usr.bin/calendar/calendars/calendar.birthday
==
--- head/usr.bin/calendar/calendars/calendar.birthday   Fri Dec 30 10:58:14 
2011(r228990)
+++ head/usr.bin/calendar/calendars/calendar.birthday   Fri Dec 30 10:59:15 
2011(r228991)
@@ -291,7 +291,7 @@
 12/12  E.G. Robinson born, 1893
 12/14  George Washington dies, 1799
 12/17  William Safire (Safir) born, 1929
-12/18  Konrad Zuse died in H�nfeld, 1995
+12/18  Konrad Zuse died in Hünfeld, 1995
 12/20  Carl Sagan died, 1996
 12/21  Benjamin Disraeli born, 1804
 12/22  Giacomo Puccini born, 1858

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdFri Dec 30 10:58:14 
2011(r228990)
+++ head/usr.bin/calendar/calendars/calendar.freebsdFri Dec 30 10:59:15 
2011(r228991)
@@ -326,7 +326,7 @@
 11/28  Stanislav Sedov s...@freebsd.org born in Chelyabinsk, USSR, 1985
 12/01  Hajimu Umemoto u...@freebsd.org born in Nara, Japan, 1961
 12/01  Alexey Dokuchaev da...@freebsd.org born in Magadan, USSR, 1980
-12/02  Ermal Lu�i e...@freebsd.org born in Tirane, Albania, 1980
+12/02  Ermal Luçi e...@freebsd.org born in Tirane, Albania, 1980
 12/03  Diane Bruce d...@freebsd.org born in Ottawa, Ontario, Canada, 1952
 12/05  Ivan Voras ivo...@freebsd.org born in Slavonski Brod, Croatia, 1981
 12/06  Stefan Farfeleder stef...@freebsd.org born in Wien, Austria, 1980

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historyFri Dec 30 10:58:14 
2011(r228990)
+++ head/usr.bin/calendar/calendars/calendar.historyFri Dec 30 10:59:15 
2011(r228991)
@@ -302,7 +302,7 @@
 09/11  Terrorists destroy World Trade Center in New York, 2001
 09/12  German paratroopers rescue Mussolini from captivity in Rome, 1943
 09/12  Germany annexes Sudetenland, 1938
-09/13  58� C (136.4� F) measured at el Azizia, Libya, 1922
+09/13  58 °C (136.4 °F) measured at el Azizia, Libya, 1922
 09/13  British defeat the French at the Plains of Abraham, just outside the 
walls of Quebec City, 1759
 09/13  Building of Hadrian's Wall begun, 122
 09/13  Chiang Kai-Shek becomes president of China, 1943

Modified: head/usr.bin/calendar/calendars/calendar.music
==
--- head/usr.bin/calendar/calendars/calendar.music  Fri Dec 30 10:58:14 
2011(r228990)
+++ head/usr.bin/calendar/calendars/calendar.music  Fri Dec 30 10:59:15 
2011(r228991)
@@ -225,7 +225,7 @@
 12/08  Jim Morrison is born in Melbourne, Florida, 1943
 12/08  John Lennon is shot and killed in New York City, 1980
 12/09  The Who's Tommy premieres in London, 1973
-12/11  (Louis) Hector Berlioz born in La-C�te-Saint-Andr�, 1803
+12/11  (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803
 12/13  Ted Nugent, the motor city madman, born in Detroit, 1949
 12/15  Thomas Edison receives patent on the phonograph, 1877
 12/16  Don McLean's American Pie is released, 1971

Modified: head/usr.bin/logins/logins.1
==
--- head/usr.bin/logins/logins.1Fri Dec 30 10:58:14 2011
(r228990)
+++ head/usr.bin/logins/logins.1Fri Dec 30 10:59:15 2011
(r228991)
@@ -1,5 +1,5 @@
 .\-
-.\ Copyright (c) 2004 Dag-Erling 

svn commit: r228993 - in head/share: doc/IPv6 termcap

2011-12-30 Thread Ulrich Spoerlein
Author: uqs
Date: Fri Dec 30 11:11:54 2011
New Revision: 228993
URL: http://svn.freebsd.org/changeset/base/228993

Log:
  Spelling fixes for share/

Modified:
  head/share/doc/IPv6/IMPLEMENTATION
  head/share/termcap/termcap.src

Modified: head/share/doc/IPv6/IMPLEMENTATION
==
--- head/share/doc/IPv6/IMPLEMENTATION  Fri Dec 30 11:02:40 2011
(r228992)
+++ head/share/doc/IPv6/IMPLEMENTATION  Fri Dec 30 11:11:54 2011
(r228993)
@@ -1404,7 +1404,7 @@ both definitions.  As an userland progra
 dealing with it is to:
 (1) ensure ss_family and/or ss_len are available on the platform, by using
 GNU autoconf,
-(2) have -Dss_family=__ss_family to unify all occurences (including header
+(2) have -Dss_family=__ss_family to unify all occurrences (including header
 file) into __ss_family, or
 (3) never touch __ss_family.  cast to sockaddr * and use sa_family like:
struct sockaddr_storage ss;
@@ -1414,7 +1414,7 @@ dealing with it is to:
 
 Some of IPv6 transition technologies embed IPv4 address into IPv6 address.
 These specifications themselves are fine, however, there can be certain
-set of attacks enabled by these specifications.  Recent speicifcation
+set of attacks enabled by these specifications.  Recent specification
 documents covers up those issues, however, there are already-published RFCs
 that does not have protection against those (like using source address of
 :::127.0.0.1 to bypass reject packet from remote filter).
@@ -1441,7 +1441,7 @@ compatible is very rare.  You should tak
 
 If we see IPv6 packets with IPv4 mapped address (:::0.0.0.0/96) in the
 header in dual-stack environment (not in SIIT environment), they indicate
-that someone is trying to inpersonate IPv4 peer.  The packet should be dropped.
+that someone is trying to impersonate IPv4 peer.  The packet should be dropped.
 
 IPv6 specifications do not talk very much about IPv6 unspecified address (::)
 in the IPv6 source address field.  Clarification is in progress.
@@ -1456,10 +1456,10 @@ Here are couple of comments:
 - The following examples are seemingly illegal.  It seems that there's general
   consensus among ipngwg for those.  (1) Mobile IPv6 home address option,
   (2) offlink packets (so routers should not forward them).
-  KAME implmements (2) already.
+  KAME implements (2) already.
 
 KAME code is carefully written to avoid such incidents.  More specifically,
-KAME kernel will reject packets with certain source/dstination address in IPv6
+KAME kernel will reject packets with certain source/destination address in IPv6
 base header, or IPv6 routing header.  Also, KAME default configuration file
 is written carefully, to avoid those attacks.
 
@@ -1552,7 +1552,7 @@ KAME implementation treats them as follo
 1.17 DNS resolver
 
 KAME ships with modified DNS resolver, in libinet6.a.
-libinet6.a has a comple of extensions against libc DNS resolver:
+libinet6.a has a couple of extensions against libc DNS resolver:
 - Can take options insecure1 and options insecure2 in /etc/resolv.conf,
   which toggles RES_INSECURE[12] option flag bit.
 - EDNS0 receive buffer size notification support.  It can be enabled by
@@ -1870,7 +1870,7 @@ Tunnel mode works basically fine, but co
 - Path MTU discovery does not work across IPv6 IPsec tunnel gateway due to
   insufficient code.
 
-AH specificaton does not talk much about multiple AH on a packet case.
+AH specification does not talk much about multiple AH on a packet case.
 We incrementally compute AH checksum, from inside to outside.  Also, we
 treat inner AH to be immutable.
 For example, if we are to create the following packet:
@@ -1890,8 +1890,8 @@ to randomly pad packets shorter than N b
 or equal to N.  Note that N does not include ESP authentication data length.
 Also note that the random padding is not included in TCP segment
 size computation.  Negative value will turn off the functionality.
-Recommeded value for N is like 128, or 256.  If you use a too big number
-as N, you may experience inefficiency due to fragmented packtes.
+Recommended value for N is like 128, or 256.  If you use a too big number
+as N, you may experience inefficiency due to fragmented packets.
 
 4.4 IPComp handling
 
@@ -2097,7 +2097,7 @@ RFC2401 defines IPsec tunnel mode, withi
 defines tunnel mode packet encapsulation/decapsulation on its own, and
 does not refer other tunnelling specifications.  Since RFC2401 advocates
 filter-based SPD database matches, it would be natural for us to implement
-IPsec IPsec tunnel mode as filters - not as pseudo interfaces.
+IPsec tunnel mode as filters - not as pseudo interfaces.
 
 There are some people who are trying to separate IPsec tunnel mode from
 the IPsec itself.  They would like to implement IPsec transport mode only,
@@ -2110,7 +2110,7 @@ interpretation.
 
 The KAME stack implements can be configured in two ways.  You may need
 to recompile your kernel to 

svn commit: r228994 - in head/sys: conf modules/ipfilter modules/nxge modules/xfs

2011-12-30 Thread Dimitry Andric
Author: dim
Date: Fri Dec 30 13:16:59 2011
New Revision: 228994
URL: http://svn.freebsd.org/changeset/base/228994

Log:
  Disable several instances instances of clang's -Wself-assign warning.
  All of these are harmless, and are in fact used to shut up warnings from
  lint.
  
  While here, remove -Wno-missing-prototypes from the xfs module
  Makefile, as I could not reproduce those warnings either with gcc or
  clang.
  
  MFC after:1 week

Modified:
  head/sys/conf/files
  head/sys/conf/kern.mk
  head/sys/modules/ipfilter/Makefile
  head/sys/modules/nxge/Makefile
  head/sys/modules/xfs/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Dec 30 11:11:54 2011(r228993)
+++ head/sys/conf/files Fri Dec 30 13:16:59 2011(r228994)
@@ -304,7 +304,7 @@ contrib/dev/acpica/utilities/utxface.c  
 contrib/dev/acpica/utilities/utxferror.c   optional acpi
 #contrib/dev/acpica/utilities/utxfmutex.c  optional acpi
 contrib/ipfilter/netinet/fil.c optional ipfilter inet \
-   compile-with ${NORMAL_C} -I$S/contrib/ipfilter
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \
compile-with ${NORMAL_C} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \
@@ -316,11 +316,11 @@ contrib/ipfilter/netinet/ip_log.c option
 contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \
compile-with ${NORMAL_C} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \
-   compile-with ${NORMAL_C} -I$S/contrib/ipfilter
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \
compile-with ${NORMAL_C} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \
-   compile-with ${NORMAL_C} -Wno-error -I$S/contrib/ipfilter
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-error 
-I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \
compile-with ${NORMAL_C} -I$S/contrib/ipfilter
 contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \
@@ -1522,17 +1522,25 @@ dev/ncv/ncr53c500.c optional ncv
 dev/ncv/ncr53c500_pccard.c optional ncv pccard
 dev/netmap/netmap.coptional netmap
 dev/nge/if_nge.c   optional nge
-dev/nxge/if_nxge.c optional nxge
-dev/nxge/xgehal/xgehal-device.coptional nxge
+dev/nxge/if_nxge.c optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
+dev/nxge/xgehal/xgehal-device.coptional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
 dev/nxge/xgehal/xgehal-mm.coptional nxge
 dev/nxge/xgehal/xge-queue.coptional nxge
-dev/nxge/xgehal/xgehal-driver.coptional nxge
-dev/nxge/xgehal/xgehal-ring.c  optional nxge
-dev/nxge/xgehal/xgehal-channel.c   optional nxge
-dev/nxge/xgehal/xgehal-fifo.c  optional nxge
-dev/nxge/xgehal/xgehal-stats.c optional nxge
+dev/nxge/xgehal/xgehal-driver.coptional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
+dev/nxge/xgehal/xgehal-ring.c  optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
+dev/nxge/xgehal/xgehal-channel.c   optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
+dev/nxge/xgehal/xgehal-fifo.c  optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
+dev/nxge/xgehal/xgehal-stats.c optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
 dev/nxge/xgehal/xgehal-config.coptional nxge
-dev/nxge/xgehal/xgehal-mgmt.c  optional nxge
+dev/nxge/xgehal/xgehal-mgmt.c  optional nxge \
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN}
 dev/nmdm/nmdm.coptional nmdm
 dev/nsp/nsp.c  optional nsp
 dev/nsp/nsp_pccard.c   optional nsp pccard
@@ -3478,7 +3486,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c   optional
 gnu/fs/xfs/FreeBSD/xfs_fs_subr.c   optional xfs \
compile-with ${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD 
-I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs
 gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \
-   compile-with ${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD 
-I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs
+   compile-with ${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD 
-I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs
 gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \
compile-with ${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD 
-I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs
 gnu/fs/xfs/FreeBSD/support/ktrace.coptional xfs \

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Fri Dec 30 11:11:54 2011(r228993)
+++ head/sys/conf/kern.mk   Fri Dec 30 13:16:59 2011

svn commit: r229000 - head/sbin/dhclient

2011-12-30 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Fri Dec 30 14:33:08 2011
New Revision: 229000
URL: http://svn.freebsd.org/changeset/base/229000

Log:
  Invalid Domain Search option isn't considered as a fatal error
  
  In the original Domain Search option patch, an invalid option value
  would cause the whole lease to be rejected. However, DHCP servers who
  emit such an invalid value are more common than I thought. With this new
  patch, just the option is rejected, not the entire lease.
  
  PR:   bin/163431
  Submitted by: Fabian Keil f...@fabiankeil.de (earlier version)
  Reviewed by:  Fabian Keil f...@fabiankeil.de
  Sponsored by: Yakaz (http://www.yakaz.com)

Modified:
  head/sbin/dhclient/options.c

Modified: head/sbin/dhclient/options.c
==
--- head/sbin/dhclient/options.cFri Dec 30 14:30:16 2011
(r228999)
+++ head/sbin/dhclient/options.cFri Dec 30 14:33:08 2011
(r229000)
@@ -211,7 +211,7 @@ parse_option_buffer(struct packet *packe
 void
 expand_domain_search(struct packet *packet)
 {
-   int offset, expanded_len;
+   int offset, expanded_len, next_domain_len;
struct option_data *option;
unsigned char *domain_search, *cursor;
 
@@ -224,9 +224,13 @@ expand_domain_search(struct packet *pack
expanded_len = 0;
offset = 0;
while (offset  option-len) {
+   next_domain_len = find_search_domain_name_len(option, offset);
+   if (next_domain_len  0)
+   /* The Domain Search option value is invalid. */
+   return;
+
/* We add 1 for the space between domain names. */
-   expanded_len +=
-   find_search_domain_name_len(option, offset) + 1;
+   expanded_len += next_domain_len + 1;
}
if (expanded_len  0)
/* Remove 1 for the superfluous trailing space. */
@@ -271,8 +275,9 @@ find_search_domain_name_len(struct optio
/* This is a pointer to another list of labels. */
if (i + 1 = option-len) {
/* The pointer is truncated. */
-   error(Truncated pointer in DHCP Domain 
+   warning(Truncated pointer in DHCP Domain 
Search option.);
+   return (-1);
}
 
pointer = ((label_len  ~(0xC0))  8) +
@@ -282,8 +287,9 @@ find_search_domain_name_len(struct optio
 * The pointer must indicates a prior
 * occurance.
 */
-   error(Invalid forward pointer in DHCP Domain 
-   Search option compression.);
+   warning(Invalid forward pointer in DHCP 
+   Domain Search option compression.);
+   return (-1);
}
 
pointed_len = find_search_domain_name_len(option,
@@ -295,7 +301,9 @@ find_search_domain_name_len(struct optio
}
 
if (i + label_len = option-len) {
-   error(Truncated label in DHCP Domain Search option.);
+   warning(Truncated label in DHCP Domain Search 
+   option.);
+   return (-1);
}
 
/*
@@ -308,9 +316,9 @@ find_search_domain_name_len(struct optio
i += label_len + 1;
}
 
-   error(Truncated DHCP Domain Search option.);
+   warning(Truncated DHCP Domain Search option.);
 
-   return (0);
+   return (-1);
 }
 
 void
___
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: r229001 - head/tools/regression/sbin/dhclient

2011-12-30 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Fri Dec 30 14:41:47 2011
New Revision: 229001
URL: http://svn.freebsd.org/changeset/base/229001

Log:
  Adapt testsuite following change in Domain Search error handling
  
  In this testsuite, warning() and error() have the same behaviour.
  
  PR:   bin/163431
  Sponsored by: Yakaz (http://www.yakaz.com)

Modified:
  head/tools/regression/sbin/dhclient/fake.c

Modified: head/tools/regression/sbin/dhclient/fake.c
==
--- head/tools/regression/sbin/dhclient/fake.c  Fri Dec 30 14:33:08 2011
(r229000)
+++ head/tools/regression/sbin/dhclient/fake.c  Fri Dec 30 14:41:47 2011
(r229001)
@@ -32,7 +32,11 @@ warning(char *fmt, ...)
va_end(ap);
fprintf(stderr, \n);
 
-   return ret;
+   /*
+* The original warning() would return ret here. We do this to
+* check warnings explicitely.
+*/
+   longjmp(env, 1);
 }
 
 int
___
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: r229002 - head/sbin/dhclient

2011-12-30 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Fri Dec 30 14:46:53 2011
New Revision: 229002
URL: http://svn.freebsd.org/changeset/base/229002

Log:
  Set svn:executable on dhclient-script
  
  Sponsored by: Yakaz (http://www.yakaz.com)

Modified:
Directory Properties:
  head/sbin/dhclient/dhclient-script   (props changed)
___
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: r229003 - head/sys/netgraph

2011-12-30 Thread Gleb Smirnoff
Author: glebius
Date: Fri Dec 30 15:41:28 2011
New Revision: 229003
URL: http://svn.freebsd.org/changeset/base/229003

Log:
  style(9), whitespace and spelling nits.

Modified:
  head/sys/netgraph/ng_base.c

Modified: head/sys/netgraph/ng_base.c
==
--- head/sys/netgraph/ng_base.c Fri Dec 30 14:46:53 2011(r229002)
+++ head/sys/netgraph/ng_base.c Fri Dec 30 15:41:28 2011(r229003)
@@ -1,7 +1,3 @@
-/*
- * ng_base.c
- */
-
 /*-
  * Copyright (c) 1996-1999 Whistle Communications, Inc.
  * All rights reserved.
@@ -333,18 +329,18 @@ ng_alloc_node(void)
 
 #define NG_FREE_HOOK(hook) \
do {\
-   mtx_lock(ng_nodelist_mtx); \
+   mtx_lock(ng_nodelist_mtx); \
LIST_INSERT_HEAD(ng_freehooks, hook, hk_hooks);\
hook-hk_magic = 0; \
-   mtx_unlock(ng_nodelist_mtx);   \
+   mtx_unlock(ng_nodelist_mtx);   \
} while (0)
 
 #define NG_FREE_NODE(node) \
do {\
-   mtx_lock(ng_nodelist_mtx); \
+   mtx_lock(ng_nodelist_mtx); \
LIST_INSERT_HEAD(ng_freenodes, node, nd_nodes);\
node-nd_magic = 0; \
-   mtx_unlock(ng_nodelist_mtx);   \
+   mtx_unlock(ng_nodelist_mtx);   \
} while (0)
 
 #else /* NETGRAPH_DEBUG */ /*--*/
@@ -670,8 +666,8 @@ ng_make_node_common(struct ng_type *type
break;
}
}
-   LIST_INSERT_HEAD(V_ng_ID_hash[NG_IDHASH_FN(node-nd_ID)],
-   node, nd_idnodes);
+   LIST_INSERT_HEAD(V_ng_ID_hash[NG_IDHASH_FN(node-nd_ID)], node,
+   nd_idnodes);
mtx_unlock(ng_idhash_mtx);
 
/* Done */
@@ -824,7 +820,7 @@ ng_node2ID(node_p node)
 /
 
 /*
- * Assign a node a name. Once assigned, the name cannot be changed.
+ * Assign a node a name.
  */
 int
 ng_name_node(node_p node, const char *name)
@@ -921,27 +917,21 @@ ng_decodeidname(const char *name)
u_long val;
 
/* Check for proper length, brackets, no leading junk */
-   if ((len  3)
-   || (name[0] != '[')
-   || (name[len - 1] != ']')
-   || (!isxdigit(name[1]))) {
+   if ((len  3) || (name[0] != '[') || (name[len - 1] != ']') ||
+   (!isxdigit(name[1])))
return ((ng_ID_t)0);
-   }
 
/* Decode number */
val = strtoul(name + 1, eptr, 16);
-   if ((eptr - name != len - 1)
-   || (val == ULONG_MAX)
-   || (val == 0)) {
+   if ((eptr - name != len - 1) || (val == ULONG_MAX) || (val == 0))
return ((ng_ID_t)0);
-   }
-   return (ng_ID_t)val;
+
+   return ((ng_ID_t)val);
 }
 
 /*
  * Remove a name from a node. This should only be called
  * when shutting down and removing the node.
- * IF we allow name changing this may be more resurrected.
  */
 void
 ng_unname(node_p node)
@@ -1045,8 +1035,8 @@ ng_findhook(node_p node, const char *nam
if (node-nd_type-findhook != NULL)
return (*node-nd_type-findhook)(node, name);
LIST_FOREACH(hook, node-nd_hooks, hk_hooks) {
-   if (NG_HOOK_IS_VALID(hook)
-(strcmp(NG_HOOK_NAME(hook), name) == 0))
+   if (NG_HOOK_IS_VALID(hook) 
+   (strcmp(NG_HOOK_NAME(hook), name) == 0))
return (hook);
}
return (NULL);
@@ -1182,12 +1172,12 @@ ng_newtype(struct ng_type *tp)
const size_t namelen = strlen(tp-name);
 
/* Check version and type name fields */
-   if ((tp-version != NG_ABI_VERSION)
-   || (namelen == 0)
-   || (namelen = NG_TYPESIZ)) {
+   if ((tp-version != NG_ABI_VERSION) || (namelen == 0) ||
+   (namelen = NG_TYPESIZ)) {
TRAP_ERROR();
if (tp-version != NG_ABI_VERSION) {
-   printf(Netgraph: Node type rejected. ABI mismatch. 
Suggest recompile\n);
+   printf(Netgraph: Node type rejected. ABI mismatch. 
+   Suggest recompile\n);
}
return (EINVAL);
}
@@ -1635,8 +1625,8 @@ ng_path_parse(char *addr, char **nodep, 
  * return the destination node.
  */
 int
-ng_path2noderef(node_p here, const char *address,
-   node_p *destp, 

Re: svn commit: r228878 - head/include

2011-12-30 Thread Sean C. Farley

On Thu, 29 Dec 2011, m...@freebsd.org wrote:


On Thu, Dec 29, 2011 at 6:54 PM, Sean C. Farley s...@freebsd.org wrote:

On Sun, 25 Dec 2011, Ed Schouten wrote:


Author: ed
Date: Sun Dec 25 20:15:41 2011
New Revision: 228878
URL: http://svn.freebsd.org/changeset/base/228878

Log:
 Remove unneeded guard.

 There is no reason why stdbool.h needs an include guard. It is already
 protected by __bool_true_false_are_defined.

Modified:
 head/include/stdbool.h

Modified: head/include/stdbool.h

==
--- head/include/stdbool.h      Sun Dec 25 18:15:31 2011        (r228877)
+++ head/include/stdbool.h      Sun Dec 25 20:15:41 2011        (r228878)
@@ -26,9 +26,6 @@
 * $FreeBSD$
 */

-#ifndef _STDBOOL_H_
-#define        _STDBOOL_H_
-
#ifndef __bool_true_false_are_defined
#define __bool_true_false_are_defined   1

@@ -44,5 +41,3 @@ typedef       int     _Bool;

#endif /* !__cplusplus */
#endif /* __bool_true_false_are_defined */
-
-#endif /* !_STDBOOL_H_ */



I just thought of this while reviewing the change:  should 
__bool_true_false_are_defined be set only if __cplusplus is not set? 
It should be set for C99, but I wonder if it should be set for C++.


My quick googling didn't show anything at all about the C++ standard 
and stdbool.h or __bool_true_false_are_defined.  It was probably 
originally set because bool, true, and false are all C++ keywords so 
certain code that wanted to ifdef on them didn't also need to check 
__cplusplus.


I did not find anything definitive either.

Also, is there a style requirement that the guard for a header file 
be based off of the name of the file?  I did not see anything obvious 
for this within style(9), but I am curious.


I think it's just common use to make sure different headers use a 
different include guard, so they only protect their contents, not any 
other file's.  The C standard only mentions the symbols bool, true, 
false, and __bool_true_false_are_defined in regards to stdbool.h.


Thank you.  I asked since I have only really noticed filename-based 
guards in the tree although not all are this way (i.e., bsdxml.h uses 
Expat_INCLUDED).


Sean
--
s...@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

Re: svn commit: r228878 - head/include

2011-12-30 Thread Sean C. Farley

On Fri, 30 Dec 2011, Ed Schouten wrote:


Hello Sean,

* Sean C. Farley s...@freebsd.org, 20111230 03:54:

I just thought of this while reviewing the change:  should
__bool_true_false_are_defined be set only if __cplusplus is not set?
It should be set for C99, but I wonder if it should be set for C++.


Even if the C++ standard doesn't mention it at all, I think it doesn't
mean it is forbidden to define it. It starts with __[a-z], so it is in
the reserved namespace.


I am fine with it.  I found many variations of stdbool.h with some 
wrapping __bool_true_false_are_defined within the __cplusplus check 
(e.g., glibc) and some that did not.  glibc may have it because 
stdbool.h is included from cstdbool and stdbool.h in 
/usr/include/c++/4.2/tr1/.



Also, is there a style requirement that the guard for a header file
be based off of the name of the file?  I did not see anything obvious
for this within style(9), but I am curious.


I am not aware of this.


I am not aware of it either, hence, my question.  It was just something 
to which I have grown accustomed.  Using __bool_true_false_are_defined 
as the guard works.


Sean
--
s...@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: r229004 - head/sys/compat/ndis

2011-12-30 Thread Dimitry Andric
Author: dim
Date: Fri Dec 30 17:18:09 2011
New Revision: 229004
URL: http://svn.freebsd.org/changeset/base/229004

Log:
  In sys/compat/ndis/subr_ntoskrnl.c, change the RtlFillMemory function
  definition from KR to ANSI, to avoid a clang warning about the uint8_t
  parameter being promoted to int, which is not compatible with the type
  declared in the earlier prototype.
  
  MFC after:1 week

Modified:
  head/sys/compat/ndis/subr_ntoskrnl.c

Modified: head/sys/compat/ndis/subr_ntoskrnl.c
==
--- head/sys/compat/ndis/subr_ntoskrnl.cFri Dec 30 15:41:28 2011
(r229003)
+++ head/sys/compat/ndis/subr_ntoskrnl.cFri Dec 30 17:18:09 2011
(r229004)
@@ -3016,10 +3016,7 @@ RtlSecureZeroMemory(dst, len)
 }
 
 static void
-RtlFillMemory(dst, len, c)
-   void*dst;
-   size_t  len;
-   uint8_t c;
+RtlFillMemory(void *dst, size_t len, uint8_t c)
 {
memset(dst, c, len);
 }
___
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: r228878 - head/include

2011-12-30 Thread David Chisnall
On 30 Dec 2011, at 16:52, Sean C. Farley wrote:

 My quick googling didn't show anything at all about the C++ standard and 
 stdbool.h or __bool_true_false_are_defined.  It was probably originally set 
 because bool, true, and false are all C++ keywords so certain code that 
 wanted to ifdef on them didn't also need to check __cplusplus.
 
 I did not find anything definitive either.

It's usually a better idea to check the spec than Google...

stdbool.h is not part of the C++ standard, and so it is free to contain 
anything in C++ mode, just as any other non-standard header is.  The cstdbool 
header is defined by the C++11 spec as containing JUST the 
__bool_true_false_are_defined macro.  The purpose of this header in C++ mode is 
to allow the inclusion of C++ headers that expect to be able to use true and 
false and guard this by the use of the __bool_true_false_are_defined macro.

David___
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: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Ben Kaduk
On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
 Author: uqs
 Date: Fri Dec 30 10:58:14 2011
 New Revision: 228990
 URL: http://svn.freebsd.org/changeset/base/228990

 Log:
  Spelling fixes for usr.sbin/

 Modified: head/usr.sbin/bluetooth/sdpd/server.c
 ==
 --- head/usr.sbin/bluetooth/sdpd/server.c       Fri Dec 30 10:45:00 2011      
   (r228989)
 +++ head/usr.sbin/bluetooth/sdpd/server.c       Fri Dec 30 10:58:14 2011      
   (r228990)
 @@ -334,7 +334,7 @@ server_accept_client(server_p srv, int32
                 * The minimum L2CAP MTU is 43 bytes. That means we need
                 * 65536 / 43 = ~1524 chunks to transfer maximum packet
                 * size with minimum MTU. The rsp_cs field in fd_idx_t
 -                * is 11 bit wide that gives us upto 2048 chunks.
 +                * is 11 bit wide that gives us up to 2048 chunks.

Should be 11 bits, no?

                 */

                if (omtu  NG_L2CAP_MTU_MINIMUM) {

 Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
 ==
 --- head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt     Fri 
 Dec 30 10:45:00 2011        (r228989)
 +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt     Fri 
 Dec 30 10:58:14 2011        (r228990)
 @@ -82,8 +82,8 @@ WlanMgmtReasonCode ::= TEXTUAL-CONVENTIO
                    associationLeave(8),
                    associationNotAuthenticated(9),
  -- XXX: TODO - FIXME
 -                   dissasocPwrcapBad(10),
 -                   dissasocSuperchanBad(11),
 +                   disassocPwrcapBad(10),
 +                   disassocSuperchanBad(11),

This file looks like it might be intended to be machine-readable -- I
would worry about changing it without test/review.
Perhaps this spelling error is even the reason for the XXX comment above.

                    ieInvalid(13),
                    micFailure(14),
                    fourWayHandshakeTimeout(15),
 @@ -579,10 +579,10 @@ wlanIfaceCountryCode OBJECT-TYPE
        interface is operating include all environments in the specified
        country.

 -       2. an ASCII 'O' character, if the country's regulastions are for
 +       2. an ASCII 'O' character, if the country's regulations are for
        Outdoor environment only.

 -       3. an ASCII 'I' character, if the country's regulastions are for
 +       3. an ASCII 'I' character, if the country's regulations are for
        Indoor environment only.
     ::= { wlanIfaceConfigEntry 2 }

 @@ -634,7 +634,7 @@ wlanIfaceFastFrames OBJECT-TYPE
     DESCRIPTION
        The value of this object controls whether use of Atheros Fast
        Frames is enabled when when communicating with another Fast
 -       Frames-capable station. The value is only meaningfull for
 +       Frames-capable station. The value is only meaningful for
        interfaces that support Atheros Fast Frames.
     ::= { wlanIfaceConfigEntry 7 }

 @@ -645,7 +645,7 @@ wlanIfaceDturbo OBJECT-TYPE
     DESCRIPTION
        The value of this object controls whether use of Atheros Dynamic
        Turbo mode is enabled when when communicating with another Dynamic
 -       Turbo-capable station. The value is only meaningfull for interfaces
 +       Turbo-capable station. The value is only meaningful for interfaces
        that support Atheros Dynamic Turbo mode.
     ::= { wlanIfaceConfigEntry 8 }

 @@ -731,7 +731,7 @@ wlanIfaceBeaconMissedThreshold OBJECT-TY
     MAX-ACCESS read-write
     STATUS     current
     DESCRIPTION
 -       The value of this object specifies the number of consequtive missed
 +       The value of this object specifies the number of consecutive missed
        beacons before an interface operating in station mode will attempt
        to search for a new access point.
     DEFVAL     { 7 }
 @@ -788,7 +788,7 @@ wlanIfaceDynamicWds OBJECT-TYPE
     STATUS     current
     DESCRIPTION
        The value of this object specifies whether Dynamic WDS (DWDS)
 -       support is enabled. The value is only meaningfull for interfaces
 +       support is enabled. The value is only meaningful for interfaces
        that support Dynamic WDS.
     ::= { wlanIfaceConfigEntry 21 }

 @@ -798,7 +798,7 @@ wlanIfacePowerSave OBJECT-TYPE
     STATUS     current
     DESCRIPTION
        The value of this object specifies whether powersave operation
 -       is enabled. The value is only meaningfull for interfaces that
 +       is enabled. The value is only meaningful for interfaces that
        support powersave operation.
     ::= { wlanIfaceConfigEntry 22 }

 @@ -809,7 +809,7 @@ wlanIfaceApBridge OBJECT-TYPE
     DESCRIPTION
        The value of this object specifies whether packets between
        wireless clients will be passed directly by an interface
 -       operating in host ap mode. Disabling it may be 

Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Alexey Dokuchaev
On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote:
 On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
  -                * is 11 bit wide that gives us upto 2048 chunks.
  +                * is 11 bit wide that gives us up to 2048 chunks.
 
 Should be 11 bits, no?

I'm not a native speaker, but I think 11 bit wide is correct here.  I
could have probably got into specifics, but simple googling for 16 ton shit
dropped on me yielded 525M results, while the same phrase with tons only
18,9M.  :-^

./danfe
___
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: head/sys/netinet

2011-12-30 Thread Maxim Sobolev
Won't this break whole lot of third-party software, which expects 
FreeBSD to be slightly different in this regards? Just curious.


-Maxim

On 10/7/2011 6:43 AM, Andre Oppermann wrote:

Author: andre
Date: Fri Oct  7 13:43:01 2011
New Revision: 226105
URL: http://svn.freebsd.org/changeset/base/226105

Log:
   Add back the IP header length to the total packet length field on
   raw IP sockets.  It was deducted in ip_input() in preparation for
   protocols interested only in the payload.

   On raw sockets the IP header should be delivered as it at came in
   from the network except for the byte order swaps in some fields.

   This brings us in line with all other OS'es that provide raw
   IP sockets.

   Reported by: Matthew Cini Sarreomcins1-at-gmail.com
   MFC after: 3 days

Modified:
   head/sys/netinet/raw_ip.c

Modified: head/sys/netinet/raw_ip.c
==
--- head/sys/netinet/raw_ip.c   Fri Oct  7 13:16:21 2011(r226104)
+++ head/sys/netinet/raw_ip.c   Fri Oct  7 13:43:01 2011(r226105)
@@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off)
last = NULL;

ifp = m-m_pkthdr.rcvif;
+   /*
+* Add back the IP header length which was
+* removed by ip_input().  Raw sockets do
+* not modify the packet except for some
+* byte order swaps.
+*/
+   ip-ip_len += off;

hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr,
ip-ip_dst.s_addr, V_ripcbinfo.ipi_hashmask);




___
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: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Harti Brandt
On Fri, 30 Dec 2011, Ben Kaduk wrote:

BKOn Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
BK Author: uqs
BK Date: Fri Dec 30 10:58:14 2011
BK New Revision: 228990
BK URL: http://svn.freebsd.org/changeset/base/228990
BK
BK Log:
BK  Spelling fixes for usr.sbin/
BK

[snip]

BK Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
BK 
==
BK --- head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt     
Fri Dec 30 10:45:00 2011        (r228989)
BK +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt     
Fri Dec 30 10:58:14 2011        (r228990)
BK @@ -82,8 +82,8 @@ WlanMgmtReasonCode ::= TEXTUAL-CONVENTIO
BK                    associationLeave(8),
BK                    associationNotAuthenticated(9),
BK  -- XXX: TODO - FIXME
BK -                   dissasocPwrcapBad(10),
BK -                   dissasocSuperchanBad(11),
BK +                   disassocPwrcapBad(10),
BK +                   disassocSuperchanBad(11),
BK
BKThis file looks like it might be intended to be machine-readable -- I
BKwould worry about changing it without test/review.
BKPerhaps this spelling error is even the reason for the XXX comment above.

Absolutely. If there is a spelling error in an SNMP MIB outside comments 
or description strings it must stay there. Otherwise applications reading 
that file will break.

This is also true for the corresponding .def file.

harti___
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: head/sys/netinet

2011-12-30 Thread Gleb Smirnoff
On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote:
M Won't this break whole lot of third-party software, which expects 
M FreeBSD to be slightly different in this regards? Just curious.

Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix
this software (at least in ports).

The MFC to stable/9 of r226105 was back out.

M -Maxim
M 
M On 10/7/2011 6:43 AM, Andre Oppermann wrote:
M  Author: andre
M  Date: Fri Oct  7 13:43:01 2011
M  New Revision: 226105
M  URL: http://svn.freebsd.org/changeset/base/226105
M 
M  Log:
M Add back the IP header length to the total packet length field on
M raw IP sockets.  It was deducted in ip_input() in preparation for
M protocols interested only in the payload.
M 
M On raw sockets the IP header should be delivered as it at came in
M from the network except for the byte order swaps in some fields.
M 
M This brings us in line with all other OS'es that provide raw
M IP sockets.
M 
M Reported by: Matthew Cini Sarreomcins1-at-gmail.com
M MFC after: 3 days
M 
M  Modified:
M head/sys/netinet/raw_ip.c
M 
M  Modified: head/sys/netinet/raw_ip.c
M  
==
M  --- head/sys/netinet/raw_ip.c  Fri Oct  7 13:16:21 2011
(r226104)
M  +++ head/sys/netinet/raw_ip.c  Fri Oct  7 13:43:01 2011
(r226105)
M  @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off)
M last = NULL;
M 
M ifp = m-m_pkthdr.rcvif;
M  +  /*
M  +   * Add back the IP header length which was
M  +   * removed by ip_input().  Raw sockets do
M  +   * not modify the packet except for some
M  +   * byte order swaps.
M  +   */
M  +  ip-ip_len += off;
M 
M hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr,
M ip-ip_dst.s_addr, V_ripcbinfo.ipi_hashmask);
M 
M 

-- 
Totus tuus, Glebius.
___
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: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Glen Barber
On Fri, Dec 30, 2011 at 07:54:44PM +, Alexey Dokuchaev wrote:
 On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote:
  On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
   -                * is 11 bit wide that gives us upto 2048 chunks.
   +                * is 11 bit wide that gives us up to 2048 chunks.
  
  Should be 11 bits, no?
 
 I'm not a native speaker, but I think 11 bit wide is correct here.  I
 could have probably got into specifics, but simple googling for 16 ton shit
 dropped on me yielded 525M results, while the same phrase with tons only
 18,9M.  :-^
 

Considering the full context, maybe it would be better written as:

rsp_cs is an 11 bit wide field that gives ...

Glen



pgpYNdTFk0X3Q.pgp
Description: PGP signature


Re: svn commit: r228992 - in head/usr.bin: csup finger fstat indent ipcs lex limits locate/locate login mail make man ncplogin netstat pr rpcgen rpcinfo systat talk tip/tip top vgrind xlint/lint1 xlin

2011-12-30 Thread Ben Kaduk
On Fri, Dec 30, 2011 at 6:02 AM, Ulrich Spoerlein u...@freebsd.org wrote:
 Author: uqs
 Date: Fri Dec 30 11:02:40 2011
 New Revision: 228992
 URL: http://svn.freebsd.org/changeset/base/228992

 Log:
  Spelling fixes for usr.bin/


 Modified: head/usr.bin/lex/NEWS
 ==
 --- head/usr.bin/lex/NEWS       Fri Dec 30 10:59:15 2011        (r228991)
 +++ head/usr.bin/lex/NEWS       Fri Dec 30 11:02:40 2011        (r228992)
 @@ -1,3 +1,5 @@
 +$FreeBSD$
 +

NEWS feels pretty similar to CHANGES, to me (viz r228990's comments)

  Changes between release 2.5.4 (11Sep96) and release 2.5.3:

        - Fixed a bug introduced in 2.5.3 that blew it when a call
 @@ -944,7 +946,7 @@ Changes between 2.3 (full) release of 28
          given.  To specify an end-of-file action for just the initial
          state, use INITIALEOF.

 -       - -d debug output is now contigent on the global yy_flex_debug
 +       - -d debug output is now contingent on the global yy_flex_debug
          being set to a non-zero value, which it is by default.

        - A new macro, YY_USER_INIT, is provided for the user to specify
 @@ -987,7 +989,7 @@ Changes between 2.3 (full) release of 28
        - yy_switch_to_buffer() can be used in the yywrap() macro/routine.

        - flex scanners do not use stdio for their input, and hence when
 -         writing an interactive scanner one must explictly call fflush()
 +         writing an interactive scanner one must explicitly call fflush()
          after writing out a prompt.

        - flex scanner can be made reentrant (after a fashion) by using

 Modified: head/usr.bin/locate/locate/util.c
 ==
 --- head/usr.bin/locate/locate/util.c   Fri Dec 30 10:59:15 2011        
 (r228991)
 +++ head/usr.bin/locate/locate/util.c   Fri Dec 30 11:02:40 2011        
 (r228992)
 @@ -218,11 +218,11 @@ tolower_word(word)


  /*
 - * Read integer from mmap pointer.
 - * Essential a simple  ``return *(int *)p'' but avoid sigbus
 + * Read integer from mmap pointer.
 + * Essential a simple  ``return *(int *)p'' but avoid sigbus

I feel like this wants to be Essentially ... avoids.
(Also, is trailing whitespace really spelling?)

  * for integer alignment (SunOS 4.x, 5.x).
  *
 - * Convert network byte order to host byte order if neccessary.
 + * Convert network byte order to host byte order if necessary.
  * So we can read on FreeBSD/i386 (little endian) a locate database
  * which was built on SunOS/sparc (big endian).
  */
 @@ -254,7 +254,7 @@ getwm(p)
  /*
  * Read integer from stream.
  *
 - * Convert network byte order to host byte order if neccessary.
 + * Convert network byte order to host byte order if necessary.
  * So we can read on FreeBSD/i386 (little endian) a locate database
  * which was built on SunOS/sparc (big endian).
  */

 Modified: head/usr.bin/mail/main.c
 ==
 --- head/usr.bin/mail/main.c    Fri Dec 30 10:59:15 2011        (r228991)
 +++ head/usr.bin/mail/main.c    Fri Dec 30 11:02:40 2011        (r228992)
 @@ -259,7 +259,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc-
                if (ef == NULL)
                        ef = %;
                if (setfile(ef) = 0)
 -                       /* Either an error has occured, or no mail */
 +                       /* Either an error has occurted, or no mail */

Just occurred, no?

                        exit(1);
                else
                        exit(0);

 Modified: head/usr.bin/mail/util.c
 ==
 --- head/usr.bin/mail/util.c    Fri Dec 30 10:59:15 2011        (r228991)
 +++ head/usr.bin/mail/util.c    Fri Dec 30 11:02:40 2011        (r228992)
 @@ -550,7 +550,7 @@ newname:
  }

  /*
 - * Count the occurances of c in str
 + * Count the occurrances of c in str

occurrences, again.

  */
  int
  charcount(char *str, int c)

 Modified: head/usr.bin/talk/ctl_transact.c
 ==
 --- head/usr.bin/talk/ctl_transact.c    Fri Dec 30 10:59:15 2011        
 (r228991)
 +++ head/usr.bin/talk/ctl_transact.c    Fri Dec 30 11:02:40 2011        
 (r228992)
 @@ -46,7 +46,7 @@ static const char sccsid[] = @(#)ctl_tr

  /*
  * SOCKDGRAM is unreliable, so we must repeat messages if we have
 - * not recieved an acknowledgement within a reasonable amount
 + * not received an acknowledgement within a reasonable amount

Merriam-Webster thinks it's acknowledgment, but I always have to
double-check this one.

  * of time
  */
  void

 Modified: head/usr.bin/yacc/NEW_FEATURES
 ==
 --- head/usr.bin/yacc/NEW_FEATURES      Fri Dec 30 10:59:15 2011        
 (r228991)
 +++ head/usr.bin/yacc/NEW_FEATURES      Fri Dec 30 11:02:40 2011     

Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Colin Percival
On 12/30/11 11:54, Alexey Dokuchaev wrote:
 On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote:
 On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
 -* is 11 bit wide that gives us upto 2048 chunks.
 +* is 11 bit wide that gives us up to 2048 chunks.

 Should be 11 bits, no?
 
 I'm not a native speaker, but I think 11 bit wide is correct here.

I am a native speaker, and it's 11 bits wide.  English is an odd language:
An 11 bit wide field is 11 bits wide.  (Similarly, a 45 *foot* long bus
is 45 *feet* long.)

-- 
Colin Percival
Security Officer, FreeBSD | freebsd.org | The power to serve
Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid
___
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: r227652 - in head: share/man/man4 sys/dev/virtio sys/dev/virtio/balloon sys/dev/virtio/block sys/dev/virtio/network sys/dev/virtio/pci sys/modules sys/modules/virtio sys/modules/virtio

2011-12-30 Thread Slawa Olhovchenkov
On Fri, Nov 18, 2011 at 05:43:43AM +, Peter Grehan wrote:

 Author: grehan
 Date: Fri Nov 18 05:43:43 2011
 New Revision: 227652
 URL: http://svn.freebsd.org/changeset/base/227652
 
 Log:
   Import virtio base, PCI front-end, and net/block/balloon drivers.
   Tested on Qemu/KVM, VirtualBox, and BHyVe.
   
   Currently built as modules-only on i386/amd64. Man pages not yet hooked
   up, pending review.
   
   Submitted by:   Bryan Venteicher  bryanv at daemoninthecloset dot org
   Reviewed by:bz
   MFC after:  4 weeks or so

MFC ready?
___
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: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnm

2011-12-30 Thread Garrett Cooper
2011/12/30 Alexey Dokuchaev da...@freebsd.org:
 On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote:
 On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein u...@freebsd.org wrote:
  -                * is 11 bit wide that gives us upto 2048 chunks.
  +                * is 11 bit wide that gives us up to 2048 chunks.

 Should be 11 bits, no?

 I'm not a native speaker, but I think 11 bit wide is correct here.  I
 could have probably got into specifics, but simple googling for 16 ton shit
 dropped on me yielded 525M results, while the same phrase with tons only
 18,9M.  :-^

bits is correct because it's the plural form of the word, but the
sentence sounds off even with that change.

This sounds better:

is 11-bits wide, which gives us up to 2048 chunks

The only question that lingers in my mind, is what does chunks
qualify (buffer chunks? chunks of gold? chunks of rocca chocolate
bars? etc)?

Thanks,
-Garrett
___
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: r229024 - head/lib/libc/gen

2011-12-30 Thread Dimitry Andric
Author: dim
Date: Fri Dec 30 20:41:24 2011
New Revision: 229024
URL: http://svn.freebsd.org/changeset/base/229024

Log:
  Add some additional const poison after r228972.  The 'mapping' array in
  lib/libc/gen/strtofflags.c became const, but gcc did not warn about
  assigning its members to non-const pointers.  Clang warned about this
  with:
  
  lib/libc/gen/strtofflags.c:98:12: error: assigning to 'char *' from 'const 
char *' discards qualifiers [-Werror,-Wincompatible-pointer-types]
  for (sp = mapping[i].invert ? mapping[i].name :
  ^ ~
  
  Reviewed by:  jilles

Modified:
  head/lib/libc/gen/strtofflags.c

Modified: head/lib/libc/gen/strtofflags.c
==
--- head/lib/libc/gen/strtofflags.c Fri Dec 30 20:35:13 2011
(r229023)
+++ head/lib/libc/gen/strtofflags.c Fri Dec 30 20:41:24 2011
(r229024)
@@ -82,7 +82,8 @@ fflagstostr(flags)
u_long flags;
 {
char *string;
-   char *sp, *dp;
+   const char *sp;
+   char *dp;
u_long setflags;
int i;
 
___
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: r229032 - head/sys/modules/cfi

2011-12-30 Thread Marius Strobl
Author: marius
Date: Fri Dec 30 21:22:10 2011
New Revision: 229032
URL: http://svn.freebsd.org/changeset/base/229032

Log:
  Add header required by cfi_bus_fdt.c.

Modified:
  head/sys/modules/cfi/Makefile

Modified: head/sys/modules/cfi/Makefile
==
--- head/sys/modules/cfi/Makefile   Fri Dec 30 21:02:32 2011
(r229031)
+++ head/sys/modules/cfi/Makefile   Fri Dec 30 21:22:10 2011
(r229032)
@@ -7,10 +7,10 @@ SRCS=   ${_cfi_bus} cfi_core.c cfi_dev.c
 SRCS+=  bus_if.h device_if.h opt_cfi.h
 
 .if ${MACHINE} == arm
-_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c
+_cfi_bus=  cfi_bus_fdt.c cfi_bus_ixp4xx.c ofw_bus_if.h
 .endif
 .if ${MACHINE} == powerpc
-_cfi_bus= cfi_bus_fdt.c
+_cfi_bus=  cfi_bus_fdt.c ofw_bus_if.h
 .endif
 
 opt_cfi.h:
___
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: r229049 - head/sbin/bsdlabel

2011-12-30 Thread Maxim Sobolev
Author: sobomax
Date: Sat Dec 31 00:09:33 2011
New Revision: 229049
URL: http://svn.freebsd.org/changeset/base/229049

Log:
  Use in-label sectorsize to determine position of the label when
  writing label into a file image. The most common use - putting disklabel
  into ISO file. Before this change the label would always go to
  the offset 512, while geom_part code expects it to be in the 1st
  sector (i.e. 2048 incase of ISO). BSD disklabels provide good and
  lightweight way to logically split livecds. It is non-intrusive as
  far as ISO9660 goes (both boot-wise and metadata-wise) and
  completely transparent to anything but BSD, so you can have
  BSD-specific area appended after regular ISO.
  
  And with a little bit of GEOM trickery you can do even more
  interesting stuff with it.
  
  For example we make hybrid bootable CDs using this method.
  We create bootable ISO with kernel and such and append UFS
  image compressed with UZIP and it works like a charm. We put
  label based on the offsef of the BSD part into the ISO. The kernel
  boots off normal ISO9660 part, tastes label attaches it,
  tastes UZIP, attaches it and finally mounts UFS using GEOM_LABEL.
  This provides much better way of eliminating waste than doing
  crunched build.
  
  MFC after:1 month

Modified:
  head/sbin/bsdlabel/bsdlabel.c

Modified: head/sbin/bsdlabel/bsdlabel.c
==
--- head/sbin/bsdlabel/bsdlabel.c   Sat Dec 31 00:03:13 2011
(r229048)
+++ head/sbin/bsdlabel/bsdlabel.c   Sat Dec 31 00:09:33 2011
(r229049)
@@ -400,7 +400,7 @@ writelabel(void)
for (i = 0; i  lab.d_npartitions; i++)
if (lab.d_partitions[i].p_size)
lab.d_partitions[i].p_offset += lba_offset;
-   bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize,
+   bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * 
lab.d_secsize,
lp);
 
fd = open(specname, O_RDWR);
@@ -434,7 +434,7 @@ writelabel(void)
gctl_ro_param(grq, class, -1, BSD);
gctl_ro_param(grq, geom, -1, pname);
gctl_ro_param(grq, label, 148+16*8,
-   bootarea + labeloffset + labelsoffset * secsize);
+   bootarea + labeloffset + labelsoffset * lab.d_secsize);
errstr = gctl_issue(grq);
if (errstr != NULL) {
warnx(%s, errstr);
___
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: r228986 - in head: share/man/man4 sys/net

2011-12-30 Thread Adrian Chadd
This just broke wlan. Please consider fixing this patch :)


Adrian

*** Interface: wlan0: start
can't re-use a leaf (wlan0)!
panic: bpfattach tscfgoid
KDB: enter: panic
[ thread pid 166 tid 100048 ]Stopped at  kdb_enter+0x4c: lui at,0x8048
db
db bt
Tracing pid 166 tid 100048 td 0x80c37900
db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24
80074bac+114 (0,?,,?) ra 8007427c sp c4007608 sz 32
80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168
db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24
800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424
kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48
trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184
MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 200
kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24
panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40
bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64
bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24
ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32
ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96
8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88
8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88
ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64
80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40
if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40
ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144
soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40
kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64
sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56
trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184
MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0
pid 166
db reset


On 30 December 2011 00:57, Lawrence Stewart lstew...@freebsd.org wrote:
 Author: lstewart
 Date: Fri Dec 30 08:57:58 2011
 New Revision: 228986
 URL: http://svn.freebsd.org/changeset/base/228986

 Log:
  - Introduce the net.bpf.tscfg sysctl tree and associated code so as to make 
 one
    aspect of time stamp configuration per interface rather than per BPF
    descriptor. Prior to this, the order in which BPF devices were opened and 
 the
    per descriptor time stamp configuration settings could cause 
 non-deterministic
    and unintended behaviour with respect to time stamping. With the new 
 scheme, a
    BPF attached interface's tscfg sysctl entry can be set to default, 
 none,
    fast, normal or external. Setting default means use the system 
 default
    option (set with the net.bpf.tscfg.default sysctl), none means do not
    generate time stamps for tapped packets, fast means generate time stamps 
 for
    tapped packets using a hz granularity system clock read, normal means
    generate time stamps for tapped packets using a full timecounter 
 granularity
    system clock read and external (currently unimplemented) means use the 
 time
    stamp provided with the packet from an underlying source.

  - Utilise the recently introduced sysclock_getsnapshot() and
    sysclock_snap2bintime() KPIs to ensure the system clock is only read once 
 per
    packet, regardless of the number of BPF descriptors and time stamp formats
    requested. Use the per BPF attached interface time stamp configuration to
    control if sysclock_getsnapshot() is called and whether the system clock 
 read
    is fast or normal. The per BPF descriptor time stamp configuration is then
    used to control how the system clock snapshot is converted to a bintime by
    sysclock_snap2bintime().

  - Remove all FAST related BPF descriptor flag variants. Performing a fast
    read of the system clock is now controlled per BPF attached interface using
    the net.bpf.tscfg sysctl tree.

  - Update the bpf.4 man page.

  Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
  Melbourne, Australia, as part of the FreeBSD Foundation funded Feed-Forward
  Clock Synchronization Algorithms project.

  For more information, see http://www.synclab.org/radclock/

  In collaboration with:        Julien Ridoux (jridoux at unimelb edu au)

 Modified:
  head/share/man/man4/bpf.4
  head/sys/net/bpf.c
  head/sys/net/bpf.h

 Modified: head/share/man/man4/bpf.4
 ==
 --- head/share/man/man4/bpf.4   Fri Dec 30 06:24:59 2011        (r228985)
 +++ head/share/man/man4/bpf.4   Fri Dec 30 08:57:58 2011        (r228986)
 @@ -49,7 +49,7 @@
  .\
  .\ $FreeBSD$
  .\
 -.Dd June 15, 2010
 +.Dd December 30, 2011
  .Dt BPF 4
  .Os
  .Sh NAME
 @@ -516,61 +516,48 @@ by default.
  .It Dv BIOCSTSTAMP
  .It Dv BIOCGTSTAMP
  .Pq Li u_int
 -Set or get format and resolution of the time stamps returned by BPF.
 +Set or get the format and resolution of time stamps returned by BPF.
 +The per-BPF descriptor configuration provided by the
 +.Dv BIOCSTSTAMP
 +IOCTL complements the per-interface time stamp configuration detailed in the
 +.Sx CONFIGURATION
 +section.
 

Re: svn: head/sys/netinet

2011-12-30 Thread Maxim Sobolev

On 12/30/2011 12:02 PM, Gleb Smirnoff wrote:

On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote:
M  Won't this break whole lot of third-party software, which expects
M  FreeBSD to be slightly different in this regards? Just curious.

Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix
this software (at least in ports).

The MFC to stable/9 of r226105 was back out.


Well, I am just curious how critical it is to get it resolved and is 
there any way to avoid ABI breakage. Software compiled for 9.x won't run 
on 10.x even when fitted with the proper compat libs, as far as I can 
tell and not all software can be easily recompiled.


There are also other places where BSD have subtle differences with 
almost any other nix flavor out there. Not accepting sun_len = 0 in the 
unix domain sockets is one of those places that comes to mind. Other 
systems just do strlen() of sun_path, while BSD does EINVAL. And we've 
been living with this for decades.


-Maxim
___
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: head/sys/netinet

2011-12-30 Thread Maxim Sobolev

On 12/30/2011 4:17 PM, Maxim Sobolev wrote:

M  Won't this break whole lot of third-party software, which expects
M  FreeBSD to be slightly different in this regards? Just curious.

Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix
this software (at least in ports).

The MFC to stable/9 of r226105 was back out.


Well, I am just curious how critical it is to get it resolved and is
there any way to avoid ABI breakage. Software compiled for 9.x won't run
on 10.x even when fitted with the proper compat libs, as far as I can
tell and not all software can be easily recompiled.


P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on 
the version of the ELF image (i.e. detect if the binary is  than 
FreeBSD 10.


-Maxim
___
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: r229067 - in head: . sys/sys

2011-12-30 Thread David E. O'Brien
Author: obrien
Date: Sat Dec 31 04:38:04 2011
New Revision: 229067
URL: http://svn.freebsd.org/changeset/base/229067

Log:
  Happy 2012 to FreeBSD users in Samoa.

Modified:
  head/COPYRIGHT
  head/sys/sys/copyright.h

Modified: head/COPYRIGHT
==
--- head/COPYRIGHT  Sat Dec 31 04:05:13 2011(r229066)
+++ head/COPYRIGHT  Sat Dec 31 04:38:04 2011(r229067)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: head/sys/sys/copyright.h
==
--- head/sys/sys/copyright.hSat Dec 31 04:05:13 2011(r229066)
+++ head/sys/sys/copyright.hSat Dec 31 04:38:04 2011(r229067)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
 
 /* FreeBSD */
 #define COPYRIGHT_FreeBSD \
-   Copyright (c) 1992-2011 The FreeBSD Project.\n
+   Copyright (c) 1992-2012 The FreeBSD Project.\n
 
 /* Foundation */
 #defineTRADEMARK_Foundation \
___
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: r229070 - head/sys/contrib/octeon-sdk

2011-12-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec 31 05:24:21 2011
New Revision: 229070
URL: http://svn.freebsd.org/changeset/base/229070

Log:
  - CAPK-0100 board's USB timer is 12MHz

Modified:
  head/sys/contrib/octeon-sdk/cvmx-helper-board.c

Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c
==
--- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sat Dec 31 04:47:00 
2011(r229069)
+++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sat Dec 31 05:24:21 
2011(r229070)
@@ -866,6 +866,9 @@ cvmx_helper_board_usb_clock_types_t __cv
 case CVMX_BOARD_TYPE_CUST_LANNER_MR320:
 case CVMX_BOARD_TYPE_CUST_LANNER_MR321X:
 #endif
+#if defined(OCTEON_BOARD_CAPK_0100ND)
+   case CVMX_BOARD_TYPE_CN3010_EVB_HS5:
+#endif
 return USB_CLOCK_TYPE_CRYSTAL_12;
 }
 return USB_CLOCK_TYPE_REF_48;
___
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: r229071 - head/sys/contrib/octeon-sdk

2011-12-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec 31 05:25:42 2011
New Revision: 229071
URL: http://svn.freebsd.org/changeset/base/229071

Log:
  - Properly clean state structure in cvmx_usb_initialize

Modified:
  head/sys/contrib/octeon-sdk/cvmx-usb.c

Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c
==
--- head/sys/contrib/octeon-sdk/cvmx-usb.c  Sat Dec 31 05:24:21 2011
(r229070)
+++ head/sys/contrib/octeon-sdk/cvmx-usb.c  Sat Dec 31 05:25:42 2011
(r229071)
@@ -654,7 +654,7 @@ cvmx_usb_status_t cvmx_usb_initialize(cv
 }
 }
 
-memset(usb, 0, sizeof(usb));
+memset(usb, 0, sizeof(*usb));
 usb-init_flags = flags;
 
 /* Initialize the USB state 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


svn commit: r229072 - head/sys/mips/cavium/usb

2011-12-30 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec 31 05:45:10 2011
New Revision: 229072
URL: http://svn.freebsd.org/changeset/base/229072

Log:
  - Pass proper endpoint number (without direction flag) to
 cvmx_usb_open_pipe

Modified:
  head/sys/mips/cavium/usb/octusb.c

Modified: head/sys/mips/cavium/usb/octusb.c
==
--- head/sys/mips/cavium/usb/octusb.c   Sat Dec 31 05:25:42 2011
(r229071)
+++ head/sys/mips/cavium/usb/octusb.c   Sat Dec 31 05:45:10 2011
(r229072)
@@ -162,7 +162,7 @@ octusb_host_alloc_endpoint(struct octusb
sc-sc_port[td-qh-port_index].state,
0,
td-qh-dev_addr,
-   td-qh-ep_num,
+   td-qh-ep_num  UE_ADDR,
octusb_convert_speed(td-qh-dev_speed),
td-qh-max_packet_size,
octusb_convert_ep_type(td-qh-ep_type),
___
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: r228986 - in head: share/man/man4 sys/net

2011-12-30 Thread Lawrence Stewart

On 12/31/11 11:13, Adrian Chadd wrote:

This just broke wlan. Please consider fixing this patch :)


Adrian

*** Interface: wlan0: start
can't re-use a leaf (wlan0)!
panic: bpfattach tscfgoid
KDB: enter: panic
[ thread pid 166 tid 100048 ]Stopped at  kdb_enter+0x4c: lui at,0x8048
db
db  bt
Tracing pid 166 tid 100048 td 0x80c37900
db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24
80074bac+114 (0,?,,?) ra 8007427c sp c4007608 sz 32
80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168
db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24
800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424
kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48
trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184
MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 200
kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24
panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40
bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64
bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24
ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32
ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96
8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88
8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88
ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64
80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40
if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40
ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144
soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40
kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64
sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56
trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184
MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0
pid 166
db  reset


I've managed to reproduce this on my wifi enabled laptop with r228986 
MFCed to a 9-stable kernel. I can't reproduce the panic with regular 
interfaces, pseudo interfaces (e.g. lo0 and pflog0) or vlans (which also 
have a relationship with an underlying physical interface) i.e. this is 
VAP/net80211 specific as far as I can tell.


The problem is that bpfattach2() is being called twice with the same 
interface name i.e. wlan0.


I added a debug printf and call to kdb_backtrace() after the 
SYSCTL_ADD_PROC() call in bpfattach2() to see the code paths which are 
calling into the function. Here's what I see when the kernel runs on my 
laptop (I've added inline comments between ## ##):


Added tscfg OID for interface wlan0
KDB: stack backtrace:
#0 0x808680ce at kdb_backtrace+0x5e
#1 0x808da5b4 at bpfattach2+0xb4
#2 0x808fbe06 at ieee80211_vap_setup+0x266
#3 0x80740205 at wpi_vap_create+0x95
#4 0x809047fb at wlan_clone_create+0x16b
#5 0x808e6079 at ifc_simple_create+0x89
#6 0x808e5cc5 at if_clone_createif+0x65
#7 0x808e4546 at ifioctl+0x306
#8 0x80879755 at kern_ioctl+0x115
#9 0x8087998d at sys_ioctl+0xfd
#10 0x80b17d60 at amd64_syscall+0x450
#11 0x80b03497 at Xfast_syscall+0xf7

## Here it has successfully added the net.bpf.tscfg.wlan0 sysctl entry 
for wlan0 ##


can't re-use a leaf (wlan0)!

## Here SYSCTL_ADD_PROC() failed because leaf name is already used ##

panic: bpfattach tscfgoid
cpuid = 1
KDB: stack backtrace:
#0 0x808680ce at kdb_backtrace+0x5e
#1 0x80832c87 at panic+0x187
#2 0x808da6f6 at bpfattach2+0x1f6
#3 0x808e72ee at ether_ifattach+0xae
#4 0x808fd0a5 at ieee80211_vap_attach+0xb5
#5 0x8074023c at wpi_vap_create+0xcc
#6 0x809047fb at wlan_clone_create+0x16b
#7 0x808e6079 at ifc_simple_create+0x89
#8 0x808e5cc5 at if_clone_createif+0x65
#9 0x808e4546 at ifioctl+0x306
#10 0x80879755 at kern_ioctl+0x115
#11 0x8087998d at sys_ioctl+0xfd
#12 0x80b17d60 at amd64_syscall+0x450
#13 0x80b03497 at Xfast_syscall+0xf7



So after a bit of digging, ieee80211_vap_setup() calls 
ieee80211_radiotap_vattach(), which explicitly calls bpfattach2(), and 
then a subsequent call to ieee80211_vap_attach() indirectly calls into 
bpfattach2() via the call to ether_ifattach().


This smells like a net80211 bug to me. I'm guessing, but I would suspect 
ieee80211_vap_setup() shouldn't call ieee80211_radiotap_vattach() and 
should let ieee80211_vap_attach() handle the BPF attachment via the call 
to ether_ifattach().


Thoughts?

Cheers,
Lawrence
___
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: r228986 - in head: share/man/man4 sys/net

2011-12-30 Thread Adrian Chadd
Please file a PR for me? :)


Adrian

On 30 December 2011 23:02, Lawrence Stewart lstew...@freebsd.org wrote:
 On 12/31/11 11:13, Adrian Chadd wrote:

 This just broke wlan. Please consider fixing this patch :)


 Adrian

 *** Interface: wlan0: start
 can't re-use a leaf (wlan0)!
 panic: bpfattach tscfgoid
 KDB: enter: panic
 [ thread pid 166 tid 100048 ]Stopped at      kdb_enter+0x4c: lui
 at,0x8048
 db
 db  bt
 Tracing pid 166 tid 100048 td 0x80c37900
 db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24
 80074bac+114 (0,?,,?) ra 8007427c sp c4007608 sz 32
 80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168
 db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24
 800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424
 kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48
 trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184
 MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 200
 kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24
 panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40
 bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64
 bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24
 ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32
 ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96
 8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88
 8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88
 ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64
 80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40
 if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40
 ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144
 soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40
 kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64
 sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56
 trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184
 MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0
 pid 166
 db  reset


 I've managed to reproduce this on my wifi enabled laptop with r228986 MFCed
 to a 9-stable kernel. I can't reproduce the panic with regular interfaces,
 pseudo interfaces (e.g. lo0 and pflog0) or vlans (which also have a
 relationship with an underlying physical interface) i.e. this is
 VAP/net80211 specific as far as I can tell.

 The problem is that bpfattach2() is being called twice with the same
 interface name i.e. wlan0.

 I added a debug printf and call to kdb_backtrace() after the
 SYSCTL_ADD_PROC() call in bpfattach2() to see the code paths which are
 calling into the function. Here's what I see when the kernel runs on my
 laptop (I've added inline comments between ## ##):

 Added tscfg OID for interface wlan0
 KDB: stack backtrace:
 #0 0x808680ce at kdb_backtrace+0x5e
 #1 0x808da5b4 at bpfattach2+0xb4
 #2 0x808fbe06 at ieee80211_vap_setup+0x266
 #3 0x80740205 at wpi_vap_create+0x95
 #4 0x809047fb at wlan_clone_create+0x16b
 #5 0x808e6079 at ifc_simple_create+0x89
 #6 0x808e5cc5 at if_clone_createif+0x65
 #7 0x808e4546 at ifioctl+0x306
 #8 0x80879755 at kern_ioctl+0x115
 #9 0x8087998d at sys_ioctl+0xfd
 #10 0x80b17d60 at amd64_syscall+0x450
 #11 0x80b03497 at Xfast_syscall+0xf7

 ## Here it has successfully added the net.bpf.tscfg.wlan0 sysctl entry for
 wlan0 ##


 can't re-use a leaf (wlan0)!

 ## Here SYSCTL_ADD_PROC() failed because leaf name is already used ##

 panic: bpfattach tscfgoid
 cpuid = 1
 KDB: stack backtrace:
 #0 0x808680ce at kdb_backtrace+0x5e
 #1 0x80832c87 at panic+0x187
 #2 0x808da6f6 at bpfattach2+0x1f6
 #3 0x808e72ee at ether_ifattach+0xae
 #4 0x808fd0a5 at ieee80211_vap_attach+0xb5
 #5 0x8074023c at wpi_vap_create+0xcc
 #6 0x809047fb at wlan_clone_create+0x16b
 #7 0x808e6079 at ifc_simple_create+0x89
 #8 0x808e5cc5 at if_clone_createif+0x65
 #9 0x808e4546 at ifioctl+0x306
 #10 0x80879755 at kern_ioctl+0x115
 #11 0x8087998d at sys_ioctl+0xfd
 #12 0x80b17d60 at amd64_syscall+0x450
 #13 0x80b03497 at Xfast_syscall+0xf7



 So after a bit of digging, ieee80211_vap_setup() calls
 ieee80211_radiotap_vattach(), which explicitly calls bpfattach2(), and then
 a subsequent call to ieee80211_vap_attach() indirectly calls into
 bpfattach2() via the call to ether_ifattach().

 This smells like a net80211 bug to me. I'm guessing, but I would suspect
 ieee80211_vap_setup() shouldn't call ieee80211_radiotap_vattach() and should
 let ieee80211_vap_attach() handle the BPF attachment via the call to
 ether_ifattach().

 Thoughts?

 Cheers,
 Lawrence
___
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: r229073 - in head: share/man/man4 sys/net

2011-12-30 Thread Lawrence Stewart
Author: lstewart
Date: Sat Dec 31 07:21:28 2011
New Revision: 229073
URL: http://svn.freebsd.org/changeset/base/229073

Log:
  Revert r228986 until it can be reworked to avoid panicing the kernel when the
  same interface is attached multiple times with different DLTs, as is done in
  net80211 for example.
  
  Reported by:  adrian

Modified:
  head/share/man/man4/bpf.4
  head/sys/net/bpf.c
  head/sys/net/bpf.h

Modified: head/share/man/man4/bpf.4
==
--- head/share/man/man4/bpf.4   Sat Dec 31 05:45:10 2011(r229072)
+++ head/share/man/man4/bpf.4   Sat Dec 31 07:21:28 2011(r229073)
@@ -49,7 +49,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd December 30, 2011
+.Dd June 15, 2010
 .Dt BPF 4
 .Os
 .Sh NAME
@@ -516,48 +516,61 @@ by default.
 .It Dv BIOCSTSTAMP
 .It Dv BIOCGTSTAMP
 .Pq Li u_int
-Set or get the format and resolution of time stamps returned by BPF.
-The per-BPF descriptor configuration provided by the
-.Dv BIOCSTSTAMP
-IOCTL complements the per-interface time stamp configuration detailed in the
-.Sx CONFIGURATION
-section.
-.Pp
+Set or get format and resolution of the time stamps returned by BPF.
 Set to
-.Dv BPF_T_MICROTIME
+.Dv BPF_T_MICROTIME ,
+.Dv BPF_T_MICROTIME_FAST ,
+.Dv BPF_T_MICROTIME_MONOTONIC ,
 or
-.Dv BPF_T_MICROTIME_MONOTONIC
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST
 to get time stamps in 64-bit
 .Vt struct timeval
 format.
 Set to
-.Dv BPF_T_NANOTIME
+.Dv BPF_T_NANOTIME ,
+.Dv BPF_T_NANOTIME_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC ,
 or
-.Dv BPF_T_NANOTIME_MONOTONIC
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST
 to get time stamps in 64-bit
 .Vt struct timespec
 format.
 Set to
-.Dv BPF_T_BINTIME
+.Dv BPF_T_BINTIME ,
+.Dv BPF_T_BINTIME_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC ,
 or
-.Dv BPF_T_BINTIME_MONOTONIC
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
 to get time stamps in 64-bit
 .Vt struct bintime
 format.
 Set to
 .Dv BPF_T_NONE
-to not set a time stamp.
-By default, time stamps are initilized to
-.Dv BPF_T_MICROTIME .
-.Pp
+to ignore time stamp.
 All 64-bit time stamp formats are wrapped in
 .Vt struct bpf_ts .
 The
+.Dv BPF_T_MICROTIME_FAST ,
+.Dv BPF_T_NANOTIME_FAST ,
+.Dv BPF_T_BINTIME_FAST ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
+and
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
+are analogs of corresponding formats without _FAST suffix but do not perform
+a full time counter query, so their accuracy is one timer tick.
+The
 .Dv BPF_T_MICROTIME_MONOTONIC ,
 .Dv BPF_T_NANOTIME_MONOTONIC ,
+.Dv BPF_T_BINTIME_MONOTONIC ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
 and
-.Dv BPF_T_BINTIME_MONOTONIC
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
 store the time elapsed since kernel boot.
+This setting is initialized to
+.Dv BPF_T_MICROTIME
+by default.
 .It Dv BIOCFEEDBACK
 .Pq Li u_int
 Set packet feedback mode.
@@ -679,14 +692,14 @@ Currently,
 .Vt bpf_hdr
 is used when the time stamp is set to
 .Dv BPF_T_MICROTIME ,
+.Dv BPF_T_MICROTIME_FAST ,
 .Dv BPF_T_MICROTIME_MONOTONIC ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
 or
 .Dv BPF_T_NONE
-for backward compatibility reasons.
-Otherwise,
+for backward compatibility reasons.  Otherwise,
 .Vt bpf_xhdr
-is used.
-However,
+is used.  However,
 .Vt bpf_hdr
 may be deprecated in the near future.
 Suitable precautions
@@ -939,48 +952,6 @@ array initializers:
 .Fn BPF_STMT opcode operand
 and
 .Fn BPF_JUMP opcode operand true_offset false_offset .
-.Sh CONFIGURATION
-Per-interface BPF time stamp configuration is possible via the
-.Va net.bpf.tscfg
-.Xr sysctl 8
-tree which provides the following variables:
-.Bl -tag -width  -offset indent
-.It Va net.bpf.tscfg.default
-The default time stamp configuration setting used by all BPF attached 
interfaces
-which have not been explicitly changed.
-Valid values are none, fast, normal and external.
-The default is normal.
-.It Va net.bpf.tscfg.interface
-The time stamp configuration setting used by a specific BPF attached interface.
-There will be a separate entry in the
-.Va net.bpf.tscfg
-sysctl tree for each BPF attached interface.
-Valid values are default, none, fast, normal and external.
-The default is default, which means the system wide default setting specified
-by the
-.Va net.bpf.tscfg.default
-sysctl is used.
-.El
-.Pp
-The meaning of each per-interface time stamp configuration option is as 
follows:
-.Bl -tag -width  -offset indent
-.It none   
-Do not generate a time stamp for all packets tapped from this interface.
-.It fast   
-Generate a time stamp for all packets tapped from this interface by doing a 
fast
-read of the system clock.
-Fast reads have a granularity equivalent to the underlying kernel tick rate.
-.It normal
-Generate a time stamp for all packets tapped from this interface by doing a 
full
-read of the system clock.
-Full reads are slower than fast reads, but provide full hardware time counter
-granularity for the time stamp.
-.It external
-Something external to 

Re: svn: head/sys/netinet

2011-12-30 Thread Kostik Belousov
On Fri, Dec 30, 2011 at 04:25:09PM -0800, Maxim Sobolev wrote:
 On 12/30/2011 4:17 PM, Maxim Sobolev wrote:
 M  Won't this break whole lot of third-party software, which expects
 M  FreeBSD to be slightly different in this regards? Just curious.
 
 Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix
 this software (at least in ports).
 
 The MFC to stable/9 of r226105 was back out.
 
 Well, I am just curious how critical it is to get it resolved and is
 there any way to avoid ABI breakage. Software compiled for 9.x won't run
 on 10.x even when fitted with the proper compat libs, as far as I can
 tell and not all software can be easily recompiled.
 
 P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on 
 the version of the ELF image (i.e. detect if the binary is  than 
 FreeBSD 10.
What exactly do you mean by 'version of the ELF image' ? ABI note tag ?
What do you propose to do if older call comes from dso, or a library
statically linked in the main binary ?


pgpcpJ61NZtas.pgp
Description: PGP signature