svn commit: r293396 - in stable/10: lib/libpam/modules/pam_ssh secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr...

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  7 23:26:16 2016
New Revision: 293396
URL: https://svnweb.freebsd.org/changeset/base/293396

Log:
  MFC r291941:
  
Replace unneeded manual dependency on header by adding it to SRCS.

Modified:
  stable/10/lib/libpam/modules/pam_ssh/Makefile
  stable/10/secure/lib/libssh/Makefile
  stable/10/secure/libexec/sftp-server/Makefile
  stable/10/secure/libexec/ssh-keysign/Makefile
  stable/10/secure/libexec/ssh-pkcs11-helper/Makefile
  stable/10/secure/usr.bin/scp/Makefile
  stable/10/secure/usr.bin/sftp/Makefile
  stable/10/secure/usr.bin/ssh-add/Makefile
  stable/10/secure/usr.bin/ssh-agent/Makefile
  stable/10/secure/usr.bin/ssh-keygen/Makefile
  stable/10/secure/usr.bin/ssh-keyscan/Makefile
  stable/10/secure/usr.bin/ssh/Makefile
  stable/10/secure/usr.sbin/sshd/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpam/modules/pam_ssh/Makefile
==
--- stable/10/lib/libpam/modules/pam_ssh/Makefile   Thu Jan  7 23:23:51 
2016(r293395)
+++ stable/10/lib/libpam/modules/pam_ssh/Makefile   Thu Jan  7 23:26:16 
2016(r293396)
@@ -12,6 +12,7 @@ SRCS+=roaming_dummy.c
 
 WARNS?=3
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
+SRCS+=  ssh_namespace.h
 
 DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
 LDADD= -lssh -lcrypto -lcrypt
@@ -20,5 +21,3 @@ USEPRIVATELIB= ssh
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/10/secure/lib/libssh/Makefile
==
--- stable/10/secure/lib/libssh/MakefileThu Jan  7 23:23:51 2016
(r293395)
+++ stable/10/secure/lib/libssh/MakefileThu Jan  7 23:26:16 2016
(r293396)
@@ -40,9 +40,11 @@ USEPRIVATELIB+= ldns
 .endif
 
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
+SRCS+=  ssh_namespace.h
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
 CFLAGS+= -include krb5_config.h
+SRCS+=  krb5_config.h
 DPADD+=${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} 
${LIBMD} ${LIBROKEN}
 LDADD+=-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
 .endif
@@ -59,8 +61,3 @@ LDADD+=   -lcrypto -lcrypt -lz
 .include 
 
 .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
-.if ${MK_KERBEROS_SUPPORT} != "no"
-${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
-.endif

Modified: stable/10/secure/libexec/sftp-server/Makefile
==
--- stable/10/secure/libexec/sftp-server/Makefile   Thu Jan  7 23:23:51 
2016(r293395)
+++ stable/10/secure/libexec/sftp-server/Makefile   Thu Jan  7 23:26:16 
2016(r293396)
@@ -6,6 +6,7 @@ PROG=   sftp-server
 SRCS=   sftp-server.c sftp-common.c sftp-server-main.c
 MAN=   sftp-server.8
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= ssh_namespace.h
 
 .if !defined(NO_SHARED)
 # required when linking with a dynamic libssh
@@ -29,5 +30,3 @@ LDADD+=   -lcrypt -lcrypto -lz
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/10/secure/libexec/ssh-keysign/Makefile
==
--- stable/10/secure/libexec/ssh-keysign/Makefile   Thu Jan  7 23:23:51 
2016(r293395)
+++ stable/10/secure/libexec/ssh-keysign/Makefile   Thu Jan  7 23:26:16 
2016(r293396)
@@ -6,6 +6,7 @@ PROG=   ssh-keysign
 SRCS=  ssh-keysign.c roaming_dummy.c readconf.c
 MAN=   ssh-keysign.8
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= ssh_namespace.h
 BINMODE=4555
 
 DPADD= ${LIBSSH}
@@ -25,5 +26,3 @@ LDADD+= -lcrypt -lcrypto -lz
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/10/secure/libexec/ssh-pkcs11-helper/Makefile
==
--- stable/10/secure/libexec/ssh-pkcs11-helper/Makefile Thu Jan  7 23:23:51 
2016(r293395)
+++ stable/10/secure/libexec/ssh-pkcs11-helper/Makefile Thu Jan  7 23:26:16 
2016(r293396)
@@ -6,6 +6,7 @@ PROG=   ssh-pkcs11-helper
 SRCS=  ssh-pkcs11.c ssh-pkcs11-helper.c
 MAN=   ssh-pkcs11-helper.8
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= ssh_namespace.h
 
 .if !defined(NO_SHARED)
 # required when linking with a dynamic libssh
@@ -29,5 +30,3 @@ LDADD+= -lcrypt -lcrypto -lz
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/10/secure/usr.bin/scp/Makefile
==
--- stable/10/secure/usr.bin/scp/Makefile   Thu Jan  7 23:23:51 2016
(r293395)
+++ stable/10/secure/usr.bin/scp/Makefile   Thu Jan  7 23:26:16 2016
(r293396)
@@ -5,6 +5,7 @@
 PROG=  scp
 SRCS=  scp.c
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= 

svn commit: r293403 - head/libexec/rtld-elf

2016-01-07 Thread Ed Maste
Author: emaste
Date: Fri Jan  8 00:56:41 2016
New Revision: 293403
URL: https://svnweb.freebsd.org/changeset/base/293403

Log:
  Revert r293201, r293202 (rtld: populate DT_DEBUG iff DYNAMIC segment is 
writable)
  
  It turns out MIPS binaries may have other oddities that can trigger a
  fault at startup.
  
  PR:   206017
  Reported by:  ray

Modified:
  head/libexec/rtld-elf/rtld.c
  head/libexec/rtld-elf/rtld.h

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cFri Jan  8 00:46:28 2016
(r293402)
+++ head/libexec/rtld-elf/rtld.cFri Jan  8 00:56:41 2016
(r293403)
@@ -1144,13 +1144,13 @@ digest_dynamic1(Obj_Entry *obj, int earl
 * is mapped read-only. DT_MIPS_RLD_MAP is used instead.
 */
 
+#ifndef __mips__
case DT_DEBUG:
-   if (!obj->writable_dynamic)
-   break;
if (!early)
dbg("Filling in DT_DEBUG entry");
((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) _debug;
break;
+#endif
 
case DT_FLAGS:
if (dynp->d_un.d_val & DF_ORIGIN)
@@ -1331,8 +1331,6 @@ digest_phdr(const Elf_Phdr *phdr, int ph
break;
 
case PT_DYNAMIC:
-   if (ph->p_flags & PROT_WRITE)
-   obj->writable_dynamic = true;
obj->dynamic = (const Elf_Dyn *)(ph->p_vaddr + obj->relocbase);
break;
 

Modified: head/libexec/rtld-elf/rtld.h
==
--- head/libexec/rtld-elf/rtld.hFri Jan  8 00:46:28 2016
(r293402)
+++ head/libexec/rtld-elf/rtld.hFri Jan  8 00:56:41 2016
(r293403)
@@ -264,7 +264,6 @@ typedef struct Struct_Obj_Entry {
 bool valid_hash_sysv : 1;  /* A valid System V hash hash tag is available 
*/
 bool valid_hash_gnu : 1;   /* A valid GNU hash tag is available */
 bool dlopened : 1; /* dlopen()-ed (vs. load statically) */
-bool writable_dynamic : 1; /* PT_DYNAMIC is writable */
 
 struct link_map linkmap;   /* For GDB and dlinfo() */
 Objlist dldags;/* Object belongs to these dlopened DAGs (%) */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293400 - in stable/9: lib/libpam/modules/pam_ssh secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr....

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Fri Jan  8 00:07:37 2016
New Revision: 293400
URL: https://svnweb.freebsd.org/changeset/base/293400

Log:
  MFC r291941:
  
Replace unneeded manual dependency on header by adding it to SRCS.

Modified:
  stable/9/lib/libpam/modules/pam_ssh/Makefile
  stable/9/secure/lib/libssh/Makefile
  stable/9/secure/libexec/sftp-server/Makefile
  stable/9/secure/libexec/ssh-keysign/Makefile
  stable/9/secure/libexec/ssh-pkcs11-helper/Makefile
  stable/9/secure/usr.bin/scp/Makefile
  stable/9/secure/usr.bin/sftp/Makefile
  stable/9/secure/usr.bin/ssh-add/Makefile
  stable/9/secure/usr.bin/ssh-agent/Makefile
  stable/9/secure/usr.bin/ssh-keygen/Makefile
  stable/9/secure/usr.bin/ssh-keyscan/Makefile
  stable/9/secure/usr.bin/ssh/Makefile
  stable/9/secure/usr.sbin/sshd/Makefile
Directory Properties:
  stable/9/lib/libpam/   (props changed)
  stable/9/secure/lib/libssh/   (props changed)
  stable/9/secure/libexec/sftp-server/   (props changed)
  stable/9/secure/libexec/ssh-keysign/   (props changed)
  stable/9/secure/libexec/ssh-pkcs11-helper/   (props changed)
  stable/9/secure/usr.bin/scp/   (props changed)
  stable/9/secure/usr.bin/sftp/   (props changed)
  stable/9/secure/usr.bin/ssh/   (props changed)
  stable/9/secure/usr.bin/ssh-add/   (props changed)
  stable/9/secure/usr.bin/ssh-agent/   (props changed)
  stable/9/secure/usr.bin/ssh-keygen/   (props changed)
  stable/9/secure/usr.bin/ssh-keyscan/   (props changed)
  stable/9/secure/usr.sbin/sshd/   (props changed)

Modified: stable/9/lib/libpam/modules/pam_ssh/Makefile
==
--- stable/9/lib/libpam/modules/pam_ssh/MakefileFri Jan  8 00:05:47 
2016(r293399)
+++ stable/9/lib/libpam/modules/pam_ssh/MakefileFri Jan  8 00:07:37 
2016(r293400)
@@ -12,6 +12,7 @@ SRCS+=roaming_dummy.c
 
 WARNS?=3
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
+SRCS+=  ssh_namespace.h
 
 DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
 LDADD= -lssh -lcrypto -lcrypt
@@ -20,5 +21,3 @@ USEPRIVATELIB= ssh
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/9/secure/lib/libssh/Makefile
==
--- stable/9/secure/lib/libssh/Makefile Fri Jan  8 00:05:47 2016
(r293399)
+++ stable/9/secure/lib/libssh/Makefile Fri Jan  8 00:07:37 2016
(r293400)
@@ -31,9 +31,11 @@ SRCS+=   bcrypt_pbkdf.c blowfish.c bsd-mis
 SRCS+= getrrsetbyname.c
 
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
+SRCS+=  ssh_namespace.h
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
 CFLAGS+= -include krb5_config.h
+SRCS+=  krb5_config.h
 DPADD+=${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} 
${LIBMD} ${LIBROKEN}
 LDADD+=-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
 .endif
@@ -50,8 +52,3 @@ LDADD+=   -lcrypto -lcrypt -lz
 .include 
 
 .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
-.if ${MK_KERBEROS_SUPPORT} != "no"
-${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
-.endif

Modified: stable/9/secure/libexec/sftp-server/Makefile
==
--- stable/9/secure/libexec/sftp-server/MakefileFri Jan  8 00:05:47 
2016(r293399)
+++ stable/9/secure/libexec/sftp-server/MakefileFri Jan  8 00:07:37 
2016(r293400)
@@ -6,6 +6,7 @@ PROG=   sftp-server
 SRCS=   sftp-server.c sftp-common.c sftp-server-main.c
 MAN=   sftp-server.8
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= ssh_namespace.h
 
 .if !defined(NO_SHARED)
 # required when linking with a dynamic libssh
@@ -22,5 +23,3 @@ LDADD+=   -lcrypt -lcrypto -lz
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/9/secure/libexec/ssh-keysign/Makefile
==
--- stable/9/secure/libexec/ssh-keysign/MakefileFri Jan  8 00:05:47 
2016(r293399)
+++ stable/9/secure/libexec/ssh-keysign/MakefileFri Jan  8 00:07:37 
2016(r293400)
@@ -6,6 +6,7 @@ PROG=   ssh-keysign
 SRCS=  ssh-keysign.c roaming_dummy.c readconf.c
 MAN=   ssh-keysign.8
 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+SRCS+= ssh_namespace.h
 BINMODE=4555
 
 DPADD= ${LIBSSH}
@@ -18,5 +19,3 @@ LDADD+= -lcrypt -lcrypto -lz
 .include 
 
 .PATH: ${SSHDIR}
-
-${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

Modified: stable/9/secure/libexec/ssh-pkcs11-helper/Makefile
==
--- stable/9/secure/libexec/ssh-pkcs11-helper/Makefile  Fri Jan  8 00:05:47 
2016(r293399)
+++ stable/9/secure/libexec/ssh-pkcs11-helper/Makefile  Fri Jan  8 00:07:37 
2016(r293400)
@@ -6,6 +6,7 @@ PROG=   ssh-pkcs11-helper
 SRCS=  ssh-pkcs11.c ssh-pkcs11-helper.c
 MAN=   ssh-pkcs11-helper.8
 

svn commit: r293391 - stable/10

2016-01-07 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jan  7 23:10:44 2016
New Revision: 293391
URL: https://svnweb.freebsd.org/changeset/base/293391

Log:
  Merge r293282 from head:
   Provide knob NO_INSTALLEXTRAKERNELS. If defined, extra kernels in KERNCONF
   won't be installed, only the first one would.
  
  Turn NO_INSTALLEXTRAKERNELS=yes on stable/10 to preserve original
  behaviour of not installing additional kernels built.
  
  Reported & tested by: Trond Endrestøl 
  Reported & tested by: dhw

Modified:
  stable/10/Makefile.inc1

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Thu Jan  7 23:02:15 2016(r293390)
+++ stable/10/Makefile.inc1 Thu Jan  7 23:10:44 2016(r293391)
@@ -1012,6 +1012,7 @@ KERNCONFDIR?= ${KRNLCONFDIR}
 
 BUILDKERNELS=
 INSTALLKERNEL=
+NO_INSTALLEXTRAKERNELS=yes
 .if defined(NO_INSTALLKERNEL)
 # All of the BUILDKERNELS loops start at index 1.
 BUILDKERNELS+= dummy
@@ -1109,7 +1110,7 @@ reinstallkernel reinstallkernel.debug: _
${CROSSENV} PATH=${TMPPATH} \
${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} 
${.TARGET:S/kernel//}
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
@echo "--"
@echo ">>> Installing kernel ${_kernel}"
@@ -1140,7 +1141,7 @@ distributekernel distributekernel.debug:
${DESTDIR}/${DISTDIR}/kernel.meta
 .endif
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 .if defined(NO_ROOT)
echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
@@ -1166,7 +1167,7 @@ packagekernel:
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
@@ -1179,7 +1180,7 @@ packagekernel:
tar cvf - . | \
${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
tar cvf - . | \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r293405 - head/sys/kern

2016-01-07 Thread Gleb Smirnoff
Author: glebius
Date: Fri Jan  8 01:16:03 2016
New Revision: 293405
URL: https://svnweb.freebsd.org/changeset/base/293405

Log:
  For SOCK_STREAM socket use sbappendstream() instead of sbappend().

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Fri Jan  8 01:12:27 2016(r293404)
+++ head/sys/kern/uipc_usrreq.c Fri Jan  8 01:16:03 2016(r293405)
@@ -981,7 +981,7 @@ uipc_send(struct socket *so, int flags, 
control))
control = NULL;
} else
-   sbappend_locked(>so_rcv, m);
+   sbappendstream_locked(>so_rcv, m, flags);
break;
 
case SOCK_SEQPACKET: {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293392 - head/bin/sh

2016-01-07 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jan  7 23:13:20 2016
New Revision: 293392
URL: https://svnweb.freebsd.org/changeset/base/293392

Log:
  sh: Reduce size of options table.

Modified:
  head/bin/sh/expand.c
  head/bin/sh/options.c
  head/bin/sh/options.h
  head/bin/sh/var.c

Modified: head/bin/sh/expand.c
==
--- head/bin/sh/expand.cThu Jan  7 23:10:44 2016(r293391)
+++ head/bin/sh/expand.cThu Jan  7 23:13:20 2016(r293392)
@@ -951,8 +951,8 @@ varvalue(const char *name, int quoted, i
case '-':
p = buf;
for (i = 0 ; i < NSHORTOPTS ; i++) {
-   if (optlist[i].val)
-   *p++ = optlist[i].letter;
+   if (optval[i])
+   *p++ = optletter[i];
}
*p = '\0';
strtodest(buf, flag, subtype, quoted, dst);

Modified: head/bin/sh/options.c
==
--- head/bin/sh/options.c   Thu Jan  7 23:10:44 2016(r293391)
+++ head/bin/sh/options.c   Thu Jan  7 23:13:20 2016(r293392)
@@ -91,7 +91,7 @@ procargs(int argc, char **argv)
if (argc > 0)
argptr++;
for (i = 0; i < NOPTS; i++)
-   optlist[i].val = 2;
+   optval[i] = 2;
privileged = (getuid() != geteuid() || getgid() != getegid());
options(1);
if (*argptr == NULL && minusc == NULL)
@@ -104,8 +104,8 @@ procargs(int argc, char **argv)
if (mflag == 2)
mflag = iflag;
for (i = 0; i < NOPTS; i++)
-   if (optlist[i].val == 2)
-   optlist[i].val = 0;
+   if (optval[i] == 2)
+   optval[i] = 0;
arg0 = argv[0];
if (sflag == 0 && minusc == NULL) {
scriptname = *argptr++;
@@ -250,26 +250,29 @@ static void
 minus_o(char *name, int val)
 {
int i;
+   const unsigned char *on;
+   size_t len;
 
if (name == NULL) {
if (val) {
/* "Pretty" output. */
out1str("Current option settings\n");
-   for (i = 0; i < NOPTS; i++)
-   out1fmt("%-16s%s\n", optlist[i].name,
-   optlist[i].val ? "on" : "off");
+   for (i = 0, on = optname; i < NOPTS; i++, on += *on + 1)
+   out1fmt("%-16.*s%s\n", *on, on + 1,
+   optval[i] ? "on" : "off");
} else {
/* Output suitable for re-input to shell. */
-   for (i = 0; i < NOPTS; i++)
-   out1fmt("%s %co %s%s",
+   for (i = 0, on = optname; i < NOPTS; i++, on += *on + 1)
+   out1fmt("%s %co %.*s%s",
i % 6 == 0 ? "set" : "",
-   optlist[i].val ? '-' : '+',
-   optlist[i].name,
+   optval[i] ? '-' : '+',
+   *on, on + 1,
i % 6 == 5 || i == NOPTS - 1 ? "\n" : "");
}
} else {
-   for (i = 0; i < NOPTS; i++)
-   if (equal(name, optlist[i].name)) {
+   len = strlen(name);
+   for (i = 0, on = optname; i < NOPTS; i++, on += *on + 1)
+   if (*on == len && memcmp(on + 1, name, len) == 0) {
setoptionbyindex(i, val);
return;
}
@@ -281,18 +284,18 @@ minus_o(char *name, int val)
 static void
 setoptionbyindex(int idx, int val)
 {
-   if (optlist[idx].letter == 'p' && !val && privileged) {
+   if (optletter[idx] == 'p' && !val && privileged) {
if (setgid(getgid()) == -1)
error("setgid");
if (setuid(getuid()) == -1)
error("setuid");
}
-   optlist[idx].val = val;
+   optval[idx] = val;
if (val) {
/* #%$ hack for ksh semantics */
-   if (optlist[idx].letter == 'V')
+   if (optletter[idx] == 'V')
Eflag = 0;
-   else if (optlist[idx].letter == 'E')
+   else if (optletter[idx] == 'E')
Vflag = 0;
}
 }
@@ -303,7 +306,7 @@ setoption(int flag, int val)
int i;
 
for (i = 0; i < NSHORTOPTS; i++)
-   if (optlist[i].letter == flag) {
+   if (optletter[i] == flag) {
setoptionbyindex(i, val);
return;
}

Modified: head/bin/sh/options.h

svn commit: r293398 - head/tools/tools/nanobsd/embedded

2016-01-07 Thread Warner Losh
Author: imp
Date: Fri Jan  8 00:05:28 2016
New Revision: 293398
URL: https://svnweb.freebsd.org/changeset/base/293398

Log:
  Setup /pkg as a spot for pkg to operate. This is for testing purposes
  only. You need to remount / rw and export TMPDIR=/pkg/tmp. pkg will
  then work. It's slow though: 15 minutes to pkg install git on an RPi 2
  with a decently fast SD card. Since this is for testing, we set
  DEFAULT_ALWAYS_YES and ASSUME_ALWAYS_YES to YES.

Modified:
  head/tools/tools/nanobsd/embedded/common

Modified: head/tools/tools/nanobsd/embedded/common
==
--- head/tools/tools/nanobsd/embedded/commonFri Jan  8 00:05:20 2016
(r293397)
+++ head/tools/tools/nanobsd/embedded/commonFri Jan  8 00:05:28 2016
(r293398)
@@ -449,6 +449,28 @@ typical_embedded ( ) (
 )
 customize_cmd typical_embedded
 
+fix_pkg ( ) (
+   chdir ${NANO_WORLDDIR}
+   mkdir -p pkg
+   mkdir -p pkg/db
+   mkdir -p pkg/cache
+   mkdir -p pkg/tmp# Needed for pkg bootstrap
+   mkdir -p usr/local/etc  # Will get moved to local/etc
+   (
+   echo 'PKG_DBDIR = "/pkg/db"'
+   echo 'PKG_CACHEDIR = "/pkg/cache"'
+   echo 'DEFAULT_ALWAYS_YES = "yes"'
+   echo 'ASSUME_ALWAYS_YES = "yes"'
+   ) >> usr/local/etc/pkg.conf
+   [ -z ${NANO_NOPRIV_BUILD} ] || (
+   echo "./pkg type=dir uname=root gname=wheel mode=0755"
+   echo "./pkg/cache type=dir uname=root gname=wheel mode=0755"
+   echo "./pkg/db type=dir uname=root gname=wheel mode=0755"
+   echo "./pkg/tmp type=dir uname=root gname=wheel mode=0755"
+   ) >> ${NANO_METALOG}
+)
+customize_cmd fix_pkg
+
 save_build ( ) (
VERSION_FILE=${NANO_WORLDDIR}/etc/version
if [ "${SVNREVISION}" = "${REVISION}" ]; then
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293401 - stable/10/lib/libc/rpc

2016-01-07 Thread Stanislav Sedov
Author: stas
Date: Fri Jan  8 00:21:55 2016
New Revision: 293401
URL: https://svnweb.freebsd.org/changeset/base/293401

Log:
  MFC r292047: RPC: populate local address for rendezvous transporter.

Modified:
  stable/10/lib/libc/rpc/svc_vc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/svc_vc.c
==
--- stable/10/lib/libc/rpc/svc_vc.c Fri Jan  8 00:07:37 2016
(r293400)
+++ stable/10/lib/libc/rpc/svc_vc.c Fri Jan  8 00:21:55 2016
(r293401)
@@ -292,8 +292,8 @@ rendezvous_request(xprt, msg)
int sock, flags;
struct cf_rendezvous *r;
struct cf_conn *cd;
-   struct sockaddr_storage addr;
-   socklen_t len;
+   struct sockaddr_storage addr, sslocal;
+   socklen_t len, slen;
struct __rpc_sockinfo si;
SVCXPRT *newxprt;
fd_set cleanfds;
@@ -358,6 +358,20 @@ again:
__xdrrec_setnonblock(>xdrs, cd->maxrec);
} else
cd->nonblock = FALSE;
+   slen = sizeof(struct sockaddr_storage);
+   if(_getsockname(sock, (struct sockaddr *)(void *), ) < 0) {
+   warnx("svc_vc_create: could not retrieve local addr");
+   newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = 0;
+   } else {
+   newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = 
sslocal.ss_len;
+   newxprt->xp_ltaddr.buf = mem_alloc((size_t)sslocal.ss_len);
+   if (newxprt->xp_ltaddr.buf == NULL) {
+   warnx("svc_vc_create: no mem for local addr");
+   newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = 0;
+   } else {
+   memcpy(newxprt->xp_ltaddr.buf, , 
(size_t)sslocal.ss_len);
+   }
+   }
 
gettimeofday(>last_recv_time, NULL);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293402 - stable/10/sys/netinet

2016-01-07 Thread Stanislav Sedov
Author: stas
Date: Fri Jan  8 00:46:28 2016
New Revision: 293402
URL: https://svnweb.freebsd.org/changeset/base/293402

Log:
  MFC r277938 (by hiren): make syncookie_mac() use 'tcp_seq irs' in computing 
hash.

Modified:
  stable/10/sys/netinet/tcp_syncache.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/tcp_syncache.c
==
--- stable/10/sys/netinet/tcp_syncache.cFri Jan  8 00:21:55 2016
(r293401)
+++ stable/10/sys/netinet/tcp_syncache.cFri Jan  8 00:46:28 2016
(r293402)
@@ -1852,6 +1852,7 @@ syncookie_mac(struct in_conninfo *inc, t
}
SipHash_Update(, >inc_fport, sizeof(inc->inc_fport));
SipHash_Update(, >inc_lport, sizeof(inc->inc_lport));
+   SipHash_Update(, , sizeof(irs));
SipHash_Update(, , sizeof(flags));
SipHash_Update(, , sizeof(secmod));
SipHash_Final((u_int8_t *), );
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293387 - svnadmin/conf

2016-01-07 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Thu Jan  7 22:51:59 2016
New Revision: 293387
URL: https://svnweb.freebsd.org/changeset/base/293387

Log:
  Remove myself from the size limit override pool.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:47:27 2016
(r293386)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:51:59 2016
(r293387)
@@ -20,7 +20,6 @@ brooks
 davidcs
 des
 dim
-gonzo
 imp
 jb
 jeff
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293390 - in head: share/man/man4 sys/dev/ioat

2016-01-07 Thread Conrad E. Meyer
Author: cem
Date: Thu Jan  7 23:02:15 2016
New Revision: 293390
URL: https://svnweb.freebsd.org/changeset/base/293390

Log:
  ioat(4): Add ioat_acquire_reserve() KPI
  
  ioat_acquire_reserve() is an extended version of ioat_acquire().  It
  allows users to reserve space in the channel for some number of
  descriptors.  If this succeeds, it guarantees that at least submission
  of N valid descriptors will succeed.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/man/man4/ioat.4
  head/sys/dev/ioat/ioat.c
  head/sys/dev/ioat/ioat.h

Modified: head/share/man/man4/ioat.4
==
--- head/share/man/man4/ioat.4  Thu Jan  7 22:59:09 2016(r293389)
+++ head/share/man/man4/ioat.4  Thu Jan  7 23:02:15 2016(r293390)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 5, 2016
+.Dd January 7, 2016
 .Dt IOAT 4
 .Os
 .Sh NAME
@@ -73,6 +73,8 @@ In
 .Fn ioat_get_max_coalesce_period "bus_dmaengine_t dmaengine"
 .Ft void
 .Fn ioat_acquire "bus_dmaengine_t dmaengine"
+.Ft int
+.Fn ioat_acquire_reserve "bus_dmaengine_t dmaengine" "uint32_t n" "int mflags"
 .Ft void
 .Fn ioat_release "bus_dmaengine_t dmaengine"
 .Ft struct bus_dmadesc *
@@ -178,6 +180,14 @@ When the user wants to offload a copy, t
 the
 .Ar bus_dmaengine_t
 object for exclusive access to enqueue operations on that channel.
+Optionally, the user can reserve space by using
+.Fn ioat_acquire_reserve
+instead.
+If
+.Fn ioat_acquire_reserve
+succeeds, there is guaranteed to be room for
+.Fa N
+new operations in the internal ring buffer.
 Then, they will submit one or more operations using
 .Fn ioat_blockfill ,
 .Fn ioat_copy ,

Modified: head/sys/dev/ioat/ioat.c
==
--- head/sys/dev/ioat/ioat.cThu Jan  7 22:59:09 2016(r293389)
+++ head/sys/dev/ioat/ioat.cThu Jan  7 23:02:15 2016(r293390)
@@ -789,6 +789,21 @@ ioat_acquire(bus_dmaengine_t dmaengine)
CTR0(KTR_IOAT, __func__);
 }
 
+int
+ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags)
+{
+   struct ioat_softc *ioat;
+   int error;
+
+   ioat = to_ioat_softc(dmaengine);
+   ioat_acquire(dmaengine);
+
+   error = ioat_reserve_space(ioat, n, mflags);
+   if (error != 0)
+   ioat_release(dmaengine);
+   return (error);
+}
+
 void
 ioat_release(bus_dmaengine_t dmaengine)
 {

Modified: head/sys/dev/ioat/ioat.h
==
--- head/sys/dev/ioat/ioat.hThu Jan  7 22:59:09 2016(r293389)
+++ head/sys/dev/ioat/ioat.hThu Jan  7 23:02:15 2016(r293390)
@@ -96,13 +96,26 @@ uint16_t ioat_get_max_coalesce_period(bu
 
 /*
  * Acquire must be called before issuing an operation to perform. Release is
- * called after. Multiple operations can be issued within the context of one
+ * called after.  Multiple operations can be issued within the context of one
  * acquire and release
  */
 void ioat_acquire(bus_dmaengine_t dmaengine);
 void ioat_release(bus_dmaengine_t dmaengine);
 
 /*
+ * Acquire_reserve can be called to ensure there is room for N descriptors.  If
+ * it succeeds, the next N valid operations will successfully enqueue.
+ *
+ * It may fail with:
+ *   - ENXIO if the channel is in an errored state, or the driver is being
+ * unloaded
+ *   - EAGAIN if mflags included M_NOWAIT
+ *
+ * On failure, the caller does not hold the dmaengine.
+ */
+int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags);
+
+/*
  * Issue a blockfill operation.  The 64-bit pattern 'fillpattern' is written to
  * 'len' physically contiguous bytes at 'dst'.
  *
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293397 - stable/9/sys/dev/cxgbe

2016-01-07 Thread Navdeep Parhar
Author: np
Date: Fri Jan  8 00:05:20 2016
New Revision: 293397
URL: https://svnweb.freebsd.org/changeset/base/293397

Log:
  MFC r279969:
  
  cxgbe(4):  fix if_media handling for T520-BT cards.  1Gbps and 100Mbps
  are valid for this card.

Modified:
  stable/9/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/cxgbe/t4_main.c
==
--- stable/9/sys/dev/cxgbe/t4_main.cThu Jan  7 23:26:16 2016
(r293396)
+++ stable/9/sys/dev/cxgbe/t4_main.cFri Jan  8 00:05:20 2016
(r293397)
@@ -2655,9 +2655,6 @@ build_medialist(struct port_info *pi)
 
switch(pi->port_type) {
case FW_PORT_TYPE_BT_XFI:
-   ifmedia_add(media, m | IFM_10G_T, data, NULL);
-   break;
-
case FW_PORT_TYPE_BT_XAUI:
ifmedia_add(media, m | IFM_10G_T, data, NULL);
/* fall through */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293399 - head/tools/tools/nanobsd

2016-01-07 Thread Warner Losh
Author: imp
Date: Fri Jan  8 00:05:47 2016
New Revision: 293399
URL: https://svnweb.freebsd.org/changeset/base/293399

Log:
  Make sure that the /set directive gets put at the top of the file,
  instead of in sort order. Slash sorts after period.

Modified:
  head/tools/tools/nanobsd/defaults.sh   (contents, props changed)

Modified: head/tools/tools/nanobsd/defaults.sh
==
--- head/tools/tools/nanobsd/defaults.shFri Jan  8 00:05:28 2016
(r293398)
+++ head/tools/tools/nanobsd/defaults.shFri Jan  8 00:05:47 2016
(r293399)
@@ -500,10 +500,9 @@ fixup_before_diskimage ( ) (
if [ -n "${NANO_METALOG}" ]; then
pprint 2 "Fixing metalog"
cp ${NANO_METALOG} ${NANO_METALOG}.pre
-   (echo "/set uname=${NANO_DEF_UNAME} gname=${NANO_DEF_GNAME}" &&
-   cat ${NANO_METALOG}.pre) | \
-   ${NANO_TOOLS}/mtree-dedup.awk | \
-   sed -e 's/ size=[0-9][0-9]*//' | sort > ${NANO_METALOG}
+   echo "/set uname=${NANO_DEF_UNAME} gname=${NANO_DEF_GNAME}" > 
${NANO_METALOG}
+   cat ${NANO_METALOG}.pre | ${NANO_TOOLS}/mtree-dedup.awk | \
+   sed -e 's/ size=[0-9][0-9]*//' | sort >> ${NANO_METALOG}
fi  
 )
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293313 - head/sys/netinet/tcp_stacks

2016-01-07 Thread Jonathan T. Looney
Author: jtl
Date: Thu Jan  7 11:54:20 2016
New Revision: 293313
URL: https://svnweb.freebsd.org/changeset/base/293313

Log:
  Apply the changes from r293284 to one additional file.
  
  Discussed with:   glebius

Modified:
  head/sys/netinet/tcp_stacks/fastpath.c

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==
--- head/sys/netinet/tcp_stacks/fastpath.c  Thu Jan  7 10:39:13 2016
(r293312)
+++ head/sys/netinet/tcp_stacks/fastpath.c  Thu Jan  7 11:54:20 2016
(r293313)
@@ -158,13 +158,11 @@ static voidtcp_do_segment_fastack(stru
  *   the ack that opens up a 0-sized window.
  * - LRO wasn't used for this segment. We make sure by checking that the
  *   segment size is not larger than the MSS.
- * - Delayed acks are enabled or this is a half-synchronized T/TCP
- *   connection.
  */
 #define DELAY_ACK(tp, tlen)\
((!tcp_timer_active(tp, TT_DELACK) &&   \
(tp->t_flags & TF_RXWIN0SENT) == 0) &&  \
-   (tlen <= tp->t_maxopd) &&   \
+   (tlen <= tp->t_maxseg) &&   \
(V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN)))
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293310 - head/sys/ofed/include/rdma

2016-01-07 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Jan  7 09:40:19 2016
New Revision: 293310
URL: https://svnweb.freebsd.org/changeset/base/293310

Log:
  Remove unused file.

Deleted:
  head/sys/ofed/include/rdma/Kbuild
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293312 - in head: usr.bin/cap_mkdb usr.sbin/services_mkdb

2016-01-07 Thread Renato Botelho
Author: garga (ports committer)
Date: Thu Jan  7 10:39:13 2016
New Revision: 293312
URL: https://svnweb.freebsd.org/changeset/base/293312

Log:
  Make cap_mkdb and services_mkdb file operations sync
  
  Similar fix was done for passwd and group operations in r285050. When a
  temporary file is created and then renamed to replace official file there
  are no checks to make sure data was written to disk and if a power cycle
  happens at this time, system can end up with a 0 length file
  
  Approved by:  bapt
  MFC after:1 week
  Sponsored by: Netgate
  Differential Revision:https://reviews.freebsd.org/D2982

Modified:
  head/usr.bin/cap_mkdb/cap_mkdb.c
  head/usr.sbin/services_mkdb/services_mkdb.c

Modified: head/usr.bin/cap_mkdb/cap_mkdb.c
==
--- head/usr.bin/cap_mkdb/cap_mkdb.cThu Jan  7 10:20:03 2016
(r293311)
+++ head/usr.bin/cap_mkdb/cap_mkdb.cThu Jan  7 10:39:13 2016
(r293312)
@@ -119,7 +119,7 @@ main(int argc, char *argv[])
(void)snprintf(buf, sizeof(buf), "%s.db", capname ? capname : *argv);
if ((capname = strdup(buf)) == NULL)
errx(1, "strdup failed");
-   if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
+   if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR | O_SYNC,
DEFFILEMODE, DB_HASH, )) == NULL)
err(1, "%s", buf);
 

Modified: head/usr.sbin/services_mkdb/services_mkdb.c
==
--- head/usr.sbin/services_mkdb/services_mkdb.c Thu Jan  7 10:20:03 2016
(r293311)
+++ head/usr.sbin/services_mkdb/services_mkdb.c Thu Jan  7 10:39:13 2016
(r293312)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -91,6 +92,8 @@ main(int argc, char *argv[])
size_t   cnt = 0;
StringList *sl, ***svc;
size_t port, proto;
+   char *dbname_dir;
+   int dbname_dir_fd = -1;
 
setprogname(argv[0]);
 
@@ -138,7 +141,7 @@ main(int argc, char *argv[])
err(1, "Cannot install exit handler");
 
(void)snprintf(tname, sizeof(tname), "%s.tmp", dbname);
-   db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL,
+   db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL | O_SYNC,
(S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, );
if (!db)
err(1, "Error opening temporary database `%s'", tname);
@@ -164,8 +167,21 @@ main(int argc, char *argv[])
if ((db->close)(db))
err(1, "Error closing temporary database `%s'", tname);
 
-   if (rename(tname, dbname) == -1)
+   /*
+* Make sure file is safe on disk. To improve performance we will call
+* fsync() to the directory where file lies
+*/
+   if (rename(tname, dbname) == -1 ||
+   (dbname_dir = dirname(dbname)) == NULL ||
+   (dbname_dir_fd = open(dbname_dir, O_RDONLY|O_DIRECTORY)) == -1 ||
+   fsync(dbname_dir_fd) != 0) {
+   if (dbname_dir_fd != -1)
+   close(dbname_dir_fd);
err(1, "Cannot rename `%s' to `%s'", tname, dbname);
+   }
+
+   if (dbname_dir_fd != -1)
+   close(dbname_dir_fd);
 
return 0;
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293315 - head/sys/netgraph/netflow

2016-01-07 Thread Alexander V. Chernikov
Author: melifaro
Date: Thu Jan  7 12:22:29 2016
New Revision: 293315
URL: https://svnweb.freebsd.org/changeset/base/293315

Log:
  Do not use 'struct route_in6' inside hash6_insert().
  
  rin6 was used only as sockaddr_in6 storage. Make rtalloc1_fib()
use on-stack sin6 and return rtenry directly, instead of doing
useless work with 'struct route_in6'.

Modified:
  head/sys/netgraph/netflow/netflow.c

Modified: head/sys/netgraph/netflow/netflow.c
==
--- head/sys/netgraph/netflow/netflow.c Thu Jan  7 12:08:15 2016
(r293314)
+++ head/sys/netgraph/netflow/netflow.c Thu Jan  7 12:22:29 2016
(r293315)
@@ -395,9 +395,8 @@ hash6_insert(priv_p priv, struct flow_ha
int plen, uint8_t flags, uint8_t tcp_flags)
 {
struct flow6_entry *fle6;
-   struct sockaddr_in6 *src, *dst;
+   struct sockaddr_in6 sin6;
struct rtentry *rt;
-   struct route_in6 rin6;
 
mtx_assert(>mtx, MA_OWNED);
 
@@ -425,16 +424,14 @@ hash6_insert(priv_p priv, struct flow_ha
 * fill in out_ifx, dst_mask, nexthop, and dst_as in future releases.
 */
if ((flags & NG_NETFLOW_CONF_NODSTLOOKUP) == 0) {
-   bzero(, sizeof(struct route_in6));
-   dst = (struct sockaddr_in6 *)_dst;
-   dst->sin6_len = sizeof(struct sockaddr_in6);
-   dst->sin6_family = AF_INET6;
-   dst->sin6_addr = r->dst.r_dst6;
+   bzero(, sizeof(struct sockaddr_in6));
+   sin6.sin6_len = sizeof(struct sockaddr_in6);
+   sin6.sin6_family = AF_INET6;
+   sin6.sin6_addr = r->dst.r_dst6;
 
-   rin6.ro_rt = rtalloc1_fib((struct sockaddr *)dst, 0, 0, r->fib);
+   rt = rtalloc1_fib((struct sockaddr *), 0, 0, r->fib);
 
-   if (rin6.ro_rt != NULL) {
-   rt = rin6.ro_rt;
+   if (rt != NULL) {
fle6->f.fle_o_ifx = rt->rt_ifp->if_index;
 
if (rt->rt_flags & RTF_GATEWAY &&
@@ -453,17 +450,14 @@ hash6_insert(priv_p priv, struct flow_ha
 
if ((flags & NG_NETFLOW_CONF_NOSRCLOOKUP) == 0) {
/* Do route lookup on source address, to fill in src_mask. */
-   bzero(, sizeof(struct route_in6));
-   src = (struct sockaddr_in6 *)_dst;
-   src->sin6_len = sizeof(struct sockaddr_in6);
-   src->sin6_family = AF_INET6;
-   src->sin6_addr = r->src.r_src6;
+   bzero(, sizeof(struct sockaddr_in6));
+   sin6.sin6_len = sizeof(struct sockaddr_in6);
+   sin6.sin6_family = AF_INET6;
+   sin6.sin6_addr = r->src.r_src6;
 
-   rin6.ro_rt = rtalloc1_fib((struct sockaddr *)src, 0, 0, r->fib);
-
-   if (rin6.ro_rt != NULL) {
-   rt = rin6.ro_rt;
+   rt = rtalloc1_fib((struct sockaddr *), 0, 0, r->fib);
 
+   if (rt != NULL) {
if (rt_mask(rt))
fle6->f.src_mask = RT_MASK6(rt);
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r275121 - in head/sys: compat/linux compat/svr4 fs/procfs kern sys

2016-01-07 Thread Chagin Dmitry
On Wed, Nov 26, 2014 at 02:10:00PM +, Konstantin Belousov wrote:
> Author: kib
> Date: Wed Nov 26 14:10:00 2014
> New Revision: 275121
> URL: https://svnweb.freebsd.org/changeset/base/275121
> 
> Log:
>   The process spin lock currently has the following distinct uses:
>   
>   - Threads lifetime cycle, in particular, counting of the threads in
> the process, and interlocking with process mutex and thread lock.
> The main reason of this is that turnstile locks are after thread
> locks, so you e.g. cannot unlock blockable mutex (think process
> mutex) while owning thread lock.
>   
>   - Virtual and profiling itimers, since the timers activation is done
> from the clock interrupt context.  Replace the p_slock by p_itimmtx
> and PROC_ITIMLOCK().
>   
>   - Profiling code (profil(2)), for similar reason.  Replace the p_slock
> by p_profmtx and PROC_PROFLOCK().
>   
>   - Resource usage accounting.  Need for the spinlock there is subtle,
> my understanding is that spinlock blocks context switching for the
> current thread, which prevents td_runtime and similar fields from
> changing (updates are done at the mi_switch()).  Replace the p_slock
> by p_statmtx and PROC_STATLOCK().
>   
>   The split is done mostly for code clarity, and should not affect
>   scalability.
>   
>   Tested by:  pho
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  1 week
hi, any chance to merge it?

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293284 - in head/sys: dev/cxgb/ulp/tom dev/cxgbe/tom netinet

2016-01-07 Thread Jonathan T. Looney
On 1/7/16, 4:24 AM, "owner-src-committ...@freebsd.org on behalf of Ivan
Klymenko" 
wrote:

>On Wed, 6 Jan 2016 18:20:50 -0800
>NGie Cooper  wrote:
>
>> On Wed, Jan 6, 2016 at 4:14 PM, Gleb Smirnoff 
>> wrote:
>> > Author: glebius
>> > Date: Thu Jan  7 00:14:42 2016
>> > New Revision: 293284
>> > URL: https://svnweb.freebsd.org/changeset/base/293284
>> > [...]
>>This broke the build.
>> 
>>[...]
>amd64 also

r293313 should fix the build breaks.

Jonathan


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r277610 - in head: bin/ln lib/libc/include lib/libc/sys share/man/man4 sys/compat/freebsd32 sys/kern sys/sys usr.bin/kdump

2016-01-07 Thread Chagin Dmitry
On Fri, Jan 23, 2015 at 09:07:09PM +, Jilles Tjoelker wrote:
> Author: jilles
> Date: Fri Jan 23 21:07:08 2015
> New Revision: 277610
> URL: https://svnweb.freebsd.org/changeset/base/277610
> 
> Log:
>   Add futimens and utimensat system calls.
>   
>   The core kernel part is patch file utimes.2008.4.diff from
>   pluk...@freebsd.org. I updated the code for API changes, added the manual
>   page and added compatibility code for old kernels. There is also audit and
>   Capsicum support.
>   
>   A new UTIME_* constant might allow setting birthtimes in future.
>   
>   Differential Revision:  https://reviews.freebsd.org/D1426
>   Submitted by:   pluknet (partially)
>   Reviewed by:delphij, pluknet, rwatson
>   Relnotes:   yes

any chances that it will be merged to 10? if not, can I merge kernel part only?
thanks! 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293349 - head/sys/kern

2016-01-07 Thread Bruce Evans

On Thu, 7 Jan 2016, Konstantin Belousov wrote:


Log:
 Convert tty common code to use make_dev_s().

 Tty.c was untypical in that it handled the si_drv1 issue consistently
 and correctly, by always checking for si_drv1 being non-NULL and
 sleeping if NULL.  The removed code also illustrated unneeded
 complications in drivers which are eliminated by the use of new KPI.


Actually, the handling was consistently incorrect.  In the case where
si_drv1 is actually NULL, it usually returned EWOULDBLOCK instead of 0
for successful opens.  This is a rare case and I haven't seen it so
I'm not sure how to recover from it.  revoke() of the device should
work.  Even open() followed by a "last" close() would probably work.


 Reviewed by:   hps, jhb
 Discussed with:bde


There seem to further old and unfixed problems.  Sorry I didn't look
at your patch very closely.  I will reply privately the complicated
details of this.


Modified: head/sys/kern/tty.c
==
--- head/sys/kern/tty.c Thu Jan  7 20:15:05 2016(r293348)
+++ head/sys/kern/tty.c Thu Jan  7 20:15:09 2016(r293349)
@@ -237,14 +237,10 @@ static int
ttydev_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
struct tty *tp;
-   int error = 0;


This code used to be just 2 style bugs:
- initialization in declaration
- use of the initialization much later.  It is to get the variable
  initialized for code starting about 50 lines later, in case that
  code falls through an if ladder to th return another 40 lines later.


-
-   while ((tp = dev->si_drv1) == NULL) {
-   error = tsleep(>si_drv1, PCATCH, "ttdrv1", 1);
-   if (error != EWOULDBLOCK)
-   return (error);
-   }


The initialization became not just a style bug when the si_drv1 handling
corrupted it.

Urk, the handling was almost completely incorrect:
- the timeout shouldn't be needed.  There is a wakeup when si_drv1 is
  initialized.
- if the wakeup actually works, then its handling is very broken.  Then
  tsleep() returns 0.  This is treated as an error, and the function
  returns 0, which means success, but the devie has not been opened.
- PCATCH shouldn't be needed either, but is not harmful like the buggy
  check for the unnecessary timeout.


+   int error;

+   tp = dev->si_drv1;
+   error = 0;


The initialization is now correct and only 40 lines before it is needed.


tty_lock(tp);
if (tty_gone(tp)) {
/* Device is already gone. */


In my version, 'error' is initialized by more complicated checks on entry
that naturally set it to 0 when they succeed.  After returning when
error != 0 early, it would be unnatural to set it to 0 again later.


@@ -1221,71 +1215,72 @@ tty_makedevf(struct tty *tp, struct ucre
flags |= MAKEDEV_CHECKNAME;

/* Master call-in device. */
-   error = make_dev_p(flags, , _cdevsw, cred, uid, gid, mode,
-   "%s%s", prefix, name);
-   if (error)
+   make_dev_args_init();
+   args.mda_flags = flags;
+   args.mda_devsw = _cdevsw;
+   args.mda_cr = cred;
+   args.mda_uid = uid;
+   args.mda_gid = gid;
+   args.mda_mode = mode;
+   args.mda_si_drv1 = tp;
+   error = make_dev_s(, , "%s%s", prefix, name);
+   if (error != 0)
return (error);
-   dev->si_drv1 = tp;
-   wakeup(>si_drv1);


Wakeups like this should have made the timeout unnecessary.  However, it
would be better to not have them.  This wakeup seems to give an instant
race, while the timeout will often be delayed long enough for the
initialization to complete.


tp->t_dev = dev;


The new version presumably fixes the initialiation order for dev->si_drv1,
but it doesn't change this.  This is delicate.  The details are too large
for this reply.

Bruce
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293407 - stable/10/sys/xen/xenbus

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 02:52:04 2016
New Revision: 293407
URL: https://svnweb.freebsd.org/changeset/base/293407

Log:
  MFC: r292969
  
  Clean up unused-but-set-variable spotted by gcc-4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4778

Modified:
  stable/10/sys/xen/xenbus/xenbusb.c

Modified: stable/10/sys/xen/xenbus/xenbusb.c
==
--- stable/10/sys/xen/xenbus/xenbusb.c  Fri Jan  8 01:18:10 2016
(r293406)
+++ stable/10/sys/xen/xenbus/xenbusb.c  Fri Jan  8 02:52:04 2016
(r293407)
@@ -561,7 +561,6 @@ xenbusb_devices_changed(struct xs_watch 
struct xenbusb_softc *xbs;
device_t dev;
char *node;
-   char *bus;
char *type;
char *id;
char *p;
@@ -580,7 +579,6 @@ xenbusb_devices_changed(struct xs_watch 
p = strchr(node, '/');
if (p == NULL)
goto out;
-   bus = node;
*p = 0;
type = p + 1;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293409 - stable/10/usr.sbin/camdd

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 02:56:21 2016
New Revision: 293409
URL: https://svnweb.freebsd.org/changeset/base/293409

Log:
  MFC: r292971
  
  Clean up unused-but-set-variable spotted by gcc-4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4776

Modified:
  stable/10/usr.sbin/camdd/camdd.c

Modified: stable/10/usr.sbin/camdd/camdd.c
==
--- stable/10/usr.sbin/camdd/camdd.cFri Jan  8 02:54:21 2016
(r293408)
+++ stable/10/usr.sbin/camdd/camdd.cFri Jan  8 02:56:21 2016
(r293409)
@@ -1276,7 +1276,6 @@ camdd_probe_pass(struct cam_device *cam_
struct camdd_dev_pass *pass_dev;
struct kevent ke;
int scsi_dev_type;
-   int retval;
 
dev = NULL;
 
@@ -1336,7 +1335,6 @@ camdd_probe_pass(struct cam_device *cam_
 
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr);
-   retval = 1;
goto bailout;
}
 
@@ -1371,11 +1369,8 @@ camdd_probe_pass(struct cam_device *cam_
 
if (cam_send_ccb(cam_dev, ccb) < 0) {
warn("error sending READ CAPACITY (16) command");
-
cam_error_print(cam_dev, ccb, CAM_ESF_ALL,
CAM_EPF_ALL, stderr);
-
-   retval = 1;
goto bailout;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293410 - stable/10/sys/net

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 02:58:10 2016
New Revision: 293410
URL: https://svnweb.freebsd.org/changeset/base/293410

Log:
  MFC: r292972
  
  Wrap using #ifdef 'notyet' those variables and statements not yet
  implemented to lower the compiler warnings.
  
  It fix the case of unused-but-set-variable spotted by gcc4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4775

Modified:
  stable/10/sys/net/if_gre.c

Modified: stable/10/sys/net/if_gre.c
==
--- stable/10/sys/net/if_gre.c  Fri Jan  8 02:56:21 2016(r293409)
+++ stable/10/sys/net/if_gre.c  Fri Jan  8 02:58:10 2016(r293410)
@@ -682,7 +682,10 @@ gre_input(struct mbuf **mp, int *offp, i
struct grehdr *gh;
struct ifnet *ifp;
struct mbuf *m;
-   uint32_t *opts, key;
+   uint32_t *opts;
+#ifdef notyet
+uint32_t key;
+#endif
uint16_t flags;
int hlen, isr, af;
 
@@ -715,17 +718,27 @@ gre_input(struct mbuf **mp, int *offp, i
opts++;
}
if (flags & GRE_FLAGS_KP) {
+#ifdef notyet
+/*
+ * XXX: The current implementation uses the key only for outgoing
+ * packets. But we can check the key value here, or even in the
+ * encapcheck function.
+ */
key = ntohl(*opts);
+#endif
hlen += sizeof(uint32_t);
opts++;
+}
+#ifdef notyet
} else
key = 0;
-   /*
if (sc->gre_key != 0 && (key != sc->gre_key || key != 0))
goto drop;
-   */
+#endif
if (flags & GRE_FLAGS_SP) {
-   /* seq = ntohl(*opts); */
+#ifdef notyet
+   seq = ntohl(*opts);
+#endif
hlen += sizeof(uint32_t);
}
switch (ntohs(gh->gre_proto)) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293411 - stable/10/sys/net

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 02:59:56 2016
New Revision: 293411
URL: https://svnweb.freebsd.org/changeset/base/293411

Log:
  MFC: r292980
  
  Clean up unused-but-set-variable spotted by gcc4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4774

Modified:
  stable/10/sys/net/if_gif.c

Modified: stable/10/sys/net/if_gif.c
==
--- stable/10/sys/net/if_gif.c  Fri Jan  8 02:58:10 2016(r293410)
+++ stable/10/sys/net/if_gif.c  Fri Jan  8 02:59:56 2016(r293411)
@@ -527,7 +527,6 @@ gif_input(struct mbuf *m, struct ifnet *
struct gif_softc *sc;
struct ether_header *eh;
struct ifnet *oldifp;
-   uint32_t gif_options;
int isr, n, af;
 
if (ifp == NULL) {
@@ -536,7 +535,6 @@ gif_input(struct mbuf *m, struct ifnet *
return;
}
sc = ifp->if_softc;
-   gif_options = sc->gif_options;
m->m_pkthdr.rcvif = ifp;
m_clrprotoflags(m);
switch (proto) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293412 - stable/10/usr.sbin/bhyve

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 03:02:19 2016
New Revision: 293412
URL: https://svnweb.freebsd.org/changeset/base/293412

Log:
  MFC: r292982
  
  Remove unused variable after r292981 to unbreak the build.
  
  MFC: r292981
  
  Clean up unused-but-set-variable spotted by gcc-4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4773

Modified:
  stable/10/usr.sbin/bhyve/bhyverun.c

Modified: stable/10/usr.sbin/bhyve/bhyverun.c
==
--- stable/10/usr.sbin/bhyve/bhyverun.c Fri Jan  8 02:59:56 2016
(r293411)
+++ stable/10/usr.sbin/bhyve/bhyverun.c Fri Jan  8 03:02:19 2016
(r293412)
@@ -307,14 +307,13 @@ static int
 vmexit_inout(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu)
 {
int error;
-   int bytes, port, in, out, string;
+   int bytes, port, in, out;
int vcpu;
 
vcpu = *pvcpu;
 
port = vme->u.inout.port;
bytes = vme->u.inout.bytes;
-   string = vme->u.inout.string;
in = vme->u.inout.in;
out = !in;
 
@@ -596,7 +595,7 @@ static vmexit_handler_t handler[VM_EXITC
 static void
 vm_loop(struct vmctx *ctx, int vcpu, uint64_t startrip)
 {
-   int error, rc, prevcpu;
+   int error, rc;
enum vm_exitcode exitcode;
cpuset_t active_cpus;
 
@@ -617,8 +616,6 @@ vm_loop(struct vmctx *ctx, int vcpu, uin
if (error != 0)
break;
 
-   prevcpu = vcpu;
-
exitcode = vmexit[vcpu].exitcode;
if (exitcode >= VM_EXITCODE_MAX || handler[exitcode] == NULL) {
fprintf(stderr, "vm_loop: unexpected exitcode 0x%x\n",
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293408 - stable/10/usr.sbin/bhyve

2016-01-07 Thread Marcelo Araujo
Author: araujo
Date: Fri Jan  8 02:54:21 2016
New Revision: 293408
URL: https://svnweb.freebsd.org/changeset/base/293408

Log:
  MFC: r292970
  
  Clean up unused-but-set-variable spotted by gcc-4.9.
  
  Reviewed by:  ngie
  Approved by:  rodrigc (mentor)
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4777

Modified:
  stable/10/usr.sbin/bhyve/pci_emul.c

Modified: stable/10/usr.sbin/bhyve/pci_emul.c
==
--- stable/10/usr.sbin/bhyve/pci_emul.c Fri Jan  8 02:52:04 2016
(r293407)
+++ stable/10/usr.sbin/bhyve/pci_emul.c Fri Jan  8 02:54:21 2016
(r293408)
@@ -863,10 +863,9 @@ msixcap_cfgwrite(struct pci_devinst *pi,
 int bytes, uint32_t val)
 {
uint16_t msgctrl, rwmask;
-   int off, table_bar;
+   int off;

off = offset - capoff;
-   table_bar = pi->pi_msix.table_bar;
/* Message Control Register */
if (off == 2 && bytes == 2) {
rwmask = PCIM_MSIXCTRL_MSIX_ENABLE | 
PCIM_MSIXCTRL_FUNCTION_MASK;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r275121 - in head/sys: compat/linux compat/svr4 fs/procfs kern sys

2016-01-07 Thread Konstantin Belousov
On Thu, Jan 07, 2016 at 04:39:53PM +0300, Chagin Dmitry wrote:
> On Wed, Nov 26, 2014 at 02:10:00PM +, Konstantin Belousov wrote:
> > Author: kib
> > Date: Wed Nov 26 14:10:00 2014
> > New Revision: 275121
> > URL: https://svnweb.freebsd.org/changeset/base/275121
> > 
> > Log:
> >   The process spin lock currently has the following distinct uses:
> >   
> >   - Threads lifetime cycle, in particular, counting of the threads in
> > the process, and interlocking with process mutex and thread lock.
> > The main reason of this is that turnstile locks are after thread
> > locks, so you e.g. cannot unlock blockable mutex (think process
> > mutex) while owning thread lock.
> >   
> >   - Virtual and profiling itimers, since the timers activation is done
> > from the clock interrupt context.  Replace the p_slock by p_itimmtx
> > and PROC_ITIMLOCK().
> >   
> >   - Profiling code (profil(2)), for similar reason.  Replace the p_slock
> > by p_profmtx and PROC_PROFLOCK().
> >   
> >   - Resource usage accounting.  Need for the spinlock there is subtle,
> > my understanding is that spinlock blocks context switching for the
> > current thread, which prevents td_runtime and similar fields from
> > changing (updates are done at the mi_switch()).  Replace the p_slock
> > by p_statmtx and PROC_STATLOCK().
> >   
> >   The split is done mostly for code clarity, and should not affect
> >   scalability.
> >   
> >   Tested by:pho
> >   Sponsored by: The FreeBSD Foundation
> >   MFC after:1 week
> hi, any chance to merge it?

I do not want to merge the split, for many reasons.
I suppose the merge conflicts due to the replace of PROC_SLOCK() by
PROC_*LOCK() are what you are looking after, am I right ?

What could be done, is to merge the syntax changes from the patch.  I mean,
provide the PROC_*LOCK() macros and merge all changes to use new macros,
but internal implementation would still lock the same proc spinlock.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293322 - head/sys/dev/nvd

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 15:59:51 2016
New Revision: 293322
URL: https://svnweb.freebsd.org/changeset/base/293322

Log:
  nvd: break out submission logic into separate function
  
  This enables a future patch using this same logic to submit
  I/O directly bypassing the taskqueue.
  
  MFC after:3 days
  Sponsored by: Intel

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

Modified: head/sys/dev/nvd/nvd.c
==
--- head/sys/dev/nvd/nvd.c  Thu Jan  7 15:58:44 2016(r293321)
+++ head/sys/dev/nvd/nvd.c  Thu Jan  7 15:59:51 2016(r293322)
@@ -47,6 +47,8 @@ struct nvd_disk;
 static disk_ioctl_t nvd_ioctl;
 static disk_strategy_t nvd_strategy;
 
+static void nvd_done(void *arg, const struct nvme_completion *cpl);
+
 static void *nvd_new_disk(struct nvme_namespace *ns, void *ctrlr);
 static void destroy_geom_disk(struct nvd_disk *ndisk);
 
@@ -148,6 +150,26 @@ nvd_unload()
nvme_unregister_consumer(consumer_handle);
 }
 
+static int
+nvd_bio_submit(struct nvd_disk *ndisk, struct bio *bp)
+{
+   int err;
+
+   bp->bio_driver1 = NULL;
+   atomic_add_int(>cur_depth, 1);
+   err = nvme_ns_bio_process(ndisk->ns, bp, nvd_done);
+   if (err) {
+   atomic_add_int(>cur_depth, -1);
+   bp->bio_error = err;
+   bp->bio_flags |= BIO_ERROR;
+   bp->bio_resid = bp->bio_bcount;
+   biodone(bp);
+   return (-1);
+   }
+
+   return (0);
+}
+
 static void
 nvd_strategy(struct bio *bp)
 {
@@ -195,7 +217,6 @@ nvd_bioq_process(void *arg, int pending)
 {
struct nvd_disk *ndisk = arg;
struct bio *bp;
-   int err;
 
for (;;) {
mtx_lock(>bioqlock);
@@ -204,17 +225,7 @@ nvd_bioq_process(void *arg, int pending)
if (bp == NULL)
break;
 
-   bp->bio_driver1 = NULL;
-   atomic_add_int(>cur_depth, 1);
-
-   err = nvme_ns_bio_process(ndisk->ns, bp, nvd_done);
-
-   if (err) {
-   atomic_add_int(>cur_depth, -1);
-   bp->bio_error = err;
-   bp->bio_flags |= BIO_ERROR;
-   bp->bio_resid = bp->bio_bcount;
-   biodone(bp);
+   if (nvd_bio_submit(ndisk, bp) != 0) {
continue;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293321 - head/sys/dev/nvd

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 15:58:44 2016
New Revision: 293321
URL: https://svnweb.freebsd.org/changeset/base/293321

Log:
  nvd: skip BIO_ORDERED logic when bio fails submission
  
  This ensures the bio flags are not read after biodone().
  The ordering will still be enforced, after the bio is
  submitted successfully.
  
  MFC after:3 days
  Sponsored by: Intel

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

Modified: head/sys/dev/nvd/nvd.c
==
--- head/sys/dev/nvd/nvd.c  Thu Jan  7 15:57:17 2016(r293320)
+++ head/sys/dev/nvd/nvd.c  Thu Jan  7 15:58:44 2016(r293321)
@@ -215,6 +215,7 @@ nvd_bioq_process(void *arg, int pending)
bp->bio_flags |= BIO_ERROR;
bp->bio_resid = bp->bio_bcount;
biodone(bp);
+   continue;
}
 
 #ifdef BIO_ORDERED
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293324 - head/sys/dev/nvme

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 16:08:04 2016
New Revision: 293324
URL: https://svnweb.freebsd.org/changeset/base/293324

Log:
  nvme: simplify some of the nested ifs in interrupt setup code
  
  This prepares for some follow-up commits which do more work in
  this area.
  
  MFC after:3 days
  Sponsored by: Intel

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==
--- head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 16:06:23 2016
(r293323)
+++ head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 16:08:04 2016
(r293324)
@@ -999,7 +999,9 @@ nvme_ctrlr_construct(struct nvme_control
if (pci_msix_count(dev) < 2) {
ctrlr->msix_enabled = 0;
goto intx;
-   } else if (pci_msix_count(dev) < num_vectors_requested) {
+   }
+
+   if (pci_msix_count(dev) < num_vectors_requested) {
ctrlr->per_cpu_io_queues = FALSE;
ctrlr->num_io_queues = 1;
num_vectors_requested = 2; /* one for admin, one for I/O */
@@ -1009,26 +1011,28 @@ nvme_ctrlr_construct(struct nvme_control
if (pci_alloc_msix(dev, _vectors_allocated) != 0) {
ctrlr->msix_enabled = 0;
goto intx;
-   } else if (num_vectors_allocated < num_vectors_requested) {
+   }
+
+   if (num_vectors_allocated < num_vectors_requested) {
if (num_vectors_allocated < 2) {
pci_release_msi(dev);
ctrlr->msix_enabled = 0;
goto intx;
-   } else {
-   ctrlr->per_cpu_io_queues = FALSE;
-   ctrlr->num_io_queues = 1;
-   /*
-* Release whatever vectors were allocated, and just
-*  reallocate the two needed for the admin and single
-*  I/O qpair.
-*/
-   num_vectors_allocated = 2;
-   pci_release_msi(dev);
-   if (pci_alloc_msix(dev, _vectors_allocated) != 0)
-   panic("could not reallocate any vectors\n");
-   if (num_vectors_allocated != 2)
-   panic("could not reallocate 2 vectors\n");
}
+
+   ctrlr->per_cpu_io_queues = FALSE;
+   ctrlr->num_io_queues = 1;
+   /*
+* Release whatever vectors were allocated, and just
+*  reallocate the two needed for the admin and single
+*  I/O qpair.
+*/
+   num_vectors_allocated = 2;
+   pci_release_msi(dev);
+   if (pci_alloc_msix(dev, _vectors_allocated) != 0)
+   panic("could not reallocate any vectors\n");
+   if (num_vectors_allocated != 2)
+   panic("could not reallocate 2 vectors\n");
}
 
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293329 - head/sys/dev/e1000

2016-01-07 Thread Sean Bruno
Author: sbruno
Date: Thu Jan  7 16:20:55 2016
New Revision: 293329
URL: https://svnweb.freebsd.org/changeset/base/293329

Log:
  Switch em(4) to the extended RX descriptor format.  This matches the
  e1000/e1000e split in linux.
  
  MFC after:2 weeks
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D3447

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Thu Jan  7 16:18:32 2016(r293328)
+++ head/sys/dev/e1000/if_em.c  Thu Jan  7 16:20:55 2016(r293329)
@@ -3733,29 +3733,38 @@ em_transmit_checksum_setup(struct tx_rin
offload |= CSUM_TCP;
tucss = hdr_len;
tucso = hdr_len + offsetof(struct tcphdr, th_sum);
-   /*
-* Setting up new checksum offload context for every frames
-* takes a lot of processing time for hardware. This also
-* reduces performance a lot for small sized frames so avoid
-* it if driver can use previously configured checksum
-* offload context.
-*/
-   if (txr->last_hw_offload == offload) {
-   if (offload & CSUM_IP) {
-   if (txr->last_hw_ipcss == ipcss &&
-   txr->last_hw_ipcso == ipcso &&
-   txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   return;
-   } else {
-   if (txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   return;
-   }
-   }
-   txr->last_hw_offload = offload;
-   txr->last_hw_tucss = tucss;
-   txr->last_hw_tucso = tucso;
+   /*
+* The 82574L can only remember the *last* context used
+* regardless of queue that it was use for.  We cannot reuse
+* contexts on this hardware platform and must generate a new
+* context every time.  82574L hardware spec, section 7.2.6,
+* second note.
+*/
+   if (adapter->num_queues < 2) {
+   /*
+   * Setting up new checksum offload context for every
+   * frames takes a lot of processing time for hardware.
+   * This also reduces performance a lot for small sized
+   * frames so avoid it if driver can use previously
+   * configured checksum offload context.
+   */
+   if (txr->last_hw_offload == offload) {
+   if (offload & CSUM_IP) {
+   if (txr->last_hw_ipcss == ipcss &&
+   txr->last_hw_ipcso == ipcso &&
+   txr->last_hw_tucss == tucss &&
+   txr->last_hw_tucso == tucso)
+   return;
+   } else {
+   if (txr->last_hw_tucss == tucss &&
+   txr->last_hw_tucso == tucso)
+   return;
+   }
+   }
+   txr->last_hw_offload = offload;
+   txr->last_hw_tucss = tucss;
+   txr->last_hw_tucso = tucso;
+   }
/*
 * Start offset for payload checksum calculation.
 * End offset for payload checksum calculation.
@@ -3771,29 +3780,38 @@ em_transmit_checksum_setup(struct tx_rin
*txd_upper |= E1000_TXD_POPTS_TXSM << 8;
tucss = hdr_len;
tucso = hdr_len + offsetof(struct udphdr, uh_sum);
-   /*
-* Setting up new checksum offload context for every frames
-* takes a lot of processing time for hardware. This also
-* reduces performance a lot for small sized frames so avoid
-* it if driver can use previously configured checksum
-* offload context.
-*/
-   if (txr->last_hw_offload == offload) {
-   if (offload & CSUM_IP) {
-   if (txr->last_hw_ipcss == ipcss &&
-   txr->last_hw_ipcso == ipcso &&
-   txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   return;
-  

svn commit: r293335 - stable/10/usr.sbin/kbdmap

2016-01-07 Thread Ed Maste
Author: emaste
Date: Thu Jan  7 17:03:26 2016
New Revision: 293335
URL: https://svnweb.freebsd.org/changeset/base/293335

Log:
  MFC r291377: vidfont: with vt(4) omit size from vidcontrol -f
  
  When using syscons, vidfont extracts the font size from the filename
  passes it to vidcontrol -f. In vt(4) mode the size argument is not
  required, and some of the fonts in /usr/share/vt/fonts do not have the
  size in the filename, which caused vidfont to fail. Thus, just omit the
  size argument in vt(4) mode.

Modified:
  stable/10/usr.sbin/kbdmap/kbdmap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/kbdmap/kbdmap.c
==
--- stable/10/usr.sbin/kbdmap/kbdmap.c  Thu Jan  7 17:02:34 2016
(r293334)
+++ stable/10/usr.sbin/kbdmap/kbdmap.c  Thu Jan  7 17:03:26 2016
(r293335)
@@ -57,6 +57,7 @@ static const char *dir;
 static const char *menu = "";
 
 static int x11;
+static int using_vt;
 static int show;
 static int verbose;
 static int print;
@@ -150,7 +151,7 @@ add_keymap(const char *desc, int mark, c
  * Return 0 if syscons is in use (to select legacy defaults).
  */
 static int
-check_newcons(void)
+check_vt(void)
 {
size_t len;
char term[3];
@@ -159,7 +160,7 @@ check_newcons(void)
if (sysctlbyname("kern.vty", , , NULL, 0) != 0 ||
strcmp(term, "vt") != 0)
return 0;
-   return -1;
+   return 1;
 }
 
 /*
@@ -256,7 +257,7 @@ get_font(void)
 static void
 vidcontrol(const char *fnt)
 {
-   char *tmp, *p, *q;
+   char *tmp, *p, *q, *cmd;
char ch;
int i;
 
@@ -264,6 +265,13 @@ vidcontrol(const char *fnt)
if (x11)
return;
 
+   if (using_vt) {
+   asprintf(, "vidcontrol -f %s", fnt);
+   system(cmd);
+   free(cmd);
+   return;
+   }
+
tmp = strdup(fnt);
 
/* Extract font size */
@@ -281,7 +289,6 @@ vidcontrol(const char *fnt)
if (sscanf(p, "%dx%d%c", , , ) != 2)
fprintf(stderr, "Which font size? %s\n", fnt);
else {
-   char *cmd;
asprintf(, "vidcontrol -f %s %s", p, fnt);
if (verbose)
fprintf(stderr, "%s\n", cmd);
@@ -832,7 +839,8 @@ main(int argc, char **argv)
sleep(2);
}
 
-   if (check_newcons() == 0) {
+   using_vt = check_vt();
+   if (using_vt == 0) {
keymapdir = DEFAULT_SC_KEYMAP_DIR;
fontdir = DEFAULT_SC_FONT_DIR;
font_default = DEFAULT_SC_FONT;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293328 - head/sys/dev/nvme

2016-01-07 Thread Ravi Pokala
-Original Message-


From:  on behalf of Jim Harris 

Date: 2016-01-07, Thursday at 08:18
To: , , 

Subject: svn commit: r293328 - head/sys/dev/nvme

>Author: jimharris
>Date: Thu Jan  7 16:18:32 2016
>New Revision: 293328
>URL: https://svnweb.freebsd.org/changeset/base/293328
>
>...
>  
>Modified: head/sys/dev/nvme/nvme_ctrlr.c
>==
>--- head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:12:42 2016
>(r293327)
>+++ head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:18:32 2016
>(r293328)
>@@ -42,6 +42,12 @@ __FBSDID("$FreeBSD$");
> 
> #include "nvme_private.h"
> 
>+/*
>+ * Used for calculating number of CPUs to assign to each core and number of 
>I/O
>+ *  queues to allocate per controller.
>+ */
>+#define NVME_CEILING(num, div)num) - 1) / (div)) + 1)
>+
>
>...

I'm surprised that this isn't in , along with 
roundup()/rounddown()/etc. Finding the ceiling like this is probably pretty 
common, so shouldn't it be added to the common header so everyone can use it?

-Ravi (rpokala@)

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293327 - head/sys/dev/nvme

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 16:12:42 2016
New Revision: 293327
URL: https://svnweb.freebsd.org/changeset/base/293327

Log:
  nvme: break out interrupt setup code into a separate function
  
  MFC after:3 days
  Sponsored by: Intel

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==
--- head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 16:11:31 2016
(r293326)
+++ head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 16:12:42 2016
(r293327)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 
 static void nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr,
struct nvme_async_event_request 
*aer);
+static void nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr);
 
 static int
 nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr)
@@ -777,6 +778,7 @@ static int
 nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
 {
 
+   ctrlr->msix_enabled = 0;
ctrlr->num_io_queues = 1;
ctrlr->rid = 0;
ctrlr->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ,
@@ -924,80 +926,35 @@ static struct cdevsw nvme_ctrlr_cdevsw =
.d_ioctl =  nvme_ctrlr_ioctl
 };
 
-int
-nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev)
+static void
+nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr)
 {
-   union cap_lo_register   cap_lo;
-   union cap_hi_register   cap_hi;
-   int per_cpu_io_queues;
-   int num_vectors_requested, num_vectors_allocated;
-   int status, timeout_period;
-
-   ctrlr->dev = dev;
-
-   mtx_init(>lock, "nvme ctrlr lock", NULL, MTX_DEF);
-
-   status = nvme_ctrlr_allocate_bar(ctrlr);
-
-   if (status != 0)
-   return (status);
-
-   /*
-* Software emulators may set the doorbell stride to something
-*  other than zero, but this driver is not set up to handle that.
-*/
-   cap_hi.raw = nvme_mmio_read_4(ctrlr, cap_hi);
-   if (cap_hi.bits.dstrd != 0)
-   return (ENXIO);
-
-   ctrlr->min_page_size = 1 << (12 + cap_hi.bits.mpsmin);
-
-   /* Get ready timeout value from controller, in units of 500ms. */
-   cap_lo.raw = nvme_mmio_read_4(ctrlr, cap_lo);
-   ctrlr->ready_timeout_in_ms = cap_lo.bits.to * 500;
-
-   timeout_period = NVME_DEFAULT_TIMEOUT_PERIOD;
-   TUNABLE_INT_FETCH("hw.nvme.timeout_period", _period);
-   timeout_period = min(timeout_period, NVME_MAX_TIMEOUT_PERIOD);
-   timeout_period = max(timeout_period, NVME_MIN_TIMEOUT_PERIOD);
-   ctrlr->timeout_period = timeout_period;
-
-   nvme_retry_count = NVME_DEFAULT_RETRY_COUNT;
-   TUNABLE_INT_FETCH("hw.nvme.retry_count", _retry_count);
+   device_tdev;
+   int per_cpu_io_queues;
+   int num_vectors_requested, num_vectors_allocated;
 
+   dev = ctrlr->dev;
per_cpu_io_queues = 1;
TUNABLE_INT_FETCH("hw.nvme.per_cpu_io_queues", _cpu_io_queues);
 
-   if (per_cpu_io_queues)
-   ctrlr->num_io_queues = mp_ncpus;
-   else
-   ctrlr->num_io_queues = 1;
-
ctrlr->force_intx = 0;
TUNABLE_INT_FETCH("hw.nvme.force_intx", >force_intx);
 
-   ctrlr->enable_aborts = 0;
-   TUNABLE_INT_FETCH("hw.nvme.enable_aborts", >enable_aborts);
+   if (ctrlr->force_intx || pci_msix_count(dev) < 2) {
+   nvme_ctrlr_configure_intx(ctrlr);
+   return;
+   }
 
ctrlr->msix_enabled = 1;
 
-   if (ctrlr->force_intx) {
-   ctrlr->msix_enabled = 0;
-   goto intx;
-   }
+   if (per_cpu_io_queues)
+   ctrlr->num_io_queues = mp_ncpus;
+   else
+   ctrlr->num_io_queues = 1;
 
/* One vector per IO queue, plus one vector for admin queue. */
num_vectors_requested = ctrlr->num_io_queues + 1;
 
-   /*
-* If we cannot even allocate 2 vectors (one for admin, one for
-*  I/O), then revert to INTx.
-*/
-   if (pci_msix_count(dev) < 2) {
-   ctrlr->msix_enabled = 0;
-   goto intx;
-   }
-
if (pci_msix_count(dev) < num_vectors_requested) {
ctrlr->num_io_queues = 1;
num_vectors_requested = 2; /* one for admin, one for I/O */
@@ -1005,15 +962,15 @@ nvme_ctrlr_construct(struct nvme_control
 
num_vectors_allocated = num_vectors_requested;
if (pci_alloc_msix(dev, _vectors_allocated) != 0) {
-   ctrlr->msix_enabled = 0;
-   goto intx;
+   nvme_ctrlr_configure_intx(ctrlr);
+   return;
}
 
if (num_vectors_allocated < num_vectors_requested) {
if (num_vectors_allocated < 2) {
pci_release_msi(dev);
-   

svn commit: r293413 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace

2016-01-07 Thread Stanislav Sedov
Author: stas
Date: Fri Jan  8 03:45:28 2016
New Revision: 293413
URL: https://svnweb.freebsd.org/changeset/base/293413

Log:
  MFC r291545: make the number of fasttrap probes and the size of the trace 
points hash table
  tunable via sysctl or kernel tunables.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 
 8 03:02:19 2016(r293412)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 
 8 03:45:28 2016(r293413)
@@ -63,6 +63,8 @@
 #if !defined(sun)
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -172,13 +174,14 @@ static volatile uint64_t fasttrap_mod_ge
 
 /*
  * When the fasttrap provider is loaded, fasttrap_max is set to either
- * FASTTRAP_MAX_DEFAULT or the value for fasttrap-max-probes in the
- * fasttrap.conf file. Each time a probe is created, fasttrap_total is
- * incremented by the number of tracepoints that may be associated with that
- * probe; fasttrap_total is capped at fasttrap_max.
+ * FASTTRAP_MAX_DEFAULT, or the value for fasttrap-max-probes in the
+ * fasttrap.conf file (Illumos), or the value provied in the loader.conf 
(FreeBSD).
+ * Each time a probe is created, fasttrap_total is incremented by the number
+ * of tracepoints that may be associated with that probe; fasttrap_total is 
capped
+ * at fasttrap_max.
  */
 #defineFASTTRAP_MAX_DEFAULT25
-static uint32_t fasttrap_max;
+static uint32_t fasttrap_max = FASTTRAP_MAX_DEFAULT;
 static uint32_t fasttrap_total;
 
 /*
@@ -226,6 +229,17 @@ static kmutex_t fasttrap_cpuc_pid_lock[M
 static eventhandler_tag fasttrap_thread_dtor_tag;
 #endif
 
+static unsigned long tpoints_hash_size = FASTTRAP_TPOINTS_DEFAULT_SIZE;
+
+#ifdef __FreeBSD__
+SYSCTL_DECL(_kern_dtrace);
+SYSCTL_NODE(_kern_dtrace, OID_AUTO, fasttrap, CTLFLAG_RD, 0, "DTrace fasttrap 
parameters");
+SYSCTL_UINT(_kern_dtrace_fasttrap, OID_AUTO, max_probes, CTLFLAG_RWTUN, 
_max,
+FASTTRAP_MAX_DEFAULT, "Maximum number of fasttrap probes");
+SYSCTL_ULONG(_kern_dtrace_fasttrap, OID_AUTO, tpoints_hash_size, 
CTLFLAG_RDTUN, _hash_size,
+FASTTRAP_TPOINTS_DEFAULT_SIZE, "Size of the tracepoint hash table");
+#endif
+
 static int
 fasttrap_highbit(ulong_t i)
 {
@@ -2466,8 +2480,6 @@ fasttrap_load(void)
 #if defined(sun)
fasttrap_max = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS,
"fasttrap-max-probes", FASTTRAP_MAX_DEFAULT);
-#else
-   fasttrap_max = FASTTRAP_MAX_DEFAULT;
 #endif
fasttrap_total = 0;
 
@@ -2478,12 +2490,14 @@ fasttrap_load(void)
nent = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS,
"fasttrap-hash-size", FASTTRAP_TPOINTS_DEFAULT_SIZE);
 #else
-   nent = FASTTRAP_TPOINTS_DEFAULT_SIZE;
+   nent = tpoints_hash_size;
 #endif
 
if (nent == 0 || nent > 0x100)
nent = FASTTRAP_TPOINTS_DEFAULT_SIZE;
 
+   tpoints_hash_size = nent;
+
if (ISP2(nent))
fasttrap_tpoints.fth_nent = nent;
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293328 - head/sys/dev/nvme

2016-01-07 Thread Bruce Evans

On Thu, 7 Jan 2016, Jim Harris wrote:


On Thu, Jan 7, 2016 at 9:27 AM, Ravi Pokala  wrote:
...

+ * Used for calculating number of CPUs to assign to each core and number

of I/O

+ *  queues to allocate per controller.
+ */
+#define NVME_CEILING(num, div)num) - 1) / (div)) + 1)
+

...


I'm surprised that this isn't in , along with
roundup()/rounddown()/etc. Finding the ceiling like this is probably pretty
common, so shouldn't it be added to the common header so everyone can use
it?


Good catch.  howmany() does exactly this, just expressed differently.  I'll
switch over to that.  Thanks!


howmany() doesn't do exactly this.  It has diferent bugs / range of
applicability,  I see about 10.  Subtracting 1 instead of adding more
than 1 gives overflow in different cases.  Even the simple and not
unreasonable case num = 0 gives overflow in NVME_CEILING() if div happens
to be unsigned and not 1: NVME_CEILING(0, 2U) = UINTMAX / 2 + 1 =
0x8000 with 32-bit ints.

Getting to 10 different bugs requires considering unreasonable cases
with negative div or num, and nonsense cases with div = 0, and
reasonable but unsupported cases with floating point args.  C's broken
division for negative integer values makes the details large.
NVME_CEILING() is closer to supporting negative values than howmany()
-- the magic 1 that it adds is to adjust for division of non-negative
values rounding down.  For division of negative values, the adjustment
should be by -1 or 0, depending on the C bug and on whether you want
to round negative results towards 0 or minus infinity.

Howmany() is undocumented so its bugs are harder to see than in your own
macro.  Another one is that it is an unsafe macro with the name of a safe
function-like API.  This naming convention is more important for undocumented
APIs.  NVME_CEILING() follows it in reverse.  Subtracting 1 instead of
adding (div) - 1 is less robust but avoids multiple evaluation of div.

Bruce
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293414 - in head/sys/boot: i386/loader userboot/userboot

2016-01-07 Thread Allan Jude
Author: allanjude
Date: Fri Jan  8 05:09:55 2016
New Revision: 293414
URL: https://svnweb.freebsd.org/changeset/base/293414

Log:
  Add support for ZFS Boot Environments to userboot (for bhyve and others)
  
  While here, also fix a possible null pointer
  
  Reported by:  lattera
  MFC after:3 days
  Sponsored by: ScaleEngine Inc.

Modified:
  head/sys/boot/i386/loader/main.c
  head/sys/boot/userboot/userboot/main.c

Modified: head/sys/boot/i386/loader/main.c
==
--- head/sys/boot/i386/loader/main.cFri Jan  8 03:45:28 2016
(r293413)
+++ head/sys/boot/i386/loader/main.cFri Jan  8 05:09:55 2016
(r293414)
@@ -321,7 +321,8 @@ init_zfs_bootenv(char *currdev)
currdev++;
/* Remove the last element (current bootenv) */
beroot = strrchr(currdev, '/');
-   beroot[0] = '\0';
+   if (beroot != NULL)
+   beroot[0] = '\0';
 
beroot = currdev;


Modified: head/sys/boot/userboot/userboot/main.c
==
--- head/sys/boot/userboot/userboot/main.c  Fri Jan  8 03:45:28 2016
(r293413)
+++ head/sys/boot/userboot/userboot/main.c  Fri Jan  8 05:09:55 2016
(r293414)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 
 static void userboot_zfs_probe(void);
 static int userboot_zfs_found;
+static void init_zfs_bootenv(char *currdev);
 #endif
 
 #defineUSERBOOT_VERSIONUSERBOOT_VERSION_3
@@ -190,6 +191,10 @@ extract_currdev(void)
dev.d_unit = 0;
}
 
+#if defined(USERBOOT_ZFS_SUPPORT)
+   init_zfs_bootenv(zfs_fmtdev());
+#endif
+
env_setenv("currdev", EV_VOLATILE, userboot_fmtdev(),
 userboot_setcurrdev, env_nounset);
env_setenv("loaddev", EV_VOLATILE, userboot_fmtdev(),
@@ -198,6 +203,29 @@ extract_currdev(void)
 
 #if defined(USERBOOT_ZFS_SUPPORT)
 static void
+init_zfs_bootenv(char *currdev)
+{
+   char *beroot;
+
+   /* Remove the trailing : */
+   currdev[strlen(currdev) - 1] = '\0';
+   setenv("zfs_be_active", currdev, 1);
+   /* Do not overwrite if already set */
+   setenv("vfs.root.mountfrom", currdev, 0);
+   /* Forward past zfs: */
+   currdev = strchr(currdev, ':');
+   currdev++;
+   /* Remove the last element (current bootenv) */
+   beroot = strrchr(currdev, '/');
+   if (beroot != NULL)
+   beroot[0] = '\0';
+
+   beroot = currdev;
+   
+   setenv("zfs_be_root", beroot, 1);
+}
+
+static void
 userboot_zfs_probe(void)
 {
char devname[32];
@@ -237,6 +265,33 @@ command_lszfs(int argc, char *argv[])
}
return (CMD_OK);
 }
+
+COMMAND_SET(reloadbe, "reloadbe", "refresh the list of ZFS Boot Environments",
+   command_reloadbe);
+
+static int
+command_reloadbe(int argc, char *argv[])
+{
+   int err;
+
+   if (argc > 2) {
+   command_errmsg = "wrong number of arguments";
+   return (CMD_ERROR);
+   }
+
+   if (argc == 2) {
+   err = zfs_bootenv(argv[1]);
+   } else {
+   err = zfs_bootenv(getenv("zfs_be_root"));
+   }
+
+   if (err != 0) {
+   command_errmsg = strerror(err);
+   return (CMD_ERROR);
+   }
+
+   return (CMD_OK);
+}
 #endif /* USERBOOT_ZFS_SUPPORT */
 
 COMMAND_SET(quit, "quit", "exit the loader", command_quit);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293341 - in head: lib/libstand sys/boot/libstand32

2016-01-07 Thread Ed Maste
On 7 January 2016 at 14:19, Bryan Drewery  wrote:
> Author: bdrewery
> Date: Thu Jan  7 19:19:23 2016
> New Revision: 293341
> URL: https://svnweb.freebsd.org/changeset/base/293341
>
> Log:
>   Don't install /usr/include/stand.h twice after r293040.
>
>   Only install it from lib/libstand.

Sorry, thanks for catching that.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293347 - in stable/10/sys/boot/efi: boot1 libefi loader

2016-01-07 Thread Ed Maste
Author: emaste
Date: Thu Jan  7 20:10:49 2016
New Revision: 293347
URL: https://svnweb.freebsd.org/changeset/base/293347

Log:
  MFC r281524 by andrew@: Use MACHINE in the efi loader when it is what we mean
  
  It may not be the same as MACHINE_CPUARCH, it just happened to be the
  case the architectures this code currently supports.
  
  Fixes build failure reported by Oliver Pinter.

Added:
  stable/10/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu
 - copied, changed from r293345, 
stable/10/sys/boot/efi/boot1/fat.tmpl.bz2.uu
Deleted:
  stable/10/sys/boot/efi/boot1/fat.tmpl.bz2.uu
Modified:
  stable/10/sys/boot/efi/boot1/Makefile
  stable/10/sys/boot/efi/libefi/Makefile
  stable/10/sys/boot/efi/loader/Makefile

Modified: stable/10/sys/boot/efi/boot1/Makefile
==
--- stable/10/sys/boot/efi/boot1/Makefile   Thu Jan  7 20:08:02 2016
(r293346)
+++ stable/10/sys/boot/efi/boot1/Makefile   Thu Jan  7 20:10:49 2016
(r293347)
@@ -18,18 +18,20 @@ SRCS=   boot1.c reloc.c start.S
 CFLAGS+=   -fPIC
 CFLAGS+=   -I.
 CFLAGS+=   -I${.CURDIR}/../include
-CFLAGS+=   -I${.CURDIR}/../include/${MACHINE_CPUARCH}
+CFLAGS+=   -I${.CURDIR}/../include/${MACHINE}
 CFLAGS+=   -I${.CURDIR}/../../../contrib/dev/acpica/include
 CFLAGS+=   -I${.CURDIR}/../../..
 
 # Always add MI sources and REGULAR efi loader bits
-.PATH: ${.CURDIR}/../loader/arch/amd64 ${.CURDIR}/../../common
+.PATH: ${.CURDIR}/../loader/arch/${MACHINE}
+.PATH: ${.CURDIR}/../loader
+.PATH: ${.CURDIR}/../../common
 CFLAGS+=   -I${.CURDIR}/../../common
 
 FILES= boot1.efi boot1.efifat
 FILESMODE_boot1.efi=   ${BINMODE}
 
-LDSCRIPT=  
${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
+LDSCRIPT=  ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
 LDFLAGS=   -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc
 
 ${PROG}:   ${LDSCRIPT}
@@ -62,8 +64,8 @@ boot1.o: ${.CURDIR}/../../common/ufsread
 
 boot1.efifat: boot1.efi
echo ${.OBJDIR}
-   uudecode ${.CURDIR}/fat.tmpl.bz2.uu
-   mv fat.tmpl.bz2 ${.TARGET}.bz2
+   uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu
+   mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2
bzip2 -f -d ${.TARGET}.bz2
dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
 

Copied and modified: stable/10/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu (from 
r293345, stable/10/sys/boot/efi/boot1/fat.tmpl.bz2.uu)
==
--- stable/10/sys/boot/efi/boot1/fat.tmpl.bz2.uuThu Jan  7 19:58:23 
2016(r293345, copy source)
+++ stable/10/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu  Thu Jan  7 20:10:49 
2016(r293347)
@@ -1,7 +1,7 @@
 FAT template boot filesystem created by generate-fat.sh
 DO NOT EDIT
 $FreeBSD$
-begin 644 fat.tmpl.bz2
+begin 644 fat-amd64.tmpl.bz2
 M0EIH.3%!629362AK*D(`+[ZZKJZ_^N_ZO^Z_Z_OJ[L`4`!7I0$#&$"
 M0$!$3&(I-DTU,)ZAZ0VA-!M0T'J`>H#"9

Modified: stable/10/sys/boot/efi/libefi/Makefile
==
--- stable/10/sys/boot/efi/libefi/Makefile  Thu Jan  7 20:08:02 2016
(r293346)
+++ stable/10/sys/boot/efi/libefi/Makefile  Thu Jan  7 20:10:49 2016
(r293347)
@@ -10,7 +10,7 @@ SRCS= delay.c efi_console.c efinet.c efi
 CFLAGS+= -fPIC -mno-red-zone
 .endif
 CFLAGS+= -I${.CURDIR}/../include
-CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
+CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
 
 # Pick up the bootstrap header for some interface items

Modified: stable/10/sys/boot/efi/loader/Makefile
==
--- stable/10/sys/boot/efi/loader/Makefile  Thu Jan  7 20:08:02 2016
(r293346)
+++ stable/10/sys/boot/efi/loader/Makefile  Thu Jan  7 20:10:49 2016
(r293347)
@@ -23,16 +23,16 @@ SRCS=   autoload.c \
smbios.c \
vers.c
 
-.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}
+.PATH: ${.CURDIR}/arch/${MACHINE}
 # For smbios.c
 .PATH: ${.CURDIR}/../../i386/libi386
-.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
+.include "${.CURDIR}/arch/${MACHINE}/Makefile.inc"
 
 CFLAGS+=   -fPIC
 CFLAGS+=   -I${.CURDIR}
-CFLAGS+=   -I${.CURDIR}/arch/${MACHINE_CPUARCH}
+CFLAGS+=   -I${.CURDIR}/arch/${MACHINE}
 CFLAGS+=   -I${.CURDIR}/../include
-CFLAGS+=   -I${.CURDIR}/../include/${MACHINE_CPUARCH}
+CFLAGS+=   -I${.CURDIR}/../include/${MACHINE}
 CFLAGS+=   -I${.CURDIR}/../../../contrib/dev/acpica/include
 CFLAGS+=   -I${.CURDIR}/../../..
 CFLAGS+=   -I${.CURDIR}/../../i386/libi386
@@ -42,7 +42,7 @@ CFLAGS+=  -DNO_PCI -DEFI
 BOOT_FORTH=yes
 CFLAGS+=  

Re: svn commit: r277610 - in head: bin/ln lib/libc/include lib/libc/sys share/man/man4 sys/compat/freebsd32 sys/kern sys/sys usr.bin/kdump

2016-01-07 Thread Jilles Tjoelker
On Thu, Jan 07, 2016 at 04:03:25PM +0300, Chagin Dmitry wrote:
> On Fri, Jan 23, 2015 at 09:07:09PM +, Jilles Tjoelker wrote:
> > Author: jilles
> > Date: Fri Jan 23 21:07:08 2015
> > New Revision: 277610
> > URL: https://svnweb.freebsd.org/changeset/base/277610

> > Log:
> >   Add futimens and utimensat system calls.

> >   The core kernel part is patch file utimes.2008.4.diff from
> >   pluk...@freebsd.org. I updated the code for API changes, added the manual
> >   page and added compatibility code for old kernels. There is also audit and
> >   Capsicum support.

> >   A new UTIME_* constant might allow setting birthtimes in future.

> >   Differential Revision:https://reviews.freebsd.org/D1426
> >   Submitted by: pluknet (partially)
> >   Reviewed by:  delphij, pluknet, rwatson
> >   Relnotes: yes

> any chances that it will be merged to 10? if not, can I merge kernel
> part only?

I don't plan an MFC because I don't think the trouble of not being able
to run a binary compiled on a newer stable/10 on an older stable/10 is
worth it.

I have no objection to a partial MFC that does not expose the new
functions to build systems of ports and other third party software.

-- 
Jilles Tjoelker
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293328 - head/sys/dev/nvme

2016-01-07 Thread Jim Harris
On Thu, Jan 7, 2016 at 9:27 AM, Ravi Pokala  wrote:

> -Original Message-
>
>
> From:  on behalf of Jim Harris
> 
> Date: 2016-01-07, Thursday at 08:18
> To: , , <
> svn-src-h...@freebsd.org>
> Subject: svn commit: r293328 - head/sys/dev/nvme
>
> >Author: jimharris
> >Date: Thu Jan  7 16:18:32 2016
> >New Revision: 293328
> >URL: https://svnweb.freebsd.org/changeset/base/293328
> >
> >...
> >
> >Modified: head/sys/dev/nvme/nvme_ctrlr.c
>
> >==
> >--- head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:12:42 2016
> (r293327)
> >+++ head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:18:32 2016
> (r293328)
> >@@ -42,6 +42,12 @@ __FBSDID("$FreeBSD$");
> >
> > #include "nvme_private.h"
> >
> >+/*
> >+ * Used for calculating number of CPUs to assign to each core and number
> of I/O
> >+ *  queues to allocate per controller.
> >+ */
> >+#define NVME_CEILING(num, div)num) - 1) / (div)) + 1)
> >+
> >
> >...
>
> I'm surprised that this isn't in , along with
> roundup()/rounddown()/etc. Finding the ceiling like this is probably pretty
> common, so shouldn't it be added to the common header so everyone can use
> it?
>

Good catch.  howmany() does exactly this, just expressed differently.  I'll
switch over to that.  Thanks!

-Jim


>
> -Ravi (rpokala@)
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293328 - head/sys/dev/nvme

2016-01-07 Thread Conrad Meyer
I believe it's spelled "howmany()."

On Thu, Jan 7, 2016 at 8:27 AM, Ravi Pokala  wrote:
> -Original Message-
>
>
> From:  on behalf of Jim Harris 
> 
> Date: 2016-01-07, Thursday at 08:18
> To: , , 
> 
> Subject: svn commit: r293328 - head/sys/dev/nvme
>
>>Author: jimharris
>>Date: Thu Jan  7 16:18:32 2016
>>New Revision: 293328
>>URL: https://svnweb.freebsd.org/changeset/base/293328
>>
>>...
>>
>>Modified: head/sys/dev/nvme/nvme_ctrlr.c
>>==
>>--- head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:12:42 2016
>>(r293327)
>>+++ head/sys/dev/nvme/nvme_ctrlr.c Thu Jan  7 16:18:32 2016
>>(r293328)
>>@@ -42,6 +42,12 @@ __FBSDID("$FreeBSD$");
>>
>> #include "nvme_private.h"
>>
>>+/*
>>+ * Used for calculating number of CPUs to assign to each core and number of 
>>I/O
>>+ *  queues to allocate per controller.
>>+ */
>>+#define NVME_CEILING(num, div)num) - 1) / (div)) + 1)
>>+
>>
>>...
>
> I'm surprised that this isn't in , along with 
> roundup()/rounddown()/etc. Finding the ceiling like this is probably pretty 
> common, so shouldn't it be added to the common header so everyone can use it?
>
> -Ravi (rpokala@)
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293354 - head/sys/dev/nvme

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 20:35:26 2016
New Revision: 293354
URL: https://svnweb.freebsd.org/changeset/base/293354

Log:
  nvme: replace NVME_CEILING macro with howmany()
  
  Suggested by: rpokala
  MFC after:3 days

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==
--- head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 20:34:06 2016
(r293353)
+++ head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 20:35:26 2016
(r293354)
@@ -42,12 +42,6 @@ __FBSDID("$FreeBSD$");
 
 #include "nvme_private.h"
 
-/*
- * Used for calculating number of CPUs to assign to each core and number of I/O
- *  queues to allocate per controller.
- */
-#define NVME_CEILING(num, div) num) - 1) / (div)) + 1)
-
 static void nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr,
struct nvme_async_event_request 
*aer);
 static void nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr);
@@ -152,7 +146,7 @@ nvme_ctrlr_construct_io_qpairs(struct nv
 *  a controller could theoretically support fewer I/O queues than
 *  MSI-X vectors.  So calculate again here just to be safe.
 */
-   ctrlr->num_cpus_per_ioq = NVME_CEILING(mp_ncpus, ctrlr->num_io_queues);
+   ctrlr->num_cpus_per_ioq = howmany(mp_ncpus, ctrlr->num_io_queues);
 
ctrlr->ioq = malloc(ctrlr->num_io_queues * sizeof(struct nvme_qpair),
M_NVME, M_ZERO | M_WAITOK);
@@ -1029,9 +1023,9 @@ nvme_ctrlr_setup_interrupts(struct nvme_
 *  admin queue.
 */
ctrlr->num_cpus_per_ioq = max(min_cpus_per_ioq,
-   NVME_CEILING(mp_ncpus, num_vectors_available - 1));
+   howmany(mp_ncpus, num_vectors_available - 1));
 
-   ctrlr->num_io_queues = NVME_CEILING(mp_ncpus, ctrlr->num_cpus_per_ioq);
+   ctrlr->num_io_queues = howmany(mp_ncpus, ctrlr->num_cpus_per_ioq);
num_vectors_requested = ctrlr->num_io_queues + 1;
num_vectors_allocated = num_vectors_requested;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293357 - head/tools/build/mk

2016-01-07 Thread Renato Botelho
Author: garga (ports committer)
Date: Thu Jan  7 20:37:18 2016
New Revision: 293357
URL: https://svnweb.freebsd.org/changeset/base/293357

Log:
  Obsolete inetd related files when WITHOUT_INETD is set
  
  Reviewed by:  bapt
  Approved by:  gnn
  MFC after:1 week
  Sponsored by: Rubiconn Communications (Netgate)
  Differential Revision:https://reviews.freebsd.org/D4742

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Jan  7 20:37:07 
2016(r293356)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Jan  7 20:37:18 
2016(r293357)
@@ -2834,6 +2834,13 @@ OLD_FILES+=usr/share/man/man8/traceroute
 OLD_FILES+=rescue/ping6
 .endif
 
+.if ${MK_INETD} == no
+OLD_FILES+=etc/rc.d/inetd
+OLD_FILES+=usr/sbin/inetd
+OLD_FILES+=usr/share/man/man5/inetd.conf.5.gz
+OLD_FILES+=usr/share/man/man8/inetd.8.gz
+.endif
+
 .if ${MK_IPFILTER} == no
 OLD_FILES+=etc/periodic/security/510.ipfdenied
 OLD_FILES+=etc/periodic/security/610.ipf6denied
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293358 - stable/10/sys/netinet6

2016-01-07 Thread Garrett Wollman
Author: wollman
Date: Thu Jan  7 20:43:45 2016
New Revision: 293358
URL: https://svnweb.freebsd.org/changeset/base/293358

Log:
  MFH r292836:
  
  in6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces
  
  bridge(4) interfaces have an if_type of IFT_BRIDGE, rather than
  IFT_ETHER, even though they only support Ethernet-style links.  This
  caused in6_if2idlen to emit an "unknown link type (209)" warning to
  the console every time it was called.  Add IFT_BRIDGE to the case
  statement in the appropriate place, indicating that it uses the same
  IPv6 address format as other Ethernet-like interfaces.

Modified:
  stable/10/sys/netinet6/in6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet6/in6.c
==
--- stable/10/sys/netinet6/in6.cThu Jan  7 20:37:18 2016
(r293357)
+++ stable/10/sys/netinet6/in6.cThu Jan  7 20:43:45 2016
(r293358)
@@ -2449,6 +2449,7 @@ in6_if2idlen(struct ifnet *ifp)
 #ifdef IFT_MIP
case IFT_MIP:   /* ditto */
 #endif
+   case IFT_BRIDGE:/* bridge(4) only does Ethernet-like links */
case IFT_INFINIBAND:
return (64);
case IFT_FDDI:  /* RFC2467 */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293359 - in head/bin/sh: . tests/builtins

2016-01-07 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jan  7 20:48:24 2016
New Revision: 293359
URL: https://svnweb.freebsd.org/changeset/base/293359

Log:
  sh: Ensure OPTIND=1 in subshell without forking does not affect outer env.
  
  Command substitutions containing a single simple command and here-document
  expansion are performed in a subshell environment, but may not fork. Any
  modified state of the shell environment should be restored afterward.
  
  The state that OPTIND=1 had been done was not saved and restored here.
  
  Note that the other parts of shellparam need not be saved and restored,
  since they are not modified in these situations (a fork is done before such
  modifications).

Added:
  head/bin/sh/tests/builtins/getopts10.0   (contents, props changed)
Modified:
  head/bin/sh/eval.c
  head/bin/sh/tests/builtins/Makefile

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Thu Jan  7 20:43:45 2016(r293358)
+++ head/bin/sh/eval.c  Thu Jan  7 20:48:24 2016(r293359)
@@ -496,10 +496,12 @@ exphere(union node *redir, struct arglis
struct jmploc *savehandler;
struct localvar *savelocalvars;
int need_longjmp = 0;
+   unsigned char saveoptreset;
 
redir->nhere.expdoc = "";
savelocalvars = localvars;
localvars = NULL;
+   saveoptreset = shellparam.reset;
forcelocal++;
savehandler = handler;
if (setjmp(jmploc.loc))
@@ -514,6 +516,7 @@ exphere(union node *redir, struct arglis
forcelocal--;
poplocalvars();
localvars = savelocalvars;
+   shellparam.reset = saveoptreset;
if (need_longjmp)
longjmp(handler->loc, 1);
INTON;
@@ -647,6 +650,7 @@ evalbackcmd(union node *n, struct backcm
struct jmploc jmploc;
struct jmploc *savehandler;
struct localvar *savelocalvars;
+   unsigned char saveoptreset;
 
result->fd = -1;
result->buf = NULL;
@@ -661,6 +665,7 @@ evalbackcmd(union node *n, struct backcm
if (is_valid_fast_cmdsubst(n)) {
savelocalvars = localvars;
localvars = NULL;
+   saveoptreset = shellparam.reset;
forcelocal++;
savehandler = handler;
if (setjmp(jmploc.loc)) {
@@ -671,6 +676,7 @@ evalbackcmd(union node *n, struct backcm
forcelocal--;
poplocalvars();
localvars = savelocalvars;
+   shellparam.reset = saveoptreset;
longjmp(handler->loc, 1);
}
} else {
@@ -681,6 +687,7 @@ evalbackcmd(union node *n, struct backcm
forcelocal--;
poplocalvars();
localvars = savelocalvars;
+   shellparam.reset = saveoptreset;
} else {
if (pipe(pip) < 0)
error("Pipe call failed: %s", strerror(errno));

Modified: head/bin/sh/tests/builtins/Makefile
==
--- head/bin/sh/tests/builtins/Makefile Thu Jan  7 20:43:45 2016
(r293358)
+++ head/bin/sh/tests/builtins/Makefile Thu Jan  7 20:48:24 2016
(r293359)
@@ -95,6 +95,7 @@ FILES+=   getopts6.0
 FILES+=getopts7.0
 FILES+=getopts8.0 getopts8.0.stdout
 FILES+=getopts9.0 getopts9.0.stdout
+FILES+=getopts10.0
 FILES+=hash1.0 hash1.0.stdout
 FILES+=hash2.0 hash2.0.stdout
 FILES+=hash3.0 hash3.0.stdout

Added: head/bin/sh/tests/builtins/getopts10.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/getopts10.0  Thu Jan  7 20:48:24 2016
(r293359)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+set -- -x arg
+opt=not
+getopts x opt
+r1=$? OPTIND1=$OPTIND opt1=$opt
+: $(: $((OPTIND = 1)))
+getopts x opt
+r2=$? OPTIND2=$OPTIND
+[ "$r1" = 0 ] && [ "$OPTIND1" = 2 ] && [ "$opt1" = x ] && [ "$r2" != 0 ] &&
+   [ "$OPTIND2" = 2 ]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293362 - svnadmin/conf

2016-01-07 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jan  7 20:53:31 2016
New Revision: 293362
URL: https://svnweb.freebsd.org/changeset/base/293362

Log:
  Remove my limit to allow me commit huge NTP patches to freebsd-update repo.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 20:52:35 2016
(r293361)
+++ svnadmin/conf/sizelimit.confThu Jan  7 20:53:31 2016
(r293362)
@@ -45,3 +45,4 @@ sam
 stas
 thompsa
 rpaulo
+glebius
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293320 - head/sys/dev/nvd

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 15:57:17 2016
New Revision: 293320
URL: https://svnweb.freebsd.org/changeset/base/293320

Log:
  nvd: do not wait for previous bios before submitting ordered bio
  
  Still wait until all in-flight bios (including the ordered bio)
  complete before processing more bios from the queue.
  
  MFC after:3 days
  Sponsored by: Intel

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

Modified: head/sys/dev/nvd/nvd.c
==
--- head/sys/dev/nvd/nvd.c  Thu Jan  7 15:55:41 2016(r293319)
+++ head/sys/dev/nvd/nvd.c  Thu Jan  7 15:57:17 2016(r293320)
@@ -204,19 +204,6 @@ nvd_bioq_process(void *arg, int pending)
if (bp == NULL)
break;
 
-#ifdef BIO_ORDERED
-   /*
-* BIO_ORDERED flag dictates that all outstanding bios
-*  must be completed before processing the bio with
-*  BIO_ORDERED flag set.
-*/
-   if (bp->bio_flags & BIO_ORDERED) {
-   while (ndisk->cur_depth > 0) {
-   pause("nvd flush", 1);
-   }
-   }
-#endif
-
bp->bio_driver1 = NULL;
atomic_add_int(>cur_depth, 1);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293331 - in head/sys/dev: e1000 netmap

2016-01-07 Thread Sean Bruno
Author: sbruno
Date: Thu Jan  7 16:42:48 2016
New Revision: 293331
URL: https://svnweb.freebsd.org/changeset/base/293331

Log:
  Switch em(4) to the extended RX descriptor format.  This matches the
  e1000/e1000e split in linux.
  
  Split rxbuffer and txbuffer apart to support the new RX descriptor format
  structures. Move rxbuffer manipulation to em_setup_rxdesc() to unify the
  new behavior changes.
  
  Add a RSSKEYLEN macro for help in generating the RSSKEY data structures
  in the card.
  
  Change em_receive_checksum() to process the new rxdescriptor format
  status bit.
  
  MFC after:2 weeks
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D3447

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h
  head/sys/dev/netmap/if_em_netmap.h

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Thu Jan  7 16:24:18 2016(r293330)
+++ head/sys/dev/e1000/if_em.c  Thu Jan  7 16:42:48 2016(r293331)
@@ -260,7 +260,9 @@ static bool em_rxeof(struct rx_ring *, i
 #ifndef __NO_STRICT_ALIGNMENT
 static int em_fixup_rx(struct rx_ring *);
 #endif
-static voidem_receive_checksum(struct e1000_rx_desc *, struct mbuf *);
+static voidem_setup_rxdesc(union e1000_rx_desc_extended *,
+   const struct em_rxbuffer *rxbuf);
+static voidem_receive_checksum(uint32_t status, struct mbuf *);
 static voidem_transmit_checksum_setup(struct tx_ring *, struct mbuf *, int,
struct ip *, u32 *, u32 *);
 static voidem_tso_setup(struct tx_ring *, struct mbuf *, int, struct ip *,
@@ -631,7 +633,7 @@ em_attach(device_t dev)
} else
adapter->num_tx_desc = em_txd;
 
-   if (((em_rxd * sizeof(struct e1000_rx_desc)) % EM_DBA_ALIGN) != 0 ||
+   if (((em_rxd * sizeof(union e1000_rx_desc_extended)) % EM_DBA_ALIGN) != 
0 ||
(em_rxd > EM_MAX_RXD) || (em_rxd < EM_MIN_RXD)) {
device_printf(dev, "Using %d RX descriptors instead of %d!\n",
EM_DEFAULT_RXD, em_rxd);
@@ -1872,7 +1874,7 @@ em_xmit(struct tx_ring *txr, struct mbuf
struct adapter  *adapter = txr->adapter;
bus_dma_segment_t   segs[EM_MAX_SCATTER];
bus_dmamap_tmap;
-   struct em_buffer*tx_buffer, *tx_buffer_mapped;
+   struct em_txbuffer  *tx_buffer, *tx_buffer_mapped;
struct e1000_tx_desc*ctxd = NULL;
struct mbuf *m_head;
struct ether_header *eh;
@@ -3296,7 +3298,7 @@ em_allocate_queues(struct adapter *adapt
 * Next the RX queues...
 */ 
rsize = roundup2(adapter->num_rx_desc *
-   sizeof(struct e1000_rx_desc), EM_DBA_ALIGN);
+   sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN);
for (int i = 0; i < adapter->num_queues; i++, rxconf++) {
rxr = >rx_rings[i];
rxr->adapter = adapter;
@@ -3314,7 +3316,7 @@ em_allocate_queues(struct adapter *adapt
error = ENOMEM;
goto err_rx_desc;
}
-   rxr->rx_base = (struct e1000_rx_desc *)rxr->rxdma.dma_vaddr;
+   rxr->rx_base = (union e1000_rx_desc_extended 
*)rxr->rxdma.dma_vaddr;
bzero((void *)rxr->rx_base, rsize);
 
/* Allocate receive buffers for the ring*/
@@ -3357,7 +3359,7 @@ em_allocate_transmit_buffers(struct tx_r
 {
struct adapter *adapter = txr->adapter;
device_t dev = adapter->dev;
-   struct em_buffer *txbuf;
+   struct em_txbuffer *txbuf;
int error, i;
 
/*
@@ -3380,7 +3382,7 @@ em_allocate_transmit_buffers(struct tx_r
}
 
if (!(txr->tx_buffers =
-   (struct em_buffer *) malloc(sizeof(struct em_buffer) *
+   (struct em_txbuffer *) malloc(sizeof(struct em_txbuffer) *
adapter->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO))) {
device_printf(dev, "Unable to allocate tx_buffer memory\n");
error = ENOMEM;
@@ -3413,7 +3415,7 @@ static void
 em_setup_transmit_ring(struct tx_ring *txr)
 {
struct adapter *adapter = txr->adapter;
-   struct em_buffer *txbuf;
+   struct em_txbuffer *txbuf;
int i;
 #ifdef DEV_NETMAP
struct netmap_slot *slot;
@@ -3632,7 +3634,7 @@ static void
 em_free_transmit_buffers(struct tx_ring *txr)
 {
struct adapter  *adapter = txr->adapter;
-   struct em_buffer*txbuf;
+   struct em_txbuffer  *txbuf;
 
INIT_DEBUGOUT("free_transmit_ring: begin");
 
@@ -3699,7 +3701,7 @@ em_transmit_checksum_setup(struct tx_rin
 {
struct adapter  *adapter = txr->adapter;
struct e1000_context_desc   *TXD = NULL;
-   struct em_buffer*tx_buffer;
+   struct em_txbuffer  *tx_buffer;

svn commit: r293332 - head/sys/dev/e1000

2016-01-07 Thread Sean Bruno
Author: sbruno
Date: Thu Jan  7 16:48:47 2016
New Revision: 293332
URL: https://svnweb.freebsd.org/changeset/base/293332

Log:
  Disable the reuse of checksum offload context descriptors in the case
  of multiple queues in em(4).  Document errata in the code.
  
  MFC after:2 weeks
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D3995

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Thu Jan  7 16:42:48 2016(r293331)
+++ head/sys/dev/e1000/if_em.c  Thu Jan  7 16:48:47 2016(r293332)
@@ -3735,29 +3735,38 @@ em_transmit_checksum_setup(struct tx_rin
offload |= CSUM_TCP;
tucss = hdr_len;
tucso = hdr_len + offsetof(struct tcphdr, th_sum);
-   /*
-* Setting up new checksum offload context for every frames
-* takes a lot of processing time for hardware. This also
-* reduces performance a lot for small sized frames so avoid
-* it if driver can use previously configured checksum
-* offload context.
-*/
-   if (txr->last_hw_offload == offload) {
-   if (offload & CSUM_IP) {
-   if (txr->last_hw_ipcss == ipcss &&
-   txr->last_hw_ipcso == ipcso &&
-   txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   return;
-   } else {
-   if (txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   return;
-   }
-   }
-   txr->last_hw_offload = offload;
-   txr->last_hw_tucss = tucss;
-   txr->last_hw_tucso = tucso;
+   /*
+* The 82574L can only remember the *last* context used
+* regardless of queue that it was use for.  We cannot reuse
+* contexts on this hardware platform and must generate a new
+* context every time.  82574L hardware spec, section 7.2.6,
+* second note.
+*/
+   if (adapter->num_queues < 2) {
+   /*
+   * Setting up new checksum offload context for every
+   * frames takes a lot of processing time for hardware.
+   * This also reduces performance a lot for small sized
+   * frames so avoid it if driver can use previously
+   * configured checksum offload context.
+   */
+   if (txr->last_hw_offload == offload) {
+   if (offload & CSUM_IP) {
+   if (txr->last_hw_ipcss == ipcss &&
+   txr->last_hw_ipcso == ipcso &&
+   txr->last_hw_tucss == tucss &&
+   txr->last_hw_tucso == tucso)
+   return;
+   } else {
+   if (txr->last_hw_tucss == tucss &&
+   txr->last_hw_tucso == tucso)
+   return;
+   }
+   }
+   txr->last_hw_offload = offload;
+   txr->last_hw_tucss = tucss;
+   txr->last_hw_tucso = tucso;
+   }
/*
 * Start offset for payload checksum calculation.
 * End offset for payload checksum calculation.
@@ -3773,29 +3782,38 @@ em_transmit_checksum_setup(struct tx_rin
*txd_upper |= E1000_TXD_POPTS_TXSM << 8;
tucss = hdr_len;
tucso = hdr_len + offsetof(struct udphdr, uh_sum);
-   /*
-* Setting up new checksum offload context for every frames
-* takes a lot of processing time for hardware. This also
-* reduces performance a lot for small sized frames so avoid
-* it if driver can use previously configured checksum
-* offload context.
-*/
-   if (txr->last_hw_offload == offload) {
-   if (offload & CSUM_IP) {
-   if (txr->last_hw_ipcss == ipcss &&
-   txr->last_hw_ipcso == ipcso &&
-   txr->last_hw_tucss == tucss &&
-   txr->last_hw_tucso == tucso)
-   

svn commit: r293333 - stable/10/sys/conf

2016-01-07 Thread Ed Maste
Author: emaste
Date: Thu Jan  7 17:00:35 2016
New Revision: 29
URL: https://svnweb.freebsd.org/changeset/base/29

Log:
  MFC r291691: newvers: Honour SOURCE_DATE_EPOCH for build reproducibility
  
  One reason the kernel does not build reproducibly is that it includes
  a timestamp in the version string. SOURCE_DATE_EPOCH provides a standard
  method to address this: it should be set to the last modification time
  of the source, and build processes use the specified timestamp instead
  of the "current" date and time.
  
  This change uses SOURCE_DATE_EPOCH if it is set; how it gets set needs
  to be addressed elsewhere.

Modified:
  stable/10/sys/conf/newvers.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/newvers.sh
==
--- stable/10/sys/conf/newvers.sh   Thu Jan  7 16:48:47 2016
(r293332)
+++ stable/10/sys/conf/newvers.sh   Thu Jan  7 17:00:35 2016
(r29)
@@ -87,7 +87,15 @@ then
 fi
 
 touch version
-v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date`
+v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`}
+if [ -n "$SOURCE_DATE_EPOCH" ]; then
+   if ! t=`date -r $SOURCE_DATE_EPOCH 2>/dev/null`; then
+   echo "Invalid SOURCE_DATE_EPOCH" >&2
+   exit 1
+   fi
+else
+   t=`date`
+fi
 i=`${MAKE:-make} -V KERN_IDENT`
 compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep 'version')
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293349 - head/sys/kern

2016-01-07 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  7 20:15:09 2016
New Revision: 293349
URL: https://svnweb.freebsd.org/changeset/base/293349

Log:
  Convert tty common code to use make_dev_s().
  
  Tty.c was untypical in that it handled the si_drv1 issue consistently
  and correctly, by always checking for si_drv1 being non-NULL and
  sleeping if NULL.  The removed code also illustrated unneeded
  complications in drivers which are eliminated by the use of new KPI.
  
  Reviewed by:  hps, jhb
  Discussed with:   bde
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks
  Differential revision:https://reviews.freebsd.org/D4746

Modified:
  head/sys/kern/tty.c

Modified: head/sys/kern/tty.c
==
--- head/sys/kern/tty.c Thu Jan  7 20:15:05 2016(r293348)
+++ head/sys/kern/tty.c Thu Jan  7 20:15:09 2016(r293349)
@@ -237,14 +237,10 @@ static int
 ttydev_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
struct tty *tp;
-   int error = 0;
-
-   while ((tp = dev->si_drv1) == NULL) {
-   error = tsleep(>si_drv1, PCATCH, "ttdrv1", 1);
-   if (error != EWOULDBLOCK)
-   return (error);
-   }
+   int error;
 
+   tp = dev->si_drv1;
+   error = 0;
tty_lock(tp);
if (tty_gone(tp)) {
/* Device is already gone. */
@@ -755,13 +751,10 @@ static int
 ttyil_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
struct tty *tp;
-   int error = 0;
+   int error;
 
-   while ((tp = dev->si_drv1) == NULL) {
-   error = tsleep(>si_drv1, PCATCH, "ttdrv1", 1);
-   if (error != EWOULDBLOCK)
-   return (error);
-   }
+   tp = dev->si_drv1;
+   error = 0;
tty_lock(tp);
if (tty_gone(tp))
error = ENODEV;
@@ -1189,6 +1182,7 @@ tty_makedevf(struct tty *tp, struct ucre
 const char *fmt, ...)
 {
va_list ap;
+   struct make_dev_args args;
struct cdev *dev, *init, *lock, *cua, *cinit, *clock;
const char *prefix = "tty";
char name[SPECNAMELEN - 3]; /* for "tty" and "cua". */
@@ -1221,71 +1215,72 @@ tty_makedevf(struct tty *tp, struct ucre
flags |= MAKEDEV_CHECKNAME;
 
/* Master call-in device. */
-   error = make_dev_p(flags, , _cdevsw, cred, uid, gid, mode,
-   "%s%s", prefix, name);
-   if (error)
+   make_dev_args_init();
+   args.mda_flags = flags;
+   args.mda_devsw = _cdevsw;
+   args.mda_cr = cred;
+   args.mda_uid = uid;
+   args.mda_gid = gid;
+   args.mda_mode = mode;
+   args.mda_si_drv1 = tp;
+   error = make_dev_s(, , "%s%s", prefix, name);
+   if (error != 0)
return (error);
-   dev->si_drv1 = tp;
-   wakeup(>si_drv1);
tp->t_dev = dev;
 
init = lock = cua = cinit = clock = NULL;
 
/* Slave call-in devices. */
if (tp->t_flags & TF_INITLOCK) {
-   error = make_dev_p(flags, , _cdevsw, cred, uid,
-   gid, mode, "%s%s.init", prefix, name);
-   if (error)
+   args.mda_devsw = _cdevsw;
+   args.mda_unit = TTYUNIT_INIT;
+   args.mda_si_drv1 = tp;
+   args.mda_si_drv2 = >t_termios_init_in;
+   error = make_dev_s(, , "%s%s.init", prefix, name);
+   if (error != 0)
goto fail;
dev_depends(dev, init);
-   dev2unit(init) = TTYUNIT_INIT;
-   init->si_drv1 = tp;
-   wakeup(>si_drv1);
-   init->si_drv2 = >t_termios_init_in;
 
-   error = make_dev_p(flags, , _cdevsw, cred, uid,
-   gid, mode, "%s%s.lock", prefix, name);
-   if (error)
+   args.mda_unit = TTYUNIT_LOCK;
+   args.mda_si_drv2 = >t_termios_lock_in;
+   error = make_dev_s(, , "%s%s.lock", prefix, name);
+   if (error != 0)
goto fail;
dev_depends(dev, lock);
-   dev2unit(lock) = TTYUNIT_LOCK;
-   lock->si_drv1 = tp;
-   wakeup(>si_drv1);
-   lock->si_drv2 = >t_termios_lock_in;
}
 
/* Call-out devices. */
if (tp->t_flags & TF_CALLOUT) {
-   error = make_dev_p(flags, , _cdevsw, cred,
-   UID_UUCP, GID_DIALER, 0660, "cua%s", name);
-   if (error)
+   make_dev_args_init();
+   args.mda_flags = flags;
+   args.mda_devsw = _cdevsw;
+   args.mda_cr = cred;
+   args.mda_uid = UID_UUCP;
+   args.mda_gid = GID_DIALER;
+   args.mda_mode = 0660;
+   args.mda_unit = TTYUNIT_CALLOUT;
+   args.mda_si_drv1 = tp;
+   error = make_dev_s(, , "cua%s", name);
+

svn commit: r293350 - in head/sys/cam: ctl scsi

2016-01-07 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  7 20:22:55 2016
New Revision: 293350
URL: https://svnweb.freebsd.org/changeset/base/293350

Log:
  Convert sys/cam to use make_dev_s().
  
  Reviewed by:  hps, jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks
  Differential revision:https://reviews.freebsd.org/D4746

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/scsi/scsi_ch.c
  head/sys/cam/scsi/scsi_enc.c
  head/sys/cam/scsi/scsi_pass.c
  head/sys/cam/scsi/scsi_pt.c
  head/sys/cam/scsi/scsi_sa.c
  head/sys/cam/scsi/scsi_sg.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Thu Jan  7 20:15:09 2016(r293349)
+++ head/sys/cam/ctl/ctl.c  Thu Jan  7 20:22:55 2016(r293350)
@@ -1778,6 +1778,7 @@ ctl_ha_role_sysctl(SYSCTL_HANDLER_ARGS)
 static int
 ctl_init(void)
 {
+   struct make_dev_args args;
struct ctl_softc *softc;
void *other_pool;
int i, error;
@@ -1785,9 +1786,17 @@ ctl_init(void)
softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF,
   M_WAITOK | M_ZERO);
 
-   softc->dev = make_dev(_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0600,
- "cam/ctl");
-   softc->dev->si_drv1 = softc;
+   make_dev_args_init();
+   args.mda_devsw = _cdevsw;
+   args.mda_uid = UID_ROOT;
+   args.mda_gid = GID_OPERATOR;
+   args.mda_mode = 0600;
+   args.mda_si_drv1 = softc;
+   error = make_dev_s(, >dev, "cam/ctl");
+   if (error != 0) {
+   free(control_softc, M_DEVBUF);
+   return (error);
+   }
 
sysctl_ctx_init(>sysctl_ctx);
softc->sysctl_tree = SYSCTL_ADD_NODE(>sysctl_ctx,

Modified: head/sys/cam/scsi/scsi_ch.c
==
--- head/sys/cam/scsi/scsi_ch.c Thu Jan  7 20:15:09 2016(r293349)
+++ head/sys/cam/scsi/scsi_ch.c Thu Jan  7 20:22:55 2016(r293350)
@@ -372,6 +372,8 @@ chregister(struct cam_periph *periph, vo
struct ch_softc *softc;
struct ccb_getdev *cgd;
struct ccb_pathinq cpi;
+   struct make_dev_args args;
+   int error;
 
cgd = (struct ccb_getdev *)arg;
if (cgd == NULL) {
@@ -431,11 +433,20 @@ chregister(struct cam_periph *periph, vo
 
 
/* Register the device */
-   softc->dev = make_dev(_cdevsw, periph->unit_number, UID_ROOT,
- GID_OPERATOR, 0600, "%s%d", periph->periph_name,
- periph->unit_number);
+   make_dev_args_init();
+   args.mda_devsw = _cdevsw;
+   args.mda_unit = periph->unit_number;
+   args.mda_uid = UID_ROOT;
+   args.mda_gid = GID_OPERATOR;
+   args.mda_mode = 0600;
+   args.mda_si_drv1 = periph;
+   error = make_dev_s(, >dev, "%s%d", periph->periph_name,
+   periph->unit_number);
cam_periph_lock(periph);
-   softc->dev->si_drv1 = periph;
+   if (error != 0) {
+   cam_periph_release_locked(periph);
+   return (CAM_REQ_CMP_ERR);
+   }
 
/*
 * Add an async callback so that we get
@@ -507,8 +518,6 @@ chclose(struct cdev *dev, int flag, int 
struct mtx *mtx;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (periph == NULL)
-   return(ENXIO);
mtx = cam_periph_mtx(periph);
mtx_lock(mtx);
 
@@ -754,9 +763,6 @@ chioctl(struct cdev *dev, u_long cmd, ca
int error;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (periph == NULL)
-   return(ENXIO);
-
cam_periph_lock(periph);
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("entering chioctl\n"));
 

Modified: head/sys/cam/scsi/scsi_enc.c
==
--- head/sys/cam/scsi/scsi_enc.cThu Jan  7 20:15:09 2016
(r293349)
+++ head/sys/cam/scsi/scsi_enc.cThu Jan  7 20:22:55 2016
(r293350)
@@ -264,10 +264,6 @@ enc_open(struct cdev *dev, int flags, in
int error = 0;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (periph == NULL) {
-   return (ENXIO);
-   }
-
if (cam_periph_acquire(periph) != CAM_REQ_CMP)
return (ENXIO);
 
@@ -302,8 +298,6 @@ enc_close(struct cdev *dev, int flag, in
struct mtx *mtx;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (periph == NULL)
-   return (ENXIO);
mtx = cam_periph_mtx(periph);
mtx_lock(mtx);
 
@@ -364,9 +358,6 @@ enc_ioctl(struct cdev *dev, u_long cmd, 
addr = NULL;
 
periph = (struct cam_periph *)dev->si_drv1;
-   if (periph == NULL)
-   return (ENXIO);
-
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("entering encioctl\n"));
 
cam_periph_lock(periph);
@@ -905,6 +896,7 @@ 

svn commit: r293352 - in head: share/man/man4 sys/dev/nvme

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 20:32:04 2016
New Revision: 293352
URL: https://svnweb.freebsd.org/changeset/base/293352

Log:
  nvme: add hw.nvme.min_cpus_per_ioq tunable
  
  Due to FreeBSD system-wide limits on number of MSI-X vectors
  (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
  it may be desirable to allocate fewer than the maximum number
  of vectors for an NVMe device, in order to save vectors for
  other devices (usually Ethernet) that can take better
  advantage of them and may be probed after NVMe.
  
  This tunable is expressed in terms of minimum number of CPUs
  per I/O queue instead of max number of queues per controller,
  to allow for a more even distribution of CPUs per queue.  This
  avoids cases where some number of CPUs have a dedicated queue,
  but other CPUs need to share queues.  Ideally the PR referenced
  above will eventually be fixed and the mechanism implemented
  here becomes obsolete anyways.
  
  While here, fix a bug in the CPUs per I/O queue calculation to
  properly account for the admin queue's MSI-X vector.
  
  Reviewed by:  gallatin
  MFC after:3 days
  Sponsored by: Intel

Modified:
  head/share/man/man4/nvme.4
  head/sys/dev/nvme/nvme_ctrlr.c
  head/sys/dev/nvme/nvme_sysctl.c

Modified: head/share/man/man4/nvme.4
==
--- head/share/man/man4/nvme.4  Thu Jan  7 20:24:30 2016(r293351)
+++ head/share/man/man4/nvme.4  Thu Jan  7 20:32:04 2016(r293352)
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (c) 2012-2014 Intel Corporation
+.\" Copyright (c) 2012-2016 Intel Corporation
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 18, 2014
+.Dd January 7, 2016
 .Dt NVME 4
 .Os
 .Sh NAME
@@ -89,7 +89,10 @@ not 0, and this driver follows that conv
 By default,
 .Nm
 will create an I/O queue pair for each CPU, provided enough MSI-X vectors
-can be allocated.
+and NVMe queue pairs can be allocated.  If not enough vectors or queue
+pairs are available, nvme(4) will use a smaller number of queue pairs and
+assign multiple CPUs per queue pair.
+.Pp
 To force a single I/O queue pair shared by all CPUs, set the following
 tunable value in
 .Xr loader.conf 5 :
@@ -97,6 +100,13 @@ tunable value in
 hw.nvme.per_cpu_io_queues=0
 .Ed
 .Pp
+To assign more than one CPU per I/O queue pair, thereby reducing the number
+of MSI-X vectors consumed by the device, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.nvme.min_cpus_per_ioq=X
+.Ed
+.Pp
 To force legacy interrupts for all
 .Nm
 driver instances, set the following tunable value in
@@ -109,6 +119,8 @@ Note that use of INTx implies disabling 
 .Sh SYSCTL VARIABLES
 The following controller-level sysctls are currently implemented:
 .Bl -tag -width indent
+.It Va dev.nvme.0.num_cpus_per_ioq
+(R) Number of CPUs associated with each I/O queue pair.
 .It Va dev.nvme.0.int_coal_time
 (R/W) Interrupt coalescing timer period in microseconds.
 Set to 0 to disable.

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==
--- head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 20:24:30 2016
(r293351)
+++ head/sys/dev/nvme/nvme_ctrlr.c  Thu Jan  7 20:32:04 2016
(r293352)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012-2015 Intel Corporation
+ * Copyright (C) 2012-2016 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -978,13 +978,27 @@ nvme_ctrlr_setup_interrupts(struct nvme_
 {
device_tdev;
int per_cpu_io_queues;
+   int min_cpus_per_ioq;
int num_vectors_requested, num_vectors_allocated;
int num_vectors_available;
 
dev = ctrlr->dev;
+   min_cpus_per_ioq = 1;
+   TUNABLE_INT_FETCH("hw.nvme.min_cpus_per_ioq", _cpus_per_ioq);
+
+   if (min_cpus_per_ioq < 1) {
+   min_cpus_per_ioq = 1;
+   } else if (min_cpus_per_ioq > mp_ncpus) {
+   min_cpus_per_ioq = mp_ncpus;
+   }
+
per_cpu_io_queues = 1;
TUNABLE_INT_FETCH("hw.nvme.per_cpu_io_queues", _cpu_io_queues);
 
+   if (per_cpu_io_queues == 0) {
+   min_cpus_per_ioq = mp_ncpus;
+   }
+
ctrlr->force_intx = 0;
TUNABLE_INT_FETCH("hw.nvme.force_intx", >force_intx);
 
@@ -1010,10 +1024,12 @@ nvme_ctrlr_setup_interrupts(struct nvme_
return;
}
 
-   if (per_cpu_io_queues)
-   ctrlr->num_cpus_per_ioq = NVME_CEILING(mp_ncpus, 
num_vectors_available + 1);
-   else
-   ctrlr->num_cpus_per_ioq = mp_ncpus;
+   /*
+* Do not use all vectors for I/O queues - one must be saved for the
+*  admin queue.
+*/
+   ctrlr->num_cpus_per_ioq = max(min_cpus_per_ioq,
+   

svn commit: r293353 - stable/10/sys/boot

2016-01-07 Thread Ed Maste
Author: emaste
Date: Thu Jan  7 20:34:06 2016
New Revision: 293353
URL: https://svnweb.freebsd.org/changeset/base/293353

Log:
  MFC r280808 by andrew: Reorder sys/boot/Makefile for the efi loader move
  
  As these will depend on ficl having been built, and are set via
  bsd.arch.inc.mk we need to place this after ficl.
  
  As Makefile.amd64 is now late enough we can add the i386 directory to
  this.

Modified:
  stable/10/sys/boot/Makefile
  stable/10/sys/boot/Makefile.amd64
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/Makefile
==
--- stable/10/sys/boot/Makefile Thu Jan  7 20:32:04 2016(r293352)
+++ stable/10/sys/boot/Makefile Thu Jan  7 20:34:06 2016(r293353)
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
 .include 
-.include 
 
 .if ${MK_FORTH} != "no"
 # Build the add-in FORTH interpreter.
@@ -9,13 +8,12 @@ SUBDIR+=  ficl
 SUBDIR+=   forth
 .endif
 
+.include 
+
 # Pick the machine-dependent subdir based on the target architecture.
 ADIR=  ${MACHINE:S/powerpc64/powerpc/}
 .if exists(${.CURDIR}/${ADIR}/.)
 SUBDIR+=   ${ADIR}
 .endif
-.if ${MACHINE} == "amd64"
-SUBDIR+=   i386
-.endif
 
 .include 

Modified: stable/10/sys/boot/Makefile.amd64
==
--- stable/10/sys/boot/Makefile.amd64   Thu Jan  7 20:32:04 2016
(r293352)
+++ stable/10/sys/boot/Makefile.amd64   Thu Jan  7 20:34:06 2016
(r293353)
@@ -8,3 +8,5 @@ SUBDIR+=userboot
 .if ${MK_FORTH} != "no"
 SUBDIR+=   ficl32
 .endif
+
+SUBDIR+=   i386
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293361 - head/sys/sys

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  7 20:52:35 2016
New Revision: 293361
URL: https://svnweb.freebsd.org/changeset/base/293361

Log:
  Allow libnv to be built externally using GCC.
  
  GCC does not define _VA_LIST_DECLARED.  It defines _VA_LIST_ and others.
  This was causing the prototype to not be defined and leading to an error
  later due to using nvlist_add_stringv(3) without a prototype in
  nvlist_add_stringf(3).
  
  This uses the same check as other va_list prototypes in the original
  change in r279438.

Modified:
  head/sys/sys/nv.h

Modified: head/sys/sys/nv.h
==
--- head/sys/sys/nv.h   Thu Jan  7 20:50:03 2016(r293360)
+++ head/sys/sys/nv.h   Thu Jan  7 20:52:35 2016(r293361)
@@ -146,7 +146,7 @@ void nvlist_add_bool(nvlist_t *nvl, cons
 void nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value);
 void nvlist_add_string(nvlist_t *nvl, const char *name, const char *value);
 void nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, 
...) __printflike(3, 4);
-#ifdef _VA_LIST_DECLARED
+#if !defined(_KERNEL) || defined(_VA_LIST_DECLARED)
 void nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, 
va_list valueap) __printflike(3, 0);
 #endif
 void nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293339 - in head/sys/dev: bwi if_ndis iwi malo otus ral rtwn usb/wlan

2016-01-07 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jan  7 18:41:03 2016
New Revision: 293339
URL: https://svnweb.freebsd.org/changeset/base/293339

Log:
  net80211 drivers: fix ieee80211_init_channels() usage
  
  Fix out-of-bounds read (all) / write (11n capable) for drivers
  that are using ieee80211_init_channels() to initialize channel list.
  
  Tested with:
   * RTL8188EU, STA mode.
   * RTL8188CUS, STA mode.
   * WUSB54GC, HOSTAP mode.
  
  Approved by:  adrian (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D4818

Modified:
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/ral/rt2560.c
  head/sys/dev/ral/rt2661.c
  head/sys/dev/ral/rt2860.c
  head/sys/dev/rtwn/if_rtwn.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_zyd.c

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Thu Jan  7 18:34:56 2016(r293338)
+++ head/sys/dev/bwi/if_bwi.c   Thu Jan  7 18:41:03 2016(r293339)
@@ -356,8 +356,8 @@ bwi_attach(struct bwi_softc *sc)
device_t dev = sc->sc_dev;
struct bwi_mac *mac;
struct bwi_phy *phy;
+   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
int i, error;
-   uint8_t bands;
 
BWI_LOCK_INIT(sc);
 
@@ -453,15 +453,15 @@ bwi_attach(struct bwi_softc *sc)
/*
 * Setup ratesets, phytype, channels and get MAC address
 */
-   bands = 0;
+   memset(bands, 0, sizeof(bands));
if (phy->phy_mode == IEEE80211_MODE_11B ||
phy->phy_mode == IEEE80211_MODE_11G) {
-   setbit(, IEEE80211_MODE_11B);
+   setbit(bands, IEEE80211_MODE_11B);
if (phy->phy_mode == IEEE80211_MODE_11B) {
ic->ic_phytype = IEEE80211_T_DS;
} else {
ic->ic_phytype = IEEE80211_T_OFDM;
-   setbit(, IEEE80211_MODE_11G);
+   setbit(bands, IEEE80211_MODE_11G);
}
 
bwi_get_eaddr(sc, BWI_SPROM_11BG_EADDR, ic->ic_macaddr);
@@ -475,7 +475,7 @@ bwi_attach(struct bwi_softc *sc)
}
} else if (phy->phy_mode == IEEE80211_MODE_11A) {
/* TODO:11A */
-   setbit(, IEEE80211_MODE_11A);
+   setbit(bands, IEEE80211_MODE_11A);
error = ENXIO;
goto fail;
} else {
@@ -487,7 +487,7 @@ bwi_attach(struct bwi_softc *sc)
   BWI_SPROM_CARD_INFO_LOCALE);
DPRINTF(sc, BWI_DBG_ATTACH, "locale: %d\n", sc->sc_locale);
/* XXX use locale */
-   ieee80211_init_channels(ic, NULL, );
+   ieee80211_init_channels(ic, NULL, bands);
 
ic->ic_softc = sc;
ic->ic_name = device_get_nameunit(dev);

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Thu Jan  7 18:34:56 2016
(r293338)
+++ head/sys/dev/if_ndis/if_ndis.c  Thu Jan  7 18:41:03 2016
(r293339)
@@ -724,8 +724,8 @@ ndis_80211attach(struct ndis_softc *sc)
ndis_80211_rates_ex rates;
struct ndis_80211_nettype_list *ntl;
uint32_targ;
-   int mode, i, r, len;
-   uint8_t bands = 0;
+   int mode, i, r, len, nonettypes = 1;
+   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)] = { 0 };
 
callout_init(>ndis_scan_callout, 1);
 
@@ -751,8 +751,9 @@ ndis_80211attach(struct ndis_softc *sc)
for (i = 0; i < ntl->ntl_items; i++) {
mode = ndis_nettype_mode(ntl->ntl_type[i]);
if (mode) {
+   nonettypes = 0;
setbit(ic->ic_modecaps, mode);
-   setbit(, mode);
+   setbit(bands, mode);
} else
device_printf(sc->ndis_dev, "Unknown nettype %d\n",
ntl->ntl_type[i]);
@@ -760,9 +761,9 @@ ndis_80211attach(struct ndis_softc *sc)
free(ntl, M_DEVBUF);
 nonettypes:
/* Default to 11b channels if the card did not supply any */
-   if (bands == 0) {
+   if (nonettypes) {
setbit(ic->ic_modecaps, IEEE80211_MODE_11B);
-   setbit(, IEEE80211_MODE_11B);
+   setbit(bands, IEEE80211_MODE_11B);
}
len = sizeof(rates);
bzero((char *), len);
@@ -859,7 +860,7 @@ nonettypes:
 #undef INCRATE
 #undef TESTSETRATE
 
-   

svn commit: r293338 - head/sys/dev/ixgbe

2016-01-07 Thread Sean Bruno
Author: sbruno
Date: Thu Jan  7 18:34:56 2016
New Revision: 293338
URL: https://svnweb.freebsd.org/changeset/base/293338

Log:
  Fix VF handling of VLANs.
  
  This helps immensily with our ability to operate in the Amazon Cloud.
  
  Discussed on Intel Networking Community call this morning.
  
  Submitted by: Jarrod Petz(p...@nisshoko.net)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D4788

Modified:
  head/sys/dev/ixgbe/if_ixv.c

Modified: head/sys/dev/ixgbe/if_ixv.c
==
--- head/sys/dev/ixgbe/if_ixv.c Thu Jan  7 18:24:24 2016(r293337)
+++ head/sys/dev/ixgbe/if_ixv.c Thu Jan  7 18:34:56 2016(r293338)
@@ -1664,7 +1664,7 @@ ixv_initialize_receive_units(struct adap
 
/* Disable the queue */
rxdctl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i));
-   rxdctl &= ~(IXGBE_RXDCTL_ENABLE | IXGBE_RXDCTL_VME);
+   rxdctl &= ~IXGBE_RXDCTL_ENABLE;
IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(i), rxdctl);
for (int j = 0; j < 10; j++) {
if (IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i)) &
@@ -1698,8 +1698,7 @@ ixv_initialize_receive_units(struct adap
rxr->tail = IXGBE_VFRDT(rxr->me);
 
/* Do the queue enabling last */
-   rxdctl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i));
-   rxdctl |= IXGBE_RXDCTL_ENABLE;
+   rxdctl |= IXGBE_RXDCTL_ENABLE | IXGBE_RXDCTL_VME;
IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(i), rxdctl);
for (int k = 0; k < 10; k++) {
if (IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i)) &
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293342 - head

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  7 19:37:11 2016
New Revision: 293342
URL: https://svnweb.freebsd.org/changeset/base/293342

Log:
  Always try to upgrade to bmake if not already using it.
  
  This is mostly targetting stable/10 which requires bmake to build and
  has issues upgrading from <10.
  
  MFC after:1 week
  Sponsored by: EMC / Isilon Storage Division
  PR:   198062

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Thu Jan  7 19:19:23 2016(r293341)
+++ head/Makefile   Thu Jan  7 19:37:11 2016(r293342)
@@ -205,7 +205,7 @@ _TARGET_ARCH?=  ${MACHINE_ARCH}
 # The user can define ALWAYS_CHECK_MAKE to have this check performed
 # for all targets.
 #
-.if defined(ALWAYS_CHECK_MAKE)
+.if defined(ALWAYS_CHECK_MAKE) || !defined(.PARSEDIR)
 ${TGTS}: upgrade_checks
 .else
 buildworld: upgrade_checks
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293343 - in head/sys: amd64/include i386/include x86/include

2016-01-07 Thread Ed Maste
Author: emaste
Date: Thu Jan  7 19:47:26 2016
New Revision: 293343
URL: https://svnweb.freebsd.org/changeset/base/293343

Log:
  Move amd64 metadata.h to x86 and share with i386
  
  MFC after:1 week

Added:
  head/sys/x86/include/metadata.h
 - copied unchanged from r293342, head/sys/amd64/include/metadata.h
Replaced:
  head/sys/amd64/include/metadata.h
 - copied, changed from r293342, head/sys/i386/include/metadata.h
Modified:
  head/sys/i386/include/metadata.h

Copied and modified: head/sys/amd64/include/metadata.h (from r293342, 
head/sys/i386/include/metadata.h)
==
--- head/sys/i386/include/metadata.hThu Jan  7 19:37:11 2016
(r293342, copy source)
+++ head/sys/amd64/include/metadata.h   Thu Jan  7 19:47:26 2016
(r293343)
@@ -1,37 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_METADATA_H_
-#define_MACHINE_METADATA_H_
-
-#defineMODINFOMD_SMAP  0x1001
-#defineMODINFOMD_SMAP_XATTR0x1002
-#defineMODINFOMD_DTBP  0x1003
-#defineMODINFOMD_MODULEP   0x1006
-
-#endif /* !_MACHINE_METADATA_H_ */
+#include 

Modified: head/sys/i386/include/metadata.h
==
--- head/sys/i386/include/metadata.hThu Jan  7 19:37:11 2016
(r293342)
+++ head/sys/i386/include/metadata.hThu Jan  7 19:47:26 2016
(r293343)
@@ -1,37 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_METADATA_H_
-#define_MACHINE_METADATA_H_
-
-#defineMODINFOMD_SMAP  0x1001
-#defineMODINFOMD_SMAP_XATTR0x1002
-#defineMODINFOMD_DTBP  0x1003
-#defineMODINFOMD_MODULEP   0x1006
-
-#endif /* !_MACHINE_METADATA_H_ */
+#include 

Copied: head/sys/x86/include/metadata.h (from r293342, 
head/sys/amd64/include/metadata.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 

svn commit: r293370 - head/sys/fs/ext2fs

2016-01-07 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jan  7 21:43:43 2016
New Revision: 293370
URL: https://svnweb.freebsd.org/changeset/base/293370

Log:
  ext2fs: reading mmaped file in Ext4 causes panic
  
  Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().
  
  Patch by Damjan Jovanovic.
  
  PR:   205938
  MFC after:1 week

Modified:
  head/sys/fs/ext2fs/ext2_bmap.c

Modified: head/sys/fs/ext2fs/ext2_bmap.c
==
--- head/sys/fs/ext2fs/ext2_bmap.c  Thu Jan  7 21:16:44 2016
(r293369)
+++ head/sys/fs/ext2fs/ext2_bmap.c  Thu Jan  7 21:43:43 2016
(r293370)
@@ -96,6 +96,7 @@ ext4_bmapext(struct vnode *vp, int32_t b
struct ext4_extent *ep;
struct ext4_extent_path path = { .ep_bp = NULL };
daddr_t lbn;
+   int ret = 0;
 
ip = VTOI(vp);
fs = ip->i_e2fs;
@@ -113,15 +114,21 @@ ext4_bmapext(struct vnode *vp, int32_t b
ext4_ext_find_extent(fs, ip, lbn, );
ep = path.ep_ext;
if (ep == NULL)
-   return (EIO);
+   ret = EIO;
+   else {
+   *bnp = fsbtodb(fs, lbn - ep->e_blk +
+   (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
 
-   *bnp = fsbtodb(fs, lbn - ep->e_blk +
-   (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
+   if (*bnp == 0)
+   *bnp = -1;
+   }
 
-   if (*bnp == 0)
-   *bnp = -1;
+   if (path.ep_bp != NULL) {
+   brelse(path.ep_bp);
+   path.ep_bp = NULL;
+   }
 
-   return (0);
+   return (ret);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293371 - head/bin/sh/tests/builtins

2016-01-07 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jan  7 21:46:07 2016
New Revision: 293371
URL: https://svnweb.freebsd.org/changeset/base/293371

Log:
  sh: Add a test for 'cd -'.
  
  Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
  directory name even if not interactive, but we currently only write it if
  interactive.

Added:
  head/bin/sh/tests/builtins/cd9.0   (contents, props changed)
  head/bin/sh/tests/builtins/cd9.0.stdout   (contents, props changed)
Modified:
  head/bin/sh/tests/builtins/Makefile

Modified: head/bin/sh/tests/builtins/Makefile
==
--- head/bin/sh/tests/builtins/Makefile Thu Jan  7 21:43:43 2016
(r293370)
+++ head/bin/sh/tests/builtins/Makefile Thu Jan  7 21:46:07 2016
(r293371)
@@ -48,6 +48,7 @@ FILES+=   cd5.0
 FILES+=cd6.0
 FILES+=cd7.0
 FILES+=cd8.0
+FILES+=cd9.0 cd9.0.stdout
 FILES+=command1.0
 FILES+=command2.0
 FILES+=command3.0

Added: head/bin/sh/tests/builtins/cd9.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/cd9.0Thu Jan  7 21:46:07 2016
(r293371)
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+cd /dev
+cd /bin
+cd - >/dev/null
+pwd
+cd - >/dev/null
+pwd

Added: head/bin/sh/tests/builtins/cd9.0.stdout
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/cd9.0.stdout Thu Jan  7 21:46:07 2016
(r293371)
@@ -0,0 +1,2 @@
+/dev
+/bin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293375 - stable/10

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  7 22:05:04 2016
New Revision: 293375
URL: https://svnweb.freebsd.org/changeset/base/293375

Log:
  MFC r291610:
  
Allow storing package(world|kernel) tarballs into a different location at
PACKAGEDIR.

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Thu Jan  7 21:53:44 2016(r293374)
+++ stable/10/Makefile.inc1 Thu Jan  7 22:05:04 2016(r293375)
@@ -116,6 +116,7 @@ CLEANDIR=   cleandir
 .endif
 
 LOCAL_TOOL_DIRS?=
+PACKAGEDIR?=   ${DESTDIR}/${DISTDIR}
 
 BUILDENV_SHELL?=/bin/sh
 
@@ -915,11 +916,11 @@ packageworld:
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
tar cvf - --exclude usr/lib/debug \
@${DESTDIR}/${DISTDIR}/${dist}.meta | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz
 .else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
tar cvf - --exclude usr/lib/debug . | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz
 .endif
 .endfor
 
@@ -928,11 +929,11 @@ packageworld:
 .  if defined(NO_ROOT)
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.debug.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/${dist}.debug.txz
 .  else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
tar cvLf - usr/lib/debug | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-debug.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/${dist}-debug.txz
 .  endif
 . endfor
 .endif
@@ -1154,23 +1155,23 @@ packagekernel:
 .if defined(NO_ROOT)
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz
 .endfor
 .endif
 .else
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - . | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
tar cvf - . | \
-   ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz
+   ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz
 .endfor
 .endif
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293376 - stable/10

2016-01-07 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  7 22:06:05 2016
New Revision: 293376
URL: https://svnweb.freebsd.org/changeset/base/293376

Log:
  MFC r291611:
  
Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be
installed as "kernel".  This is relevant for packaging of the kernel when 
not
wanting a default "kernel.txz".

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Thu Jan  7 22:05:04 2016(r293375)
+++ stable/10/Makefile.inc1 Thu Jan  7 22:06:05 2016(r293376)
@@ -1012,10 +1012,14 @@ KERNCONFDIR?=   ${KRNLCONFDIR}
 
 BUILDKERNELS=
 INSTALLKERNEL=
+.if defined(NO_INSTALLKERNEL)
+# All of the BUILDKERNELS loops start at index 1.
+BUILDKERNELS+= dummy
+.endif
 .for _kernel in ${KERNCONF}
 .if exists(${KERNCONFDIR}/${_kernel})
 BUILDKERNELS+= ${_kernel}
-.if empty(INSTALLKERNEL)
+.if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL)
 INSTALLKERNEL= ${_kernel}
 .endif
 .endif
@@ -1029,12 +1033,12 @@ ${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALL
 # Builds all kernels defined by BUILDKERNELS.
 #
 buildkernel: .MAKE .PHONY
-.if empty(BUILDKERNELS)
+.if empty(BUILDKERNELS:Ndummy)
@echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \
false
 .endif
@echo
-.for _kernel in ${BUILDKERNELS}
+.for _kernel in ${BUILDKERNELS:Ndummy}
@echo "--"
@echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
@echo "--"
@@ -1093,6 +1097,7 @@ buildkernel: .MAKE .PHONY
 #
 installkernel installkernel.debug \
 reinstallkernel reinstallkernel.debug: _installcheck_kernel
+.if !defined(NO_INSTALLKERNEL)
 .if empty(INSTALLKERNEL)
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
false
@@ -1103,6 +1108,7 @@ reinstallkernel reinstallkernel.debug: _
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
${CROSSENV} PATH=${TMPPATH} \
${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} 
${.TARGET:S/kernel//}
+.endif
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
@echo "--"
@@ -1115,6 +1121,7 @@ reinstallkernel reinstallkernel.debug: _
 .endif
 
 distributekernel distributekernel.debug:
+.if !defined(NO_INSTALLKERNEL)
 .if empty(INSTALLKERNEL)
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
false
@@ -1132,6 +1139,7 @@ distributekernel distributekernel.debug:
sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \
${DESTDIR}/${DISTDIR}/kernel.meta
 .endif
+.endif
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 .if defined(NO_ROOT)
@@ -1153,9 +1161,11 @@ distributekernel distributekernel.debug:
 
 packagekernel:
 .if defined(NO_ROOT)
+.if !defined(NO_INSTALLKERNEL)
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
+.endif
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
@@ -1164,9 +1174,11 @@ packagekernel:
 .endfor
 .endif
 .else
+.if !defined(NO_INSTALLKERNEL)
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - . | \
${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
+.endif
 .if ${BUILDKERNELS:[#]} > 1
 .for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293377 - svnadmin/conf

2016-01-07 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jan  7 22:09:07 2016
New Revision: 293377
URL: https://svnweb.freebsd.org/changeset/base/293377

Log:
  Remove myself.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:06:05 2016
(r293376)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:09:07 2016
(r293377)
@@ -45,4 +45,3 @@ sam
 stas
 thompsa
 rpaulo
-glebius
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293379 - head/lib/libdpv

2016-01-07 Thread Devin Teske
Author: dteske
Date: Thu Jan  7 22:13:17 2016
New Revision: 293379
URL: https://svnweb.freebsd.org/changeset/base/293379

Log:
  Bump copyright (forgotten part of r293340)
  
  MFC after:3 days
  X-MFC-to: stable/10
  X-MFC-with:   r293340

Modified:
  head/lib/libdpv/util.h

Modified: head/lib/libdpv/util.h
==
--- head/lib/libdpv/util.h  Thu Jan  7 22:13:16 2016(r293378)
+++ head/lib/libdpv/util.h  Thu Jan  7 22:13:17 2016(r293379)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013-2014 Devin Teske 
+ * Copyright (c) 2013-2016 Devin Teske 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293378 - svnadmin/conf

2016-01-07 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jan  7 22:13:16 2016
New Revision: 293378
URL: https://svnweb.freebsd.org/changeset/base/293378

Log:
  Remove commented out usernames and usernames, who are not in 'access' file.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:09:07 2016
(r293377)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:13:16 2016
(r293378)
@@ -14,16 +14,9 @@
 # If you add just your name here, you get 10 times that.  (1024)
 
 # First field is username, second field is the raised limit required.
-#peter 3141592
-#grog
-#kan
-#lulf
-# adrian
 achim
 bapt
 brooks
-# cy
-#delphij
 davidcs
 des
 dim
@@ -33,15 +26,11 @@ gonzo
 imp
 jb
 jeff
-#jkim
-kmacy
 lstewart
-#ngie
 obrien
 peter
 roberto
 rwatson
-sam
 stas
 thompsa
 rpaulo
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293369 - head/sys/dev/ismt

2016-01-07 Thread Jim Harris
Author: jimharris
Date: Thu Jan  7 21:16:44 2016
New Revision: 293369
URL: https://svnweb.freebsd.org/changeset/base/293369

Log:
  ismt: fix ISMT_DESC_ADDR_RW macro
  
  Submitted by: Masanobu SAITOH 
  MFC after:3 days

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

Modified: head/sys/dev/ismt/ismt.c
==
--- head/sys/dev/ismt/ismt.cThu Jan  7 21:02:29 2016(r293368)
+++ head/sys/dev/ismt/ismt.cThu Jan  7 21:16:44 2016(r293369)
@@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
 #define ISMT_DESC_LPR  0x80/* Large Packet Received */
 
 /* Macros */
-#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr) | (is_read))
+#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr << 1) | (is_read))
 
 /* iSMT General Register address offsets (SMBBAR + ) */
 #define ISMT_GR_GCTRL  0x000   /* General Control */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293353 - stable/10/sys/boot

2016-01-07 Thread Oliver Pinter
On Thu, Jan 7, 2016 at 9:34 PM, Ed Maste  wrote:
> Author: emaste
> Date: Thu Jan  7 20:34:06 2016
> New Revision: 293353
> URL: https://svnweb.freebsd.org/changeset/base/293353
>
> Log:
>   MFC r280808 by andrew: Reorder sys/boot/Makefile for the efi loader move

Thanks Ed! This commit is the real fix, and not the previous one what
I mentioned.

>
>   As these will depend on ficl having been built, and are set via
>   bsd.arch.inc.mk we need to place this after ficl.
>
>   As Makefile.amd64 is now late enough we can add the i386 directory to
>   this.
>
> Modified:
>   stable/10/sys/boot/Makefile
>   stable/10/sys/boot/Makefile.amd64
> Directory Properties:
>   stable/10/   (props changed)
>
> Modified: stable/10/sys/boot/Makefile
> ==
> --- stable/10/sys/boot/Makefile Thu Jan  7 20:32:04 2016(r293352)
> +++ stable/10/sys/boot/Makefile Thu Jan  7 20:34:06 2016(r293353)
> @@ -1,7 +1,6 @@
>  # $FreeBSD$
>
>  .include 
> -.include 
>
>  .if ${MK_FORTH} != "no"
>  # Build the add-in FORTH interpreter.
> @@ -9,13 +8,12 @@ SUBDIR+=  ficl
>  SUBDIR+=   forth
>  .endif
>
> +.include 
> +
>  # Pick the machine-dependent subdir based on the target architecture.
>  ADIR=  ${MACHINE:S/powerpc64/powerpc/}
>  .if exists(${.CURDIR}/${ADIR}/.)
>  SUBDIR+=   ${ADIR}
>  .endif
> -.if ${MACHINE} == "amd64"
> -SUBDIR+=   i386
> -.endif
>
>  .include 
>
> Modified: stable/10/sys/boot/Makefile.amd64
> ==
> --- stable/10/sys/boot/Makefile.amd64   Thu Jan  7 20:32:04 2016
> (r293352)
> +++ stable/10/sys/boot/Makefile.amd64   Thu Jan  7 20:34:06 2016
> (r293353)
> @@ -8,3 +8,5 @@ SUBDIR+=userboot
>  .if ${MK_FORTH} != "no"
>  SUBDIR+=   ficl32
>  .endif
> +
> +SUBDIR+=   i386
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
> To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293380 - svnadmin/conf

2016-01-07 Thread Ed Schouten
Author: ed
Date: Thu Jan  7 22:24:43 2016
New Revision: 293380
URL: https://svnweb.freebsd.org/changeset/base/293380

Log:
  Remove myself from sizelimit.conf.
  
  I added it a long time ago, because I often ran into these limits when
  importing copies of LLVM and Clang. dim@ does a fine job maintaining
  that nowadays, so there is no need for me to be whitelisted.
  
  Requested by: glebius

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:13:17 2016
(r293379)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:24:43 2016
(r293380)
@@ -20,7 +20,6 @@ brooks
 davidcs
 des
 dim
-ed
 gnn
 gonzo
 imp
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293381 - svnadmin/conf

2016-01-07 Thread Ollivier Robert
Author: roberto
Date: Thu Jan  7 22:27:19 2016
New Revision: 293381
URL: https://svnweb.freebsd.org/changeset/base/293381

Log:
  I do not need to be there right now.
  
  Reminded by:glebius (thanks!)

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:24:43 2016
(r293380)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:27:19 2016
(r293381)
@@ -28,7 +28,6 @@ jeff
 lstewart
 obrien
 peter
-roberto
 rwatson
 stas
 thompsa
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293382 - svnadmin/conf

2016-01-07 Thread Stanislav Sedov
Author: stas
Date: Thu Jan  7 22:36:10 2016
New Revision: 293382
URL: https://svnweb.freebsd.org/changeset/base/293382

Log:
  Remove myself from the sizelimit file.
  
  Noticed by:   glebius

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:27:19 2016
(r293381)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:36:10 2016
(r293382)
@@ -29,6 +29,5 @@ lstewart
 obrien
 peter
 rwatson
-stas
 thompsa
 rpaulo
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293385 - svnadmin/conf

2016-01-07 Thread George V. Neville-Neil
Author: gnn
Date: Thu Jan  7 22:45:50 2016
New Revision: 293385
URL: https://svnweb.freebsd.org/changeset/base/293385

Log:
  Remove myself from the size limit override pool.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Jan  7 22:44:58 2016
(r293384)
+++ svnadmin/conf/sizelimit.confThu Jan  7 22:45:50 2016
(r293385)
@@ -20,7 +20,6 @@ brooks
 davidcs
 des
 dim
-gnn
 gonzo
 imp
 jb
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"