svn commit: r282415 - head/usr.sbin/ntp

2015-05-04 Thread Cy Schubert
Author: cy
Date: Mon May  4 12:42:52 2015
New Revision: 282415
URL: https://svnweb.freebsd.org/changeset/base/282415

Log:
  Restore CPU dependent compile time conditionals.
  
  MFC after:1 month (with r281143 and r282408)

Modified:
  head/usr.sbin/ntp/config.h

Modified: head/usr.sbin/ntp/config.h
==
--- head/usr.sbin/ntp/config.h  Mon May  4 09:33:57 2015(r282414)
+++ head/usr.sbin/ntp/config.h  Mon May  4 12:42:52 2015(r282415)
@@ -1469,13 +1469,21 @@
 /* #undef SCO5_CLOCK */
 
 /* The size of `char*', as computed by sizeof. */
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
 #define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
 
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT 4
 
 /* The size of `long', as computed by sizeof. */
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
 #define SIZEOF_LONG 8
+#else
+#define SIZEOF_LONG 4
+#endif
 
 /* The size of `long long', as computed by sizeof. */
 #define SIZEOF_LONG_LONG 8
@@ -1490,7 +1498,11 @@
 #define SIZEOF_SIGNED_CHAR 1
 
 /* The size of `time_t', as computed by sizeof. */
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
 #define SIZEOF_TIME_T 8
+#else
+#define SIZEOF_TIME_T 4
+#endif
 
 /* Does SIOCGIFCONF return size in the buffer? */
 /* #undef SIZE_RETURNED_IN_BUFFER */
@@ -1516,7 +1528,15 @@
 /* #undef STRERROR_R_CHAR_P */
 
 /* canonical system (cpu-vendor-os) of where we should run */
-#define STR_SYSTEM amd64-portbld-freebsd10.1
+#if defined(__alpha__)
+#define STR_SYSTEM alpha-undermydesk-freebsd
+#elif defined(__sparc64__)
+#define STR_SYSTEM sparc64-undermydesk-freebsd
+#elif defined(__amd64__)
+#define STR_SYSTEM amd64-undermydesk-freebsd
+#else
+#define STR_SYSTEM i386-undermydesk-freebsd
+#endif
 
 /* Does Xettimeofday take 1 arg? */
 /* #undef SYSV_TIMEOFDAY */
___
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: r282415 - head/usr.sbin/ntp

2015-05-04 Thread Ian Lepore
On Mon, 2015-05-04 at 12:42 +, Cy Schubert wrote:
 Author: cy
 Date: Mon May  4 12:42:52 2015
 New Revision: 282415
 URL: https://svnweb.freebsd.org/changeset/base/282415
 
 Log:
   Restore CPU dependent compile time conditionals.
   
   MFC after:  1 month (with r281143 and r282408)
 
 Modified:
   head/usr.sbin/ntp/config.h
 
 Modified: head/usr.sbin/ntp/config.h
 ==
 --- head/usr.sbin/ntp/config.hMon May  4 09:33:57 2015
 (r282414)
 +++ head/usr.sbin/ntp/config.hMon May  4 12:42:52 2015
 (r282415)
 @@ -1469,13 +1469,21 @@
  /* #undef SCO5_CLOCK */
  
  /* The size of `char*', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_CHARP 8
 +#else
 +#define SIZEOF_CHARP 4
 +#endif
  
  /* The size of `int', as computed by sizeof. */
  #define SIZEOF_INT 4
  
  /* The size of `long', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_LONG 8
 +#else
 +#define SIZEOF_LONG 4
 +#endif
  
  /* The size of `long long', as computed by sizeof. */
  #define SIZEOF_LONG_LONG 8
 @@ -1490,7 +1498,11 @@
  #define SIZEOF_SIGNED_CHAR 1
  
  /* The size of `time_t', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_TIME_T 8
 +#else
 +#define SIZEOF_TIME_T 4
 +#endif
  
  /* Does SIOCGIFCONF return size in the buffer? */
  /* #undef SIZE_RETURNED_IN_BUFFER */
 @@ -1516,7 +1528,15 @@
  /* #undef STRERROR_R_CHAR_P */
  
  /* canonical system (cpu-vendor-os) of where we should run */
 -#define STR_SYSTEM amd64-portbld-freebsd10.1
 +#if defined(__alpha__)
 +#define STR_SYSTEM alpha-undermydesk-freebsd
 +#elif defined(__sparc64__)
 +#define STR_SYSTEM sparc64-undermydesk-freebsd
 +#elif defined(__amd64__)
 +#define STR_SYSTEM amd64-undermydesk-freebsd
 +#else
 +#define STR_SYSTEM i386-undermydesk-freebsd
 +#endif
  
  /* Does Xettimeofday take 1 arg? */
  /* #undef SYSV_TIMEOFDAY */
 

I suspect arm64 should appear in the same places as amd64.  arm (all
flavors) should also be in the list of 8-byte time_t.

Should NTP_KEYSDIR be /usr/etc rather than /usr/local/etc for the base
daemon?  (/usr/local shows up in a couple places in config.h)

I think WORDS_BIGENDIAN needs to be defined on the platforms where
that's true.

The list of ifdefs for STR_SYSTEM seems a bit beyond its sell-by date.

-- Ian


___
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: r282415 - head/usr.sbin/ntp

2015-05-04 Thread Konstantin Belousov
On Mon, May 04, 2015 at 12:42:53PM +, Cy Schubert wrote:
 Author: cy
 Date: Mon May  4 12:42:52 2015
 New Revision: 282415
 URL: https://svnweb.freebsd.org/changeset/base/282415
 
 Log:
   Restore CPU dependent compile time conditionals.
   
   MFC after:  1 month (with r281143 and r282408)
 
 Modified:
   head/usr.sbin/ntp/config.h
 
 Modified: head/usr.sbin/ntp/config.h
 ==
 --- head/usr.sbin/ntp/config.hMon May  4 09:33:57 2015
 (r282414)
 +++ head/usr.sbin/ntp/config.hMon May  4 12:42:52 2015
 (r282415)
 @@ -1469,13 +1469,21 @@
  /* #undef SCO5_CLOCK */
  
  /* The size of `char*', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_CHARP 8
 +#else
 +#define SIZEOF_CHARP 4
 +#endif
  
  /* The size of `int', as computed by sizeof. */
  #define SIZEOF_INT 4
  
  /* The size of `long', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_LONG 8
 +#else
 +#define SIZEOF_LONG 4
 +#endif
  
  /* The size of `long long', as computed by sizeof. */
  #define SIZEOF_LONG_LONG 8
 @@ -1490,7 +1498,11 @@
  #define SIZEOF_SIGNED_CHAR 1
  
  /* The size of `time_t', as computed by sizeof. */
 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
  #define SIZEOF_TIME_T 8
 +#else
 +#define SIZEOF_TIME_T 4
 +#endif

We definitely do not support alpha.

What about other 64bit architectures, like mips64 with 64bit ABI,
powerpc64, or arm64 ?

___
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: r282416 - head/lib/libc/sys

2015-05-04 Thread John Baldwin
Author: jhb
Date: Mon May  4 14:23:31 2015
New Revision: 282416
URL: https://svnweb.freebsd.org/changeset/base/282416

Log:
  Partially revert r255486, the first argument to socketpair() is a socket
  domain, not a file descriptor.  Use 'domain' instead of the original 'd'
  for this argument to match socket(2).
  
  PR:   199491
  Reported by:  sp5...@qq.com
  MFC after:1 week

Modified:
  head/lib/libc/sys/socketpair.2

Modified: head/lib/libc/sys/socketpair.2
==
--- head/lib/libc/sys/socketpair.2  Mon May  4 12:42:52 2015
(r282415)
+++ head/lib/libc/sys/socketpair.2  Mon May  4 14:23:31 2015
(r282416)
@@ -28,7 +28,7 @@
 .\ @(#)socketpair.2   8.1 (Berkeley) 6/4/93
 .\ $FreeBSD$
 .\
-.Dd September 11, 2013
+.Dd May 4, 2015
 .Dt SOCKETPAIR 2
 .Os
 .Sh NAME
@@ -40,13 +40,13 @@
 .In sys/types.h
 .In sys/socket.h
 .Ft int
-.Fn socketpair int fd int type int protocol int *sv
+.Fn socketpair int domain int type int protocol int *sv
 .Sh DESCRIPTION
 The
 .Fn socketpair
 system call creates an unnamed pair of connected sockets in
-the specified domain
-.Fa fd ,
+the specified communications
+.Fa domain ,
 of the specified
 .Fa type ,
 and using the optionally specified
___
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: r282417 - head/lib/libc/sys

2015-05-04 Thread John Baldwin
Author: jhb
Date: Mon May  4 14:47:00 2015
New Revision: 282417
URL: https://svnweb.freebsd.org/changeset/base/282417

Log:
  Various updates to the ftruncate(2) documentation:
  - Note that ftruncate(2) can operate on shared memory objects and cross
reference shm_open(2).
  - Note that ftruncate(2) does not change the file position pointer (aka
seek pointer) of the file descriptor.
  - ftruncate(2) will fail with EINVAL for all sorts of other fd types than
just sockets, so instead note that it fails for all but regular files and
shared memory objects.
  - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
(Or at least the manpage for both appeared in 4.2, I did not check the
kernel code itself to see if either predated 4.2.)
  
  PR:   199472 (2)
  Submitted by: and...@ugh.net.au (2)
  MFC after:1 week

Modified:
  head/lib/libc/sys/truncate.2

Modified: head/lib/libc/sys/truncate.2
==
--- head/lib/libc/sys/truncate.2Mon May  4 14:23:31 2015
(r282416)
+++ head/lib/libc/sys/truncate.2Mon May  4 14:47:00 2015
(r282417)
@@ -28,7 +28,7 @@
 .\ @(#)truncate.2 8.1 (Berkeley) 6/4/93
 .\ $FreeBSD$
 .\
-.Dd December 13, 2006
+.Dd May 4, 2015
 .Dt TRUNCATE 2
 .Os
 .Sh NAME
@@ -60,9 +60,18 @@ is lost.
 If the file was smaller than this size,
 it will be extended as if by writing bytes
 with the value zero.
-With
-.Fn ftruncate ,
-the file must be open for writing.
+.Pp
+The
+.Fn ftruncate
+system call causes the file or shared memory object backing the file descriptor
+.Fa fd
+to be truncated or extended to
+.Fa length
+bytes in size.
+The file descriptor must be a valid file descriptor open for writing.
+The file position pointer associated with the file descriptor
+.Fa fd
+will not be modified.
 .Sh RETURN VALUES
 .Rv -std
 If the file to be modified is not a directory or
@@ -129,7 +138,7 @@ is not a valid descriptor.
 The
 .Fa fd
 argument
-references a socket, not a file.
+references a file descriptor that is not a regular file or shared memory 
object.
 .It Bq Er EINVAL
 The
 .Fa fd
@@ -138,11 +147,14 @@ is not open for writing.
 .El
 .Sh SEE ALSO
 .Xr chflags 2 ,
-.Xr open 2
+.Xr open 2 ,
+.Xr shm_open 2
 .Sh HISTORY
 The
 .Fn truncate
-system call appeared in
+and
+.Fn ftruncate
+system calls appeared in
 .Bx 4.2 .
 .Sh BUGS
 These calls should be generalized to allow ranges
___
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: r282418 - head/sys/arm/arm

2015-05-04 Thread Ian Lepore
Author: ian
Date: Mon May  4 14:55:21 2015
New Revision: 282418
URL: https://svnweb.freebsd.org/changeset/base/282418

Log:
  On an icache sync by address/len, round the length up if the operation spans
  a cacheline boundary.
  
  PR:   199740
  Submitted by: Juergen Weiss we...@uni-mainz.de

Modified:
  head/sys/arm/arm/cpufunc_asm_armv7.S

Modified: head/sys/arm/arm/cpufunc_asm_armv7.S
==
--- head/sys/arm/arm/cpufunc_asm_armv7.SMon May  4 14:47:00 2015
(r282417)
+++ head/sys/arm/arm/cpufunc_asm_armv7.SMon May  4 14:55:21 2015
(r282418)
@@ -266,6 +266,9 @@ END(armv7_icache_sync_all)
 ENTRY_NP(armv7_icache_sync_range)
ldr ip, .Larmv7_icache_line_size
ldr ip, [ip]
+   sub r3, ip, #1  /* Address need not be aligned, but */
+   and r2, r0, r3  /* round length up if op spans line */
+   add r1, r1, r2  /* boundary: len += addr  linemask; */
 .Larmv7_sync_next:
mcr CP15_DCCMVAC(r0)
mcr CP15_ICIMVAU(r0)
___
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: r282419 - head/release

2015-05-04 Thread Glen Barber
Author: gjb
Date: Mon May  4 15:04:39 2015
New Revision: 282419
URL: https://svnweb.freebsd.org/changeset/base/282419

Log:
  Add logic to detect if the net/bsdec2-image-upload port needs
  to be installed. [1]
  
  For the cw-ec2-portinstall and ec2ami targets, touch the
  .TARGET file after completion to prevent duplicate invocations.
  
  Add cw-ec2-portinstall and ec2ami to CLEANFILES.
  
  Submitted by: cperciva[1]
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.ec2

Modified: head/release/Makefile.ec2
==
--- head/release/Makefile.ec2   Mon May  4 14:55:21 2015(r282418)
+++ head/release/Makefile.ec2   Mon May  4 15:04:39 2015(r282419)
@@ -12,6 +12,15 @@ AMINAMESUFFIX!=  date +-%Y-%m-%d
 PUBLISH=   --public
 .endif
 
+CLEANFILES+=   ec2ami
+
+.if !exists(/usr/local/bin/bsdec2-image-upload)
+CW_EC2_PORTINSTALL=cw-ec2-portinstall
+CLEANFILES+=   ${CW_EC2_PORTINSTALL}
+.else
+CW_EC2_PORTINSTALL=
+.endif
+
 cw-ec2-portinstall:
 .if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean
@@ -21,8 +30,10 @@ cw-ec2-portinstall:
 . endif
env ASSUME_ALWAYS_YES=yes pkg install -y net/bsdec2-image-upload
 .endif
+   @touch ${.TARGET}
 
-ec2ami: cw-ec2 cw-ec2-portinstall
+ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
+   @false
 .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
@echo --
@echo  AWSKEYFILE must point at AWS keys for EC2 AMI creation
@@ -46,3 +57,4 @@ ec2ami: cw-ec2 cw-ec2-portinstall
${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX} \
${TYPE} ${REVISION}-${BRANCH} \
${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE}
+   @touch ${.TARGET}
___
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: r282280 - in head/sys/dev: e1000 ixgbe ixl

2015-05-04 Thread John Baldwin
On Saturday, May 02, 2015 10:10:00 PM Gleb Smirnoff wrote:
 On Fri, May 01, 2015 at 10:47:43AM -0400, John Baldwin wrote:
 J  J  While you are here, let me remind you about this plan:
 J  J  
 J  J  
 https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html
 J  J  
 J  J  We can prototype the API to userland now, write down a utility that 
 uses
 J  J  it, or add the functionality to an existing utility. And start with 
 Intel
 J  J  drivers, that seem to be most interested in extra stats.
 J  J 
 J  J So the importaing thing here is that if_get_counter() is still doing
 J  J per-ifnet stats.  The stat you underlined above is per-queue instead.
 J  J We well need more explicitly knowledge of queues outside of drivers
 J  J and in the stack itself to support a generic framework for per-queue
 J  J stats.
 J  
 J  This depends on how generic we want the API to be. Of course, we can add
 J  an extra argument to if_get_counter().
 J  
 J  However, if we don't expect the number of queues to exceed a reasonable
 J  number of 255 :), we can fit the functionality into existing API.
 J  We can keep the queue number in the highest 8 bits of the ift_counter
 J  parameter.
 J  
 J  #define  IFCOUNTER_MASK  0x00ff
 J  #define  IFCOUNTER_QUEUE(c)  ((c)  24)
 J 
 J I'd prefer that expose queues more directly and figure out how to handle
 J per-queue stats then (e.g. do we have some sort of driver-independent
 J structure that each ifnet has 1 or more of that maps to a queue and has
 J driver provided methods, etc.  If so you could have a driver method for
 J queue stats).  Note that I did use if_get_counter to report the
 J per-interface stats instead of adding a new sysctl.
 
 What do you prefer: an extra argument to the if_get_counter() or a extra
 ifop?

As I said, I'd prefer we expose queues to the stack more directly complete
with per-queue ops (e.g. I'd like a per-queue if_transmit thing, though
probably more like the old if_start).

-- 
John Baldwin
___
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: r282420 - in head: . etc/mtree lib/libevent lib/libucl share/mk

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 16:28:54 2015
New Revision: 282420
URL: https://svnweb.freebsd.org/changeset/base/282420

Log:
  Rework PRIVATELIB
  
  Now when a lib is marked as PRIVATELIB it is renamed into libprivate$foo 
instead
  of being installed in /usr/lib/private and playing with rpath.
  
  Also allow to install headers for PRIVATELIBS in that case the headers will be
  installed in /usr/include/private/$foo
  
  Keep the headers under a private namespace to prevent third party build system
  to easily find them to ensure they are only used on purpose.
  
  This allows for non base applications to statically link against a library in
  base which is linked to a privatelib
  
  Treating PRIVATELIBS as regular libraries allows to push them into our current
  compatX packages if needed.
  
  While here finish promotion of libevent as PRIVATELIB
  Install header for bsdstat and libucl
  
  Differential Revision:https://reviews.freebsd.org/D2365
  Reviewed by:  brooks, des
  Discussed with:   imp

Modified:
  head/ObsoleteFiles.inc
  head/etc/mtree/BSD.usr.dist
  head/lib/libevent/Makefile
  head/lib/libucl/Makefile
  head/share/mk/atf.test.mk
  head/share/mk/bsd.incs.mk
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.prog.mk
  head/share/mk/src.libnames.mk

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon May  4 15:04:39 2015(r282419)
+++ head/ObsoleteFiles.inc  Mon May  4 16:28:54 2015(r282420)
@@ -38,6 +38,29 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20150504
+OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
+OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
+OLD_LIBS+=usr/lib32/private/libheimipcs.so.11
+OLD_LIBS+=usr/lib32/private/libsqlite3.so.0
+OLD_LIBS+=usr/lib32/private/libunbound.so.5
+OLD_LIBS+=usr/lib32/private/libatf-c.so.1
+OLD_LIBS+=usr/lib32/private/libheimipcc.so.11
+OLD_LIBS+=usr/lib32/private/libldns.so.5
+OLD_LIBS+=usr/lib32/private/libssh.so.5
+OLD_LIBS+=usr/lib32/private/libucl.so.1
+OLD_DIRS+=usr/lib32/private
+OLD_LIBS+=usr/lib/private/libatf-c++.so.2
+OLD_LIBS+=usr/lib/private/libbsdstat.so.1
+OLD_LIBS+=usr/lib/private/libheimipcs.so.11
+OLD_LIBS+=usr/lib/private/libsqlite3.so.0
+OLD_LIBS+=usr/lib/private/libunbound.so.5
+OLD_LIBS+=usr/lib/private/libatf-c.so.1
+OLD_LIBS+=usr/lib/private/libheimipcc.so.11
+OLD_LIBS+=usr/lib/private/libldns.so.5
+OLD_LIBS+=usr/lib/private/libssh.so.5
+OLD_LIBS+=usr/lib/private/libucl.so.1
+OLD_DIRS+=usr/lib/private
 # 20150501
 OLD_FILES+=usr/bin/soeliminate
 OLD_FILES+=usr/share/man/man1/soeliminate.1.gz

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Mon May  4 15:04:39 2015(r282419)
+++ head/etc/mtree/BSD.usr.dist Mon May  4 16:28:54 2015(r282420)
@@ -8,6 +8,12 @@
 bin
 ..
 include
+private
+bsdstat
+..
+ucl
+..
+..
 ..
 lib
 aout
@@ -32,16 +38,12 @@
 ..
 i18n
 ..
-private
-..
 ..
 lib32
 dtrace
 ..
 i18n
 ..
-private
-..
 ..
 libdata
 gcc

Modified: head/lib/libevent/Makefile
==
--- head/lib/libevent/Makefile  Mon May  4 15:04:39 2015(r282419)
+++ head/lib/libevent/Makefile  Mon May  4 16:28:54 2015(r282420)
@@ -7,7 +7,6 @@
 LIB=   event
 SHLIB_MAJOR=   1
 PRIVATELIB=
-INTERNALLIB=
 
 SRCS=  buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c
 HDRS=  event.h

Modified: head/lib/libucl/Makefile
==
--- head/lib/libucl/MakefileMon May  4 15:04:39 2015(r282419)
+++ head/lib/libucl/MakefileMon May  4 16:28:54 2015(r282420)
@@ -14,8 +14,10 @@ SRCS=ucl_emitter_streamline.c \
ucl_util.c \
xxhash.c
 
-.PATH: ${LIBUCL}/src
+.PATH: ${LIBUCL}/src \
+   ${LIBUCL}/include
 
+INCS=  ucl.h
 LIBADD=m
 
 WARNS= 1

Modified: head/share/mk/atf.test.mk
==
--- head/share/mk/atf.test.mk   Mon May  4 15:04:39 2015(r282419)
+++ head/share/mk/atf.test.mk   Mon May  4 16:28:54 2015(r282420)
@@ -72,11 +72,10 @@ MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.c
 DPADD.${_T}+= ${LIBATF_C}
 .if empty(LDFLAGS:M-static)  empty(LDFLAGS.${_T}:M-static)
-LDADD.${_T}+= ${LDATF_C}
+LDADD.${_T}+= ${LDADD_atf_c}
 .else
 LDADD.${_T}+= ${LIBATF_C}
 .endif
-USEPRIVATELIB+= atf-c
 TEST_INTERFACE.${_T}= atf
 .endfor
 .endif
@@ -90,11 +89,10 @@ MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc}
 DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C

svn commit: r282421 - in head: . etc

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 16:34:08 2015
New Revision: 282421
URL: https://svnweb.freebsd.org/changeset/base/282421

Log:
  Remove now unneeded libmap32.conf

Deleted:
  head/etc/libmap32.conf
Modified:
  head/ObsoleteFiles.inc
  head/etc/Makefile

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon May  4 16:28:54 2015(r282420)
+++ head/ObsoleteFiles.inc  Mon May  4 16:34:08 2015(r282421)
@@ -39,6 +39,7 @@
 # done
 
 # 20150504
+OLD_FILES+=etc/libmap32.conf
 OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
 OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
 OLD_LIBS+=usr/lib32/private/libheimipcs.so.11

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Mon May  4 16:28:54 2015(r282420)
+++ head/etc/Makefile   Mon May  4 16:34:08 2015(r282421)
@@ -54,10 +54,6 @@ BIN1=crontab \
syslog.conf \
termcap.small
 
-.if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == powerpc64
-BIN1+= libmap32.conf
-.endif
-
 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
 BIN1+= etc.${MACHINE}/ttys
 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
___
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: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate

2015-05-04 Thread Bryan Drewery
On 5/1/2015 3:08 PM, Baptiste Daroussin wrote:
 Author: bapt
 Date: Fri May  1 20:08:25 2015
 New Revision: 282318
 URL: https://svnweb.freebsd.org/changeset/base/282318
 
 Log:
   Replace groff's soelim by soeliminate(1) renamed soelim(1)
 
 Added:
   head/usr.bin/soelim/
  - copied from r281993, head/usr.bin/soeliminate/
   head/usr.bin/soelim/soelim.1
  - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.1
   head/usr.bin/soelim/soelim.c
  - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.c
 Deleted:
   head/usr.bin/soelim/soeliminate.1
   head/usr.bin/soelim/soeliminate.c
   head/usr.bin/soeliminate/
 Modified:
   head/Makefile.inc1
   head/ObsoleteFiles.inc
   head/gnu/usr.bin/groff/src/preproc/Makefile
   head/tools/build/mk/OptionalObsoleteFiles.inc
   head/usr.bin/Makefile
   head/usr.bin/soelim/Makefile
 

Can you point me to some ports that failed due to this? It is relevant
for my arch@ idea about checksumming jails for rebuild. I had not
planned to add soelim(1) and related tools but may need to now.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate

2015-05-04 Thread Baptiste Daroussin
On Mon, May 04, 2015 at 11:39:10AM -0500, Bryan Drewery wrote:
 On 5/1/2015 3:08 PM, Baptiste Daroussin wrote:
  Author: bapt
  Date: Fri May  1 20:08:25 2015
  New Revision: 282318
  URL: https://svnweb.freebsd.org/changeset/base/282318
  
  Log:
Replace groff's soelim by soeliminate(1) renamed soelim(1)
  
  Added:
head/usr.bin/soelim/
   - copied from r281993, head/usr.bin/soeliminate/
head/usr.bin/soelim/soelim.1
   - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.1
head/usr.bin/soelim/soelim.c
   - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.c
  Deleted:
head/usr.bin/soelim/soeliminate.1
head/usr.bin/soelim/soeliminate.c
head/usr.bin/soeliminate/
  Modified:
head/Makefile.inc1
head/ObsoleteFiles.inc
head/gnu/usr.bin/groff/src/preproc/Makefile
head/tools/build/mk/OptionalObsoleteFiles.inc
head/usr.bin/Makefile
head/usr.bin/soelim/Makefile
  
 
 Can you point me to some ports that failed due to this? It is relevant
 for my arch@ idea about checksumming jails for rebuild. I had not
 planned to add soelim(1) and related tools but may need to now.
 
 
 -- 
 Regards,
 Bryan Drewery
 


Only openldap to my knowledge

Bapt


pgpITObApLQG8.pgp
Description: PGP signature


Re: svn commit: r282420 - in head: . etc/mtree lib/libevent lib/libucl share/mk

2015-05-04 Thread Bryan Drewery
On 5/4/2015 11:28 AM, Baptiste Daroussin wrote:
 +LIBATF_C=$(DESTDIR)$(LIBDIR)/libprivateatf-c.a
 +LIBATF_CXX=  $(DESTDIR)$(LIBDIR)/libprivateatf-c++.a
 +LDADD_atf_c= -lprivateatf-c
 +LDADD_atf_cxx=   -lprivateatf-c++
 +
 +.for _l in ${_PRIVATELIBS}
 +LIB${_l:tu}?=${DESTDIR}${LIBDIR}/libprivate${_l}.a

Style-wise I see bugs here. Let's stick to () or {}.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r282421 - in head: . etc

2015-05-04 Thread Bryan Drewery
On 5/4/2015 11:34 AM, Baptiste Daroussin wrote:
 Author: bapt
 Date: Mon May  4 16:34:08 2015
 New Revision: 282421
 URL: https://svnweb.freebsd.org/changeset/base/282421
 
 Log:
   Remove now unneeded libmap32.conf

This doesn't explain why; the commit message is useless. Because
r282420 ...

 
 Deleted:
   head/etc/libmap32.conf
 Modified:
   head/ObsoleteFiles.inc
   head/etc/Makefile
 
 Modified: head/ObsoleteFiles.inc
 ==
 --- head/ObsoleteFiles.incMon May  4 16:28:54 2015(r282420)
 +++ head/ObsoleteFiles.incMon May  4 16:34:08 2015(r282421)
 @@ -39,6 +39,7 @@
  # done
  
  # 20150504
 +OLD_FILES+=etc/libmap32.conf

This seems dangerous. I think only files no longer useful in any context
should be added here. A user may have their own libmap32.conf that this
would remove. Mergemaster/etcupdate might handle this case fine without
delete-old.

There are several other bugs with libmap32.conf:

 There's no manpage.
 There's no default /usr/local/etc/libmap32.d dir or entry.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r282422 - head/share/mk

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 16:59:09 2015
New Revision: 282422
URL: https://svnweb.freebsd.org/changeset/base/282422

Log:
  Style fix
  
  Reported by:  bdrewery

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Mon May  4 16:34:08 2015
(r282421)
+++ head/share/mk/src.libnames.mk   Mon May  4 16:59:09 2015
(r282422)
@@ -233,8 +233,8 @@ _DP_vmmapi= util
 
 # Define spacial cases
 LDADD_supcplusplus=-lsupc++
-LIBATF_C=  $(DESTDIR)$(LIBDIR)/libprivateatf-c.a
-LIBATF_CXX=$(DESTDIR)$(LIBDIR)/libprivateatf-c++.a
+LIBATF_C=  ${DESTDIR}${LIBDIR}/libprivateatf-c.a
+LIBATF_CXX=${DESTDIR}${LIBDIR}/libprivateatf-c++.a
 LDADD_atf_c=   -lprivateatf-c
 LDADD_atf_cxx= -lprivateatf-c++
 
___
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: r282423 - head

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 17:01:51 2015
New Revision: 282423
URL: https://svnweb.freebsd.org/changeset/base/282423

Log:
  Do not remove libmap32.conf in make delete-old as it may remove user modified
  version by mistake

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon May  4 16:59:09 2015(r282422)
+++ head/ObsoleteFiles.inc  Mon May  4 17:01:51 2015(r282423)
@@ -39,7 +39,6 @@
 # done
 
 # 20150504
-OLD_FILES+=etc/libmap32.conf
 OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
 OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
 OLD_LIBS+=usr/lib32/private/libheimipcs.so.11
___
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: r282423 - head

2015-05-04 Thread John Baldwin
On Monday, May 04, 2015 05:01:51 PM Baptiste Daroussin wrote:
 Author: bapt
 Date: Mon May  4 17:01:51 2015
 New Revision: 282423
 URL: https://svnweb.freebsd.org/changeset/base/282423
 
 Log:
   Do not remove libmap32.conf in make delete-old as it may remove user 
 modified
   version by mistake

I think etcupdate at least will DTRT and remove it IFF it matches the originally
installed version (if it has been modified it will emit a warning but leave the
file in place).

-- 
John Baldwin
___
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: r282423 - head

2015-05-04 Thread Bryan Drewery
On 5/4/2015 12:01 PM, Baptiste Daroussin wrote:
 Author: bapt
 Date: Mon May  4 17:01:51 2015
 New Revision: 282423
 URL: https://svnweb.freebsd.org/changeset/base/282423
 
 Log:
   Do not remove libmap32.conf in make delete-old as it may remove user 
 modified
   version by mistake
 
 Modified:
   head/ObsoleteFiles.inc
 
 Modified: head/ObsoleteFiles.inc
 ==
 --- head/ObsoleteFiles.incMon May  4 16:59:09 2015(r282422)
 +++ head/ObsoleteFiles.incMon May  4 17:01:51 2015(r282423)
 @@ -39,7 +39,6 @@
  # done
  
  # 20150504
 -OLD_FILES+=etc/libmap32.conf
  OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
  OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
  OLD_LIBS+=usr/lib32/private/libheimipcs.so.11
 

Thanks. If only we had @sample type behavior here ;)

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r282424 - in head/sys: dev/usb/serial kern sys

2015-05-04 Thread Ian Lepore
Author: ian
Date: Mon May  4 17:59:39 2015
New Revision: 282424
URL: https://svnweb.freebsd.org/changeset/base/282424

Log:
  Implement a mechanism for making changes in the kernel-driver PPS
  interface without breaking ABI or API compatibility with existing drivers.
  
  The existing data structures used to communicate between the kernel and
  driver portions of PPS processing contain no spare/padding fields and no
  flags field or other straightforward mechanism for communicating changes
  in the structures or behaviors of the code.  This makes it difficult to
  MFC new features added to the PPS facility.  ABI compatibility is
  important; out-of-tree drivers in module form are known to exist.  (Note
  that the existing api_version field in the pps_params structure must
  contain the value mandated by RFC 2783 and any RFCs that come along after.)
  
  These changes introduce a pair of abi-version fields which are filled in
  by the driver and the kernel respectively to indicate the interface
  version.  The driver sets its version field before calling the new
  pps_init_abi() function.  That lets the kernel know how much of the
  pps_state structure is understood by the driver and it can avoid using
  newer fields at the end of the structure that it knows about if the driver
  is a lower version.  The kernel fills in its version field during the init
  call, letting the driver know what features and data the kernel supports.
  
  To implement the new version information in a way that is backwards
  compatible with code from before these changes, the high bit of the
  lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
  driver is aware of the abi versioning scheme.  Basically if this bit is
  clear that indicates a version 0 driver and if it is set the driver_abi
  field indicates the version.
  
  These changes also move the recently-added 'mtx' field of pps_state from
  the middle to the end of the structure, and make the kernel code that uses
  this field conditional on the driver being abi version 1 or higher.  It
  changes the only driver currently supplying the mtx field, usb_serial, to
  use pps_init_abi().
  
  Reviewed by:  hselasky@

Modified:
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/kern/kern_tc.c
  head/sys/sys/timepps.h

Modified: head/sys/dev/usb/serial/usb_serial.c
==
--- head/sys/dev/usb/serial/usb_serial.cMon May  4 17:01:51 2015
(r282423)
+++ head/sys/dev/usb/serial/usb_serial.cMon May  4 17:59:39 2015
(r282424)
@@ -415,8 +415,9 @@ ucom_attach_tty(struct ucom_super_softc 
sc-sc_tty = tp;
 
sc-sc_pps.ppscap = PPS_CAPTUREBOTH;
-   sc-sc_pps.mtx = sc-sc_mtx;
-   pps_init(sc-sc_pps);
+   sc-sc_pps.driver_abi = PPS_ABI_VERSION;
+   sc-sc_pps.driver_mtx = sc-sc_mtx;
+   pps_init_abi(sc-sc_pps);
 
DPRINTF(ttycreate: %s\n, buf);
 

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Mon May  4 17:01:51 2015(r282423)
+++ head/sys/kern/kern_tc.c Mon May  4 17:59:39 2015(r282424)
@@ -1468,6 +1468,17 @@ SYSCTL_PROC(_kern_timecounter, OID_AUTO,
  * RFC 2783 PPS-API implementation.
  */
 
+/*
+ *  Return true if the driver is aware of the abi version extensions in the
+ *  pps_state structure, and it supports at least the given abi version number.
+ */
+static inline int
+abi_aware(struct pps_state *pps, int vers)
+{
+
+   return ((pps-kcmode  KCMODE_ABIFLAG)  pps-driver_abi = vers);
+}
+
 static int
 pps_fetch(struct pps_fetch_args *fapi, struct pps_state *pps)
 {
@@ -1497,10 +1508,17 @@ pps_fetch(struct pps_fetch_args *fapi, s
cseq = pps-ppsinfo.clear_sequence;
while (aseq == pps-ppsinfo.assert_sequence 
cseq == pps-ppsinfo.clear_sequence) {
-   if (pps-mtx != NULL)
-   err = msleep(pps, pps-mtx, PCATCH, ppsfch, 
timo);
-   else
+   if (abi_aware(pps, 1)  pps-driver_mtx != NULL) {
+   if (pps-flags  PPSFLAG_MTX_SPIN) {
+   err = msleep_spin(pps, pps-driver_mtx,
+   ppsfch, timo);
+   } else {
+   err = msleep(pps, pps-driver_mtx, 
PCATCH,
+   ppsfch, timo);
+   }
+   } else {
err = tsleep(pps, PCATCH, ppsfch, timo);
+   }
if (err == EWOULDBLOCK  fapi-timeout.tv_sec == -1) {
continue;
} else if (err != 0) {
@@ -1590,7 +1608,8 @@ pps_ioctl(u_long cmd, caddr_t data, stru

svn commit: r282425 - in head/usr.bin/soelim: . tests

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 18:20:31 2015
New Revision: 282425
URL: https://svnweb.freebsd.org/changeset/base/282425

Log:
  Parse filename until first space then print the rest of the line after file
  inclusion
  
  This is the same behaviour of heirloom's soelim

Added:
  head/usr.bin/soelim/tests/basic-with-space.in   (contents, props changed)
  head/usr.bin/soelim/tests/basic-with-space.out   (contents, props changed)
Modified:
  head/usr.bin/soelim/soelim.c
  head/usr.bin/soelim/tests/Makefile
  head/usr.bin/soelim/tests/soelim.sh

Modified: head/usr.bin/soelim/soelim.c
==
--- head/usr.bin/soelim/soelim.cMon May  4 17:59:39 2015
(r282424)
+++ head/usr.bin/soelim/soelim.cMon May  4 18:20:31 2015
(r282425)
@@ -108,11 +108,12 @@ soelim_file(FILE *f, int flag)
while (isspace(*walk))
walk++;
 
-   cp = walk + strlen(walk) - 1;
-   while (cp  walk  isspace(*cp)) {
-   *cp = 0;
-   cp--;
-   }
+   cp = walk;
+   while (*cp != '\0'  !isspace(*cp))
+   cp++;
+   *cp = 0;
+   if (cp  line + linelen)
+   cp++;
 
if (*walk == '\0') {
printf(%s, line);
@@ -122,6 +123,8 @@ soelim_file(FILE *f, int flag)
free(line);
return (1);
}
+   if (*cp != '\0')
+   printf(%s, cp);
}
 
free(line);

Modified: head/usr.bin/soelim/tests/Makefile
==
--- head/usr.bin/soelim/tests/Makefile  Mon May  4 17:59:39 2015
(r282424)
+++ head/usr.bin/soelim/tests/Makefile  Mon May  4 18:20:31 2015
(r282425)
@@ -7,7 +7,9 @@ ATF_TESTS_SH=   soelim
 FILES= nonexisting.in \
basic.in \
basic \
-   basic.out
+   basic.out \
+   basic-with-space.in \
+   basic-with-space.out
 FILESDIR=  ${TESTSDIR}
 
 .include bsd.test.mk

Added: head/usr.bin/soelim/tests/basic-with-space.in
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/soelim/tests/basic-with-space.in   Mon May  4 18:20:31 
2015(r282425)
@@ -0,0 +1,3 @@
+This is a test
+.so basic something
+end

Added: head/usr.bin/soelim/tests/basic-with-space.out
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/soelim/tests/basic-with-space.out  Mon May  4 18:20:31 
2015(r282425)
@@ -0,0 +1,4 @@
+This is a test
+basic has been included
+something
+end

Modified: head/usr.bin/soelim/tests/soelim.sh
==
--- head/usr.bin/soelim/tests/soelim.sh Mon May  4 17:59:39 2015
(r282424)
+++ head/usr.bin/soelim/tests/soelim.sh Mon May  4 18:20:31 2015
(r282425)
@@ -87,6 +87,13 @@ files_body()
-e empty \
-s exit:0 \
soelim -I$(atf_get_srcdir) $(atf_get_srcdir)/basic.in
+
+   atf_check \
+   -o file:$(atf_get_srcdir)/basic-with-space.out \
+   -e empty \
+   -s exit:0 \
+   soelim -I$(atf_get_srcdir) $(atf_get_srcdir)/basic-with-space.in
+
 }
 
 atf_init_test_cases()
___
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: r282426 - head/sys/vm

2015-05-04 Thread Gleb Smirnoff
Author: glebius
Date: Mon May  4 18:49:25 2015
New Revision: 282426
URL: https://svnweb.freebsd.org/changeset/base/282426

Log:
  Fix arithmetical bug in vnode_pager_haspage().  The check against object size
  should be done not with the number of pages in the first block, but with the
  overall number of pages.  While here, add KASSERT that makes sure that BMAP
  doesn't return completely irrelevant blocks.
  
  Reviewed by:  kib
  Tested by:pho
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Mon May  4 18:20:31 2015(r282425)
+++ head/sys/vm/vnode_pager.c   Mon May  4 18:49:25 2015(r282426)
@@ -340,16 +340,21 @@ vnode_pager_haspage(vm_object_t object, 
*before += poff;
}
if (after) {
-   int numafter;
+   /*
+* The BMAP vop can report a partial block in the
+* 'after', but must not count blocks after EOF.
+* Assert the latter, and truncate 'after' in case
+* of the former.
+*/
+   KASSERT(reqblock + *after =
+   object-size * pagesperblock,
+   (%s: reqblock %jd after %d size %ju, __func__,
+   (intmax_t )reqblock, *after,
+   (uintmax_t )object-size));
*after *= pagesperblock;
-   numafter = pagesperblock - (poff + 1);
-   if (IDX_TO_OFF(pindex + numafter) 
-   object-un_pager.vnp.vnp_size) {
-   numafter =
-   OFF_TO_IDX(object-un_pager.vnp.vnp_size) -
-   pindex;
-   }
-   *after += numafter;
+   *after += pagesperblock - (poff + 1);
+   if (pindex + *after = object-size)
+   *after = object-size - 1 - pindex;
}
} else {
if (before) {
___
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: r282280 - in head/sys/dev: e1000 ixgbe ixl

2015-05-04 Thread Gleb Smirnoff
  John,

On Mon, May 04, 2015 at 09:58:49AM -0400, John Baldwin wrote:
J  J  J So the importaing thing here is that if_get_counter() is still 
doing
J  J  J per-ifnet stats.  The stat you underlined above is per-queue 
instead.
J  J  J We well need more explicitly knowledge of queues outside of drivers
J  J  J and in the stack itself to support a generic framework for 
per-queue
J  J  J stats.
J  J  
J  J  This depends on how generic we want the API to be. Of course, we can 
add
J  J  an extra argument to if_get_counter().
J  J  
J  J  However, if we don't expect the number of queues to exceed a 
reasonable
J  J  number of 255 :), we can fit the functionality into existing API.
J  J  We can keep the queue number in the highest 8 bits of the ift_counter
J  J  parameter.
J  J  
J  J  #define   IFCOUNTER_MASK  0x00ff
J  J  #define   IFCOUNTER_QUEUE(c)  ((c)  24)
J  J 
J  J I'd prefer that expose queues more directly and figure out how to handle
J  J per-queue stats then (e.g. do we have some sort of driver-independent
J  J structure that each ifnet has 1 or more of that maps to a queue and has
J  J driver provided methods, etc.  If so you could have a driver method for
J  J queue stats).  Note that I did use if_get_counter to report the
J  J per-interface stats instead of adding a new sysctl.
J  
J  What do you prefer: an extra argument to the if_get_counter() or a extra
J  ifop?
J 
J As I said, I'd prefer we expose queues to the stack more directly complete
J with per-queue ops (e.g. I'd like a per-queue if_transmit thing, though
J probably more like the old if_start).

Your answer seems quite orthogonal to my question. I reread it couple of times,
but still can't figure out how exactly do you prefet to fetch per-queue stats.
Can you please explain in more detail?

-- 
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: r282442 - head/sys/arm/conf

2015-05-04 Thread Luiz Otavio O Souza
Author: loos
Date: Tue May  5 01:45:38 2015
New Revision: 282442
URL: https://svnweb.freebsd.org/changeset/base/282442

Log:
  Now that DMA works, enable the audio driver on RPi 2.

Modified:
  head/sys/arm/conf/RPI2

Modified: head/sys/arm/conf/RPI2
==
--- head/sys/arm/conf/RPI2  Tue May  5 00:27:55 2015(r282441)
+++ head/sys/arm/conf/RPI2  Tue May  5 01:45:38 2015(r282442)
@@ -131,8 +131,8 @@ device  smsc
 device spibus
 device bcm2835_spi
 
-#devicevchiq
-#devicesound
+device vchiq
+device sound
 
 # Flattened Device Tree
 optionsFDT # Configure using FDT/DTB data
___
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: r282440 - head/sys/arm/broadcom/bcm2835

2015-05-04 Thread Luiz Otavio O Souza
Author: loos
Date: Tue May  5 00:19:04 2015
New Revision: 282440
URL: https://svnweb.freebsd.org/changeset/base/282440

Log:
  Fix DMA on RPi 2.
  
  BCM2836 has a different base address for peripherals.
  
  Obtained from:netbsd

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h   Mon May  4 22:27:55 
2015(r282439)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h   Tue May  5 00:19:04 
2015(r282440)
@@ -37,14 +37,20 @@
 #defineBCM2835_VCBUS_IO_BASE   0x7E00
 #defineBCM2835_VCBUS_SDRAM_UNCACHED0xC000
 
+#ifdef SOC_BCM2836
+#defineBCM2835_ARM_IO_BASE 0x3f00
+#defineBCM2835_VCBUS_SDRAM_BASEBCM2835_VCBUS_SDRAM_UNCACHED
+#else
 #defineBCM2835_ARM_IO_BASE 0x2000
-#defineBCM2835_ARM_IO_SIZE 0x0200
+#defineBCM2835_VCBUS_SDRAM_BASEBCM2835_VCBUS_SDRAM_CACHED
+#endif
+#defineBCM2835_ARM_IO_SIZE 0x0100
 
 /*
  * Convert physical address to VC bus address. Should be used 
  * when submitting address over mailbox interface 
  */
-#definePHYS_TO_VCBUS(pa)   ((pa) + BCM2835_VCBUS_SDRAM_CACHED)
+#definePHYS_TO_VCBUS(pa)   ((pa) + BCM2835_VCBUS_SDRAM_BASE)
 
 /* Check whether pa bellong top IO window */
 #define BCM2835_ARM_IS_IO(pa)  (((pa) = BCM2835_ARM_IO_BASE)  \
@@ -61,6 +67,6 @@
  * when address is returned by VC over mailbox interface. e.g.
  * framebuffer base
  */
-#defineVCBUS_TO_PHYS(vca)  ((vca) - BCM2835_VCBUS_SDRAM_CACHED)
+#defineVCBUS_TO_PHYS(vca)  ((vca) - BCM2835_VCBUS_SDRAM_BASE)
 
 #endif /* _BCM2835_VCBUS_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: r282443 - head/usr.sbin/bsdinstall/scripts

2015-05-04 Thread Allan Jude
Author: allanjude (doc committer)
Date: Tue May  5 03:08:49 2015
New Revision: 282443
URL: https://svnweb.freebsd.org/changeset/base/282443

Log:
  Add a sanity check to the swap size in zfsboot of bsdinstall
  Loop until the user enters a valid size (100mb or 0)
  
  Differential Revision:https://reviews.freebsd.org/D2299
  Reported By:  Shawn Webb
  Reviewed by:  roberto
  Approved by:  brd
  MFC after:2 weeks
  Sponsored by: ScaleEngine Inc.

Modified:
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==
--- head/usr.sbin/bsdinstall/scripts/zfsbootTue May  5 01:45:38 2015
(r282442)
+++ head/usr.sbin/bsdinstall/scripts/zfsbootTue May  5 03:08:49 2015
(r282443)
@@ -287,10 +287,12 @@ msg_stripe_desc=Stripe - No Redundancy
 msg_stripe_help=[1+ Disks] Striping provides maximum storage but no 
redundancy
 msg_swap_encrypt=Encrypt Swap?
 msg_swap_encrypt_help=Encrypt swap partitions with temporary keys, discarded 
on reboot
+msg_swap_invalid=The selected swap size (%s) is invalid. Enter a number 
optionally followed by units. Example: 2G
 msg_swap_mirror=Mirror Swap?
 msg_swap_mirror_help=Mirror swap partitions for redundancy, breaks crash 
dumps
 msg_swap_size=Swap Size
 msg_swap_size_help=Customize how much swap space is allocated to each 
selected disk
+msg_swap_toosmall=The selected swap size (%s) is to small. Please enter a 
value greater than 100MB or enter 0 for no swap
 msg_these_disks_are_too_small=These disks are too small given the amount of 
requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or 
more of each of the following selected disk\ndevices (not recommended):\n\n  
%s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of 
devices.
 msg_uefi_not_supported=The FreeBSD UEFI loader does not currently support 
booting root-on-ZFS. Your system will need to boot in legacy (CSM) mode.\nDo 
you want to continue?
 msg_unable_to_get_disk_capacity=Unable to get disk capacity of \`%s'
@@ -1557,10 +1559,26 @@ while :; do
;;
? $msg_swap_size)
# Prompt the user to input/change the swap size for each disk
-   f_dialog_input input \
-   $msg_please_enter_amount_of_swap_space \
-   $ZFSBOOT_SWAP_SIZE 
-   ZFSBOOT_SWAP_SIZE=${input:-0}
+   while :; do
+   f_dialog_input input \
+   $msg_please_enter_amount_of_swap_space \
+   $ZFSBOOT_SWAP_SIZE 
+   ZFSBOOT_SWAP_SIZE=${input:-0}
+   if f_expand_number $ZFSBOOT_SWAP_SIZE swapsize
+   then
+   if [ $swapsize -ne 0 -a $swapsize -lt 104857600 ]; then
+   f_show_err $msg_swap_toosmall \
+  $ZFSBOOT_SWAP_SIZE
+   continue;
+   else
+   break;
+   fi
+   else
+   f_show_err $msg_swap_invalid \
+  $ZFSBOOT_SWAP_SIZE
+   continue;
+   fi
+   done
;;
? $msg_swap_mirror)
# Toggle the variable referenced both by the menu and later
___
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: r282441 - head/sys/arm/broadcom/bcm2835

2015-05-04 Thread Luiz Otavio O Souza
Author: loos
Date: Tue May  5 00:27:55 2015
New Revision: 282441
URL: https://svnweb.freebsd.org/changeset/base/282441

Log:
  Enable DMA for sdhci on RPi 2 (BCM2836).

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Tue May  5 00:19:04 
2015(r282440)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Tue May  5 00:27:55 
2015(r282441)
@@ -68,15 +68,8 @@ __FBSDID($FreeBSD$);
 #define dprintf(fmt, args...)
 #endif
 
-/* DMA doesn't yet work with the bcm3826 */
-#ifdef SOC_BCM2836
-#definePIO_MODE1
-#else
-#definePIO_MODE0
-#endif
-
 static int bcm2835_sdhci_hs = 1;
-static int bcm2835_sdhci_pio_mode = PIO_MODE;
+static int bcm2835_sdhci_pio_mode = 0;
 
 TUNABLE_INT(hw.bcm2835.sdhci.hs, bcm2835_sdhci_hs);
 TUNABLE_INT(hw.bcm2835.sdhci.pio_mode, bcm2835_sdhci_pio_mode);
___
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: r282446 - head/sys/dev/pccbb

2015-05-04 Thread Warner Losh
Author: imp
Date: Tue May  5 04:13:48 2015
New Revision: 282446
URL: https://svnweb.freebsd.org/changeset/base/282446

Log:
  When dealing with the TI12XX family of parts, we sometimes need to
  initialize the MFUNC registers. Our old test of assuming that if this
  register is set at all is not quite right. Many scenarios (including
  the power-on defaults for chips w/o EEPROMs) land us in trouble. The
  MFUNC0 pin should be set to signal #INTA and the MFUNC1 pin should be
  set to signal #INTB of multi-socketed devices. Since my memory recalls
  issues with blindly clearing the upper bytes of this register, perform
  the heuristic only when both MFUNC0 and 1 are clear. We won't work
  well using these pins for GPIO, and the serial interrupts won't save
  us because we go out of our way to generally disable them. They are
  needed to support legacy drivers for 16-bit PC Cards that are
  hard-wired to specific IRQ values. Since FreeBSD never had any of
  these, we configure the more reliable direct signaling. This was just
  one small piece of that which had been left out back in the day.

Modified:
  head/sys/dev/pccbb/pccbb_pci.c

Modified: head/sys/dev/pccbb/pccbb_pci.c
==
--- head/sys/dev/pccbb/pccbb_pci.c  Tue May  5 03:17:32 2015
(r282445)
+++ head/sys/dev/pccbb/pccbb_pci.c  Tue May  5 04:13:48 2015
(r282446)
@@ -502,10 +502,19 @@ cbb_chipinit(struct cbb_softc *sc)
 * properly initialized.
 *
 * The TI125X parts have a different register.
+*
+* Note: Only the lower two nibbles matter. When set
+* to 0, the MFUNC{0,1} pins are GPIO, which isn't
+* going to work out too well because we specifically
+* program these parts to parallel interrupt signalling
+* elsewhere. We preserve the upper bits of this
+* register since changing them have subtle side effects
+* for different variants of the card and are
+* extremely difficult to exaustively test.
 */
mux = pci_read_config(sc-dev, CBBR_MFUNC, 4);
sysctrl = pci_read_config(sc-dev, CBBR_SYSCTRL, 4);
-   if (mux == 0) {
+   if ((mux  (CBBM_MFUNC_PIN0 | CBBM_MFUNC_PIN1)) == 0) {
mux = (mux  ~CBBM_MFUNC_PIN0) |
CBBM_MFUNC_PIN0_INTA;
if ((sysctrl  CBBM_SYSCTRL_INTRTIE) == 0)
@@ -518,7 +527,8 @@ cbb_chipinit(struct cbb_softc *sc)
/*
 * Disable zoom video.  Some machines initialize this
 * improperly and exerpience has shown that this helps
-* prevent strange behavior.
+* prevent strange behavior. We don't support zoom
+* video anyway, so no harm can come from this.
 */
pci_write_config(sc-dev, CBBR_MMCTRL, 0, 4);
break;
___
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: r282447 - head/sys/dev/pccbb

2015-05-04 Thread Warner Losh
Author: imp
Date: Tue May  5 04:23:55 2015
New Revision: 282447
URL: https://svnweb.freebsd.org/changeset/base/282447

Log:
  Add some data found in TI's application note SCPA035: PCI1510
  Implementation Guide about default values.

Modified:
  head/sys/dev/pccbb/pccbb_pci.c

Modified: head/sys/dev/pccbb/pccbb_pci.c
==
--- head/sys/dev/pccbb/pccbb_pci.c  Tue May  5 04:13:48 2015
(r282446)
+++ head/sys/dev/pccbb/pccbb_pci.c  Tue May  5 04:23:55 2015
(r282447)
@@ -511,6 +511,13 @@ cbb_chipinit(struct cbb_softc *sc)
 * register since changing them have subtle side effects
 * for different variants of the card and are
 * extremely difficult to exaustively test.
+*
+* Also, the TI 1510/1520 changed the default for the MFUNC
+* register from 0x0 to 0x1000 to enable IRQSER by default.
+* We want to be careful to avoid overriding that, and the
+* below test will do that. Should this check prove to be
+* too permissive, we should just check against 0 and 0x1000
+* and not touch it otherwise.
 */
mux = pci_read_config(sc-dev, CBBR_MFUNC, 4);
sysctrl = pci_read_config(sc-dev, CBBR_SYSCTRL, 4);
___
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: r282448 - head/sys/compat/freebsd32

2015-05-04 Thread Peter Wemm
Author: peter
Date: Tue May  5 05:14:12 2015
New Revision: 282448
URL: https://svnweb.freebsd.org/changeset/base/282448

Log:
  Fix an error in r281551, part of the getfsstat() / kern_getfsstat()
  rework.  The number of entries was supposed to be returned to the user,
  not used as a scratch variable.
  
  This broke RELENG_4 jails starting up on current systems.

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Tue May  5 04:23:55 2015
(r282447)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Tue May  5 05:14:12 2015
(r282448)
@@ -248,7 +248,7 @@ freebsd4_freebsd32_getfsstat(struct thre
 {
struct statfs *buf, *sp;
struct statfs32 stat32;
-   size_t count, size;
+   size_t count, size, copycount;
int error;
 
count = uap-bufsize / sizeof(struct statfs32);
@@ -256,12 +256,13 @@ freebsd4_freebsd32_getfsstat(struct thre
error = kern_getfsstat(td, buf, size, count, UIO_SYSSPACE, 
uap-flags);
if (size  0) {
sp = buf;
-   while (count  0  error == 0) {
+   copycount = count;
+   while (copycount  0  error == 0) {
copy_statfs(sp, stat32);
error = copyout(stat32, uap-buf, sizeof(stat32));
sp++;
uap-buf++;
-   count--;
+   copycount--;
}
free(buf, M_TEMP);
}
___
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: r281551 - in head/sys: compat/freebsd32 compat/linprocfs kern sys

2015-05-04 Thread Peter Wemm
On Wednesday, April 15, 2015 09:13:11 AM Edward Tomasz Napierala wrote:
 Author: trasz
 Date: Wed Apr 15 09:13:11 2015
 New Revision: 281551
 URL: https://svnweb.freebsd.org/changeset/base/281551
 
 Log:
   Rewrite linprocfs_domtab() as a wrapper around kern_getfsstat(). This
   adds missing jail and MAC checks.
 
   Differential Revision:  https://reviews.freebsd.org/D2193
   Reviewed by:kib@
   MFC after:  1 month

Please don't MFC this without taking care of of the follow-up bug fix.  
Something like r282448 is needed to keep old binaries (and old jails) working.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246

signature.asc
Description: This is a digitally signed message part.


Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl

2015-05-04 Thread Slawa Olhovchenkov
On Mon, May 04, 2015 at 04:01:28PM -0400, John Baldwin wrote:

 On Monday, May 04, 2015 09:51:25 PM Gleb Smirnoff wrote:
John,
  
  On Mon, May 04, 2015 at 09:58:49AM -0400, John Baldwin wrote:
  J  J  J So the importaing thing here is that if_get_counter() is still 
  doing
  J  J  J per-ifnet stats.  The stat you underlined above is per-queue 
  instead.
  J  J  J We well need more explicitly knowledge of queues outside of 
  drivers
  J  J  J and in the stack itself to support a generic framework for 
  per-queue
  J  J  J stats.
  J  J  
  J  J  This depends on how generic we want the API to be. Of course, we 
  can add
  J  J  an extra argument to if_get_counter().
  J  J  
  J  J  However, if we don't expect the number of queues to exceed a 
  reasonable
  J  J  number of 255 :), we can fit the functionality into existing API.
  J  J  We can keep the queue number in the highest 8 bits of the 
  ift_counter
  J  J  parameter.
  J  J  
  J  J  #define   IFCOUNTER_MASK  0x00ff
  J  J  #define   IFCOUNTER_QUEUE(c)  ((c)  24)
  J  J 
  J  J I'd prefer that expose queues more directly and figure out how to 
  handle
  J  J per-queue stats then (e.g. do we have some sort of 
  driver-independent
  J  J structure that each ifnet has 1 or more of that maps to a queue and 
  has
  J  J driver provided methods, etc.  If so you could have a driver method 
  for
  J  J queue stats).  Note that I did use if_get_counter to report the
  J  J per-interface stats instead of adding a new sysctl.
  J  
  J  What do you prefer: an extra argument to the if_get_counter() or a 
  extra
  J  ifop?
  J 
  J As I said, I'd prefer we expose queues to the stack more directly 
  complete
  J with per-queue ops (e.g. I'd like a per-queue if_transmit thing, though
  J probably more like the old if_start).
  
  Your answer seems quite orthogonal to my question. I reread it couple of 
  times,
  but still can't figure out how exactly do you prefet to fetch per-queue 
  stats.
  Can you please explain in more detail?
 
 struct if_queue {
   struct ifnet *ifq_parent;
   void (*ifq_get_counter)(struct if_queue *, ift_counter);
   ...
 };
 
 (Pretend that if_queue is a new object type and that each RX or TX queue on a
 NIC has one.)

What about bulk get?
One request for 1.5K queues stats.
___
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: r282437 - head/usr.bin/checknr

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 22:05:12 2015
New Revision: 282437
URL: https://svnweb.freebsd.org/changeset/base/282437

Log:
  Take from heirloom's doctools version of checknr(1) some cosmetic fixes
  This helps working on synchronising both tools

Modified:
  head/usr.bin/checknr/checknr.c

Modified: head/usr.bin/checknr/checknr.c
==
--- head/usr.bin/checknr/checknr.c  Mon May  4 21:44:51 2015
(r282436)
+++ head/usr.bin/checknr/checknr.c  Mon May  4 22:05:12 2015
(r282437)
@@ -250,7 +250,7 @@ main(int argc, char **argv)
nfiles = argc - 1;
 
if (nfiles  0) {
-   for (i=1; iargc; i++) {
+   for (i = 1; i  argc; i++) {
cfilename = argv[i];
f = fopen(cfilename, r);
if (f == NULL)
@@ -320,9 +320,9 @@ process(FILE *f)
 * At this point we process the line looking
 * for \s and \f.
 */
-   for (i=0; line[i]; i++)
-   if (line[i]=='\\'  (i==0 || line[i-1]!='\\')) {
-   if (!sflag  line[++i]=='s') {
+   for (i = 0; line[i]; i++)
+   if (line[i] == '\\'  (i == 0 || line[i-1] != '\\')) {
+   if (!sflag  line[++i] == 's') {
pl = line[++i];
if (isdigit(pl)) {
n = pl - '0';
@@ -345,7 +345,7 @@ process(FILE *f)
stk[stktop].parm = n;
stk[stktop].lno = lineno;
}
-   } else if (!fflag  line[i]=='f') {
+   } else if (!fflag  line[i] == 'f') {
n = line[++i];
if (n == 'P') {
if (stk[stktop].opno == FT) {
@@ -367,7 +367,7 @@ process(FILE *f)
 * We've hit the end and look at all this stuff that hasn't been
 * matched yet!  Complain, complain.
 */
-   for (i=stktop; i=0; i--) {
+   for (i = stktop; i = 0; i--) {
complain(i);
}
 }
@@ -386,7 +386,7 @@ prop(int i)
 {
if (stk[i].pl == 0)
printf(.%s, br[stk[i].opno].opbr);
-   else switch(stk[i].opno) {
+   else switch (stk[i].opno) {
case SZ:
printf(\\s%c%d, stk[i].pl, stk[i].parm);
break;
@@ -395,7 +395,8 @@ prop(int i)
break;
default:
printf(Bug: stk[%d].opno = %d = .%s, .%s,
-   i, stk[i].opno, br[stk[i].opno].opbr, 
br[stk[i].opno].clbr);
+   i, stk[i].opno, br[stk[i].opno].opbr,
+   br[stk[i].opno].clbr);
}
 }
 
@@ -567,7 +568,9 @@ printf(binsrch(%s) - %d\n, mac, slot)
*loc = strcpy(malloc(3), mac);
ncmds++;
 #ifdef DEBUG
-printf(after: %s %s %s %s %s, %d cmds\n, knowncmds[slot-2], 
knowncmds[slot-1], knowncmds[slot], knowncmds[slot+1], knowncmds[slot+2], 
ncmds);
+   printf(after: %s %s %s %s %s, %d cmds\n,
+   knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot],
+   knowncmds[slot+1], knowncmds[slot+2], ncmds);
 #endif
 }
 
@@ -592,12 +595,12 @@ binsrch(const char *mac)
if (d == 0)
d = p[1] - mac[1];
if (d == 0)
-   return mid;
+   return (mid);
if (d  0)
bot = mid + 1;
else
top = mid - 1;
}
slot = bot; /* place it would have gone */
-   return -1;
+   return (-1);
 }
___
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: r282438 - head/usr.bin/checknr

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 22:18:58 2015
New Revision: 282438
URL: https://svnweb.freebsd.org/changeset/base/282438

Log:
  Extend the list of known nroff/troff commands
  
  Obtained from:heirloom doctools

Modified:
  head/usr.bin/checknr/checknr.c

Modified: head/usr.bin/checknr/checknr.c
==
--- head/usr.bin/checknr/checknr.c  Mon May  4 22:05:12 2015
(r282437)
+++ head/usr.bin/checknr/checknr.c  Mon May  4 22:18:58 2015
(r282438)
@@ -165,18 +165,22 @@ static const char *knowncmds[MAXCMDS] = 
 WC, WH, XA, XD, XE, XF, XK, XP, XS, [,  [-, [0,
 [1, [2, [3, [4, [5, [, [, [], ],  ]-, ], ],
 ][, ab, ac, ad, af, am, ar, as, b,  ba, bc, bd,
-bi, bl, bp, br, bx, c., c2, cc, ce, cf, ch, cs,
-ct, cu, da, de, di, dl, dn, ds, dt, dw, dy, ec,
-ef, eh, el, em, eo, ep, ev, ex, fc, fi, fl, fo,
-fp, ft, fz, hc, he, hl, hp, ht, hw, hx, hy, i,
-ie, if, ig, in, ip, it, ix, lc, lg, li, ll, ln,
-lo, lp, ls, lt, m1, m2, m3, m4, mc, mk, mo, n1,
-n2, na, ne, nf, nh, nl, nm, nn, np, nr, ns, nx,
-of, oh, os, pa, pc, pi, pl, pm, pn, po, pp, ps,
-q,  r,  rb, rd, re, rm, rn, ro, rr, rs, rt, sb,
-sc, sh, sk, so, sp, ss, st, sv, sz, ta, tc, th,
-ti, tl, tm, tp, tr, u,  uf, uh, ul, vs, wh, xp,
-yr, 0
+bi, bl, bp, br, bx, c., c2, cc, ce, cf, ch,
+chop, cs, ct, cu, da, de, di, dl, dn, do, ds,
+dt, dw, dy, ec, ef, eh, el, em, eo, ep, ev,
+evc, ex, fallback, fc, feature, fi, fl, flig, fo,
+fp, ft, ftr, fz, fzoom, hc, he, hidechar, hl, hp,
+ht, hw, hx, hy, hylang, i, ie, if, ig, in, ip,
+it, ix, kern, kernafter, kernbefore, kernpair, lc, lg,
+lhang, lc_ctype, li, ll, ln, lo, lp, ls, lt, m1,
+m2, m3, m4, mc, mk, mo, n1, n2, na, ne, nf, nh,
+nl, nm, nn, np, nr, ns, nx, of, oh, os, pa,
+papersize, pc, pi, pl, pm, pn, po, pp, ps, q,
+r,  rb, rd, re, recursionlimit, return, rhang, rm,
+rn, ro, rr, rs, rt, sb, sc, sh, shift, sk, so,
+sp, ss, st, sv, sz, ta, tc, th, ti, tl, tm, tp,
+tr, track, u,  uf, uh, ul, vs, wh, xflag, xp, yr,
+0
 };
 
 static int lineno; /* current line number in input file */
___
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: r282439 - head/usr.bin/checknr

2015-05-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon May  4 22:27:55 2015
New Revision: 282439
URL: https://svnweb.freebsd.org/changeset/base/282439

Log:
  Remove limitation on input lines by using getline(3)

Modified:
  head/usr.bin/checknr/checknr.1
  head/usr.bin/checknr/checknr.c

Modified: head/usr.bin/checknr/checknr.1
==
--- head/usr.bin/checknr/checknr.1  Mon May  4 22:18:58 2015
(r282438)
+++ head/usr.bin/checknr/checknr.1  Mon May  4 22:27:55 2015
(r282439)
@@ -28,7 +28,7 @@
 .\ @(#)checknr.1  8.1 (Berkeley) 6/6/93
 .\ $FreeBSD$
 .\
-.Dd January 26, 2005
+.Dd May 5, 2015
 .Dt CHECKNR 1
 .Os
 .Sh NAME
@@ -157,7 +157,3 @@ There is no way to define a 1 character 
 .Pp
 Does not correctly recognize certain reasonable constructs,
 such as conditionals.
-.Pp
-Input lines are limited to
-.Dv LINE_MAX
-(2048) bytes in length.

Modified: head/usr.bin/checknr/checknr.c
==
--- head/usr.bin/checknr/checknr.c  Mon May  4 22:18:58 2015
(r282438)
+++ head/usr.bin/checknr/checknr.c  Mon May  4 22:27:55 2015
(r282439)
@@ -50,6 +50,7 @@ __FBSDID($FreeBSD$);
  * structured typesetting.
  */
 #include err.h
+#define _WITH_GETLINE
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -284,11 +285,14 @@ process(FILE *f)
 {
int i, n;
char mac[5];/* The current macro or nroff command */
+   char *line;
+   size_t linecap;
int pl;
-   static char line[256];  /* the current line */
 
+   line = NULL;
+   linecap = 0;
stktop = -1;
-   for (lineno = 1; fgets(line, sizeof line, f); lineno++) {
+   for (lineno = 1; getline(line, linecap, f)  0; lineno++) {
if (line[0] == '.') {
/*
 * find and isolate the macro/command name.
@@ -367,6 +371,7 @@ process(FILE *f)
}
}
}
+   free(line);
/*
 * We've hit the end and look at all this stuff that hasn't been
 * matched yet!  Complain, complain.
___
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: r282434 - in head: contrib/openresolv sbin/resolvconf

2015-05-04 Thread Glen Barber
Author: gjb
Date: Mon May  4 21:07:20 2015
New Revision: 282434
URL: https://svnweb.freebsd.org/changeset/base/282434

Log:
  MFV r225523, r282431:
   r225523 (hrs):
Import openresolv-3.4.4.
  
   r282431:
Import openresolv-3.7.0.
  
  PR:   199854
  Submitted by: y...@rawbw.com
  MFC after:1 week
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation

Added:
  head/contrib/openresolv/GNUmakefile
 - copied unchanged from r282431, vendor/openresolv/dist/GNUmakefile
  head/contrib/openresolv/config-null.mk
 - copied unchanged from r282431, vendor/openresolv/dist/config-null.mk
  head/contrib/openresolv/pdns_recursor.in
 - copied unchanged from r282431, vendor/openresolv/dist/pdns_recursor.in
Modified:
  head/contrib/openresolv/Makefile
  head/contrib/openresolv/configure
  head/contrib/openresolv/dnsmasq.in
  head/contrib/openresolv/libc.in
  head/contrib/openresolv/named.in
  head/contrib/openresolv/pdnsd.in
  head/contrib/openresolv/resolvconf.8.in
  head/contrib/openresolv/resolvconf.conf.5.in
  head/contrib/openresolv/resolvconf.in
  head/contrib/openresolv/unbound.in
  head/sbin/resolvconf/Makefile
Directory Properties:
  head/contrib/openresolv/   (props changed)

Copied: head/contrib/openresolv/GNUmakefile (from r282431, 
vendor/openresolv/dist/GNUmakefile)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/openresolv/GNUmakefile Mon May  4 21:07:20 2015
(r282434, copy of r282431, vendor/openresolv/dist/GNUmakefile)
@@ -0,0 +1,4 @@
+# Nasty hack so that make clean works without configure being run
+CONFIG_MK?=$(shell test -e config.mk  echo config.mk || echo config-null.mk)
+
+include Makefile

Modified: head/contrib/openresolv/Makefile
==
--- head/contrib/openresolv/MakefileMon May  4 20:59:23 2015
(r282433)
+++ head/contrib/openresolv/MakefileMon May  4 21:07:20 2015
(r282434)
@@ -1,8 +1,19 @@
-include config.mk
+PKG=   openresolv
+VERSION=   3.7.0
 
-NAME=  openresolv
-VERSION=   3.4.1
-PKG=   ${NAME}-${VERSION}
+# Nasty hack so that make clean works without configure being run
+_CONFIG_MK!=   test -e config.mk  echo config.mk || echo config-null.mk
+CONFIG_MK?=${_CONFIG_MK}
+include${CONFIG_MK}
+
+SBINDIR?=  /sbin
+SYSCONFDIR?=   /etc
+LIBEXECDIR?=   /libexec/resolvconf
+VARDIR?=   /var/run/resolvconf
+RCDIR?=/etc/rc.d
+RESTARTCMD?=   if ${RCDIR}/\1 status /dev/null 2\1; then \
+   ${RCDIR}/\1 restart; \
+   fi
 
 INSTALL?=  install
 SED?=  sed
@@ -17,31 +28,36 @@ TARGET= ${RESOLVCONF} ${SUBSCRIBERS}
 SRCS=  ${TARGET:C,$,.in,} # pmake
 SRCS:= ${TARGET:=.in} # gmake
 
-SED_PREFIX=-e 's:@PREFIX@:${PREFIX}:g'
+SED_SBINDIR=   -e 's:@SBINDIR@:${SBINDIR}:g'
 SED_SYSCONFDIR=-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
 SED_LIBEXECDIR=-e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
 SED_VARDIR=-e 's:@VARDIR@:${VARDIR}:g'
 SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g'
 SED_RESTARTCMD=-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g'
 
+DISTPREFIX?=   ${PKG}-${VERSION}
+DISTFILEGZ?=   ${DISTPREFIX}.tar.gz
+DISTFILE?= ${DISTPREFIX}.tar.bz2
+FOSSILID?= current
+
 .SUFFIXES: .in
 
 all: ${TARGET}
 
 .in:
-   ${SED}  ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+   ${SED}  ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
$  $@
 
 clean:
-   rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
+   rm -f ${TARGET}
 
 distclean: clean
-   rm -f config.mk
+   rm -f config.mk ${DISTFILE}
 
 installdirs:
 
-install: ${TARGET}
+proginstall: ${TARGET}
${INSTALL} -d ${DESTDIR}${SBINDIR}
${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR}
${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
@@ -49,18 +65,21 @@ install: ${TARGET}
${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
+
+maninstall:
${INSTALL} -d ${DESTDIR}${MANDIR}/man8
${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
${INSTALL} -d ${DESTDIR}${MANDIR}/man5
${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
 
+install: proginstall maninstall
+
 import:
-   rm -rf /tmp/${PKG}
-   ${INSTALL} -d /tmp/${PKG}
-   cp README ${SRCS} /tmp/${PKG}
-
-dist: import
-   cp configure Makefile resolvconf.conf /tmp/${PKG}
-   tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} 
-   rm -rf /tmp/${PKG} 
-   ls -l ${PKG}.tar.bz2
+   rm -rf /tmp/${DISTPREFIX}
+   ${INSTALL} -d 

svn commit: r282429 - head/usr.sbin/bhyve

2015-05-04 Thread Alexander Motin
Author: mav
Date: Mon May  4 19:55:01 2015
New Revision: 282429
URL: https://svnweb.freebsd.org/changeset/base/282429

Log:
  Implement in-order execution of non-NCQ commands.
  
  Using status updates in r282364, block queue on BSY, DRQ or ERR bits set.
  This can be a performance penalization for non-NCQ commands, but it is
  required for proper error recovery and standard compliance.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/bhyve/pci_ahci.c

Modified: head/usr.sbin/bhyve/pci_ahci.c
==
--- head/usr.sbin/bhyve/pci_ahci.c  Mon May  4 19:34:59 2015
(r282428)
+++ head/usr.sbin/bhyve/pci_ahci.c  Mon May  4 19:55:01 2015
(r282429)
@@ -140,6 +140,7 @@ struct ahci_port {
uint8_t err_cfis[20];
uint8_t sense_key;
uint8_t asc;
+   u_int ccs;
uint32_t pending;
 
uint32_t clb;
@@ -204,6 +205,8 @@ struct pci_ahci_softc {
 };
 #defineahci_ctx(sc)((sc)-asc_pi-pi_vmctx)
 
+static void ahci_handle_port(struct ahci_port *p);
+
 static inline void lba_to_msf(uint8_t *buf, int lba)
 {
lba += 150;
@@ -406,6 +409,7 @@ ahci_check_stopped(struct ahci_port *p)
 */
if (!(p-cmd  AHCI_P_CMD_ST)) {
if (p-pending == 0) {
+   p-ccs = 0;
p-cmd = ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK);
p-ci = 0;
p-sact = 0;
@@ -783,6 +787,8 @@ next:
ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | 
ATA_S_DSC);
p-pending = ~(1  slot);
ahci_check_stopped(p);
+   if (!first)
+   ahci_handle_port(p);
return;
}
goto next;
@@ -1754,20 +1760,21 @@ ahci_handle_slot(struct ahci_port *p, in
 static void
 ahci_handle_port(struct ahci_port *p)
 {
-   int i;
 
if (!(p-cmd  AHCI_P_CMD_ST))
return;
 
/*
 * Search for any new commands to issue ignoring those that
-* are already in-flight.
+* are already in-flight.  Stop if device is busy or in error.
 */
-   for (i = 0; (i  32)  p-ci; i++) {
-   if ((p-ci  (1  i))  !(p-pending  (1  i))) {
+   for (; (p-ci  ~p-pending) != 0; p-ccs = ((p-ccs + 1)  31)) {
+   if ((p-tfd  (ATA_S_BUSY | ATA_S_DRQ | ATA_S_ERROR)) != 0)
+   break;
+   if ((p-ci  ~p-pending  (1  p-ccs)) != 0) {
p-cmd = ~AHCI_P_CMD_CCS_MASK;
-   p-cmd |= i  AHCI_P_CMD_CCS_SHIFT;
-   ahci_handle_slot(p, i);
+   p-cmd |= p-ccs  AHCI_P_CMD_CCS_SHIFT;
+   ahci_handle_slot(p, p-ccs);
}
}
 }
@@ -1844,6 +1851,7 @@ ata_ioreq_cb(struct blockif_req *br, int
p-pending = ~(1  slot);
 
ahci_check_stopped(p);
+   ahci_handle_port(p);
 out:
pthread_mutex_unlock(sc-mtx);
DPRINTF(%s exit\n, __func__);
@@ -1905,6 +1913,7 @@ atapi_ioreq_cb(struct blockif_req *br, i
p-pending = ~(1  slot);
 
ahci_check_stopped(p);
+   ahci_handle_port(p);
 out:
pthread_mutex_unlock(sc-mtx);
DPRINTF(%s exit\n, __func__);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r282430 - in head/sys: conf dev/nand

2015-05-04 Thread Justin Hibbits
Author: jhibbits
Date: Mon May  4 20:36:00 2015
New Revision: 282430
URL: https://svnweb.freebsd.org/changeset/base/282430

Log:
  Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)
  
  Summary:
  This has been tested on the RB800, but should work on the RB333, RB600, and
  RB1100 as well.
  
  It's currently missing ECC support, but read and write are complete.
  
  Reviewers: imp
  
  Reviewed By: imp
  
  Subscribers: imp
  
  Differential Revision: https://reviews.freebsd.org/D2223

Added:
  head/sys/dev/nand/nfc_rb.c   (contents, props changed)
Modified:
  head/sys/conf/files.powerpc

Modified: head/sys/conf/files.powerpc
==
--- head/sys/conf/files.powerpc Mon May  4 19:55:01 2015(r282429)
+++ head/sys/conf/files.powerpc Mon May  4 20:36:00 2015(r282430)
@@ -43,6 +43,7 @@ dev/iicbus/ds1775.c   optionalds1775 pow
 dev/iicbus/max6690.c   optionalmax6690 powermac
 dev/kbd/kbd.c  optionalsc | vt
 dev/nand/nfc_fsl.c optionalnand mpc85xx
+dev/nand/nfc_rb.c  optionalnand mpc85xx
 # ofw can be either aim or fdt: fdt case handled in files. aim only powerpc 
specific.
 dev/ofw/openfirm.c optionalaim
 dev/ofw/openfirmio.c   optionalaim

Added: head/sys/dev/nand/nfc_rb.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/nand/nfc_rb.c  Mon May  4 20:36:00 2015(r282430)
@@ -0,0 +1,275 @@
+/*-
+ * Copyright (C) 2015 Justin Hibbits
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* RouterBoard 600/800 NAND controller driver. */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/proc.h
+#include sys/bus.h
+#include sys/conf.h
+#include sys/kernel.h
+#include sys/module.h
+#include sys/malloc.h
+#include sys/rman.h
+#include sys/lock.h
+#include sys/mutex.h
+#include sys/time.h
+
+#include machine/bus.h
+
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+
+#include dev/nand/nand.h
+#include dev/nand/nandbus.h
+#include nfc_if.h
+#include gpio_if.h
+
+#define RB_NAND_DATA   (0x00)
+
+struct rb_nand_softc {
+   struct nand_softc   nand_dev;
+   struct resource *sc_mem;
+   int rid;
+   device_tsc_gpio;
+   uint32_tsc_rdy_pin;
+   uint32_tsc_nce_pin;
+   uint32_tsc_cle_pin;
+   uint32_tsc_ale_pin;
+};
+
+static int rb_nand_attach(device_t);
+static int rb_nand_probe(device_t);
+static int rb_nand_send_command(device_t, uint8_t);
+static int rb_nand_send_address(device_t, uint8_t);
+static uint8_t rb_nand_read_byte(device_t);
+static voidrb_nand_read_buf(device_t, void *, uint32_t);
+static voidrb_nand_write_buf(device_t, void *, uint32_t);
+static int rb_nand_select_cs(device_t, uint8_t);
+static int rb_nand_read_rnb(device_t);
+
+static device_method_t rb_nand_methods[] = {
+   DEVMETHOD(device_probe, rb_nand_probe),
+   DEVMETHOD(device_attach,rb_nand_attach),
+
+   DEVMETHOD(nfc_send_command, rb_nand_send_command),
+   DEVMETHOD(nfc_send_address, rb_nand_send_address),
+   DEVMETHOD(nfc_read_byte,rb_nand_read_byte),
+   DEVMETHOD(nfc_read_buf, rb_nand_read_buf),
+   DEVMETHOD(nfc_write_buf,rb_nand_write_buf),
+   DEVMETHOD(nfc_select_cs,rb_nand_select_cs),
+  

Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl

2015-05-04 Thread John Baldwin
On Monday, May 04, 2015 09:51:25 PM Gleb Smirnoff wrote:
   John,
 
 On Mon, May 04, 2015 at 09:58:49AM -0400, John Baldwin wrote:
 J  J  J So the importaing thing here is that if_get_counter() is still 
 doing
 J  J  J per-ifnet stats.  The stat you underlined above is per-queue 
 instead.
 J  J  J We well need more explicitly knowledge of queues outside of 
 drivers
 J  J  J and in the stack itself to support a generic framework for 
 per-queue
 J  J  J stats.
 J  J  
 J  J  This depends on how generic we want the API to be. Of course, we 
 can add
 J  J  an extra argument to if_get_counter().
 J  J  
 J  J  However, if we don't expect the number of queues to exceed a 
 reasonable
 J  J  number of 255 :), we can fit the functionality into existing API.
 J  J  We can keep the queue number in the highest 8 bits of the 
 ift_counter
 J  J  parameter.
 J  J  
 J  J  #define IFCOUNTER_MASK  0x00ff
 J  J  #define IFCOUNTER_QUEUE(c)  ((c)  24)
 J  J 
 J  J I'd prefer that expose queues more directly and figure out how to 
 handle
 J  J per-queue stats then (e.g. do we have some sort of driver-independent
 J  J structure that each ifnet has 1 or more of that maps to a queue and 
 has
 J  J driver provided methods, etc.  If so you could have a driver method 
 for
 J  J queue stats).  Note that I did use if_get_counter to report the
 J  J per-interface stats instead of adding a new sysctl.
 J  
 J  What do you prefer: an extra argument to the if_get_counter() or a extra
 J  ifop?
 J 
 J As I said, I'd prefer we expose queues to the stack more directly complete
 J with per-queue ops (e.g. I'd like a per-queue if_transmit thing, though
 J probably more like the old if_start).
 
 Your answer seems quite orthogonal to my question. I reread it couple of 
 times,
 but still can't figure out how exactly do you prefet to fetch per-queue stats.
 Can you please explain in more detail?

struct if_queue {
struct ifnet *ifq_parent;
void (*ifq_get_counter)(struct if_queue *, ift_counter);
...
};

(Pretend that if_queue is a new object type and that each RX or TX queue on a
NIC has one.)

-- 
John Baldwin
___
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: r282436 - in head: contrib/tcpdump sbin/ping usr.bin/kdump

2015-05-04 Thread Brooks Davis
Author: brooks
Date: Mon May  4 21:44:51 2015
New Revision: 282436
URL: https://svnweb.freebsd.org/changeset/base/282436

Log:
  Remove capability mode sandbox enabled messages.
  
  These messages serve little purpose and break some consumers.
  
  PR:   199855
  Differential Revision:https://reviews.freebsd.org/D2440
  Reviewed by:  rwatson
  Approved by:  pjd
  MFC after:1 week
  Sponsored by: DARPA, AFRL

Modified:
  head/contrib/tcpdump/tcpdump.c
  head/sbin/ping/ping.c
  head/usr.bin/kdump/kdump.c

Modified: head/contrib/tcpdump/tcpdump.c
==
--- head/contrib/tcpdump/tcpdump.c  Mon May  4 21:34:19 2015
(r282435)
+++ head/contrib/tcpdump/tcpdump.c  Mon May  4 21:44:51 2015
(r282436)
@@ -1921,8 +1921,6 @@ main(int argc, char **argv)
 #endif
if (cansandbox  cap_enter()  0  errno != ENOSYS)
error(unable to enter the capability mode);
-   if (cap_sandboxed())
-   fprintf(stderr, capability mode sandbox enabled\n);
 #endif /* __FreeBSD__ */
 
do {

Modified: head/sbin/ping/ping.c
==
--- head/sbin/ping/ping.c   Mon May  4 21:34:19 2015(r282435)
+++ head/sbin/ping/ping.c   Mon May  4 21:44:51 2015(r282436)
@@ -737,9 +737,6 @@ main(int argc, char *const *argv)
if (cansandbox  cap_enter()  0  errno != ENOSYS)
err(1, cap_enter);
 
-   if (cap_sandboxed())
-   fprintf(stderr, capability mode sandbox enabled\n);
-
cap_rights_init(rights, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT);
if (cap_rights_limit(srecv, rights)  0  errno != ENOSYS)
err(1, cap_rights_limit srecv);

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Mon May  4 21:34:19 2015(r282435)
+++ head/usr.bin/kdump/kdump.c  Mon May  4 21:44:51 2015(r282436)
@@ -352,8 +352,6 @@ main(int argc, char *argv[])
limitfd(STDIN_FILENO);
limitfd(STDOUT_FILENO);
limitfd(STDERR_FILENO);
-   if (cap_sandboxed())
-   fprintf(stderr, capability mode sandbox enabled\n);
 
TAILQ_INIT(trace_procs);
drop_logged = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r282433 - head/sys/arm/conf

2015-05-04 Thread Luiz Otavio O Souza
Author: loos
Date: Mon May  4 20:59:23 2015
New Revision: 282433
URL: https://svnweb.freebsd.org/changeset/base/282433

Log:
  In preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
  to supported kernels.
  
  This is a temporary solution and should be reverted when ARM_NEW_PMAP is
  enabled by default.

Modified:
  head/sys/arm/conf/BEAGLEBONE
  head/sys/arm/conf/PANDABOARD
  head/sys/arm/conf/RPI-B
  head/sys/arm/conf/RPI2
  head/sys/arm/conf/ZEDBOARD

Modified: head/sys/arm/conf/BEAGLEBONE
==
--- head/sys/arm/conf/BEAGLEBONEMon May  4 20:52:21 2015
(r282432)
+++ head/sys/arm/conf/BEAGLEBONEMon May  4 20:59:23 2015
(r282433)
@@ -67,6 +67,7 @@ options   KBD_INSTALL_CDEV# install a CD
 optionsPLATFORM
 optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
 optionsVFP # Enable floating point hardware support
+optionsARM_NEW_PMAP# Enable the new v6 pmap
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols

Modified: head/sys/arm/conf/PANDABOARD
==
--- head/sys/arm/conf/PANDABOARDMon May  4 20:52:21 2015
(r282432)
+++ head/sys/arm/conf/PANDABOARDMon May  4 20:59:23 2015
(r282433)
@@ -64,6 +64,7 @@ options   PLATFORM
 optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
 optionsVFP # Enable floating point hardware support
 optionsSMP # Enable multiple cores
+optionsARM_NEW_PMAP# Enable the new v6 pmap
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols

Modified: head/sys/arm/conf/RPI-B
==
--- head/sys/arm/conf/RPI-B Mon May  4 20:52:21 2015(r282432)
+++ head/sys/arm/conf/RPI-B Mon May  4 20:59:23 2015(r282433)
@@ -57,6 +57,7 @@ options   KBD_INSTALL_CDEV# install a CD
 optionsPLATFORM
 optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
 optionsVFP # Enable floating point hardware support
+optionsARM_NEW_PMAP# Enable the new v6 pmap
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols

Modified: head/sys/arm/conf/RPI2
==
--- head/sys/arm/conf/RPI2  Mon May  4 20:52:21 2015(r282432)
+++ head/sys/arm/conf/RPI2  Mon May  4 20:59:23 2015(r282433)
@@ -57,6 +57,7 @@ options   KBD_INSTALL_CDEV# install a CD
 optionsPLATFORM
 optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
 optionsVFP # Enable floating point hardware support
+optionsARM_NEW_PMAP# Enable the new v6 pmap
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols

Modified: head/sys/arm/conf/ZEDBOARD
==
--- head/sys/arm/conf/ZEDBOARD  Mon May  4 20:52:21 2015(r282432)
+++ head/sys/arm/conf/ZEDBOARD  Mon May  4 20:59:23 2015(r282433)
@@ -56,6 +56,7 @@ options   KBD_INSTALL_CDEV# install a CD
 optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
 optionsVFP # Enable floating point hardware support
 optionsSMP # Enable multiple cores
+optionsARM_NEW_PMAP# Enable the new v6 pmap
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
___
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: r282435 - head/release

2015-05-04 Thread Glen Barber
Author: gjb
Date: Mon May  4 21:34:19 2015
New Revision: 282435
URL: https://svnweb.freebsd.org/changeset/base/282435

Log:
  Remove a debugging line that snuck in with r282419.
  
  Pointyhat:gjb
  MFC after:3 days
  X-MFC-With:   r282419
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.ec2

Modified: head/release/Makefile.ec2
==
--- head/release/Makefile.ec2   Mon May  4 21:07:20 2015(r282434)
+++ head/release/Makefile.ec2   Mon May  4 21:34:19 2015(r282435)
@@ -33,7 +33,6 @@ cw-ec2-portinstall:
@touch ${.TARGET}
 
 ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
-   @false
 .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
@echo --
@echo  AWSKEYFILE must point at AWS keys for EC2 AMI creation
___
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