svn commit: r313695 - in head: contrib/libpcap contrib/libpcap/bpf/net contrib/libpcap/config contrib/libpcap/lbl contrib/libpcap/missing contrib/libpcap/pcap contrib/libpcap/tests lib/libpcap sbin...

2017-02-13 Thread Xin LI
Author: delphij
Date: Mon Feb 13 08:23:39 2017
New Revision: 313695
URL: https://svnweb.freebsd.org/changeset/base/313695

Log:
  MFV r313676: libpcap 1.8.1
  
  MFC after:1 month

Added:
  head/contrib/libpcap/config/
 - copied from r313676, vendor/libpcap/dist/config/
  head/contrib/libpcap/configure.ac
 - copied unchanged from r313676, vendor/libpcap/dist/configure.ac
  head/contrib/libpcap/extract.h
 - copied unchanged from r313676, vendor/libpcap/dist/extract.h
  head/contrib/libpcap/fad-helpers.c
 - copied unchanged from r313676, vendor/libpcap/dist/fad-helpers.c
  head/contrib/libpcap/gen_version_c.sh
 - copied unchanged from r313676, vendor/libpcap/dist/gen_version_c.sh
  head/contrib/libpcap/gen_version_header.sh
 - copied unchanged from r313676, vendor/libpcap/dist/gen_version_header.sh
  head/contrib/libpcap/lbl/os-aix7.h
 - copied unchanged from r313676, vendor/libpcap/dist/lbl/os-aix7.h
  head/contrib/libpcap/missing/getopt.c
 - copied unchanged from r313676, vendor/libpcap/dist/missing/getopt.c
  head/contrib/libpcap/missing/getopt.h
 - copied unchanged from r313676, vendor/libpcap/dist/missing/getopt.h
  head/contrib/libpcap/missing/strtok_r.c
 - copied unchanged from r313676, vendor/libpcap/dist/missing/strtok_r.c
  head/contrib/libpcap/missing/win_snprintf.c
 - copied unchanged from r313676, vendor/libpcap/dist/missing/win_snprintf.c
  head/contrib/libpcap/nametoaddr.h
 - copied unchanged from r313676, vendor/libpcap/dist/nametoaddr.h
  head/contrib/libpcap/pcap-new.c
 - copied unchanged from r313676, vendor/libpcap/dist/pcap-new.c
  head/contrib/libpcap/pcap-rpcap.c
 - copied unchanged from r313676, vendor/libpcap/dist/pcap-rpcap.c
  head/contrib/libpcap/pcap-rpcap.h
 - copied unchanged from r313676, vendor/libpcap/dist/pcap-rpcap.h
  head/contrib/libpcap/pcap-tc.c
 - copied unchanged from r313676, vendor/libpcap/dist/pcap-tc.c
  head/contrib/libpcap/pcap-tc.h
 - copied unchanged from r313676, vendor/libpcap/dist/pcap-tc.h
  head/contrib/libpcap/pcap/can_socketcan.h
 - copied unchanged from r313676, vendor/libpcap/dist/pcap/can_socketcan.h
  head/contrib/libpcap/pcap/dlt.h
 - copied unchanged from r313676, vendor/libpcap/dist/pcap/dlt.h
  head/contrib/libpcap/pcap/export-defs.h
 - copied unchanged from r313676, vendor/libpcap/dist/pcap/export-defs.h
  head/contrib/libpcap/pcap_version.h.in
 - copied unchanged from r313676, vendor/libpcap/dist/pcap_version.h.in
  head/contrib/libpcap/portability.h
 - copied unchanged from r313676, vendor/libpcap/dist/portability.h
  head/contrib/libpcap/remote-ext.h
 - copied unchanged from r313676, vendor/libpcap/dist/remote-ext.h
  head/contrib/libpcap/sockutils.c
 - copied unchanged from r313676, vendor/libpcap/dist/sockutils.c
  head/contrib/libpcap/sockutils.h
 - copied unchanged from r313676, vendor/libpcap/dist/sockutils.h
  head/contrib/libpcap/tests/can_set_rfmon_test.c
 - copied unchanged from r313676, 
vendor/libpcap/dist/tests/can_set_rfmon_test.c
  head/sys/net/dlt.h
 - copied, changed from r313694, head/sys/net/bpf.h
Deleted:
  head/contrib/libpcap/configure.in
  head/contrib/libpcap/fad-sita.c
  head/contrib/libpcap/pcap-can-linux.c
  head/contrib/libpcap/pcap-can-linux.h
  head/contrib/libpcap/pcap-canusb-linux.c
  head/contrib/libpcap/pcap-canusb-linux.h
  head/contrib/libpcap/runlex.sh
Modified:
  head/contrib/libpcap/CHANGES
  head/contrib/libpcap/CREDITS
  head/contrib/libpcap/INSTALL.txt
  head/contrib/libpcap/LICENSE
  head/contrib/libpcap/Makefile-devel-adds
  head/contrib/libpcap/Makefile.in
  head/contrib/libpcap/README
  head/contrib/libpcap/TODO
  head/contrib/libpcap/VERSION
  head/contrib/libpcap/bpf/net/bpf_filter.c
  head/contrib/libpcap/bpf_dump.c
  head/contrib/libpcap/bpf_image.c
  head/contrib/libpcap/config.guess
  head/contrib/libpcap/config.h.in
  head/contrib/libpcap/config.sub
  head/contrib/libpcap/configure
  head/contrib/libpcap/dlpisubs.c
  head/contrib/libpcap/etherent.c
  head/contrib/libpcap/ethertype.h
  head/contrib/libpcap/fad-getad.c
  head/contrib/libpcap/fad-gifc.c
  head/contrib/libpcap/fad-glifc.c
  head/contrib/libpcap/gencode.c
  head/contrib/libpcap/gencode.h
  head/contrib/libpcap/grammar.y
  head/contrib/libpcap/inet.c
  head/contrib/libpcap/install-sh
  head/contrib/libpcap/lbl/os-osf4.h
  head/contrib/libpcap/lbl/os-osf5.h
  head/contrib/libpcap/lbl/os-solaris2.h
  head/contrib/libpcap/lbl/os-sunos4.h
  head/contrib/libpcap/lbl/os-ultrix4.h
  head/contrib/libpcap/missing/snprintf.c
  head/contrib/libpcap/mkdep
  head/contrib/libpcap/nametoaddr.c
  head/contrib/libpcap/optimize.c
  head/contrib/libpcap/pcap-bpf.c
  head/contrib/libpcap/pcap-bpf.h
  head/contrib/libpcap/pcap-bt-linux.c
  head/contrib/libpcap/pcap-bt-linux.h
  head/contrib/libpcap/pcap-bt-monitor-linux.c
  head/contrib/libpcap/pcap-common.c
  head/contrib/libpcap/pcap-config.1
  head/contrib/libpcap/pcap-dag.c
  head/cont

svn commit: r313696 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys vm

2017-02-13 Thread Konstantin Belousov
Author: kib
Date: Mon Feb 13 09:04:38 2017
New Revision: 313696
URL: https://svnweb.freebsd.org/changeset/base/313696

Log:
  Rework r313352.
  
  Rename kern_vm_* functions to kern_*.  Move the prototypes to
  syscallsubr.h.  Also change Mach VM types to uintptr_t/size_t as
  needed, to avoid headers pollution.
  
  Requested by: alc, jhb
  Reviewed by:  alc
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D9535

Modified:
  head/sys/compat/cloudabi/cloudabi_mem.c
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/linux/linux_misc.c
  head/sys/compat/linux/linux_mmap.c
  head/sys/kern/vfs_aio.c
  head/sys/sys/syscallsubr.h
  head/sys/vm/vm_extern.h
  head/sys/vm/vm_mmap.c

Modified: head/sys/compat/cloudabi/cloudabi_mem.c
==
--- head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 13 08:23:39 2017
(r313695)
+++ head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 13 09:04:38 2017
(r313696)
@@ -29,8 +29,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-
-#include 
+#include 
 
 #include 
 
@@ -86,16 +85,16 @@ cloudabi_sys_mem_advise(struct thread *t
return (EINVAL);
}
 
-   return (kern_vm_madvise(td, (vm_offset_t)uap->mapping,
-   uap->mapping_len, behav));
+   return (kern_madvise(td, (uintptr_t)uap->mapping, uap->mapping_len,
+   behav));
 }
 
 int
 cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args 
*uap)
 {
 
-   return (vm_mlock(td->td_proc, td->td_ucred, uap->mapping,
-   uap->mapping_len));
+   return (kern_mlock(td->td_proc, td->td_ucred,
+   __DECONST(uintptr_t, uap->mapping), uap->mapping_len));
 }
 
 int
@@ -119,8 +118,8 @@ cloudabi_sys_mem_map(struct thread *td, 
if (error != 0)
return (error);
 
-   return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot,
-   flags, uap->fd, uap->off));
+   return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, prot, flags,
+   uap->fd, uap->off));
 }
 
 int
@@ -134,8 +133,8 @@ cloudabi_sys_mem_protect(struct thread *
if (error != 0)
return (error);
 
-   return (kern_vm_mprotect(td, (vm_offset_t)uap->mapping,
-   uap->mapping_len, prot));
+   return (kern_mprotect(td, (uintptr_t)uap->mapping, uap->mapping_len,
+   prot));
 }
 
 int
@@ -157,8 +156,8 @@ cloudabi_sys_mem_sync(struct thread *td,
if ((uap->flags & CLOUDABI_MS_INVALIDATE) != 0)
flags |= MS_INVALIDATE;
 
-   return (kern_vm_msync(td, (vm_offset_t)uap->mapping,
-   uap->mapping_len, flags));
+   return (kern_msync(td, (uintptr_t)uap->mapping, uap->mapping_len,
+   flags));
 }
 
 int
@@ -166,7 +165,8 @@ cloudabi_sys_mem_unlock(struct thread *t
 struct cloudabi_sys_mem_unlock_args *uap)
 {
 
-   return (kern_vm_munlock(td, (vm_offset_t)uap->mapping, 
uap->mapping_len));
+   return (kern_munlock(td, __DECONST(uintptr_t, uap->mapping),
+   uap->mapping_len));
 }
 
 int
@@ -174,5 +174,5 @@ cloudabi_sys_mem_unmap(struct thread *td
 struct cloudabi_sys_mem_unmap_args *uap)
 {
 
-   return (kern_vm_munmap(td, (vm_offset_t)uap->mapping, 
uap->mapping_len));
+   return (kern_munmap(td, (uintptr_t)uap->mapping, uap->mapping_len));
 }

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Mon Feb 13 08:23:39 2017
(r313695)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Mon Feb 13 09:04:38 2017
(r313696)
@@ -456,8 +456,8 @@ freebsd32_mprotect(struct thread *td, st
if (i386_read_exec && (prot & PROT_READ) != 0)
prot |= PROT_EXEC;
 #endif
-   return (kern_vm_mprotect(td, (vm_offset_t)PTRIN(uap->addr),
-   uap->len, prot));
+   return (kern_mprotect(td, (uintptr_t)PTRIN(uap->addr), uap->len,
+   prot));
 }
 
 int
@@ -471,7 +471,7 @@ freebsd32_mmap(struct thread *td, struct
prot |= PROT_EXEC;
 #endif
 
-   return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot,
+   return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, prot,
uap->flags, uap->fd, PAIR32TO64(off_t, uap->pos)));
 }
 
@@ -480,17 +480,16 @@ int
 freebsd6_freebsd32_mmap(struct thread *td,
 struct freebsd6_freebsd32_mmap_args *uap)
 {
-   struct freebsd32_mmap_args ap;
+   int prot;
 
-   ap.addr = uap->addr;
-   ap.len = uap->len;
-   ap.prot = uap->prot;
-   ap.flags = uap->flags;
-   ap.fd = uap->fd;
-   ap.pos1 = uap->pos1;
-   ap.pos2 = uap->pos2;
+   prot = uap->prot;
+#if defined(__amd64__)
+   if (i386_read_exec && (prot & PROT_READ))
+   prot |= PROT_EXEC;
+#endif
 
-   return (freebsd32_mmap(td,

svn commit: r313697 - in head/sys: netinet netinet6

2017-02-13 Thread Andrey V. Elsukov
Author: ae
Date: Mon Feb 13 11:37:52 2017
New Revision: 313697
URL: https://svnweb.freebsd.org/changeset/base/313697

Log:
  Remove IPsec related PCB code from SCTP.
  
  The inpcb structure has inp_sp pointer that is initialized by
  ipsec_init_pcbpolicy() function. This pointer keeps strorage for IPsec
  security policies associated with a specific socket.
  An application can use IP_IPSEC_POLICY and IPV6_IPSEC_POLICY socket
  options to configure these security policies. Then ip[6]_output()
  uses inpcb pointer to specify that an outgoing packet is associated
  with some socket. And IPSEC_OUTPUT() method can use a security policy
  stored in the inp_sp. For inbound packet the protocol-specific input
  routine uses IPSEC_CHECK_POLICY() method to check that a packet conforms
  to inbound security policy configured in the inpcb.
  
  SCTP protocol doesn't specify inpcb for ip[6]_output() when it sends
  packets. Thus IPSEC_OUTPUT() method does not consider such packets as
  associated with some socket and can not apply security policies
  from inpcb, even if they are configured. Since IPSEC_CHECK_POLICY()
  method is called from protocol-specific input routine, it can specify
  inpcb pointer and associated with socket inbound policy will be
  checked. But there are two problems:
  1. Such check is asymmetric, becasue we can not apply security policy
  from inpcb for outgoing packet.
  2. IPSEC_CHECK_POLICY() expects that caller holds INPCB lock and
  access to inp_sp is protected. But for SCTP this is not correct,
  becasue SCTP uses own locks to protect inpcb.
  
  To fix these problems remove IPsec related PCB code from SCTP.
  This imply that IP_IPSEC_POLICY and IPV6_IPSEC_POLICY socket options
  will be not applicable to SCTP sockets. To be able correctly check
  inbound security policies for SCTP, mark its protocol header with
  the PR_LASTHDR flag.
  
  Reported by:  tuexen
  Reviewed by:  tuexen
  Differential Revision:https://reviews.freebsd.org/D9538

Modified:
  head/sys/netinet/in_proto.c
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_os_bsd.h
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet6/in6_proto.c
  head/sys/netinet6/sctp6_usrreq.c

Modified: head/sys/netinet/in_proto.c
==
--- head/sys/netinet/in_proto.c Mon Feb 13 09:04:38 2017(r313696)
+++ head/sys/netinet/in_proto.c Mon Feb 13 11:37:52 2017(r313697)
@@ -148,7 +148,7 @@ struct protosw inetsw[] = {
.pr_type =  SOCK_SEQPACKET,
.pr_domain =&inetdomain,
.pr_protocol =  IPPROTO_SCTP,
-   .pr_flags = PR_WANTRCVD,
+   .pr_flags = PR_WANTRCVD|PR_LASTHDR,
.pr_input = sctp_input,
.pr_ctlinput =  sctp_ctlinput,
.pr_ctloutput = sctp_ctloutput,
@@ -160,7 +160,7 @@ struct protosw inetsw[] = {
.pr_type =  SOCK_STREAM,
.pr_domain =&inetdomain,
.pr_protocol =  IPPROTO_SCTP,
-   .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD,
+   .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_LASTHDR,
.pr_input = sctp_input,
.pr_ctlinput =  sctp_ctlinput,
.pr_ctloutput = sctp_ctloutput,

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Mon Feb 13 09:04:38 2017
(r313696)
+++ head/sys/netinet/sctp_input.c   Mon Feb 13 11:37:52 2017
(r313697)
@@ -5790,40 +5790,6 @@ sctp_common_input_processing(struct mbuf
} else if (stcb == NULL) {
inp_decr = inp;
}
-#if defined(IPSEC) || defined(IPSEC_SUPPORT)
-   /*-
-* I very much doubt any of the IPSEC stuff will work but I have no
-* idea, so I will leave it in place.
-*/
-   if (inp != NULL) {
-   switch (dst->sa_family) {
-#ifdef INET
-   case AF_INET:
-   if (IPSEC_ENABLED(ipv4)) {
-   if (IPSEC_CHECK_POLICY(ipv4, m,
-   &inp->ip_inp.inp) != 0) {
-   SCTP_STAT_INCR(sctps_hdrops);
-   goto out;
-   }
-   }
-   break;
-#endif
-#ifdef INET6
-   case AF_INET6:
-   if (IPSEC_ENABLED(ipv6)) {
-   if (IPSEC_CHECK_POLICY(ipv6, m,
-   &inp->ip_inp.inp) != 0) {
-   SCTP_STAT_INCR(sctps_hdrops);
-   goto out;
-   }
-   }
-   break;
-#endif
-   default:
-   break;
-   }
-  

Re: svn commit: r313675 - in head/sys: netinet netinet6

2017-02-13 Thread Dmitry Morozovsky
On Sun, 12 Feb 2017, Glen Barber wrote:

[snip previous]

> > I didn't read this when I hit send on my email. Hopefully nobody takes 
> > offense. I was upset and still am.
> > 
> > I still think that the revision numbers of any backout should have been 
> > documented in the commit log.
> > 
> 
> I absolutely agree, and was the key meaning behind my "what exactly does
> this mean?" reply.  The commit log, as-is, provides nothing useful to
> the reader.
> 
> > Something we could do, as is expected by re@ for commits during a freeze, 
> > is metees also let their mentors know of what the contents of commit log 
> > messages will be. I think commit log messages discussing the what, why and 
> > rationale are as important as the code itself.
> > 
> 
> I thought this was standard practice.  But if not, I would agree that
> both code changes and the commit log should be both approved by the
> mentor.

Shouldn't we then emphacise this in the Committer's Guide?

-- 
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: ma...@freebsd.org ]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru ***

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


Re: svn commit: r313401 - head/sys/netinet

2017-02-13 Thread Eric van Gyzen

On 02/11/2017 11:02, Adrian Chadd wrote:

Can we do the same with ether_ntoa too?


ether_ntoa doesn't exist in the kernel.

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


svn commit: r313701 - in head: sbin/mdconfig sys/dev/md

2017-02-13 Thread Stephen J. Kiernan
Author: stevek
Date: Mon Feb 13 17:44:07 2017
New Revision: 313701
URL: https://svnweb.freebsd.org/changeset/base/313701

Log:
  For MD_PRELOAD type md(4) devices, if there is a file name in the preloaded
  meta-data, copy it into the softc structure.
  
  When returning md(4) device details to the caller, include the file name in
  any MD_PRELOAD type devices if it is set (first character is not NUL.)
  
  In mdconfig, for "preload" type md(4) devices, if there is file config
  available, print it in the file column of the output.
  
  Reviewed by:  brooks
  Approved by:  sjg (mentor)
  MFC after:1 month
  Sponsored by: Juniper Networks, Inc.
  Differential Revision:https://reviews.freebsd.org/D9529

Modified:
  head/sbin/mdconfig/mdconfig.c
  head/sys/dev/md/md.c

Modified: head/sbin/mdconfig/mdconfig.c
==
--- head/sbin/mdconfig/mdconfig.c   Mon Feb 13 16:11:37 2017
(r313700)
+++ head/sbin/mdconfig/mdconfig.c   Mon Feb 13 17:44:07 2017
(r313701)
@@ -452,7 +452,8 @@ md_list(const char *units, int opt, cons
}
gc = &pp->lg_config;
type = geom_config_get(gc, "type");
-   if (strcmp(type, "vnode") == 0) {
+   if (strcmp(type, "vnode") == 0 ||
+   strcmp(type, "preload") == 0) {
file = geom_config_get(gc, "file");
if (fflag != NULL &&
strcmp(fflag, file) != 0)

Modified: head/sys/dev/md/md.c
==
--- head/sys/dev/md/md.cMon Feb 13 16:11:37 2017(r313700)
+++ head/sys/dev/md/md.cMon Feb 13 17:44:07 2017(r313701)
@@ -1689,7 +1689,8 @@ xmdctlioctl(struct cdev *dev, u_long cmd
mdio->md_options = sc->flags;
mdio->md_mediasize = sc->mediasize;
mdio->md_sectorsize = sc->sectorsize;
-   if (sc->type == MD_VNODE)
+   if (sc->type == MD_VNODE ||
+   (sc->type == MD_PRELOAD && mdio->md_file != NULL))
error = copyout(sc->file, mdio->md_file,
strlen(sc->file) + 1);
return (error);
@@ -1733,6 +1734,8 @@ md_preloaded(u_char *image, size_t lengt
sc->pl_ptr = image;
sc->pl_len = length;
sc->start = mdstart_preload;
+   if (name != NULL)
+   strlcpy(sc->file, name, sizeof(sc->file));
 #if defined(MD_ROOT) && !defined(ROOTDEVNAME)
if (sc->unit == 0)
rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0";
@@ -1835,7 +1838,8 @@ g_md_dumpconf(struct sbuf *sb, const cha
sbuf_printf(sb, " fs %ju", (uintmax_t) mp->fwsectors);
sbuf_printf(sb, " l %ju", (uintmax_t) mp->mediasize);
sbuf_printf(sb, " t %s", type);
-   if (mp->type == MD_VNODE && mp->vnode != NULL)
+   if ((mp->type == MD_VNODE && mp->vnode != NULL) ||
+   (mp->type == MD_PRELOAD && mp->file[0] != '\0'))
sbuf_printf(sb, " file %s", mp->file);
} else {
sbuf_printf(sb, "%s%d\n", indent,
@@ -1855,7 +1859,8 @@ g_md_dumpconf(struct sbuf *sb, const cha
"read-only");
sbuf_printf(sb, "%s%s\n", indent,
type);
-   if (mp->type == MD_VNODE && mp->vnode != NULL) {
+   if ((mp->type == MD_VNODE && mp->vnode != NULL) ||
+   (mp->type == MD_PRELOAD && mp->file[0] != '\0'))
sbuf_printf(sb, "%s", indent);
g_conf_printf_escaped(sb, "%s", mp->file);
sbuf_printf(sb, "\n");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313701 - in head: sbin/mdconfig sys/dev/md

2017-02-13 Thread O. Hartmann
Am Mon, 13 Feb 2017 17:44:07 + (UTC)
"Stephen J. Kiernan"  schrieb:

> Author: stevek
> Date: Mon Feb 13 17:44:07 2017
> New Revision: 313701
> URL: https://svnweb.freebsd.org/changeset/base/313701
> 
> Log:
>   For MD_PRELOAD type md(4) devices, if there is a file name in the preloaded
>   meta-data, copy it into the softc structure.
>   
>   When returning md(4) device details to the caller, include the file name in
>   any MD_PRELOAD type devices if it is set (first character is not NUL.)
>   
>   In mdconfig, for "preload" type md(4) devices, if there is file config
>   available, print it in the file column of the output.
>   
>   Reviewed by:brooks
>   Approved by:sjg (mentor)
>   MFC after:  1 month
>   Sponsored by:   Juniper Networks, Inc.
>   Differential Revision:  https://reviews.freebsd.org/D9529
> 
> Modified:
>   head/sbin/mdconfig/mdconfig.c
>   head/sys/dev/md/md.c
> 
> Modified: head/sbin/mdconfig/mdconfig.c
> ==
> --- head/sbin/mdconfig/mdconfig.c Mon Feb 13 16:11:37 2017
> (r313700)
> +++ head/sbin/mdconfig/mdconfig.c Mon Feb 13 17:44:07 2017
> (r313701)
> @@ -452,7 +452,8 @@ md_list(const char *units, int opt, cons
>   }
>   gc = &pp->lg_config;
>   type = geom_config_get(gc, "type");
> - if (strcmp(type, "vnode") == 0) {
> + if (strcmp(type, "vnode") == 0 ||
> + strcmp(type, "preload") == 0) {
>   file = geom_config_get(gc, "file");
>   if (fflag != NULL &&
>   strcmp(fflag, file) != 0)
> 
> Modified: head/sys/dev/md/md.c
> ==
> --- head/sys/dev/md/md.c  Mon Feb 13 16:11:37 2017(r313700)
> +++ head/sys/dev/md/md.c  Mon Feb 13 17:44:07 2017(r313701)
> @@ -1689,7 +1689,8 @@ xmdctlioctl(struct cdev *dev, u_long cmd
>   mdio->md_options = sc->flags;
>   mdio->md_mediasize = sc->mediasize;
>   mdio->md_sectorsize = sc->sectorsize;
> - if (sc->type == MD_VNODE)
> + if (sc->type == MD_VNODE ||
> + (sc->type == MD_PRELOAD && mdio->md_file != NULL))
>   error = copyout(sc->file, mdio->md_file,
>   strlen(sc->file) + 1);
>   return (error);
> @@ -1733,6 +1734,8 @@ md_preloaded(u_char *image, size_t lengt
>   sc->pl_ptr = image;
>   sc->pl_len = length;
>   sc->start = mdstart_preload;
> + if (name != NULL)
> + strlcpy(sc->file, name, sizeof(sc->file));
>  #if defined(MD_ROOT) && !defined(ROOTDEVNAME)
>   if (sc->unit == 0)
>   rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0";
> @@ -1835,7 +1838,8 @@ g_md_dumpconf(struct sbuf *sb, const cha
>   sbuf_printf(sb, " fs %ju", (uintmax_t) mp->fwsectors);
>   sbuf_printf(sb, " l %ju", (uintmax_t) mp->mediasize);
>   sbuf_printf(sb, " t %s", type);
> - if (mp->type == MD_VNODE && mp->vnode != NULL)
> + if ((mp->type == MD_VNODE && mp->vnode != NULL) ||
> + (mp->type == MD_PRELOAD && mp->file[0] != '\0'))
>   sbuf_printf(sb, " file %s", mp->file);
>   } else {
>   sbuf_printf(sb, "%s%d\n", indent,
> @@ -1855,7 +1859,8 @@ g_md_dumpconf(struct sbuf *sb, const cha
>   "read-only");
>   sbuf_printf(sb, "%s%s\n", indent,
>   type);
> - if (mp->type == MD_VNODE && mp->vnode != NULL) {
> + if ((mp->type == MD_VNODE && mp->vnode != NULL) ||
> + (mp->type == MD_PRELOAD && mp->file[0] != '\0'))
>   sbuf_printf(sb, "%s", indent);
>   g_conf_printf_escaped(sb, "%s", mp->file);
>   sbuf_printf(sb, "\n");
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

This broke kernel build on recent CURRENT:

[...]
===> mdio (all)
--- all_subdir_md ---
--- md.o ---
/usr/src/sys/modules/md/../../dev/md/md.c:1870:1: error: extraneous closing 
brace ('}')
}
^
1 error generated.
*** [md.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/md


Kind regards,

Oliver


pgpT2UIPeI4ox.pgp
Description: OpenPGP digital signature


svn commit: r313703 - head/sys/dev/md

2017-02-13 Thread Stephen J. Kiernan
Author: stevek
Date: Mon Feb 13 18:52:26 2017
New Revision: 313703
URL: https://svnweb.freebsd.org/changeset/base/313703

Log:
  Fix typo where opening brace was needed.
  
  Reported by:  Michael Butler
  Reviewed by:  sjg
  Approved by:  sjg (mentor)

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

Modified: head/sys/dev/md/md.c
==
--- head/sys/dev/md/md.cMon Feb 13 18:39:21 2017(r313702)
+++ head/sys/dev/md/md.cMon Feb 13 18:52:26 2017(r313703)
@@ -1860,7 +1860,7 @@ g_md_dumpconf(struct sbuf *sb, const cha
sbuf_printf(sb, "%s%s\n", indent,
type);
if ((mp->type == MD_VNODE && mp->vnode != NULL) ||
-   (mp->type == MD_PRELOAD && mp->file[0] != '\0'))
+   (mp->type == MD_PRELOAD && mp->file[0] != '\0')) {
sbuf_printf(sb, "%s", indent);
g_conf_printf_escaped(sb, "%s", mp->file);
sbuf_printf(sb, "\n");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313704 - head/sys/sys

2017-02-13 Thread Ed Schouten
Author: ed
Date: Mon Feb 13 19:00:09 2017
New Revision: 313704
URL: https://svnweb.freebsd.org/changeset/base/313704

Log:
  Make  work on its own.
  
  Right now this header file doesn't want to build when included on its
  own, as it depends on some integer types that are only declared
  internally. Switch it over to use  and the __*
  counterparts.

Modified:
  head/sys/sys/event.h

Modified: head/sys/sys/event.h
==
--- head/sys/sys/event.hMon Feb 13 18:52:26 2017(r313703)
+++ head/sys/sys/event.hMon Feb 13 19:00:09 2017(r313704)
@@ -29,7 +29,8 @@
 #ifndef _SYS_EVENT_H_
 #define _SYS_EVENT_H_
 
-#include  
+#include 
+#include 
 
 #define EVFILT_READ(-1)
 #define EVFILT_WRITE   (-2)
@@ -57,11 +58,11 @@
 } while(0)
 
 struct kevent {
-   uintptr_t   ident;  /* identifier for this event */
+   __uintptr_t ident;  /* identifier for this event */
short   filter; /* filter for event */
-   u_short flags;
-   u_int   fflags;
-   intptr_tdata;
+   unsigned short  flags;
+   unsigned intfflags;
+   __intptr_t  data;
void*udata; /* opaque user data identifier */
 };
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313696 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys vm

2017-02-13 Thread John Baldwin
On Monday, February 13, 2017 09:04:38 AM Konstantin Belousov wrote:
> Author: kib
> Date: Mon Feb 13 09:04:38 2017
> New Revision: 313696
> URL: https://svnweb.freebsd.org/changeset/base/313696
> 
> Log:
>   Rework r313352.
>   
>   Rename kern_vm_* functions to kern_*.  Move the prototypes to
>   syscallsubr.h.  Also change Mach VM types to uintptr_t/size_t as
>   needed, to avoid headers pollution.
>   
>   Requested by:   alc, jhb
>   Reviewed by:alc
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  2 weeks
>   Differential revision:  https://reviews.freebsd.org/D9535

Thanks!

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


Re: svn commit: r313704 - head/sys/sys

2017-02-13 Thread Ngie Cooper
On Mon, Feb 13, 2017 at 11:00 AM, Ed Schouten  wrote:
> Author: ed
> Date: Mon Feb 13 19:00:09 2017
> New Revision: 313704
> URL: https://svnweb.freebsd.org/changeset/base/313704
>
> Log:
>   Make  work on its own.
>
>   Right now this header file doesn't want to build when included on its
>   own, as it depends on some integer types that are only declared
>   internally. Switch it over to use  and the __*
>   counterparts.

Thanks! Should kqueue(2)/kevent(2) be updated?
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313705 - in head/sys: conf dev/bhnd dev/bhnd/bcma dev/bhnd/siba mips/broadcom

2017-02-13 Thread Landon J. Fuller
Author: landonf
Date: Mon Feb 13 19:58:55 2017
New Revision: 313705
URL: https://svnweb.freebsd.org/changeset/base/313705

Log:
  [mips/broadcom] Move MIPS-specific bhnd(4) nexus drivers to
  sys/mips/broadcom, and add MIPS/BCM4706-specific workaround to
  bhnd_nexus_is_hw_disabled() -- the BCM4706 low-cost package leaves
  secondary GMAC cores floating.
  
  Reviewed by:  mizhka
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D9499

Added:
  head/sys/mips/broadcom/bcma_nexus.c
 - copied, changed from r313704, head/sys/dev/bhnd/bcma/bcma_nexus.c
  head/sys/mips/broadcom/bhnd_nexus.c
 - copied, changed from r313704, head/sys/dev/bhnd/bhnd_nexus.c
  head/sys/mips/broadcom/bhnd_nexusvar.h
 - copied, changed from r313704, head/sys/dev/bhnd/bhnd_nexusvar.h
  head/sys/mips/broadcom/siba_nexus.c
 - copied, changed from r313704, head/sys/dev/bhnd/siba/siba_nexus.c
Deleted:
  head/sys/dev/bhnd/bcma/bcma_nexus.c
  head/sys/dev/bhnd/bhnd_nexus.c
  head/sys/dev/bhnd/bhnd_nexusvar.h
  head/sys/dev/bhnd/siba/siba_nexus.c
Modified:
  head/sys/conf/files
  head/sys/mips/broadcom/files.broadcom

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Feb 13 19:00:09 2017(r313704)
+++ head/sys/conf/files Mon Feb 13 19:58:55 2017(r313705)
@@ -1190,8 +1190,6 @@ dev/bge/if_bge.c  optional bge
 dev/bhnd/bhnd.coptional bhnd
 dev/bhnd/bhnd_erom.c   optional bhnd
 dev/bhnd/bhnd_erom_if.moptional bhnd
-dev/bhnd/bhnd_nexus.c  optional bhnd siba_nexus | \
-bhnd bcma_nexus
 dev/bhnd/bhnd_subr.c   optional bhnd
 dev/bhnd/bhnd_bus_if.m optional bhnd
 dev/bhnd/bhndb/bhnd_bhndb.coptional bhndb bhnd
@@ -1206,7 +1204,6 @@ dev/bhnd/bhndb/bhndb_subr.c   optional bh
 dev/bhnd/bcma/bcma.c   optional bcma bhnd
 dev/bhnd/bcma/bcma_bhndb.c optional bcma bhnd bhndb
 dev/bhnd/bcma/bcma_erom.c  optional bcma bhnd
-dev/bhnd/bcma/bcma_nexus.c optional bcma_nexus bcma bhnd
 dev/bhnd/bcma/bcma_subr.c  optional bcma bhnd
 dev/bhnd/cores/chipc/bhnd_chipc_if.m   optional bhnd
 dev/bhnd/cores/chipc/bhnd_sprom_chipc.coptional bhnd
@@ -1252,7 +1249,6 @@ dev/bhnd/nvram/bhnd_sprom.c   optional bh
 dev/bhnd/siba/siba.c   optional siba bhnd
 dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb
 dev/bhnd/siba/siba_erom.c  optional siba bhnd
-dev/bhnd/siba/siba_nexus.c optional siba_nexus siba bhnd
 dev/bhnd/siba/siba_subr.c  optional siba bhnd
 #
 dev/bktr/bktr_audio.c  optional bktr pci

Copied and modified: head/sys/mips/broadcom/bcma_nexus.c (from r313704, 
head/sys/dev/bhnd/bcma/bcma_nexus.c)
==
--- head/sys/dev/bhnd/bcma/bcma_nexus.c Mon Feb 13 19:00:09 2017
(r313704, copy source)
+++ head/sys/mips/broadcom/bcma_nexus.c Mon Feb 13 19:58:55 2017
(r313705)
@@ -43,49 +43,41 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
-#include 
 
-#include "bcmavar.h"
-#include "bcma_eromreg.h"
+#include 
+
+#include "bcm_machdep.h"
+
+#include "bhnd_nexusvar.h"
 
 /*
- * Supports bcma(4) attachment to a nexus bus.
+ * Supports bcma(4) attachment to a MIPS nexus bus.
  */
 
 static int bcma_nexus_attach(device_t);
 static int bcma_nexus_probe(device_t);
 
-struct bcma_nexus_softc {
-   struct bcma_softc   parent_sc;
-   struct bhnd_chipid  bcma_cid;
-};
-
 static int
 bcma_nexus_probe(device_t dev)
 {
-   struct bcma_nexus_softc *sc;
-   int  error;
-
-   sc = device_get_softc(dev);
-
-   /* Read the ChipCommon info using the hints the kernel
-* was compiled with. */
-   if ((error = bhnd_nexus_read_chipid(dev, &sc->bcma_cid)))
-   return (error);
+   int error;
 
-   if (sc->bcma_cid.chip_type != BHND_CHIPTYPE_BCMA)
+   switch (bcm_get_platform()->cid.chip_type) {
+   case BHND_CHIPTYPE_BCMA:
+   case BHND_CHIPTYPE_BCMA_ALT:
+   case BHND_CHIPTYPE_UBUS:
+   break;
+   default:
return (ENXIO);
+   }
 
-   if ((error = bcma_probe(dev)) > 0) {
-   device_printf(dev, "error %d in probe\n", error);
+   if ((error = bcma_probe(dev)) > 0)
return (error);
-   }
 
/* Set device description */
-   bhnd_set_default_bus_desc(dev, &sc->bcma_cid);
+   bhnd_set_default_bus_desc(dev, &bcm_get_platform()->cid);
 
-   return (0);
+   return (BUS_PROBE_SPECIFIC);
 }
 
 static int
@@ -108,25 +100,15 @@ failed:
return (error);
 }
 
-static const struct bh

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

2017-02-13 Thread Alexander Motin
Author: mav
Date: Mon Feb 13 20:36:28 2017
New Revision: 313707
URL: https://svnweb.freebsd.org/changeset/base/313707

Log:
  Remove M_PKTHDR from m_getm2() in icl_pdu_append_data().
  
  ip_data_mbuf is always appended to ip_bhs_mbuf, so it does not need own
  packet header.  This change first avoids allocation/initialization of the
  header, and then avoids dropping one when it later gets to socket buffer.
  
  MFC after:2 weeks

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

Modified: head/sys/dev/iscsi/icl_soft.c
==
--- head/sys/dev/iscsi/icl_soft.c   Mon Feb 13 20:13:29 2017
(r313706)
+++ head/sys/dev/iscsi/icl_soft.c   Mon Feb 13 20:36:28 2017
(r313707)
@@ -1087,7 +1087,7 @@ icl_pdu_append_data(struct icl_pdu *requ
 
KASSERT(len > 0, ("len == 0"));
 
-   newmb = m_getm2(NULL, len, flags, MT_DATA, M_PKTHDR);
+   newmb = m_getm2(NULL, len, flags, MT_DATA, 0);
if (newmb == NULL) {
ICL_WARN("failed to allocate mbuf for %zd bytes", len);
return (ENOMEM);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313708 - head/sys/arm/arm

2017-02-13 Thread Olivier Houchard
Author: cognet
Date: Mon Feb 13 20:51:08 2017
New Revision: 313708
URL: https://svnweb.freebsd.org/changeset/base/313708

Log:
  Remove debugging code that was probably unused since before the arm code
  was initially committed.
  
  Reported by:  Alexandre Martins 

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

Modified: head/sys/arm/arm/cpufunc_asm.S
==
--- head/sys/arm/arm/cpufunc_asm.S  Mon Feb 13 20:36:28 2017
(r313707)
+++ head/sys/arm/arm/cpufunc_asm.S  Mon Feb 13 20:51:08 2017
(r313708)
@@ -124,9 +124,6 @@ ENTRY(cpufunc_control)
mov r0, r3  /* Return old value */
 
RET
-.Lglou:
-   .asciz "plop %p\n"
-   .align 2
 END(cpufunc_control)
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313709 - head/usr.bin/dtc

2017-02-13 Thread Dimitry Andric
Author: dim
Date: Mon Feb 13 20:56:53 2017
New Revision: 313709
URL: https://svnweb.freebsd.org/changeset/base/313709

Log:
  Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no):
  * Initialize correct parent in binary_operator's constructor.
  * Include  explicitly, otherwise errno is undefined (without
NDEBUG, this is accidentally 'fixed' by including ).
  
  Reported by:  matteo
  MFC after:3 days

Modified:
  head/usr.bin/dtc/input_buffer.cc

Modified: head/usr.bin/dtc/input_buffer.cc
==
--- head/usr.bin/dtc/input_buffer.ccMon Feb 13 20:51:08 2017
(r313708)
+++ head/usr.bin/dtc/input_buffer.ccMon Feb 13 20:56:53 2017
(r313709)
@@ -32,6 +32,7 @@
 
 #include "input_buffer.hh"
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -544,7 +545,8 @@ struct binary_operator : public binary_o
 * Constructor.  Takes the name of the operator as an argument, for
 * debugging.  Only stores it in debug mode.
 */
-   binary_operator(source_location l, const char *) : expression(l) {}
+   binary_operator(source_location l, const char *) :
+   binary_operator_base(l) {}
 #else
const char *opName;
binary_operator(source_location l, const char *o) :
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313710 - head/sys/boot/efi/libefi

2017-02-13 Thread Toomas Soome
Author: tsoome
Date: Mon Feb 13 21:33:50 2017
New Revision: 313710
URL: https://svnweb.freebsd.org/changeset/base/313710

Log:
  loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t
  
  Cleaned up some spaces where tabs should be.
  efipart_ioctl() DIOCGMEDIASIZE needs to use uint64_t, not off_t
  
  Reviewed by:  allanjude
  Approved by:  allanjude (mentor)
  Differential Revision:https://reviews.freebsd.org/D9562

Modified:
  head/sys/boot/efi/libefi/efipart.c

Modified: head/sys/boot/efi/libefi/efipart.c
==
--- head/sys/boot/efi/libefi/efipart.c  Mon Feb 13 20:56:53 2017
(r313709)
+++ head/sys/boot/efi/libefi/efipart.c  Mon Feb 13 21:33:50 2017
(r313710)
@@ -254,7 +254,7 @@ efipart_cdinfo_add(EFI_HANDLE handle, EF
}
unit++;
}
- 
+
cd = malloc(sizeof(pdinfo_t));
if (cd == NULL) {
printf("Failed to add cd %d, out of memory\n", unit);
@@ -290,7 +290,7 @@ efipart_updatecd(void)
continue;
if (efipart_floppy(node) != NULL)
continue;
- 
+
status = BS->HandleProtocol(efipart_handles[i],
&blkio_guid, (void **)&blkio);
if (EFI_ERROR(status))
@@ -589,14 +589,14 @@ efipart_print_common(struct devsw *dev, 
 
if (STAILQ_EMPTY(pdlist))
return (0);
- 
+
printf("%s devices:", dev->dv_name);
if ((ret = pager_output("\n")) != 0)
return (ret);
 
STAILQ_FOREACH(pd, pdlist, pd_link) {
h = pd->pd_handle;
-   if (verbose) {  /* Output the device path. */
+   if (verbose) {  /* Output the device path. */
text = efi_devpath_name(efi_lookup_devpath(h));
if (text != NULL) {
printf("  %S", text);
@@ -707,7 +707,7 @@ efipart_open(struct open_file *f, ...)
pd = efiblk_get_pdinfo(pdi, dev->d_unit);
if (pd == NULL)
return (EIO);
- 
+
if (pd->pd_blkio == NULL) {
status = BS->HandleProtocol(pd->pd_handle, &blkio_guid,
(void **)&pd->pd_blkio);
@@ -791,7 +791,7 @@ efipart_ioctl(struct open_file *f, u_lon
*(u_int *)data = pd->pd_blkio->Media->BlockSize;
break;
case DIOCGMEDIASIZE:
-   *(off_t *)data = pd->pd_blkio->Media->BlockSize *
+   *(uint64_t *)data = pd->pd_blkio->Media->BlockSize *
(pd->pd_blkio->Media->LastBlock + 1);
break;
default:
@@ -915,9 +915,9 @@ efipart_realstrategy(void *devdata, int 
if (rsize != NULL)
*rsize = size;
 
-if ((size % blkio->Media->BlockSize == 0) &&
+   if ((size % blkio->Media->BlockSize == 0) &&
((blk * 512) % blkio->Media->BlockSize == 0))
-return (efipart_readwrite(blkio, rw,
+   return (efipart_readwrite(blkio, rw,
blk * 512 / blkio->Media->BlockSize,
size / blkio->Media->BlockSize, buf));
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313711 - head/sys/dev/virtio/network

2017-02-13 Thread Philip Paeps
Author: philip
Date: Mon Feb 13 21:44:29 2017
New Revision: 313711
URL: https://svnweb.freebsd.org/changeset/base/313711

Log:
  vtnet: don't update VLAN filter when parent is not running
  
  Submitted by: Gerrie Roos 
  Reviewed by:  gnn
  Sponsored by: XipLink, Inc.
  Differential Revision:https://reviews.freebsd.org/D9573

Modified:
  head/sys/dev/virtio/network/if_vtnet.c

Modified: head/sys/dev/virtio/network/if_vtnet.c
==
--- head/sys/dev/virtio/network/if_vtnet.c  Mon Feb 13 21:33:50 2017
(r313710)
+++ head/sys/dev/virtio/network/if_vtnet.c  Mon Feb 13 21:44:29 2017
(r313711)
@@ -3473,6 +3473,7 @@ vtnet_update_vlan_filter(struct vtnet_so
sc->vtnet_vlan_filter[idx] &= ~(1 << bit);
 
if (ifp->if_capenable & IFCAP_VLAN_HWFILTER &&
+   ifp->if_drv_flags & IFF_DRV_RUNNING &&
vtnet_exec_vlan_filter(sc, add, tag) != 0) {
device_printf(sc->vtnet_dev,
"cannot %s VLAN %d %s the host filter table\n",
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313712 - head/sys/dev/sdhci

2017-02-13 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Tue Feb 14 00:04:36 2017
New Revision: 313712
URL: https://svnweb.freebsd.org/changeset/base/313712

Log:
  [sdhci_acpi] Add support for Bay Trail SDHC SD card slot
  
  Add ACPI device 80860F14 with _UID 3 to the list of known devices. It
  make SD card available on NUCs and Minnowboard. Previously added _UID 1
  covered only eMMC devices.
  
  Reported by:  kib@
  MFC after:1 week

Modified:
  head/sys/dev/sdhci/sdhci_acpi.c

Modified: head/sys/dev/sdhci/sdhci_acpi.c
==
--- head/sys/dev/sdhci/sdhci_acpi.c Mon Feb 13 21:44:29 2017
(r313711)
+++ head/sys/dev/sdhci/sdhci_acpi.c Tue Feb 14 00:04:36 2017
(r313712)
@@ -60,9 +60,11 @@ static const struct sdhci_acpi_device {
const char  *desc;
u_int   quirks;
 } sdhci_acpi_devices[] = {
-   { "80860F14",   1,  "Intel Bay Trail eMMC 4.5 Controller",
+   { "80860F14",   1,  "Intel Bay Trail SD Host Controller",
SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE |
SDHCI_QUIRK_INTEL_POWER_UP_RESET },
+   { "80860F14",   3,  "Intel Bay Trail SD Host Controller",
+   SDHCI_QUIRK_INTEL_POWER_UP_RESET },
{ "80860F16",   0,  "Intel Bay Trail SD Host Controller",
0 },
{ NULL, 0, NULL, 0}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313713 - head/lib/msun/tests

2017-02-13 Thread Ngie Cooper
Author: ngie
Date: Tue Feb 14 00:54:48 2017
New Revision: 313713
URL: https://svnweb.freebsd.org/changeset/base/313713

Log:
  Handle clang 4.x+ with the compile-time exception added in r312213
  
  It also fails the assertions noted in bug 208703
  
  PR:   208703
  PR:   217084
  Submitted by: jbeich
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/lib/msun/tests/fmaxmin_test.c

Modified: head/lib/msun/tests/fmaxmin_test.c
==
--- head/lib/msun/tests/fmaxmin_test.c  Tue Feb 14 00:04:36 2017
(r313712)
+++ head/lib/msun/tests/fmaxmin_test.c  Tue Feb 14 00:54:48 2017
(r313713)
@@ -116,7 +116,8 @@ testall(int testnum, long double big, lo
 
 /* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */
 #if defined(__clang__) && \
-(__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0)
+((__clang_major__ >  3)) || \
+((__clang_major__ == 3 && __clang_minor__ >= 8))
 #defineaffected_by_bug_208703
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313714 - head/sys/vm

2017-02-13 Thread Bjoern A. Zeeb
Author: bz
Date: Tue Feb 14 01:20:03 2017
New Revision: 313714
URL: https://svnweb.freebsd.org/changeset/base/313714

Log:
  Use %s __func__ to print the actual function name (been looking at
  the wrong one for too often lately at first), and also use %#lx to
  get the 0x prefix for the address.
  
  MFC after:1 week

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==
--- head/sys/vm/vm_fault.c  Tue Feb 14 00:54:48 2017(r313713)
+++ head/sys/vm/vm_fault.c  Tue Feb 14 01:20:03 2017(r313714)
@@ -528,8 +528,8 @@ RetryFault:;
fs.map_generation = fs.map->timestamp;
 
if (fs.entry->eflags & MAP_ENTRY_NOFAULT) {
-   panic("vm_fault: fault on nofault entry, addr: %lx",
-   (u_long)vaddr);
+   panic("%s: fault on nofault entry, addr: %#lx",
+   __func__, (u_long)vaddr);
}
 
if (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION &&
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r313715 - head/sys/sys

2017-02-13 Thread Konstantin Belousov
Author: kib
Date: Tue Feb 14 03:32:37 2017
New Revision: 313715
URL: https://svnweb.freebsd.org/changeset/base/313715

Log:
  Order alphabetically.
  
  Noted by: alc
  MFC after:3 days

Modified:
  head/sys/sys/syscallsubr.h

Modified: head/sys/sys/syscallsubr.h
==
--- head/sys/sys/syscallsubr.h  Tue Feb 14 01:20:03 2017(r313714)
+++ head/sys/sys/syscallsubr.h  Tue Feb 14 03:32:37 2017(r313715)
@@ -162,8 +162,8 @@ int kern_mmap(struct thread *td, uintptr
int flags, int fd, off_t pos);
 intkern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot);
 intkern_msgctl(struct thread *, int, int, struct msqid_ds *);
-intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 intkern_msgrcv(struct thread *, int, void *, size_t, long, int, long *);
+intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 intkern_msync(struct thread *td, uintptr_t addr, size_t size, int flags);
 intkern_munlock(struct thread *td, uintptr_t addr, size_t size);
 intkern_munmap(struct thread *td, uintptr_t addr, size_t size);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313704 - head/sys/sys

2017-02-13 Thread Ed Schouten
Hi there,

2017-02-13 20:53 GMT+01:00 Ngie Cooper :
> Thanks! Should kqueue(2)/kevent(2) be updated?

I'm really not sure what's best here. On one hand the header no longer
depends on , but the man page does refer to types and
identifiers that are no longer declared by simply including this
header.

Maybe it's best to leave it there, so that it's more likely for people
to write code that also builds with previous versions of this header?

-- 
Ed Schouten 
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r313704 - head/sys/sys

2017-02-13 Thread Ngie Cooper (yaneurabeya)

> On Feb 13, 2017, at 22:19, Ed Schouten  wrote:
> 
> Hi there,
> 
> 2017-02-13 20:53 GMT+01:00 Ngie Cooper :
>> Thanks! Should kqueue(2)/kevent(2) be updated?
> 
> I'm really not sure what's best here. On one hand the header no longer
> depends on , but the man page does refer to types and
> identifiers that are no longer declared by simply including this
> header.
> 
> Maybe it's best to leave it there, so that it's more likely for people
> to write code that also builds with previous versions of this header?

Hm… Thinking about this a bit more, I think it’s a good idea to update 
the manpages. My gut says that unless the explicit requirement is removed, 
people will keep on using the old #include list. Maybe a note should be made in 
the BUGS section about sys/types.h being required in previous releases (or 
folks should just pay attention to previous versions’ manpages *shrugs*?)?
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail