svn commit: r273208 - head/sys/geom

2014-10-16 Thread Andrey V. Elsukov
Author: ae
Date: Fri Oct 17 06:58:04 2014
New Revision: 273208
URL: https://svnweb.freebsd.org/changeset/base/273208

Log:
  Add provider's sectorsize and stripesize to confdot output.
  
  Submitted by: rpokala at panasas.com

Modified:
  head/sys/geom/geom_dump.c

Modified: head/sys/geom/geom_dump.c
==
--- head/sys/geom/geom_dump.c   Fri Oct 17 06:23:04 2014(r273207)
+++ head/sys/geom/geom_dump.c   Fri Oct 17 06:58:04 2014(r273208)
@@ -61,8 +61,9 @@ static void
 g_confdot_provider(struct sbuf *sb, struct g_provider *pp)
 {
 
-   sbuf_printf(sb, "z%p 
[shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\"];\n",
-   pp, pp->name, pp->acr, pp->acw, pp->ace, pp->error);
+   sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\\n"
+   "sector=%u\\nstripe=%u\"];\n", pp, pp->name, pp->acr, pp->acw,
+   pp->ace, pp->error, pp->sectorsize, pp->stripesize);
 }
 
 static 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: r273206 - head/sys/modules/linux

2014-10-16 Thread Warner Losh
Author: imp
Date: Fri Oct 17 04:36:53 2014
New Revision: 273206
URL: https://svnweb.freebsd.org/changeset/base/273206

Log:
  move linux*_locore.s and linux*_support.s to SRCS, remove the OBJS
  entry and remove now-redunant dependencies. Add assym.s to
  linux*_locore.s build, as it depends on it.
  
  With this change, linux*.ko no longer builds every time through a
  KERNFAST run.
  
  Sponsored by: Netflix

Modified:
  head/sys/modules/linux/Makefile

Modified: head/sys/modules/linux/Makefile
==
--- head/sys/modules/linux/Makefile Fri Oct 17 04:36:48 2014
(r273205)
+++ head/sys/modules/linux/Makefile Fri Oct 17 04:36:53 2014
(r273206)
@@ -15,7 +15,8 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l
linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \
linux_timer.c \
opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \
-   device_if.h bus_if.h assym.s
+   device_if.h bus_if.h assym.s \
+   linux${SFX}_locore.s linux${SFX}_support.s
 
 # XXX: for assym.s
 SRCS+=  opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h
@@ -23,8 +24,6 @@ SRCS+=  opt_kstack_pages.h opt_nfs.h opt
 SRCS+= opt_apic.h
 .endif
 
-OBJS=  linux${SFX}_locore.o linux${SFX}_support.o
-
 .if ${MACHINE_CPUARCH} == "i386"
 SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h
 .endif
@@ -45,15 +44,15 @@ linux${SFX}_assym.h: @/kern/genassym.sh
 .endif
sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
 
-linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h
+linux${SFX}_locore.o: linux${SFX}_assym.h assym.s
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
 
-linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h
+linux${SFX}_support.o: linux${SFX}_assym.h assym.s
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
 
-linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86
+linux${SFX}_genassym.o:
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
 
 .if !defined(KERNBUILDDIR)
___
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: r273205 - head/sys/conf

2014-10-16 Thread Warner Losh
Author: imp
Date: Fri Oct 17 04:36:48 2014
New Revision: 273205
URL: https://svnweb.freebsd.org/changeset/base/273205

Log:
  Don't depend on @ or machine for assym.s or genassym.o. That's a
  vestige of a time when we needed to do that, but it is all handled by
  beforedepend now. When we depend on the symlink, bmake will cause the
  file to be rebuilt always.
  
  With this change, dtrace.ko doesn't rebuild every time through a
  KERNFAST run.
  
  Sponsored by: Netfix

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Fri Oct 17 03:55:33 2014(r273204)
+++ head/sys/conf/kmod.mk   Fri Oct 17 04:36:48 2014(r273205)
@@ -476,7 +476,7 @@ assym.s: genassym.o
 genassym.o: opt_global.h
 .endif
 .if !exists(@)
-assym.s: @
+assym.s:
 .else
 assym.s: @/kern/genassym.sh
 .endif
@@ -484,7 +484,7 @@ assym.s: @/kern/genassym.sh
 .if exists(@)
 genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
 .endif
-genassym.o: @ machine ${SRCS:Mopt_*.h}
+genassym.o: ${SRCS:Mopt_*.h}
${CC} -c ${CFLAGS:N-fno-common} \
@/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci d

2014-10-16 Thread Davide Italiano
On Thu, Oct 16, 2014 at 8:30 PM, Garrett Cooper  wrote:
>
>> BTW, it would be cool if universe will put logs of successful builds
>> and logs of failed builds in different directories for easier
>> inspection.
>> If there's already something like this and you can point me to that,
>> it would be appreciated.
>
> I think you want make tinderbox instead of make universe (make universe 
> doesn't display builds errors whereas make tinderbox does).
> Cheers!

Thanks -- I'm rerunning 'make tinderbox on ref11 as we speak and I'll
commit a fix once it's over.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
___
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: r273204 - head/release

2014-10-16 Thread Glen Barber
Author: gjb
Date: Fri Oct 17 03:55:33 2014
New Revision: 273204
URL: https://svnweb.freebsd.org/changeset/base/273204

Log:
  Add more descriptive metadata to the ISO images.
  
  PR:   146079
  Submitted by: Roman Bogorodskiy
  MFC after:3 days
  X-MFC-10.1:   yes
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile

Modified: head/release/Makefile
==
--- head/release/Makefile   Fri Oct 17 03:04:38 2014(r273203)
+++ head/release/Makefile   Fri Oct 17 03:55:33 2014(r273204)
@@ -62,6 +62,8 @@ OSRELEASE=${TYPE}-${REVISION}-${BRANCH}
 .endfor
 .endif
 
+VOLUME_LABEL=  ${OSRELEASE:C/[-\.]/_/g:S/^$${TYPE}_//}
+
 .if !exists(${DOCDIR})
 NODOC= true
 .endif
@@ -247,13 +249,13 @@ dvd:
 
 release.iso: disc1.iso
 disc1.iso: system
-   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} 
release
+   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} 
release
 
 dvd1.iso: dvd pkg-stage
-   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd
+   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD 
${.TARGET} dvd
 
 bootonly.iso: bootonly
-   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} 
bootonly
+   sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} 
bootonly
 
 memstick: memstick.img
 memstick.img: system
___
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: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci d

2014-10-16 Thread Garrett Cooper

> BTW, it would be cool if universe will put logs of successful builds
> and logs of failed builds in different directories for easier
> inspection.
> If there's already something like this and you can point me to that,
> it would be appreciated.

I think you want make tinderbox instead of make universe (make universe 
doesn't display builds errors whereas make tinderbox does).
Cheers!
___
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: r273202 - head/sys/fs/nfsserver

2014-10-16 Thread Marcelo Araujo
Author: araujo (ports committer)
Date: Fri Oct 17 02:11:09 2014
New Revision: 273202
URL: https://svnweb.freebsd.org/changeset/base/273202

Log:
  Make the sysctl(8) for checkutf8 positively defined and improve
  the description of it.
  
  Submitted by: Ronald Klop 
  Reviewed by:  rmacklem
  Approved by:  rmacklem
  Sponsored by: QNAP Systems Inc.

Modified:
  head/sys/fs/nfsserver/nfs_nfsdsubs.c

Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c
==
--- head/sys/fs/nfsserver/nfs_nfsdsubs.cFri Oct 17 00:31:51 2014
(r273201)
+++ head/sys/fs/nfsserver/nfs_nfsdsubs.cFri Oct 17 02:11:09 2014
(r273202)
@@ -61,10 +61,10 @@ static u_int32_t nfsrv_isannfserr(u_int3
 
 SYSCTL_DECL(_vfs_nfsd);
 
-static int disable_checkutf8 = 0;
-SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW,
-&disable_checkutf8, 0,
-"Disable the NFSv4 check for a UTF8 compliant name");
+static int enable_checkutf8 = 1;
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_checkutf8, CTLFLAG_RW,
+&enable_checkutf8, 0,
+"Enable the NFSv4 check for the UTF8 compliant name required by rfc3530");
 
 static intenable_nobodycheck = 1;
 SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_nobodycheck, CTLFLAG_RW,
@@ -2005,7 +2005,7 @@ nfsrv_parsename(struct nfsrv_descript *n
error = 0;
goto nfsmout;
}
-   if (disable_checkutf8 == 0 &&
+   if (enable_checkutf8 == 1 &&
nfsrv_checkutf8((u_int8_t *)bufp, outlen)) {
nd->nd_repstat = NFSERR_INVAL;
error = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci d

2014-10-16 Thread Davide Italiano
On Thu, Oct 16, 2014 at 4:44 PM, Bjoern A. Zeeb  wrote:
>
> On 16 Oct 2014, at 18:04 , Davide Italiano  wrote:
>
>> Author: davide
>> Date: Thu Oct 16 18:04:43 2014
>> New Revision: 273174
>> URL: https://svnweb.freebsd.org/changeset/base/273174
>>
>> Log:
>>  Follow up to r225617. In order to maximize the re-usability of kernel code
>>  in userland rename in-kernel getenv()/setenv() to 
>> kern_setenv()/kern_getenv().
>>  This fixes a namespace collision with libc symbols.
>>
>>  Submitted by:   kmacy
>>  Tested by:  make universe
>
> Hmm I still see a lot of mips kernels broken with
>
> /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c: In function 
> 'platform_start':
> /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: implicit 
> declaration of function 'setenv'
> /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: nested 
> extern declaration of ‘setenv’ [-Wnested-externs]
>
> on my incremental builds.
>
> —
> Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983
>

Hi,
I think you're right and I apologize for the breakage (apparently I
didn't look at all the log files properly).
Can you tell me if this fixes for you:
https://people.freebsd.org/~davide/patches/kernsetenv_fixup.diff ?
If yes, I'll commit.
BTW, it would be cool if universe will put logs of successful builds
and logs of failed builds in different directories for easier
inspection.
If there's already something like this and you can point me to that,
it would be appreciated.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
___
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: r273201 - head/etc

2014-10-16 Thread Hiroki Sato
Author: hrs
Date: Fri Oct 17 00:31:51 2014
New Revision: 273201
URL: https://svnweb.freebsd.org/changeset/base/273201

Log:
  Add support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which
  interpreted the listed items as port numbers of TCP services.
  
  A service with no suffix still works and recognized as a TCP service for
  backward compatibility.  It should be updated with /tcp suffix.
  
  PR:   194292
  MFC after:1 week

Modified:
  head/etc/rc.firewall

Modified: head/etc/rc.firewall
==
--- head/etc/rc.firewallFri Oct 17 00:05:31 2014(r273200)
+++ head/etc/rc.firewallFri Oct 17 00:31:51 2014(r273201)
@@ -422,8 +422,8 @@ case ${firewall_type} in
 
 [Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn])
# Configuration:
-   #  firewall_myservices: List of TCP ports on which this host
-   #offers services.
+   #  firewall_myservices: List of ports/protocols on which this
+   #host offers services.
#  firewall_allowservices:  List of IPv4 and/or IPv6 addresses
#that have access to
#$firewall_myservices.
@@ -487,7 +487,24 @@ case ${firewall_type} in
#
for i in ${firewall_allowservices} ; do
  for j in ${firewall_myservices} ; do
-   ${fwcmd} add pass tcp from $i to me $j
+   case $j in
+   [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo])
+ ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me
+   ;;
+   [0-9A-Za-z]*/[Tt][Cc][Pp])
+ ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]}
+   ;;
+   [0-9A-Za-z]*/[Uu][Dd][Pp])
+ ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]}
+   ;;
+   *[0-9A-Za-z])
+ echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr
+ ${fwcmd} add pass tcp from $i to me $j
+   ;;
+   *)
+ echo "Invalid port in firewall_myservices: $j" > /dev/stderr
+   ;;
+   esac
  done
done
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys

2014-10-16 Thread Gleb Smirnoff
On Fri, Oct 17, 2014 at 01:30:35AM +0200, Dag-Erling Smørgrav wrote:
D> Gleb Smirnoff  writes:
D> > The function should also be documented in hash(9).
D> 
D> It's not intended as a "general kernel hashing function".  It is
D> intended solely for pf.

Why? If so, it should live in pf and not compiled uncoditionally
into all kernels. Anyway, I don't see reason for doing it non-generic.

P.S. Once I gathered 3 jenkins hash copy-n-pastes into one place,
and we still got an extra copy in ofed.

-- 
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: r272906 - in head/sys: conf libkern netpfil/pf sys

2014-10-16 Thread Gleb Smirnoff
  Luigi,

On Fri, Oct 17, 2014 at 01:04:46AM +0200, Luigi Rizzo wrote:
L> > Thanks a lot, Ed. I rerun the tests. Results are fine. Distribution
L> > is equal (plots attached).
L> > 
L> > Murmur is 9% +/- 1.5% faster. Sorry for noise.
L> 
L> is that 9% on the hash alone ?

Right.

L> If so it is surprising that you could see any change on pf's throughput.
L> In my very non-scientific tests with VALE, doing two hashes on
L> the MAC address would result in 17 Mpps vs 20 Mpps when no hashes were done.
L> The difference is about 8ns, which is totally in the noise at 2 Mpps or less.

We share exactly the same position here. Notice also, that Olivier also run
tests that showed no change. May be George's tests were on single state?

-- 
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: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci d

2014-10-16 Thread Bjoern A. Zeeb

On 16 Oct 2014, at 18:04 , Davide Italiano  wrote:

> Author: davide
> Date: Thu Oct 16 18:04:43 2014
> New Revision: 273174
> URL: https://svnweb.freebsd.org/changeset/base/273174
> 
> Log:
>  Follow up to r225617. In order to maximize the re-usability of kernel code
>  in userland rename in-kernel getenv()/setenv() to 
> kern_setenv()/kern_getenv().
>  This fixes a namespace collision with libc symbols.
> 
>  Submitted by:   kmacy
>  Tested by:  make universe

Hmm I still see a lot of mips kernels broken with

/scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c: In function 
'platform_start':
/scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: implicit 
declaration of function 'setenv'
/scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: nested extern 
declaration of ‘setenv’ [-Wnested-externs]

on my incremental builds.

— 
Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983

___
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: r272906 - in head/sys: conf libkern netpfil/pf sys

2014-10-16 Thread Dag-Erling Smørgrav
Gleb Smirnoff  writes:
> The function should also be documented in hash(9).

It's not intended as a "general kernel hashing function".  It is
intended solely for pf.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r273197 - head/share/man/man4

2014-10-16 Thread Gavin Atkinson
Author: gavin
Date: Thu Oct 16 23:07:09 2014
New Revision: 273197
URL: https://svnweb.freebsd.org/changeset/base/273197

Log:
  The igb(4) driver supports 82580, i350, i354, i210 and i211 chipsets too,
  document them.
  
  PR:   192301
  MFC after:1 week

Modified:
  head/share/man/man4/igb.4

Modified: head/share/man/man4/igb.4
==
--- head/share/man/man4/igb.4   Thu Oct 16 23:03:04 2014(r273196)
+++ head/share/man/man4/igb.4   Thu Oct 16 23:07:09 2014(r273197)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 25, 2013
+.Dd October 17, 2014
 .Dt IGB 4
 .Os
 .Sh NAME
@@ -55,7 +55,8 @@ if_igb_load="YES"
 The
 .Nm
 driver provides support for PCI Express Gigabit Ethernet adapters
-based on the Intel 82575 and 82576 Ethernet controller chips.
+based on the Intel 82575, 82576, 82580, i21x and i35x
+Ethernet controller chips.
 The driver supports Transmit/Receive checksum offload and Jumbo
 Frames.
 Furthermore it supports TCP segmentation offload (TSO) on all
@@ -142,6 +143,12 @@ driver supports Gigabit Ethernet adapter
 Intel Gigabit ET Dual Port Server Adapter (82576)
 .It
 Intel Gigabit VT Quad Port Server Adapter (82575)
+.It
+Intel Single, Dual and Quad Gigabit Ethernet Controller (82580)
+.It
+Intel i210 and i211 Gigabit Ethernet Controller
+.It
+Intel i350 and i354 Gigabit Ethernet Controller
 .El
 .Sh LOADER TUNABLES
 Tunables can be set at the
___
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: r272906 - in head/sys: conf libkern netpfil/pf sys

2014-10-16 Thread Luigi Rizzo
On Wed, Oct 15, 2014 at 08:14:19AM +0400, Gleb Smirnoff wrote:
> On Tue, Oct 14, 2014 at 11:38:23PM -0400, Ed Maste wrote:
> E> On 14 October 2014 23:04, Gleb Smirnoff  wrote:
> E> >
> E> > Look at results at the end of email. Guess what -j and -m mean. I
> E> > want either proving me doing the test wrong, or backing the change
> E> > out ASAP.
> E> 
> E> It looks like there is indeed an error in the test:
> E> 
> E> > h = murmur3_aligned_32((uint32_t *)&key[i],
> E> >   sizeof(struct pf_state_key_cmp)/sizeof(uint32_t),
> E> 
> E> murmur3's size argument is bytes, not uint32_ts, so the test is only
> E> hashing the first 1/4 of the keys.
> 
> Thanks a lot, Ed. I rerun the tests. Results are fine. Distribution
> is equal (plots attached).
> 
> Murmur is 9% +/- 1.5% faster. Sorry for noise.

is that 9% on the hash alone ?

If so it is surprising that you could see any change on pf's throughput.
In my very non-scientific tests with VALE, doing two hashes on
the MAC address would result in 17 Mpps vs 20 Mpps when no hashes were done.
The difference is about 8ns, which is totally in the noise at 2 Mpps or less.

cheers
luigi

> x jenkins-time
> + murmur-time
> +--+
> |  ++  x  
>  |
> |  ++ xx  
>  |
> |+ +++xx  
>  |
> |+ +  +   xx x x   x  x   
> x|
> | |_A_|  |_M__A_| 
>  |
> +--+
> N   Min   MaxMedian   AvgStddev
> x  12   8147243   8851519   8173132 8296753.8 235815.07
> +  15   7502767   7655925   7547376 7551089.5 39524.149
> Difference at 95.0% confidence
> -745664 +/- 127010
> -8.98742% +/- 1.53084%
> (Student's t, pooled s = 159194)
> 
> -- 
> 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: r272906 - in head/sys: conf libkern netpfil/pf sys

2014-10-16 Thread Gleb Smirnoff
On Wed, Oct 15, 2014 at 11:21:52AM +0200, Dag-Erling Smørgrav wrote:
D> Ed Maste  writes:
D> > murmur3's size argument is bytes, not uint32_ts, so the test is only
D> > hashing the first 1/4 of the keys.
D> 
D> That's my fault, and I'm going to change it, because it's illogical.
D> The function works on aligned arrays of int32s and should take a count,
D> not a size.  I just didn't want to delay the patch even further.

The function should also be documented in hash(9).

-- 
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"


svn commit: r273189 - in head: lib/libc/string sys/libkern

2014-10-16 Thread Xin LI
Author: delphij
Date: Thu Oct 16 22:04:07 2014
New Revision: 273189
URL: https://svnweb.freebsd.org/changeset/base/273189

Log:
  Remove duplicated code.
  
  Suggested by: jmg

Deleted:
  head/lib/libc/string/explicit_bzero.c
Modified:
  head/lib/libc/string/Makefile.inc
  head/sys/libkern/explicit_bzero.c

Modified: head/lib/libc/string/Makefile.inc
==
--- head/lib/libc/string/Makefile.inc   Thu Oct 16 22:00:24 2014
(r273188)
+++ head/lib/libc/string/Makefile.inc   Thu Oct 16 22:04:07 2014
(r273189)
@@ -2,6 +2,7 @@
 # $FreeBSD$
 
 .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string
+.PATH: ${LIBC_SRCTOP}/../../sys/libkern
 
 CFLAGS+= -I${LIBC_SRCTOP}/locale
 

Modified: head/sys/libkern/explicit_bzero.c
==
--- head/sys/libkern/explicit_bzero.c   Thu Oct 16 22:00:24 2014
(r273188)
+++ head/sys/libkern/explicit_bzero.c   Thu Oct 16 22:04:07 2014
(r273189)
@@ -7,7 +7,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#ifdef _KERNEL
 #include 
+#else
+#include 
+#endif /* _KERNEL */
 
 __attribute__((weak)) void __explicit_bzero_hook(void *, size_t);
 
___
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: r273186 - head/share/mk

2014-10-16 Thread Mark Johnston
Author: markj
Date: Thu Oct 16 21:13:46 2014
New Revision: 273186
URL: https://svnweb.freebsd.org/changeset/base/273186

Log:
  Don't define rules based on PROGS if PROGS is empty.
  
  Reviewed by:  sjg, ngie
  MFC after:1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Thu Oct 16 20:46:02 2014(r273185)
+++ head/share/mk/bsd.progs.mk  Thu Oct 16 21:13:46 2014(r273186)
@@ -99,9 +99,11 @@ $p.$t: .PHONY .MAKE
 .endfor
 .endfor
 
+.if !empty(PROGS)
 .for t in ${PROGS_TARGETS:O:u}
 $t: ${PROGS:%=%.$t}
 .endfor
+.endif
 
 .if empty(PROGS) && !empty(SCRIPTS)
 
___
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: r273183 - in head/sys/cam: ata scsi

2014-10-16 Thread Sean Bruno
Author: sbruno
Date: Thu Oct 16 20:33:04 2014
New Revision: 273183
URL: https://svnweb.freebsd.org/changeset/base/273183

Log:
  Add 4k quirks for PM853T Samsung SSD
  
  MFC after:2 weeks
  Sponsored by: Limelight Networks

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Thu Oct 16 20:13:16 2014(r273182)
+++ head/sys/cam/ata/ata_da.c   Thu Oct 16 20:33:04 2014(r273183)
@@ -459,6 +459,14 @@ static struct ada_quirk_entry ada_quirk_
},
{
/*
+* Samsung PM853T Series SSDs
+* 4k optimised
+*/
+   { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG MZ7GE*", "*" },
+   /*quirks*/ADA_Q_4K
+   },
+   {
+   /*
 * SuperTalent TeraDrive CT SSDs
 * 4k optimised & trim only works in 4k requests + 4k aligned
 */

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Thu Oct 16 20:13:16 2014(r273182)
+++ head/sys/cam/scsi/scsi_da.c Thu Oct 16 20:33:04 2014(r273183)
@@ -1134,6 +1134,14 @@ static struct da_quirk_entry da_quirk_ta
},
{
/*
+* Samsung PM853T Series SSDs
+* 4k optimised
+*/
+   { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG MZ7GE*", "*" },
+   /*quirks*/DA_Q_4K
+   },
+   {
+   /*
 * SuperTalent TeraDrive CT SSDs
 * 4k optimised & trim only works in 4k requests + 4k aligned
 */
___
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: r273182 - in head/sys/modules: qlxgb qlxgbe qlxge

2014-10-16 Thread Warner Losh
Author: imp
Date: Thu Oct 16 20:13:16 2014
New Revision: 273182
URL: https://svnweb.freebsd.org/changeset/base/273182

Log:
  There's no need to override the clean target. The clean target works
  correctly without doing so.

Modified:
  head/sys/modules/qlxgb/Makefile
  head/sys/modules/qlxgbe/Makefile
  head/sys/modules/qlxge/Makefile

Modified: head/sys/modules/qlxgb/Makefile
==
--- head/sys/modules/qlxgb/Makefile Thu Oct 16 19:53:32 2014
(r273181)
+++ head/sys/modules/qlxgb/Makefile Thu Oct 16 20:13:16 2014
(r273182)
@@ -35,9 +35,4 @@ KMOD= if_qlxgb
 SRCS=  qla_os.c qla_dbg.c qla_hw.c qla_misc.c qla_isr.c qla_ioctl.c
 SRCS+= device_if.h bus_if.h pci_if.h
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine
-
 .include 

Modified: head/sys/modules/qlxgbe/Makefile
==
--- head/sys/modules/qlxgbe/MakefileThu Oct 16 19:53:32 2014
(r273181)
+++ head/sys/modules/qlxgbe/MakefileThu Oct 16 20:13:16 2014
(r273182)
@@ -41,10 +41,4 @@ SRCS+= device_if.h bus_if.h pci_if.h
 
 #CFLAGS += -DQL_DBG
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include 
-

Modified: head/sys/modules/qlxge/Makefile
==
--- head/sys/modules/qlxge/Makefile Thu Oct 16 19:53:32 2014
(r273181)
+++ head/sys/modules/qlxge/Makefile Thu Oct 16 20:13:16 2014
(r273182)
@@ -41,10 +41,5 @@ SRCS+= device_if.h bus_if.h pci_if.h
 
 CFLAGS += -DQL_DBG
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include 
 
___
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: r273181 - in head/sys/dev/usb: . serial

2014-10-16 Thread Joerg Wunsch
Author: joerg
Date: Thu Oct 16 19:53:32 2014
New Revision: 273181
URL: https://svnweb.freebsd.org/changeset/base/273181

Log:
  Add the Dresden Elektronik deRFnode device to uftdi(4).
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/uftdi.c
==
--- head/sys/dev/usb/serial/uftdi.c Thu Oct 16 19:52:12 2014
(r273180)
+++ head/sys/dev/usb/serial/uftdi.c Thu Oct 16 19:53:32 2014
(r273181)
@@ -298,6 +298,7 @@ static const STRUCT_USB_HOST_ID uftdi_de
UFTDI_DEV(CONTEC, COM1USBH, 0),
UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0),
UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0),
+   UFTDI_DEV(DRESDENELEKTRONIK, DE_RFNODE, 0),
UFTDI_DEV(DRESDENELEKTRONIK, LEVELSHIFTERSTICKLOWCOST, 0),
UFTDI_DEV(ELEKTOR, FT323R, 0),
UFTDI_DEV(EVOLUTION, ER1, 0),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsThu Oct 16 19:52:12 2014(r273180)
+++ head/sys/dev/usb/usbdevsThu Oct 16 19:53:32 2014(r273181)
@@ -1664,6 +1664,7 @@ product DREAMLINK DL100B  0x0004  USB Webm
 /* dresden elektronik products */
 product DRESDENELEKTRONIK SENSORTERMINALBOARD  0x0001 SensorTerminalBoard
 product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL  0x0004 Wireless Handheld 
Terminal
+product DRESDENELEKTRONIK DE_RFNODE 0x001c deRFnode
 product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST  0x0022 Levelshifter Stick 
Low Cost
 
 /* Dynastream Innovations */
___
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: r273180 - head/sys/dev/mmc

2014-10-16 Thread Warner Losh
Author: imp
Date: Thu Oct 16 19:52:12 2014
New Revision: 273180
URL: https://svnweb.freebsd.org/changeset/base/273180

Log:
  fwsectors and fwheads used to be somehwat arbitrary. However, they are
  used to align partitions in gpart. We also try to align partitions by
  stripe size when creating new media. Align these two concepts by
  making fwsectors the same as the stripe size. Select a sensible number
  of heads so we wind up with about 20 cylinders. This number was
  selected to keep the rounding effects to a few percent while keeping
  the number of cylinder groups low.
  
  Sadly, it is not possible to make these numbers match the numbers used
  by SD card readers. There apperas to be much variation between brands
  so there's no one universal number. These numbers are also not aligned
  to the stripe size, so some performance problems may still be present
  when SD cards are created this way.
  
  Also, these numbers will differ from the far less common SD to ATA
  adapters, which present a different, but more uniform, set of numbers
  that also happened to match the old defaults.
  
  Nothing should change for current users. Any suboptimal performance
  caused by misalignment will still be there. gpart will honor the
  partitions that aren't on proper boudnaries, but editing the partition
  tables may result in different alignments being used than before when
  editing things natively.
  
  Ideally, there'd be some way to override these values in the disk
  subsystem by the user for the USB adapter use case where all "native"
  notions of geometry disappear. This does not implement that.

Modified:
  head/sys/dev/mmc/mmcsd.c

Modified: head/sys/dev/mmc/mmcsd.c
==
--- head/sys/dev/mmc/mmcsd.cThu Oct 16 19:27:26 2014(r273179)
+++ head/sys/dev/mmc/mmcsd.cThu Oct 16 19:52:12 2014(r273180)
@@ -155,14 +155,36 @@ mmcsd_attach(device_t dev)
d->d_dump = mmcsd_dump;
d->d_name = "mmcsd";
d->d_drv1 = sc;
-   d->d_maxsize = 4*1024*1024; /* Maximum defined SD card AU size. */
d->d_sectorsize = mmc_get_sector_size(dev);
+   d->d_maxsize = mmc_get_max_data(dev) * d->d_sectorsize;
d->d_mediasize = (off_t)mmc_get_media_size(dev) * d->d_sectorsize;
d->d_stripeoffset = 0;
d->d_stripesize = mmc_get_erase_sector(dev) * d->d_sectorsize;
d->d_unit = device_get_unit(dev);
d->d_flags = DISKFLAG_CANDELETE;
d->d_delmaxsize = mmc_get_erase_sector(dev) * d->d_sectorsize * 1; /* 
conservative */
+   /*
+* The d_fw* values are fake. However, layout is aided by making the
+* number of fwsectors equal to the erase sectors from the drive since
+* we set the stripe size equal to that. We set fwheads such that there
+* are ~20 cylinder groups since all values are somewhat arbitrary here
+* and this gives good behavior with ffs without wasting too much
+* space.  Sadly, geom_part wants to round partitions to these
+* values. While not bad, in and of itself, the values we present here
+* will almost certainly be different then the values that USB SD
+* adapters use and there's too much variation between brands to just
+* use those values here.  Also SD to ATA adapters favor traditional
+* ata sizes, which are different again from the USB adapters (which
+* favor SCSI values). This rounding leads to a loss of up to 5% of the
+* usable space (usually much less, but that's why 20 was selected: to
+* limit this effect at a few percent). gpart needs a way to override
+* this behavior for situations like this, but doesn't provide
+* one. Perhaps this behavior should be tunable as well, but maybe that
+* belongs in the disk layer.  These values will be much better than
+* the default ones.
+*/
+   d->d_fwsectors = mmc_get_erase_sector(dev);
+   d->d_fwheads = mmc_get_media_size(dev) / (d->d_fwsectors * 20);
strlcpy(d->d_ident, mmc_get_card_sn_string(dev), sizeof(d->d_ident));
strlcpy(d->d_descr, mmc_get_card_id_string(dev), sizeof(d->d_descr));
 
___
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: r273178 - head/share/man/man4

2014-10-16 Thread Ed Maste
Author: emaste
Date: Thu Oct 16 18:49:50 2014
New Revision: 273178
URL: https://svnweb.freebsd.org/changeset/base/273178

Log:
  Update vt(4) for UEFI defaults and special keys
  
  vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.
  
  PR:   193710
  Submitted by: wblock [1]
  Reviewed by:  wblock
  MFC after:3 days
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation
  Differential Revision: https://reviews.freebsd.org/D953

Modified:
  head/share/man/man4/vt.4

Modified: head/share/man/man4/vt.4
==
--- head/share/man/man4/vt.4Thu Oct 16 18:28:11 2014(r273177)
+++ head/share/man/man4/vt.4Thu Oct 16 18:49:50 2014(r273178)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 2, 2014
+.Dd October 16, 2014
 .Dt "VIRTUAL TERMINALS" 4
 .Os
 .Sh NAME
@@ -45,7 +45,15 @@ In
 .Xr loader.conf 5 :
 .Cd hw.vga.textmode=1
 .Cd kern.vty=vt
-.Cd kern.vt.spclkeys=15
+.Pp
+In
+.Xr loader.conf 5 or
+.Xr sysctl.conf 5 :
+.Cd kern.vt.kbd_halt=1
+.Cd kern.vt.kbd_poweroff=1
+.Cd kern.vt.kbd_reboot=1
+.Cd kern.vt.kbd_debug=1
+.Cd kern.vt.kbd_panic=0
 .Sh DESCRIPTION
 The
 .Nm
@@ -185,30 +193,41 @@ Set to 1 to use virtual terminals in tex
 Features that require graphics mode, like loadable fonts, will be
 disabled.
 .It Va kern.vty
-When both
-.Nm
-and
-.Xr sc 4 have been compiled into the kernel, the one to use for the
-system console can be selected by setting this value to
+Set this value to
 .Ql vt
 or
-.Ql sc .
-If this value is not set,
+.Ql sc
+to override the default driver used for the system console.
+By default,
 .Xr sc 4
-is used.
-.It Va kern.vt.spclkeys
-bitmap of allowed special keys. 1 is enabled, 0 is disabled. Encoded as:
-.Bl -tag -compact -width 0x00
-.It 0x0001
-Debug request key combination. (Ctrl+Alt+Esc)
-.It 0x0002
-Reboot. (Ctrl+Alt+Del)
-.It 0x0004
-Halt.
-.It 0x0008
-Power down.
-.El
-Default is 15, all enabled.
+is used on computers that boot from BIOS, and
+.Nm
+is used on computers that boot from UEFI.
+.Sh KEYBOARD SYSCTL TUNABLES
+These settings control whether certain special key combinations are enabled or
+ignored.
+The specific key combinations can be configured by using a
+.Xr keymap 5
+file.
+.Pp
+These settings can be entered at the
+.Xr loader 8
+prompt or in
+.Xr loader.conf 5
+and can also be changed at runtime with the
+.Xr sysctl 8
+command.
+.Bl -tag -width indent
+.It Va kern.vt.kbd_halt
+Enable halt keyboard combination.
+.It Va kern.vt.kbd_poweroff
+Enable power off key combination.
+.It Va kern.vt.kbd_reboot.
+Enable reboot key combination, usually Ctrl+Alt+Del.
+.It Va kern.vt.kbd_debug
+Enable debug request key combination, usually Ctrl+Alt+Esc.
+.It Va kern.vt.kbd_panic
+Enable panic key combination.
 .El
 .Sh FILES
 .Bl -tag -width /usr/share/vt/keymaps/* -compact
___
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: r273177 - head/tools/build/options

2014-10-16 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Oct 16 18:28:11 2014
New Revision: 273177
URL: https://svnweb.freebsd.org/changeset/base/273177

Log:
  Correct two typos
  
  PR:   194350
  Submitted by: jiash...@gmail.com
  Approved by:  hrs (mentor)

Modified:
  head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
  head/tools/build/options/WITHOUT_GCC_BOOTSTRAP

Modified: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP
==
--- head/tools/build/options/WITHOUT_CLANG_BOOTSTRAPThu Oct 16 18:16:31 
2014(r273176)
+++ head/tools/build/options/WITHOUT_CLANG_BOOTSTRAPThu Oct 16 18:28:11 
2014(r273177)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
 Set to not build the Clang C/C++ compiler during the bootstrap phase of the 
build.
-You must enable wither gcc or clang bootstrap to be able to build the system,
-unless an alternative compiiler is provided via
+You must enable either gcc or clang bootstrap to be able to build the system,
+unless an alternative compiler is provided via
 XCC.

Modified: head/tools/build/options/WITHOUT_GCC_BOOTSTRAP
==
--- head/tools/build/options/WITHOUT_GCC_BOOTSTRAP  Thu Oct 16 18:16:31 
2014(r273176)
+++ head/tools/build/options/WITHOUT_GCC_BOOTSTRAP  Thu Oct 16 18:28:11 
2014(r273177)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
 Set to not build gcc and g++ as part of the bootstrap process.
-You must enable wither gcc or clang bootstrap to be able to build the system,
-unless an alternative compiiler is provided via
+You must enable either gcc or clang bootstrap to be able to build the system,
+unless an alternative compiler is provided via
 XCC.
___
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: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de...

2014-10-16 Thread Davide Italiano
Author: davide
Date: Thu Oct 16 18:04:43 2014
New Revision: 273174
URL: https://svnweb.freebsd.org/changeset/base/273174

Log:
  Follow up to r225617. In order to maximize the re-usability of kernel code
  in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv().
  This fixes a namespace collision with libc symbols.
  
  Submitted by:   kmacy
  Tested by:  make universe

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/vmm/vmm.c
  head/sys/arm/arm/machdep.c
  head/sys/cam/ata/ata_da.c
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
  head/sys/dev/acpica/acpi.c
  head/sys/dev/asmc/asmc.c
  head/sys/dev/cfi/cfi_core.c
  head/sys/dev/drm2/drm_crtc_helper.c
  head/sys/dev/hatm/if_hatm.c
  head/sys/dev/mii/brgphy.c
  head/sys/dev/nfe/if_nfe.c
  head/sys/dev/patm/if_patm_attach.c
  head/sys/dev/pci/pci.c
  head/sys/dev/pci/pci_pci.c
  head/sys/dev/rt/if_rt.c
  head/sys/dev/uart/uart_subr.c
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/geom/geom_dev.c
  head/sys/geom/raid/g_raid.c
  head/sys/geom/sched/g_sched.c
  head/sys/i386/i386/bios.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/xen/xen_machdep.c
  head/sys/kern/init_main.c
  head/sys/kern/kern_environment.c
  head/sys/kern/kern_sysctl.c
  head/sys/kern/subr_hints.c
  head/sys/kern/subr_param.c
  head/sys/kern/vfs_mountroot.c
  head/sys/mips/atheros/ar71xx_machdep.c
  head/sys/mips/nlm/xlp_machdep.c
  head/sys/mips/rmi/xlr_machdep.c
  head/sys/nfs/bootp_subr.c
  head/sys/nfs/nfs_diskless.c
  head/sys/nfsclient/nfs_vfsops.c
  head/sys/powerpc/aim/machdep.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sys/systm.h
  head/sys/vm/vm_page.c
  head/sys/x86/iommu/busdma_dmar.c
  head/sys/x86/x86/tsc.c
  head/sys/x86/xen/pv.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Thu Oct 16 15:59:00 2014
(r273173)
+++ head/sys/amd64/amd64/machdep.c  Thu Oct 16 18:04:43 2014
(r273174)
@@ -244,7 +244,7 @@ cpu_startup(dummy)
 * We do this by disabling a bit in the SMI_EN (SMI Control and
 * Enable register) of the Intel ICH LPC Interface Bridge. 
 */
-   sysenv = getenv("smbios.system.product");
+   sysenv = kern_getenv("smbios.system.product");
if (sysenv != NULL) {
if (strncmp(sysenv, "MacBook1,1", 10) == 0 ||
strncmp(sysenv, "MacBook3,1", 10) == 0 ||
@@ -276,7 +276,7 @@ cpu_startup(dummy)
 * Display physical memory if SMBIOS reports reasonable amount.
 */
memsize = 0;
-   sysenv = getenv("smbios.memory.enabled");
+   sysenv = kern_getenv("smbios.memory.enabled");
if (sysenv != NULL) {
memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10;
freeenv(sysenv);
@@ -2070,7 +2070,7 @@ hammer_time(u_int64_t modulep, u_int64_t
thread0.td_pcb->pcb_cr3 = KPML4phys; /* PCID 0 is reserved for kernel */
thread0.td_frame = &proc0_tf;
 
-env = getenv("kernelname");
+env = kern_getenv("kernelname");
if (env != NULL)
strlcpy(kernelname, env, sizeof(kernelname));
 

Modified: head/sys/amd64/vmm/vmm.c
==
--- head/sys/amd64/vmm/vmm.cThu Oct 16 15:59:00 2014(r273173)
+++ head/sys/amd64/vmm/vmm.cThu Oct 16 18:04:43 2014(r273174)
@@ -1934,7 +1934,7 @@ vmm_is_pptdev(int bus, int slot, int fun
/* set pptdevs="1/2/3 4/5/6 7/8/9 10/11/12" */
found = 0;
for (i = 0; names[i] != NULL && !found; i++) {
-   cp = val = getenv(names[i]);
+   cp = val = kern_getenv(names[i]);
while (cp != NULL && *cp != '\0') {
if ((cp2 = strchr(cp, ' ')) != NULL)
*cp2 = '\0';

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Thu Oct 16 15:59:00 2014(r273173)
+++ head/sys/arm/arm/machdep.c  Thu Oct 16 18:04:43 2014(r273174)
@@ -1245,7 +1245,7 @@ initarm(struct arm_boot_params *abp)
debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp);
print_kenv();
 
-   env = getenv("kernelname");
+   env = kern_getenv("kernelname");
if (env != NULL)
strlcpy(kernelname, env, sizeof(kernelname));
 

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Thu Oct 16 15:59:00 2014(r273173)
+++ head/sys/cam/ata/ata_da.c   Thu Oct 16 18:04:43 2014(r273174)
@@ -1316,7 +1316,7 @@ adaregister(struct cam_periph *periph, v
softc->disk->d_name, softc->disk->d_unit);
snprintf(buf1, sizeof(buf1),
"ad%d", lega

svn commit: r273173 - head/share/man/man5

2014-10-16 Thread Brooks Davis
Author: brooks
Date: Thu Oct 16 15:59:00 2014
New Revision: 273173
URL: https://svnweb.freebsd.org/changeset/base/273173

Log:
  Regenerate src.conf.5 after:
  
  r273170:
MK_ARB_EABI was removed in r272350 so remove the documentation.
  r273171:
Per r273155, HYPERV is built by default on platforms where it makes
sense and ignored on others.
  r273172:
Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not
just programs.

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Thu Oct 16 15:55:13 2014
(r273172)
+++ head/share/man/man5/src.conf.5  Thu Oct 16 15:59:00 2014
(r273173)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z 
des
 .\" $FreeBSD$
-.Dd September 12, 2014
+.Dd October 16, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -100,9 +100,6 @@ Set to not build
 .Xr apm 8 ,
 .Xr apmd 8
 and related programs.
-.It Va WITHOUT_ARM_EABI
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 
19:15:19Z andrew
-Set the ARM ABI to OABI.
 .It Va WITHOUT_ASSERT_DEBUG
 .\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 
2006-09-11 13:55:27Z ru
 Set to compile programs and libraries without the
@@ -525,15 +522,6 @@ Set to not build HTML docs.
 .It Va WITHOUT_HYPERV
 .\" from FreeBSD: head/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 
02:15:31Z delphij
 Set to not build or install HyperV utilities.
-.Pp
-It is a default setting on
-arm/arm, arm/armeb, arm/armv6, arm/armv6hf, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 
and sparc64/sparc64.
-.It Va WITH_HYPERV
-.\" from FreeBSD: head/tools/build/options/WITH_HYPERV 271493 2014-09-13 
02:15:31Z delphij
-Set to build and install HyperV utilities.
-.Pp
-It is a default setting on
-amd64/amd64, i386/i386 and pc98/i386.
 .It Va WITHOUT_ICONV
 .\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 
17:15:56Z antoine
 Set to not build iconv as part of libc.
@@ -1058,8 +1046,8 @@ When set, it also enforces the following
 .Va WITHOUT_GROFF
 .El
 .It Va WITHOUT_TOOLCHAIN
-.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 
16:43:17Z ru
-Set to not install
+.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 273172 2014-10-16 
15:55:13Z brooks
+Set to not install header or
 programs used for program development,
 compilers, debuggers etc.
 .Bf -symbolic
___
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: r273172 - head/tools/build/options

2014-10-16 Thread Brooks Davis
Author: brooks
Date: Thu Oct 16 15:55:13 2014
New Revision: 273172
URL: https://svnweb.freebsd.org/changeset/base/273172

Log:
  Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not
  just programs.

Modified:
  head/tools/build/options/WITHOUT_TOOLCHAIN

Modified: head/tools/build/options/WITHOUT_TOOLCHAIN
==
--- head/tools/build/options/WITHOUT_TOOLCHAIN  Thu Oct 16 15:54:23 2014
(r273171)
+++ head/tools/build/options/WITHOUT_TOOLCHAIN  Thu Oct 16 15:55:13 2014
(r273172)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-Set to not install
+Set to not install header or
 programs used for program development,
 compilers, debuggers etc.
 .Bf -symbolic
___
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: r273171 - head/tools/build/options

2014-10-16 Thread Brooks Davis
Author: brooks
Date: Thu Oct 16 15:54:23 2014
New Revision: 273171
URL: https://svnweb.freebsd.org/changeset/base/273171

Log:
  Per r273155, HYPERV is built by default on platforms where it makes
  sense and ignored on others.

Deleted:
  head/tools/build/options/WITH_HYPERV
___
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: r273170 - head/tools/build/options

2014-10-16 Thread Brooks Davis
Author: brooks
Date: Thu Oct 16 15:52:36 2014
New Revision: 273170
URL: https://svnweb.freebsd.org/changeset/base/273170

Log:
  MK_ARB_EABI was removed in r272350 so remove the documentation.

Deleted:
  head/tools/build/options/WITHOUT_ARM_EABI
___
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: r273168 - head/sys/netinet

2014-10-16 Thread Michael Tuexen
Author: tuexen
Date: Thu Oct 16 15:36:04 2014
New Revision: 273168
URL: https://svnweb.freebsd.org/changeset/base/273168

Log:
  Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
  sent incoming stream reset request was responded with failed
  or denied.
  Thanks to Peter Bostroem from Google for reporting the issue.
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctp_header.h
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_input.h

Modified: head/sys/netinet/sctp_header.h
==
--- head/sys/netinet/sctp_header.h  Thu Oct 16 14:08:59 2014
(r273167)
+++ head/sys/netinet/sctp_header.h  Thu Oct 16 15:36:04 2014
(r273168)
@@ -450,6 +450,11 @@ struct sctp_pktdrop_chunk {
 
 /**STREAM RESET STUFF **/
 
+struct sctp_stream_reset_request {
+   struct sctp_paramhdr ph;
+   uint32_t request_seq;
+} SCTP_PACKED;
+
 struct sctp_stream_reset_out_request {
struct sctp_paramhdr ph;
uint32_t request_seq;   /* monotonically increasing seq no */
@@ -464,7 +469,6 @@ struct sctp_stream_reset_in_request {
uint16_t list_of_streams[]; /* if not all list of streams */
 }SCTP_PACKED;
 
-
 struct sctp_stream_reset_tsn_request {
struct sctp_paramhdr ph;
uint32_t request_seq;

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Thu Oct 16 14:08:59 2014
(r273167)
+++ head/sys/netinet/sctp_input.c   Thu Oct 16 15:36:04 2014
(r273168)
@@ -3496,12 +3496,12 @@ sctp_reset_out_streams(struct sctp_tcb *
 }
 
 
-struct sctp_stream_reset_out_request *
+struct sctp_stream_reset_request *
 sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct 
sctp_tmit_chunk **bchk)
 {
struct sctp_association *asoc;
struct sctp_chunkhdr *ch;
-   struct sctp_stream_reset_out_request *r;
+   struct sctp_stream_reset_request *r;
struct sctp_tmit_chunk *chk;
int len, clen;
 
@@ -3524,7 +3524,7 @@ sctp_find_stream_reset(struct sctp_tcb *
}
clen = chk->send_size;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-   r = (struct sctp_stream_reset_out_request *)(ch + 1);
+   r = (struct sctp_stream_reset_request *)(ch + 1);
if (ntohl(r->request_seq) == seq) {
/* found it */
return (r);
@@ -3532,7 +3532,7 @@ sctp_find_stream_reset(struct sctp_tcb *
len = SCTP_SIZE32(ntohs(r->ph.param_length));
if (clen > (len + (int)sizeof(struct sctp_chunkhdr))) {
/* move to the next one, there can only be a max of two */
-   r = (struct sctp_stream_reset_out_request *)((caddr_t)r + len);
+   r = (struct sctp_stream_reset_request *)((caddr_t)r + len);
if (ntohl(r->request_seq) == seq) {
return (r);
}
@@ -3576,7 +3576,9 @@ sctp_handle_stream_reset_response(struct
int lparm_len;
struct sctp_association *asoc = &stcb->asoc;
struct sctp_tmit_chunk *chk;
-   struct sctp_stream_reset_out_request *srparam;
+   struct sctp_stream_reset_request *req_param;
+   struct sctp_stream_reset_out_request *req_out_param;
+   struct sctp_stream_reset_in_request *req_in_param;
uint32_t number_entries;
 
if (asoc->stream_reset_outstanding == 0) {
@@ -3584,35 +3586,36 @@ sctp_handle_stream_reset_response(struct
return (0);
}
if (seq == stcb->asoc.str_reset_seq_out) {
-   srparam = sctp_find_stream_reset(stcb, seq, &chk);
-   if (srparam) {
+   req_param = sctp_find_stream_reset(stcb, seq, &chk);
+   if (req_param != NULL) {
stcb->asoc.str_reset_seq_out++;
-   type = ntohs(srparam->ph.param_type);
-   lparm_len = ntohs(srparam->ph.param_length);
+   type = ntohs(req_param->ph.param_type);
+   lparm_len = ntohs(req_param->ph.param_length);
if (type == SCTP_STR_RESET_OUT_REQUEST) {
+   req_out_param = (struct 
sctp_stream_reset_out_request *)req_param;
number_entries = (lparm_len - sizeof(struct 
sctp_stream_reset_out_request)) / sizeof(uint16_t);
asoc->stream_reset_out_is_outstanding = 0;
if (asoc->stream_reset_outstanding)
asoc->stream_reset_outstanding--;
if (action == 
SCTP_STREAM_RESET_RESULT_PERFORMED) {
/* do it */
-   sctp_reset_out_streams(stcb, 
number_entries, srparam->list_of

svn commit: r273167 - head/libexec

2014-10-16 Thread Warner Losh
Author: imp
Date: Thu Oct 16 14:08:59 2014
New Revision: 273167
URL: https://svnweb.freebsd.org/changeset/base/273167

Log:
  Add an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It
  is not relevant to the hardware it runs on.

Added:
  head/libexec/Makefile.pc98   (contents, props changed)

Added: head/libexec/Makefile.pc98
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/Makefile.pc98  Thu Oct 16 14:08:59 2014(r273167)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+# Because i386 adds extra stuff we don't need or want for PC98 we need
+# an empty file so it doesn't get added.
___
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: r273155 - in head: etc/devd libexec share/mk

2014-10-16 Thread Warner Losh

On Oct 16, 2014, at 5:57 AM, TAKAHASHI Yoshihiro  wrote:

> In article <201410160033.s9g0x6w1063...@svn.freebsd.org>
> Warner Losh  writes:
> 
>> Log:
>>  HYPERV isn't available on all architectures, but just on by default
>>  for i386/amd64. Rather, it only works on i386/amd64 and should only be
>>  built there. Rather than change the default based on which
>>  architecutre, do things more directly by only building it on
>>  i386/amd64 and having it always on. This is how we handle other
>>  options that are relevant only for a few architectures.
>> 
>> Added:
>>  head/libexec/Makefile.amd64   (contents, props changed)
>>  head/libexec/Makefile.i386   (contents, props changed)
> 
> We need a dummy Makefile.pc98 to avoid including Makefile.i386 on pc98.

Ah, right. Thanks. Will fix that. Sorry that I didn’t test that.

Warner



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/

2014-10-16 Thread David Chisnall
On 16 Oct 2014, at 14:41, Mateusz Guzik  wrote:

> Well, atomic_set can be as simple as v->counter = i; (which btw will
> make it look identical to linux version). This should not give any
> measureable effect unless atomic_set on given var is abused quite a lot.

v->counter = i does not establish a happens-before relationship and so there is 
no guarantee that the write will be visible to other threads until something 
else does establish such a relationship.  The compiler and CPU are both free to 
reorder the store at will, and to elide it.

There is a reason that C11 provides atomic_store and atomic_load operations.  
It sounds like Linux wants the relaxed consistency model here, which *is* 
equivalent to v->counter = i on x86, but *will not be the same* on any 
weakly-ordered architecture (e.g. ARM).

Given that we have a stdatomic.h in the base system, which works with all of 
our supported compilers, please consider using the functionality provided by 
the C standard to solve your exact problem.

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"


svn commit: r273166 - head/lib/libkvm

2014-10-16 Thread Andrew Turner
Author: andrew
Date: Thu Oct 16 13:49:54 2014
New Revision: 273166
URL: https://svnweb.freebsd.org/changeset/base/273166

Log:
  Fix the type of pte_pa as when it is passed into _kvm_pa2off it is either
  a uint64_t or a pointer to an off_t. With it being a u_long can result in
  incorrect values being returned.

Modified:
  head/lib/libkvm/kvm_arm.c

Modified: head/lib/libkvm/kvm_arm.c
==
--- head/lib/libkvm/kvm_arm.c   Thu Oct 16 12:41:14 2014(r273165)
+++ head/lib/libkvm/kvm_arm.c   Thu Oct 16 13:49:54 2014(r273166)
@@ -212,7 +212,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t 
struct vmstate *vm = kd->vmst;
pd_entry_t pd;
pt_entry_t pte;
-   u_long pte_pa;
+   off_t pte_pa;
 
if (kd->vmst->minidump)
return (_kvm_minidump_kvatop(kd, va, pa));
@@ -228,7 +228,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t 
return  (_kvm_pa2off(kd, *pa, pa, L1_S_SIZE));
}
pte_pa = (pd & L1_ADDR_MASK) + l2pte_index(va) * sizeof(pte);
-   _kvm_pa2off(kd, pte_pa, (off_t *)&pte_pa, L1_S_SIZE);
+   _kvm_pa2off(kd, pte_pa, &pte_pa, L1_S_SIZE);
if (lseek(kd->pmfd, pte_pa, 0) == -1) {
_kvm_syserr(kd, kd->program, "_kvm_kvatop: lseek");
goto invalid;
___
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: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/

2014-10-16 Thread Mateusz Guzik
On Thu, Oct 16, 2014 at 03:30:20PM +0200, Hans Petter Selasky wrote:
> On 10/16/14 14:39, Mateusz Guzik wrote:
> >On Wed, Oct 15, 2014 at 01:40:30PM +, Hans Petter Selasky wrote:
> >>Author: hselasky
> >>Date: Wed Oct 15 13:40:29 2014
> >>New Revision: 273135
> >>URL: https://svnweb.freebsd.org/changeset/base/273135
> >>
> >>Log:
> >>   Update the OFED Linux compatibility layer and
> >>   Mellanox hardware driver(s):
> >>
> >>   - Properly name an inclusion guard
> >>   - Fix compile warnings regarding unsigned enums
> >>   - Add two new sysctl nodes
> >>   - Remove all empty linux header files
> >>   - Make an error printout more verbose
> >>   - Use "mod_delayed_work()" instead of
> >> cancelling and starting a timeout.
> >>   - Implement more Linux scatterlist
> >> functions.
> >>
> >
> >Do you have ofed benchmarks by any chance?
> >
> >In linux they use atomic_read which just reads the var and so on, while
> >our compat layer issues full memory barrier in such case (i.e. does it
> >in an expensive way providing guarantees not needed by the code).
> >
> >I would suggest investigating re-implementation of the layer with
> >relaxed functions and checking if it improves stuff.
> >
> >Just my $0,03.
> >
> 
> Hi Mateusz,
> 
> We have not specifically investigated all parts of the OFED layer,
> and your comments are valid. There is indeed room for improvement. Do
> you have a patch suggestion?
> 

Well, atomic_set can be as simple as v->counter = i; (which btw will
make it look identical to linux version). This should not give any
measureable effect unless atomic_set on given var is abused quite a lot.

On the other hand atomic_read, assuming the var is "popular", can give
something.

To quote my other mail:
Reading http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf
(pdf page 77) reveals:
A cast of a value to a qualified type has no effect; the qualification
(volatile, say) can have no effect on the access since it has occurred
prior to the cast. If it is necessary to access a non-volatile object
using volatile semantics, the technique is to cast the address of the
object to the appropriate pointer-to-qualified type, then dereference
that pointer.

So how about we just follow the recomandation and also get the type
automagically like linux folks do (added to sys/param.h):
#define READ_ONCE(var)  (*(volatile __typeof(var) *)&(var))



However, READ_ONCE macro got some comments and I didn't get around to address
that yet. Still, this is something you can use for testing.

So that would be return (READ_ONCE(var)) or so.

-- 
Mateusz Guzik 
___
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: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/

2014-10-16 Thread Hans Petter Selasky

On 10/16/14 14:39, Mateusz Guzik wrote:

On Wed, Oct 15, 2014 at 01:40:30PM +, Hans Petter Selasky wrote:

Author: hselasky
Date: Wed Oct 15 13:40:29 2014
New Revision: 273135
URL: https://svnweb.freebsd.org/changeset/base/273135

Log:
   Update the OFED Linux compatibility layer and
   Mellanox hardware driver(s):

   - Properly name an inclusion guard
   - Fix compile warnings regarding unsigned enums
   - Add two new sysctl nodes
   - Remove all empty linux header files
   - Make an error printout more verbose
   - Use "mod_delayed_work()" instead of
 cancelling and starting a timeout.
   - Implement more Linux scatterlist
 functions.



Do you have ofed benchmarks by any chance?

In linux they use atomic_read which just reads the var and so on, while
our compat layer issues full memory barrier in such case (i.e. does it
in an expensive way providing guarantees not needed by the code).

I would suggest investigating re-implementation of the layer with
relaxed functions and checking if it improves stuff.

Just my $0,03.



Hi Mateusz,

We have not specifically investigated all parts of the OFED layer, and 
your comments are valid. There is indeed room for improvement. Do you 
have a patch suggestion?


--HPS

___
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: r273155 - in head: etc/devd libexec share/mk

2014-10-16 Thread TAKAHASHI Yoshihiro
In article <201410160033.s9g0x6w1063...@svn.freebsd.org>
Warner Losh  writes:

> Log:
>   HYPERV isn't available on all architectures, but just on by default
>   for i386/amd64. Rather, it only works on i386/amd64 and should only be
>   built there. Rather than change the default based on which
>   architecutre, do things more directly by only building it on
>   i386/amd64 and having it always on. This is how we handle other
>   options that are relevant only for a few architectures.
> 
> Added:
>   head/libexec/Makefile.amd64   (contents, props changed)
>   head/libexec/Makefile.i386   (contents, props changed)

We need a dummy Makefile.pc98 to avoid including Makefile.i386 on pc98.

---
TAKAHASHI Yoshihiro 
___
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: r273165 - head/sys/ufs/ufs

2014-10-16 Thread Mateusz Guzik
Author: mjg
Date: Thu Oct 16 12:41:14 2014
New Revision: 273165
URL: https://svnweb.freebsd.org/changeset/base/273165

Log:
  Use lockless quota checks in qsync and qsyncvp.
  
  No strong objections from: kib, mckusick
  MFC after:1 week

Modified:
  head/sys/ufs/ufs/ufs_quota.c

Modified: head/sys/ufs/ufs/ufs_quota.c
==
--- head/sys/ufs/ufs/ufs_quota.cThu Oct 16 09:09:43 2014
(r273164)
+++ head/sys/ufs/ufs/ufs_quota.cThu Oct 16 12:41:14 2014
(r273165)
@@ -1035,11 +1035,9 @@ qsync(struct mount *mp)
 * Check if the mount point has any quotas.
 * If not, simply return.
 */
-   UFS_LOCK(ump);
for (i = 0; i < MAXQUOTAS; i++)
if (ump->um_quotas[i] != NULLVP)
break;
-   UFS_UNLOCK(ump);
if (i == MAXQUOTAS)
return (0);
/*
@@ -1084,11 +1082,9 @@ qsyncvp(struct vnode *vp)
 * Check if the mount point has any quotas.
 * If not, simply return.
 */
-   UFS_LOCK(ump);
for (i = 0; i < MAXQUOTAS; i++)
if (ump->um_quotas[i] != NULLVP)
break;
-   UFS_UNLOCK(ump);
if (i == MAXQUOTAS)
return (0);
/*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/

2014-10-16 Thread Mateusz Guzik
On Wed, Oct 15, 2014 at 01:40:30PM +, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Wed Oct 15 13:40:29 2014
> New Revision: 273135
> URL: https://svnweb.freebsd.org/changeset/base/273135
> 
> Log:
>   Update the OFED Linux compatibility layer and
>   Mellanox hardware driver(s):
>   
>   - Properly name an inclusion guard
>   - Fix compile warnings regarding unsigned enums
>   - Add two new sysctl nodes
>   - Remove all empty linux header files
>   - Make an error printout more verbose
>   - Use "mod_delayed_work()" instead of
> cancelling and starting a timeout.
>   - Implement more Linux scatterlist
> functions.
>   

Do you have ofed benchmarks by any chance?

In linux they use atomic_read which just reads the var and so on, while
our compat layer issues full memory barrier in such case (i.e. does it
in an expensive way providing guarantees not needed by the code).

I would suggest investigating re-implementation of the layer with
relaxed functions and checking if it improves stuff.

Just my $0,03.

>   MFC after:  3 days
>   Sponsored by:   Mellanox Technologies
> 
> Deleted:
>   head/sys/ofed/drivers/net/mlx4/en_frag.c
>   head/sys/ofed/drivers/net/mlx4/en_params.c
>   head/sys/ofed/drivers/net/mlx4/xrcd.c
>   head/sys/ofed/include/asm/page.h
>   head/sys/ofed/include/linux/ethtool.h
>   head/sys/ofed/include/linux/inet.h
>   head/sys/ofed/include/linux/mount.h
> Modified:
>   head/sys/contrib/rdma/krping/krping.c
>   head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
>   head/sys/ofed/drivers/infiniband/core/addr.c
>   head/sys/ofed/drivers/infiniband/core/agent.c
>   head/sys/ofed/drivers/infiniband/core/ucm.c
>   head/sys/ofed/drivers/infiniband/core/uverbs_main.c
>   head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c
>   head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h
>   head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c
>   head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c
>   head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
>   head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
>   head/sys/ofed/drivers/net/mlx4/Makefile
>   head/sys/ofed/drivers/net/mlx4/en_ethtool.c
>   head/sys/ofed/drivers/net/mlx4/en_netdev.c
>   head/sys/ofed/drivers/net/mlx4/en_selftest.c
>   head/sys/ofed/drivers/net/mlx4/en_tx.c
>   head/sys/ofed/drivers/net/mlx4/pd.c
>   head/sys/ofed/include/linux/completion.h
>   head/sys/ofed/include/linux/etherdevice.h
>   head/sys/ofed/include/linux/linux_compat.c
>   head/sys/ofed/include/linux/mlx4/device.h
>   head/sys/ofed/include/linux/mlx4/driver.h
>   head/sys/ofed/include/linux/netdevice.h
>   head/sys/ofed/include/linux/scatterlist.h
>   head/sys/ofed/include/linux/vmalloc.h
>   head/sys/ofed/include/rdma/ib_addr.h
>   head/sys/ofed/include/rdma/ib_smi.h
>   head/sys/ofed/include/rdma/ib_user_cm.h
> 
> Modified: head/sys/contrib/rdma/krping/krping.c
> ==
> --- head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:39:00 2014
> (r273134)
> +++ head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:40:29 2014
> (r273135)
> @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> 
> Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
> ==
> --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.hWed Oct 15 13:39:00 2014
> (r273134)
> +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.hWed Oct 15 13:40:29 2014
> (r273135)
> @@ -41,7 +41,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> 
> Modified: head/sys/ofed/drivers/infiniband/core/addr.c
> ==
> --- head/sys/ofed/drivers/infiniband/core/addr.c  Wed Oct 15 13:39:00 
> 2014(r273134)
> +++ head/sys/ofed/drivers/infiniband/core/addr.c  Wed Oct 15 13:40:29 
> 2014(r273135)
> @@ -35,10 +35,15 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  
>  MODULE_AUTHOR("Sean Hefty");
>  MODULE_DESCRIPTION("IB Address Translation");
> @@ -189,13 +194,11 @@ static void set_timeout(unsigned long ti
>  {
>   unsigned long delay;
>  
> - cancel_delayed_work(&work);
> -
>   delay = time - jiffies;
>   if ((long)delay <= 0)
>   delay = 1;
>  
> - queue_delayed_work(addr_wq, &work, delay);
> + mod_delayed_work(addr_wq, &work, delay);
>  }
>  
>  static void queue_req(struct addr_req *req)
> @@ -620,7 +623,7 @@ static struct notifier_block nb = {
>   .notifier_call = netevent_callback
>  };
>  
> -static int addr_init(void)
> +static int __init addr_init(void)
>  {
>   INIT_DELAYED_WORK(&work, process_req);
>   addr_wq = create_singlethread_workqueue("ib_addr");
> @@ -631,7 

svn commit: r273164 - head/sys/dev/iscsi

2014-10-16 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Oct 16 09:09:43 2014
New Revision: 273164
URL: https://svnweb.freebsd.org/changeset/base/273164

Log:
  When removing an iSCSI session, check whether all conditions match,
  not if any of them matches.  This fixes "iscsictl -Rn" removing
  unrelated sessions.
  
  PR:   194034
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==
--- head/sys/dev/iscsi/iscsi.c  Thu Oct 16 08:42:17 2014(r273163)
+++ head/sys/dev/iscsi/iscsi.c  Thu Oct 16 09:09:43 2014(r273164)
@@ -1752,18 +1752,16 @@ static bool
 iscsi_session_conf_matches(unsigned int id1, const struct iscsi_session_conf 
*c1,
 unsigned int id2, const struct iscsi_session_conf *c2)
 {
-   if (id2 == 0 && c2->isc_target[0] == '\0' &&
-   c2->isc_target_addr[0] == '\0')
-   return (true);
-   if (id2 != 0 && id2 == id1)
-   return (true);
+
+   if (id2 != 0 && id2 != id1)
+   return (false);
if (c2->isc_target[0] != '\0' &&
-   strcmp(c1->isc_target, c2->isc_target) == 0)
-   return (true);
+   strcmp(c1->isc_target, c2->isc_target) != 0)
+   return (false);
if (c2->isc_target_addr[0] != '\0' &&
-   strcmp(c1->isc_target_addr, c2->isc_target_addr) == 0)
-   return (true);
-   return (false);
+   strcmp(c1->isc_target_addr, c2->isc_target_addr) != 0)
+   return (false);
+   return (true);
 }
 
 static 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: r273163 - head/sys/cam/ctl

2014-10-16 Thread Alexander Motin
Author: mav
Date: Thu Oct 16 08:42:17 2014
New Revision: 273163
URL: https://svnweb.freebsd.org/changeset/base/273163

Log:
  Implement more functional CTL debug logging.
  
  Setting bits in kern.cam.ctl.debug allows to log errors, commands and some
  commands data respectively.
  
  MFC after:1 week

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_debug.h
  head/sys/cam/ctl/ctl_private.h
  head/sys/cam/ctl/ctl_scsi_all.c
  head/sys/cam/ctl/ctl_util.c
  head/sys/cam/ctl/ctl_util.h

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Thu Oct 16 08:39:44 2014(r273162)
+++ head/sys/cam/ctl/ctl.c  Thu Oct 16 08:42:17 2014(r273163)
@@ -326,9 +326,9 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CT
 static int worker_threads = -1;
 SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN,
 &worker_threads, 1, "Number of worker threads");
-static int verbose = 0;
-SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN,
-&verbose, 0, "Show SCSI errors returned to initiator");
+static int ctl_debug = CTL_DEBUG_NONE;
+SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debug, CTLFLAG_RWTUN,
+&ctl_debug, 0, "Enabled debug flags");
 
 /*
  * Supported pages (0x00), Serial number (0x80), Device ID (0x83),
@@ -5066,6 +5066,8 @@ ctl_config_move_done(union ctl_io *io)
 *
 * - Call some other function once the data is in?
 */
+   if (ctl_debug & CTL_DEBUG_CDB_DATA)
+   ctl_data_print(io);
 
/*
 * XXX KDM call ctl_scsiio() again for now, and check flag
@@ -13508,17 +13510,14 @@ ctl_process_done(union ctl_io *io)
case CTL_IO_SCSI:
break;
case CTL_IO_TASK:
-   if (bootverbose || verbose > 0)
+   if (bootverbose || (ctl_debug & CTL_DEBUG_INFO))
ctl_io_error_print(io, NULL);
if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)
ctl_free_io(io);
else
fe_done(io);
return (CTL_RETVAL_COMPLETE);
-   break;
default:
-   printf("ctl_process_done: invalid io type %d\n",
-  io->io_hdr.io_type);
panic("ctl_process_done: invalid io type %d\n",
  io->io_hdr.io_type);
break; /* NOTREACHED */
@@ -13612,74 +13611,28 @@ ctl_process_done(union ctl_io *io)
ctl_set_task_aborted(&io->scsiio);
 
/*
-* We print out status for every task management command.  For SCSI
-* commands, we filter out any unit attention errors; they happen
-* on every boot, and would clutter up the log.  Note:  task
-* management commands aren't printed here, they are printed above,
-* since they should never even make it down here.
+* If enabled, print command error status.
+* We don't print UAs unless debugging was enabled explicitly.
 */
-   switch (io->io_hdr.io_type) {
-   case CTL_IO_SCSI: {
-   int error_code, sense_key, asc, ascq;
-
-   sense_key = 0;
+   do {
+   if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)
+   break;
+   if (!bootverbose && (ctl_debug & CTL_DEBUG_INFO) == 0)
+   break;
+   if ((ctl_debug & CTL_DEBUG_INFO) == 0 &&
+   ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR) &&
+(io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) {
+   int error_code, sense_key, asc, ascq;
 
-   if (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR)
-&& (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) {
-   /*
-* Since this is just for printing, no need to
-* show errors here.
-*/
scsi_extract_sense_len(&io->scsiio.sense_data,
-  io->scsiio.sense_len,
-  &error_code,
-  &sense_key,
-  &asc,
-  &ascq,
-  /*show_errors*/ 0);
+   io->scsiio.sense_len, &error_code, &sense_key,
+   &asc, &ascq, /*show_errors*/ 0);
+   if (sense_key == SSD_KEY_UNIT_ATTENTION)
+   break;
}
 
-   if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
-&& (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SCSI_ERROR)
- || (io->scsiio.scsi_status != SCSI_STATU

svn commit: r273160 - head/usr.sbin/autofs

2014-10-16 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Oct 16 08:33:04 2014
New Revision: 273160
URL: https://svnweb.freebsd.org/changeset/base/273160

Log:
  Fix automountd(8) not to leave zombies.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/autofs/automountd.c

Modified: head/usr.sbin/autofs/automountd.c
==
--- head/usr.sbin/autofs/automountd.c   Thu Oct 16 02:24:19 2014
(r273159)
+++ head/usr.sbin/autofs/automountd.c   Thu Oct 16 08:33:04 2014
(r273160)
@@ -364,6 +364,33 @@ handle_request(const struct autofs_daemo
quick_exit(0);
 }
 
+static void
+sigchld_handler(int dummy __unused)
+{
+
+   /*
+* The only purpose of this handler is to make SIGCHLD
+* interrupt the AUTOFSREQUEST ioctl(2), so we can call
+* wait_for_children().
+*/
+}
+
+static void
+register_sigchld(void)
+{
+   struct sigaction sa;
+   int error;
+
+   bzero(&sa, sizeof(sa));
+   sa.sa_handler = sigchld_handler;
+   sigfillset(&sa.sa_mask);
+   error = sigaction(SIGCHLD, &sa, NULL);
+   if (error != 0)
+   log_err(1, "sigaction");
+
+}
+
+
 static int
 wait_for_children(bool block)
 {
@@ -496,6 +523,8 @@ main_automountd(int argc, char **argv)
 
pidfile_write(pidfh);
 
+   register_sigchld();
+
for (;;) {
log_debugx("waiting for request from the kernel");
 
___
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"