svn commit: r241922 - head/sys/netipsec
Author: glebius Date: Tue Oct 23 08:22:01 2012 New Revision: 241922 URL: http://svn.freebsd.org/changeset/base/241922 Log: - Fix one more miss from r241913. - Add XXX comment about necessity of the entire block, that fixes up the IP header. Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c == --- head/sys/netipsec/ipsec_input.c Tue Oct 23 02:20:42 2012 (r241921) +++ head/sys/netipsec/ipsec_input.c Tue Oct 23 08:22:01 2012 (r241922) @@ -328,7 +328,10 @@ ipsec4_common_input_cb(struct mbuf *m, s } if (skip != 0) { - /* Fix IPv4 header */ + /* +* Fix IPv4 header +* XXXGL: do we need this entire block? +*/ if (m-m_len skip (m = m_pullup(m, skip)) == NULL) { DPRINTF((%s: processing failed for SA %s/%08lx\n, __func__, ipsec_address(sav-sah-saidx.dst), @@ -341,7 +344,6 @@ ipsec4_common_input_cb(struct mbuf *m, s ip = mtod(m, struct ip *); ip-ip_len = htons(m-m_pkthdr.len); - ip-ip_off = htons(ip-ip_off); ip-ip_sum = 0; ip-ip_sum = in_cksum(m, ip-ip_hl 2); } else { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241922 - head/sys/netipsec
On Tue, Oct 23, 2012 at 08:22:02AM +, Gleb Smirnoff wrote: T Author: glebius T Date: Tue Oct 23 08:22:01 2012 T New Revision: 241922 T URL: http://svn.freebsd.org/changeset/base/241922 T T Log: T - Fix one more miss from r241913. T - Add XXX comment about necessity of the entire block, T that fixes up the IP header. It'll be nice if any IPSEC expert looks into this block and considers its importance. It looks to me that the fix up won't be needed at all right after I commit change that fixed ip_input() to not modify ip_len, which I plan to do in several minutes. T Modified: T head/sys/netipsec/ipsec_input.c T T Modified: head/sys/netipsec/ipsec_input.c T == T --- head/sys/netipsec/ipsec_input.c Tue Oct 23 02:20:42 2012 (r241921) T +++ head/sys/netipsec/ipsec_input.c Tue Oct 23 08:22:01 2012 (r241922) T @@ -328,7 +328,10 @@ ipsec4_common_input_cb(struct mbuf *m, s T } T T if (skip != 0) { T -/* Fix IPv4 header */ T +/* T + * Fix IPv4 header T + * XXXGL: do we need this entire block? T + */ T if (m-m_len skip (m = m_pullup(m, skip)) == NULL) { T DPRINTF((%s: processing failed for SA %s/%08lx\n, T __func__, ipsec_address(sav-sah-saidx.dst), T @@ -341,7 +344,6 @@ ipsec4_common_input_cb(struct mbuf *m, s T T ip = mtod(m, struct ip *); T ip-ip_len = htons(m-m_pkthdr.len); T -ip-ip_off = htons(ip-ip_off); T ip-ip_sum = 0; T ip-ip_sum = in_cksum(m, ip-ip_hl 2); T } else { -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241923 - in head/sys: netinet netipsec
Author: glebius Date: Tue Oct 23 08:33:13 2012 New Revision: 241923 URL: http://svn.freebsd.org/changeset/base/241923 Log: Do not reduce ip_len by size of IP header in the ip_input() before passing a packet to protocol input routines. For several protocols this mean that now protocol needs to do subtraction itself, and for another half this means that we do not need to add header length back to the packet. Make ip_stripoptions() to adjust ip_len, since now we enter this function with a packet header whose ip_len does represent length of entire packet, not payload only. Modified: head/sys/netinet/igmp.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_options.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_input.c head/sys/netinet/tcp_input.c head/sys/netinet/udp_usrreq.c head/sys/netipsec/xform_ah.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Tue Oct 23 08:22:01 2012(r241922) +++ head/sys/netinet/igmp.c Tue Oct 23 08:33:13 2012(r241923) @@ -1442,7 +1442,7 @@ igmp_input(struct mbuf *m, int off) ip = mtod(m, struct ip *); iphlen = off; - igmplen = ntohs(ip-ip_len); + igmplen = ntohs(ip-ip_len) - off; /* * Validate lengths. Modified: head/sys/netinet/ip_icmp.c == --- head/sys/netinet/ip_icmp.c Tue Oct 23 08:22:01 2012(r241922) +++ head/sys/netinet/ip_icmp.c Tue Oct 23 08:33:13 2012(r241923) @@ -359,7 +359,7 @@ icmp_input(struct mbuf *m, int off) struct ip *ip = mtod(m, struct ip *); struct sockaddr_in icmpsrc, icmpdst, icmpgw; int hlen = off; - int icmplen = ntohs(ip-ip_len); + int icmplen = ntohs(ip-ip_len) - off; int i, code; void (*ctlfunc)(int, struct sockaddr *, void *); int fibnum; @@ -592,8 +592,6 @@ icmp_input(struct mbuf *m, int off) } ifa_free(ia-ia_ifa); reflect: - /* Since ip_input() deducts this. */ - ip-ip_len = htons(ntohs(ip-ip_len) + hlen); ICMPSTAT_INC(icps_reflect); ICMPSTAT_INC(icps_outhist[icp-icmp_type]); icmp_reflect(m); Modified: head/sys/netinet/ip_input.c == --- head/sys/netinet/ip_input.c Tue Oct 23 08:22:01 2012(r241922) +++ head/sys/netinet/ip_input.c Tue Oct 23 08:33:13 2012(r241923) @@ -731,12 +731,6 @@ ours: ip_len = ntohs(ip-ip_len); } - /* -* Further protocols expect the packet length to be w/o the -* IP header. -*/ - ip-ip_len = htons(ip_len - hlen); - #ifdef IPSEC /* * enforce IPsec policy checking if we are seeing last header. Modified: head/sys/netinet/ip_options.c == --- head/sys/netinet/ip_options.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/ip_options.c Tue Oct 23 08:33:13 2012 (r241923) @@ -470,7 +470,7 @@ ip_stripoptions(struct mbuf *m) m-m_len -= olen; if (m-m_flags M_PKTHDR) m-m_pkthdr.len -= olen; - ip-ip_v = IPVERSION; + ip-ip_len = htons(ntohs(ip-ip_len) - olen); ip-ip_hl = sizeof(struct ip) 2; } Modified: head/sys/netinet/raw_ip.c == --- head/sys/netinet/raw_ip.c Tue Oct 23 08:22:01 2012(r241922) +++ head/sys/netinet/raw_ip.c Tue Oct 23 08:33:13 2012(r241923) @@ -287,12 +287,9 @@ rip_input(struct mbuf *m, int off) ifp = m-m_pkthdr.rcvif; /* -* Add back the IP header length which was -* removed by ip_input(). Raw sockets do -* not modify the packet except for some -* byte order swaps. +* Applications on raw sockets expect host byte order. */ - ip-ip_len = ntohs(ip-ip_len) + off; + ip-ip_len = ntohs(ip-ip_len); ip-ip_off = ntohs(ip-ip_off); hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr, @@ -506,7 +503,8 @@ rip_output(struct mbuf *m, struct socket ip-ip_id = ip_newid(); /* -* Applications on raw sockets expect host byte order. +* Applications on raw sockets pass us packets +* in host byte order. */ ip-ip_len = htons(ip-ip_len); ip-ip_off = htons(ip-ip_off); Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/sctp_input.c
Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/examp
On 2012-10-22 16:58, Jan Beich wrote: Dimitry Andric d...@freebsd.org writes: On 2012-10-22 09:00, Jan Beich wrote: ... undefined reference to `std::__1::basic_ioschar, std::__1::char_traitschar ::clear(unsigned int)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) Strange, for me it compiles (with a bunch of warnings, which I have fixed locally), and links just fine. However, I always use -std=c++11, which -std= flag are you using, if any? Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. Instead, removing local -finline-functions (implied by -O3) does. With clang, -O3 does not imply -finline-functions, but it may have some influence on the threshold for inlining. This error is still very strange though, and it might be a real bug in the optimizer at -O3; at this level, it really seems to generate a call to a function that is declared inline, with the __always_inline attribute. For now, I would advise not to use higher levels than -O2. Meanwhile, I will take this problem to the llvm/clang guys. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241923 - in head/sys: netinet netipsec
On 23.10.2012 10:33, Gleb Smirnoff wrote: Author: glebius Date: Tue Oct 23 08:33:13 2012 New Revision: 241923 URL: http://svn.freebsd.org/changeset/base/241923 Log: Do not reduce ip_len by size of IP header in the ip_input() before passing a packet to protocol input routines. For several protocols this mean that now protocol needs to do subtraction itself, and for another half this means that we do not need to add header length back to the packet. Yay! More Mammoth shit getting washed away! ;) Please add an entry to UPDATING as the convention of of ip_len subtraction has been there since forever. That makes it easier to discover for third parties writing code. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241923 - in head/sys: netinet netipsec
On Tue, Oct 23, 2012 at 11:12:00AM +0200, Andre Oppermann wrote: A On 23.10.2012 10:33, Gleb Smirnoff wrote: A Author: glebius A Date: Tue Oct 23 08:33:13 2012 A New Revision: 241923 A URL: http://svn.freebsd.org/changeset/base/241923 A A Log: A Do not reduce ip_len by size of IP header in the ip_input() A before passing a packet to protocol input routines. A For several protocols this mean that now protocol needs to A do subtraction itself, and for another half this means that A we do not need to add header length back to the packet. A A Yay! More Mammoth shit getting washed away! ;) A A Please add an entry to UPDATING as the convention of of ip_len A subtraction has been there since forever. That makes it easier A to discover for third parties writing code. Not sure it worth. Never heard of any loadable protocol outside of tree. Those loadable protocols that we have in tree (carp, divert) do not look at ip_len. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241925 - head/sys/netinet
Author: glebius Date: Tue Oct 23 10:29:31 2012 New Revision: 241925 URL: http://svn.freebsd.org/changeset/base/241925 Log: Simplify ip_stripoptions() reducing number of intermediate variables. Modified: head/sys/netinet/ip_options.c Modified: head/sys/netinet/ip_options.c == --- head/sys/netinet/ip_options.c Tue Oct 23 09:59:46 2012 (r241924) +++ head/sys/netinet/ip_options.c Tue Oct 23 10:29:31 2012 (r241925) @@ -458,20 +458,18 @@ ip_srcroute(struct mbuf *m0) void ip_stripoptions(struct mbuf *m) { - int i; struct ip *ip = mtod(m, struct ip *); - caddr_t opts; int olen; - olen = (ip-ip_hl 2) - sizeof (struct ip); - opts = (caddr_t)(ip + 1); - i = m-m_len - (sizeof (struct ip) + olen); - bcopy(opts + olen, opts, (unsigned)i); + olen = (ip-ip_hl 2) - sizeof(struct ip); m-m_len -= olen; if (m-m_flags M_PKTHDR) m-m_pkthdr.len -= olen; ip-ip_len = htons(ntohs(ip-ip_len) - olen); ip-ip_hl = sizeof(struct ip) 2; + + bcopy((char *)ip + sizeof(struct ip) + olen, (ip + 1), + (size_t )(m-m_len - sizeof(struct ip))); } /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241926 - head/sys/netinet
Author: glebius Date: Tue Oct 23 10:30:09 2012 New Revision: 241926 URL: http://svn.freebsd.org/changeset/base/241926 Log: Use ip_stripoptions() instead of handrolled version. Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c == --- head/sys/netinet/ip_icmp.c Tue Oct 23 10:29:31 2012(r241925) +++ head/sys/netinet/ip_icmp.c Tue Oct 23 10:30:09 2012(r241926) @@ -857,19 +857,7 @@ match: printf(%d\n, opts-m_len); #endif } - /* -* Now strip out original options by copying rest of first -* mbuf's data back, and adjust the IP length. -*/ - ip-ip_len = htons(ntohs(ip-ip_len) - optlen); - ip-ip_v = IPVERSION; - ip-ip_hl = 5; - m-m_len -= optlen; - if (m-m_flags M_PKTHDR) - m-m_pkthdr.len -= optlen; - optlen += sizeof(struct ip); - bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), -(unsigned)(m-m_len - sizeof(struct ip))); + ip_stripoptions(m); } m_tag_delete_nonpersistent(m); m-m_flags = ~(M_BCAST|M_MCAST); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241927 - head
Author: kib Date: Tue Oct 23 12:03:32 2012 New Revision: 241927 URL: http://svn.freebsd.org/changeset/base/241927 Log: Add the VFS_UNLOCK_GIANT.9.gz hardlink to ObsoleteFiles list too. Noted by: pluknet Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Oct 23 10:30:09 2012(r241926) +++ head/ObsoleteFiles.inc Tue Oct 23 12:03:32 2012(r241927) @@ -40,6 +40,7 @@ # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz +OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz # 20121004: remove incomplete unwind.h OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241931 - in head/sys: conf kern
Author: andre Date: Tue Oct 23 14:19:44 2012 New Revision: 241931 URL: http://svn.freebsd.org/changeset/base/241931 Log: Replace the ill-named ZERO_COPY_SOCKET kernel option with two more appropriate named kernel options for the very distinct send and receive path. options SOCKET_SEND_COW enables VM page copy-on-write based sending of data on an outbound socket. NB: The COW based send mechanism is not safe and may result in kernel crashes. options SOCKET_RECV_PFLIP enables VM kernel/userspace page flipping for special disposable pages attached as external storage to mbufs. Only the naming of the kernel options is changed and their corresponding #ifdef sections are adjusted. No functionality is added or removed. Discussed with: alc (mechanism and limitations of send side COW) Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/subr_uio.c head/sys/kern/uipc_socket.c Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Tue Oct 23 12:39:17 2012(r241930) +++ head/sys/conf/NOTES Tue Oct 23 14:19:44 2012(r241931) @@ -964,12 +964,20 @@ options TCP_SIGNATURE #include support # a smooth scheduling of the traffic. optionsDUMMYNET -# Zero copy sockets support. This enables zero copy for sending and -# receiving data via a socket. The send side works for any type of NIC, -# the receive side only works for NICs that support MTUs greater than the -# page size of your architecture and that support header splitting. See -# zero_copy(9) for more details. -optionsZERO_COPY_SOCKETS +# Zero copy sockets support is split into the send and receive path +# which operate very differently. +# For the send path the VM page with the data is wired into the kernel +# and marked as COW (copy-on-write). If the application touches the +# data while it is still in the send socket buffer the page is copied +# and divorced from its kernel wiring (no longer zero copy). +# The receive side requires explicit NIC driver support to create +# disposable pages which are flipped from kernel to user-space VM. +# See zero_copy(9) for more details. +# XXX: The COW based send mechanism is not safe and may result in +# kernel crashes. +# XXX: None of the current NIC drivers support disposeable pages. +optionsSOCKET_SEND_COW +optionsSOCKET_RECV_PFLIP # # FILESYSTEM OPTIONS Modified: head/sys/conf/options == --- head/sys/conf/options Tue Oct 23 12:39:17 2012(r241930) +++ head/sys/conf/options Tue Oct 23 14:19:44 2012(r241931) @@ -520,7 +520,8 @@ NGATM_CCATM opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h -ZERO_COPY_SOCKETS opt_zero.h +SOCKET_SEND_COWopt_zero.h +SOCKET_RECV_PFLIP opt_zero.h TI_SF_BUF_JUMBOopt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h BCE_JUMBO_HDRSPLIT opt_bce.h Modified: head/sys/kern/subr_uio.c == --- head/sys/kern/subr_uio.cTue Oct 23 12:39:17 2012(r241930) +++ head/sys/kern/subr_uio.cTue Oct 23 14:19:44 2012(r241931) @@ -57,7 +57,7 @@ __FBSDID($FreeBSD$); #include vm/vm_extern.h #include vm/vm_page.h #include vm/vm_map.h -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW #include vm/vm_object.h #endif @@ -66,7 +66,7 @@ SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault); -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW /* Declared in uipc_socket.c */ extern int so_zero_copy_receive; @@ -128,7 +128,7 @@ retry: vm_map_lookup_done(map, entry); return(KERN_SUCCESS); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_SEND_COW */ int copyin_nofault(const void *udaddr, void *kaddr, size_t len) @@ -261,7 +261,7 @@ uiomove_frombuf(void *buf, int buflen, s return (uiomove((char *)buf + offset, n, uio)); } -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_RECV_PFLIP /* * Experimental support for zero-copy I/O */ @@ -356,7 +356,7 @@ uiomoveco(void *cp, int n, struct uio *u } return (0); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_RECV_PFLIP */ /* * Give next character to user as result of read. Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Tue Oct 23 12:39:17 2012(r241930) +++ head/sys/kern/uipc_socket.c Tue Oct 23 14:19:44 2012(r241931) @@ -219,17 +219,20 @@ static int numopensockets; SYSCTL_INT(_kern_ipc, OID_AUTO, numopensockets, CTLFLAG_RD, numopensockets, 0, Number of open sockets); -#ifdef
svn commit: r241932 - head/share/man/man9
Author: andre Date: Tue Oct 23 14:25:37 2012 New Revision: 241932 URL: http://svn.freebsd.org/changeset/base/241932 Log: Update zero_copy(9) man page to note the renamed kernel options and to warn about unsafeness of COW based sends. Modified: head/share/man/man9/zero_copy.9 Modified: head/share/man/man9/zero_copy.9 == --- head/share/man/man9/zero_copy.9 Tue Oct 23 14:19:44 2012 (r241931) +++ head/share/man/man9/zero_copy.9 Tue Oct 23 14:25:37 2012 (r241932) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd December 5, 2004 +.Dd October 23, 2012 .Dt ZERO_COPY 9 .Os .Sh NAME @@ -33,7 +33,8 @@ .Nm zero_copy_sockets .Nd zero copy sockets code .Sh SYNOPSIS -.Cd options ZERO_COPY_SOCKETS +.Cd options SOCKET_SEND_COW +.Cd options SOCKET_RECV_PFLIP .Sh DESCRIPTION The .Fx @@ -155,6 +156,8 @@ variables respectively. .Xr sendfile 2 , .Xr socket 2 , .Xr ti 4 +.Sh BUGS +The COW based send mechanism is not safe and may result in kernel crashes. .Sh HISTORY The zero copy sockets code first appeared in .Fx 5.0 , ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On Tue, Oct 23, 2012 at 02:19:45PM +, Andre Oppermann wrote: A Author: andre A Date: Tue Oct 23 14:19:44 2012 A New Revision: 241931 A URL: http://svn.freebsd.org/changeset/base/241931 A A Log: A Replace the ill-named ZERO_COPY_SOCKET kernel option with two A more appropriate named kernel options for the very distinct A send and receive path. A A options SOCKET_SEND_COW enables VM page copy-on-write based A sending of data on an outbound socket. A A NB: The COW based send mechanism is not safe and may result A in kernel crashes. A A options SOCKET_RECV_PFLIP enables VM kernel/userspace page A flipping for special disposable pages attached as external A storage to mbufs. A A Only the naming of the kernel options is changed and their A corresponding #ifdef sections are adjusted. No functionality A is added or removed. A A Discussed with:alc (mechanism and limitations of send side COW) Users may call this a pointless POLA violation. IMO, the old kernel option that we had for years, more than a decade, should remain and just imply two new kernel options. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241933 - head/sys/conf
Author: imp Date: Tue Oct 23 14:58:24 2012 New Revision: 241933 URL: http://svn.freebsd.org/changeset/base/241933 Log: Start a clean-room implementation of files.mips. This is sufficient for SWARM64 and SWARM64_SMP to compile. Other kernels will be layered in. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 14:25:37 2012(r241932) +++ head/sys/conf/files.mipsTue Oct 23 14:58:24 2012(r241933) @@ -1,130 +1,77 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta -# -# -- -# Phase 2 -# -- -# This file tells config what files go into building a kernel, -# files marked standard are always included. -# -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # $FreeBSD$ # -# -- -# Phase 2 -# -- -mips/mips/machdep.cstandard -mips/mips/mp_machdep.c optional smp -mips/mips/mpboot.S optional smp -# -- -# Phase 3 -# -- -mips/mips/autoconf.c standard -mips/mips/cpu.cstandard -mips/mips/elf_machdep.cstandard -mips/mips/exception.S standard -mips/mips/gdb_machdep.cstandard -mips/mips/pmap.c standard -mips/mips/trap.c standard -mips/mips/vm_machdep.c standard -# -- -# Phase 4 -# -- -# -- -# Phase 5 -# -- -mips/mips/fp.S standard -mips/mips/pm_machdep.c standard -mips/mips/swtch.S standard -mips/mips/tlb.cstandard - -mips/mips/bus_space_generic.c standard -mips/mips/busdma_machdep.c standard -mips/mips/cache.c standard -mips/mips/cache_mipsNN.c standard -mips/mips/db_disasm.c optionalddb -mips/mips/db_interface.c optionalddb -mips/mips/db_trace.c optionalddb -mips/mips/dump_machdep.c standard -mips/mips/in_cksum.c optionalinet | inet6 -mips/mips/locore.S standardno-obj -mips/mips/minidump_machdep.c standard -mips/mips/mem.coptionalmem -mips/mips/libkern_machdep.cstandard -mips/mips/nexus.c standard -mips/mips/stack_machdep.c optionalddb | stack -mips/mips/support.Sstandard -mips/mips/sys_machdep.cstandard -mips/mips/swtch.S standard -mips/mips/uio_machdep.cstandard -mips/mips/uma_machdep.cstandard -crypto/blowfish/bf_enc.c optionalcrypto | ipsec -crypto/des/des_enc.c optionalcrypto | ipsec -geom/geom_bsd.coptionalgeom_bsd -geom/geom_bsd_enc.coptionalgeom_bsd -geom/geom_mbr.coptionalgeom_mbr -geom/geom_mbr_enc.coptionalgeom_mbr -libkern/ashldi3.c standard -libkern/ashrdi3.c standard -libkern/cmpdi2.c standard -libkern/ffsl.c standard -libkern/fls.c standard -libkern/flsl.c standard -libkern/lshrdi3.c standard -libkern/memchr.c optionalfdt -libkern/memmove.c standard -libkern/ucmpdi2.c standard - -#XXX: We can't use these versions, as strcmp.c is included conf/files -#libkern/mips/strcmp.S standard -#libkern/mips/strncmp.Sstandard -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with ${ZFS_C} +# Arch dependent files +mips/mips/autoconf.c standard +mips/mips/bus_space_generic.c standard +mips/mips/busdma_machdep.c standard +mips/mips/cache.c standard +mips/mips/cache_mipsNN.c standard +mips/mips/cpu.cstandard +mips/mips/db_disasm.c optionalddb +mips/mips/db_interface.c optionalddb
svn commit: r241934 - head/games/fortune/datfiles
Author: eadler Date: Tue Oct 23 15:03:25 2012 New Revision: 241934 URL: http://svn.freebsd.org/changeset/base/241934 Log: Remove extra word: Submitted by: many Approved by: cperciva (implicit) MFC after:3 days Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips == --- head/games/fortune/datfiles/freebsd-tipsTue Oct 23 14:58:24 2012 (r241933) +++ head/games/fortune/datfiles/freebsd-tipsTue Oct 23 15:03:25 2012 (r241934) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with boot0cfg(8). See +reinstall it with boot0cfg(8). See man boot0cfg for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 23.10.2012 16:42, Gleb Smirnoff wrote: On Tue, Oct 23, 2012 at 02:19:45PM +, Andre Oppermann wrote: A Author: andre A Date: Tue Oct 23 14:19:44 2012 A New Revision: 241931 A URL: http://svn.freebsd.org/changeset/base/241931 A A Log: A Replace the ill-named ZERO_COPY_SOCKET kernel option with two A more appropriate named kernel options for the very distinct A send and receive path. A A options SOCKET_SEND_COW enables VM page copy-on-write based A sending of data on an outbound socket. A A NB: The COW based send mechanism is not safe and may result A in kernel crashes. A A options SOCKET_RECV_PFLIP enables VM kernel/userspace page A flipping for special disposable pages attached as external A storage to mbufs. A A Only the naming of the kernel options is changed and their A corresponding #ifdef sections are adjusted. No functionality A is added or removed. A A Discussed with: alc (mechanism and limitations of send side COW) Users may call this a pointless POLA violation. IMO, the old kernel option that we had for years, more than a decade, should remain and just imply two new kernel options. There shouldn't be any users. Zero copy send is broken and responsible for random kernel crashes. Zero copy receive isn't supported by any modern driver. Both are useless to dangerous. The main problem with ZERO_COPY_SOCKETS was that it sounded great and who wouldn't want to have zero copy sockets? Unfortunately it doesn't work that way. According to alc@ even if zero copy send would work it wouldn't be faster due to page based COW setup being a very expensive operation. Eventually he want's page-based COW to go away. For zero copy send we're trying to come up with a sendfile-like approach where the page is simply wired into kernel space. The application then is not allowed to touch it until the socket buffer has released it again. The main issue here is how to provide feedback to the application when it is safe for reuse. For zero copy receive I've been contacted by np@ to find a way to combine DDP into the socket buffer layer. Trying to work something out that isn't too horrible. A generic approach would hinge on page sized mbufs though. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 23 Oct 2012, at 16:05, Andre Oppermann wrote: For zero copy send we're trying to come up with a sendfile-like approach where the page is simply wired into kernel space. The application then is not allowed to touch it until the socket buffer has released it again. The main issue here is how to provide feedback to the application when it is safe for reuse. It's been a few years since I used it, but I thought that aio_write() already provided this. The application may not modify the contents of the memory pointed to by aio_buf until after it has received notification that the write has finished. This happens either via a signal directly, a signal polled by kqueue, or a call to aio_return(). David ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241936 - head/sys/conf
Author: imp Date: Tue Oct 23 15:16:40 2012 New Revision: 241936 URL: http://svn.freebsd.org/changeset/base/241936 Log: Add support for syscons (we should consider moving most of this into files, another day). Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 15:15:16 2012(r241935) +++ head/sys/conf/files.mipsTue Oct 23 15:16:40 2012(r241936) @@ -72,6 +72,15 @@ compat/freebsd32/freebsd32_sysent.c opti kern/imgact_elf32.coptionalcompat_freebsd32 mips/mips/freebsd32_machdep.c optionalcompat_freebsd32 +# cfe support dev/cfe/cfe_api.c optionalcfe dev/cfe/cfe_console.c optionalcfe_console dev/cfe/cfe_env.c optionalcfe_env + +# syscons support +dev/fb/fb.coptionalsc +dev/kbd/kbd.c optionalsc +dev/syscons/scgfbrndr.coptionalsc +dev/syscons/scterm-teken.c optionalsc +dev/syscons/scvtb.coptionalsc +mips/mips/sc_machdep.c optionalsc ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 10/23/2012 10:05 AM, Andre Oppermann wrote: There shouldn't be any users. Zero copy send is broken and responsible for random kernel crashes. Zero copy receive isn't supported by any modern driver. Both are useless to dangerous. I enabled this a few weeks ago, not knowing it was useless/dangerous. Perhaps an entry in UPDATING to note that this has been renamed and that it may not actually be useful? Also, zero_copy(9) needs updating, as it references ZERO_COPY_SOCKETS. -- Regards, Bryan Drewery bdrewery@freenode/EFNet ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241942 - head/sys/mips/rt305x
Author: imp Date: Tue Oct 23 15:25:48 2012 New Revision: 241942 URL: http://svn.freebsd.org/changeset/base/241942 Log: Add RT305x specific devices here. Modified: head/sys/mips/rt305x/files.rt305x Modified: head/sys/mips/rt305x/files.rt305x == --- head/sys/mips/rt305x/files.rt305x Tue Oct 23 15:25:19 2012 (r241941) +++ head/sys/mips/rt305x/files.rt305x Tue Oct 23 15:25:48 2012 (r241942) @@ -11,3 +11,5 @@ mips/rt305x/uart_cpu_rt305x.c optional u mips/rt305x/uart_dev_rt305x.c optional uart mips/mips/intr_machdep.cstandard mips/mips/tick.c standard +dev/rt/if_rt.c optional rt +dev/nvram2env/nvram2env.c optional nvram2env ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 23.10.2012 17:11, David Chisnall wrote: On 23 Oct 2012, at 16:05, Andre Oppermann wrote: For zero copy send we're trying to come up with a sendfile-like approach where the page is simply wired into kernel space. The application then is not allowed to touch it until the socket buffer has released it again. The main issue here is how to provide feedback to the application when it is safe for reuse. It's been a few years since I used it, but I thought that aio_write() already provided this. The application may not modify the contents of the memory pointed to by aio_buf until after it has received notification that the write has finished. This happens either via a signal directly, a signal polled by kqueue, or a call to aio_return(). Indeed, that's one of the ways being explored. It requires the explicit cooperation of the application. I don't think there is any way around that. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241946 - head/sys/conf
Author: imp Date: Tue Oct 23 15:33:40 2012 New Revision: 241946 URL: http://svn.freebsd.org/changeset/base/241946 Log: intr_machdep.c and trap.c can be replaced with ports' own versions, so remove the standard ones from here. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 15:33:32 2012(r241945) +++ head/sys/conf/files.mipsTue Oct 23 15:33:40 2012(r241946) @@ -20,7 +20,6 @@ mips/mips/exception.S standard mips/mips/fp.S standard mips/mips/gdb_machdep.cstandard mips/mips/in_cksum.c optionalinet -mips/mips/intr_machdep.c standard mips/mips/libkern_machdep.cstandard mips/mips/locore.S standardno-obj mips/mips/machdep.cstandard @@ -37,7 +36,6 @@ mips/mips/stack_machdep.c standard mips/mips/support.Sstandard mips/mips/swtch.S standard mips/mips/sys_machdep.cstandard -mips/mips/tick.c standard mips/mips/tlb.cstandard mips/mips/trap.c standard mips/mips/uio_machdep.cstandard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241952 - head/sys/cam/scsi
Author: mav Date: Tue Oct 23 16:03:00 2012 New Revision: 241952 URL: http://svn.freebsd.org/changeset/base/241952 Log: Remove two more 'periph == NULL' checks missed in r241404. This condition can never be true as functions are called from single place and the checks just pollute the code and confuse Clang Static Analyzer. Modified: head/sys/cam/scsi/scsi_enc.c head/sys/cam/scsi/scsi_pt.c Modified: head/sys/cam/scsi/scsi_enc.c == --- head/sys/cam/scsi/scsi_enc.cTue Oct 23 15:48:42 2012 (r241951) +++ head/sys/cam/scsi/scsi_enc.cTue Oct 23 16:03:00 2012 (r241952) @@ -879,11 +879,6 @@ enc_ctor(struct cam_periph *periph, void char *tname; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf(enc_ctor: periph was NULL!!\n); - goto out; - } - if (cgd == NULL) { printf(enc_ctor: no getdev CCB, can't register device\n); goto out; Modified: head/sys/cam/scsi/scsi_pt.c == --- head/sys/cam/scsi/scsi_pt.c Tue Oct 23 15:48:42 2012(r241951) +++ head/sys/cam/scsi/scsi_pt.c Tue Oct 23 16:03:00 2012(r241952) @@ -255,11 +255,6 @@ ptctor(struct cam_periph *periph, void * struct ccb_pathinq cpi; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf(ptregister: periph was NULL!!\n); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf(ptregister: no getdev CCB, can't register device\n); return(CAM_REQ_CMP_ERR); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: A There shouldn't be any users. Zero copy send is broken and A responsible for random kernel crashes. Zero copy receive isn't A supported by any modern driver. Both are useless to dangerous. A A The main problem with ZERO_COPY_SOCKETS was that it sounded great A and who wouldn't want to have zero copy sockets? Unfortunately A it doesn't work that way. Okay, it appeared that there are users, even on current@ mailing list during couple of hours of exposition. Can we keep the old option as compatibility? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241953 - head/sys/conf
Author: imp Date: Tue Oct 23 16:07:41 2012 New Revision: 241953 URL: http://svn.freebsd.org/changeset/base/241953 Log: Add in MD specific support for FDT. Need to refactor this a bit. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 16:03:00 2012(r241952) +++ head/sys/conf/files.mipsTue Oct 23 16:07:41 2012(r241953) @@ -60,6 +60,7 @@ libkern/ffsl.cstandard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard +libkern/memchr.c optionalfdt libkern/memmove.c standard # Compat32 stuff @@ -82,3 +83,12 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optionalsc dev/syscons/scvtb.coptionalsc mips/mips/sc_machdep.c optionalsc + +# FDT support +dev/ofw/openfirm.c optionalfdt +dev/ofw/openfirmio.c optionalfdt +dev/ofw/ofw_bus_if.m optionalfdt +dev/ofw/ofw_if.m optionalfdt +dev/ofw/ofw_bus_subr.c optionalfdt +dev/ofw/ofw_fdt.c optionalfdt +dev/fdt/fdt_mips.c optionalfdt ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241954 - head/sys/conf
Author: imp Date: Tue Oct 23 16:12:17 2012 New Revision: 241954 URL: http://svn.freebsd.org/changeset/base/241954 Log: Add in the crypto support from the generic versions. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 16:07:41 2012(r241953) +++ head/sys/conf/files.mipsTue Oct 23 16:12:17 2012(r241954) @@ -92,3 +92,7 @@ dev/ofw/ofw_if.m optionalfdt dev/ofw/ofw_bus_subr.c optionalfdt dev/ofw/ofw_fdt.c optionalfdt dev/fdt/fdt_mips.c optionalfdt + +# crypto support -- use generic +crypto/blowfish/bf_enc.c optionalcrypto | ipsec +crypto/des/des_enc.c optionalcrypto | ipsec ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 10/23/2012 11:05, Gleb Smirnoff wrote: On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: A There shouldn't be any users. Zero copy send is broken and A responsible for random kernel crashes. Zero copy receive isn't A supported by any modern driver. Both are useless to dangerous. A A The main problem with ZERO_COPY_SOCKETS was that it sounded great A and who wouldn't want to have zero copy sockets? Unfortunately A it doesn't work that way. Okay, it appeared that there are users, even on current@ mailing list during couple of hours of exposition. In my experience, that is because they are reporting a crash. Can we keep the old option as compatibility? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241923 - in head/sys: netinet netipsec
On Tue, Oct 23, 2012 at 3:16 AM, Gleb Smirnoff gleb...@freebsd.org wrote: On Tue, Oct 23, 2012 at 11:12:00AM +0200, Andre Oppermann wrote: A On 23.10.2012 10:33, Gleb Smirnoff wrote: A Author: glebius A Date: Tue Oct 23 08:33:13 2012 A New Revision: 241923 A URL: http://svn.freebsd.org/changeset/base/241923 A A Log: A Do not reduce ip_len by size of IP header in the ip_input() A before passing a packet to protocol input routines. A For several protocols this mean that now protocol needs to A do subtraction itself, and for another half this means that A we do not need to add header length back to the packet. A A Yay! More Mammoth shit getting washed away! ;) A A Please add an entry to UPDATING as the convention of of ip_len A subtraction has been there since forever. That makes it easier A to discover for third parties writing code. Not sure it worth. Never heard of any loadable protocol outside of tree. Those loadable protocols that we have in tree (carp, divert) do not look at ip_len. I would follow Andre's advice. People can get clever when developing under a tight deadline, which can result in interesting breakage. Thanks! -Garrett ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241955 - head
Author: andre Date: Tue Oct 23 16:33:43 2012 New Revision: 241955 URL: http://svn.freebsd.org/changeset/base/241955 Log: Note the removal of the ZERO_COPY_SOCKETS kernel option in r241931 and provide a proper explanation. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Tue Oct 23 16:12:17 2012(r241954) +++ head/UPDATING Tue Oct 23 16:33:43 2012(r241955) @@ -25,6 +25,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 ln -s 'abort:false,junk:false' /etc/malloc.conf.) 20121023: + The ZERO_COPY_SOCKET kernel option has been removed and + split into SOCKET_SEND_COW and SOCKET_RECV_PFLIP. + NB: SOCKET_SEND_COW uses the VM page based copy-on-write + mechanism which is not safe and may result in kernel crashes. + NB: The SOCKET_RECV_PFLIP mechanism is useless as no current + driver supports disposeable external page sized mbuf storage. + Proper replacements for both zero-copy mechanisms are under + consideration and will eventually lead to complete removal + of the two kernel options. + +20121023: The IPv4 network stack has been converted to network byte order. The following modules need to be recompiled together with kernel: carp(4), divert(4), gif(4), siftr(4), gre(4), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 23.10.2012 17:21, Bryan Drewery wrote: On 10/23/2012 10:05 AM, Andre Oppermann wrote: There shouldn't be any users. Zero copy send is broken and responsible for random kernel crashes. Zero copy receive isn't supported by any modern driver. Both are useless to dangerous. I enabled this a few weeks ago, not knowing it was useless/dangerous. Perhaps an entry in UPDATING to note that this has been renamed and that it may not actually be useful? Good idea. Will do. Also, zero_copy(9) needs updating, as it references ZERO_COPY_SOCKETS. Already done in r241932. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241931 - in head/sys: conf kern
On 23.10.2012 18:05, Gleb Smirnoff wrote: On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: A There shouldn't be any users. Zero copy send is broken and A responsible for random kernel crashes. Zero copy receive isn't A supported by any modern driver. Both are useless to dangerous. A A The main problem with ZERO_COPY_SOCKETS was that it sounded great A and who wouldn't want to have zero copy sockets? Unfortunately A it doesn't work that way. Okay, it appeared that there are users, even on current@ mailing list during couple of hours of exposition. Can we keep the old option as compatibility? No. They are not users. They simply fell for the promise of zero copy which it isn't. It doesn't do what the users believe it does. It's useless for receive and dangerous for send. I have updated NOTES and forwarded it to -current. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. This was a chance to remove style bugs in the prototypes. At least it didn't create so many new ones, unlike the original __P axing. It still enlarged about a hundred by changing from Gnu style continuation to Gnu style continuation indentation with an off-by-5 error. Hi Bruce, please note that the SCTP code in the FreeBSD sources is generated via an export script from a codebase which runs on multiple platforms. The script tries to follow FreeBSDs guidelines, but is far from being perfect. Best regards Michael Modified: head/sys/netinet/sctp_uio.h == --- head/sys/netinet/sctp_uio.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet/sctp_uio.h Mon Oct 22 21:49:56 2012 (r241916) @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, #if !(defined(_KERNEL)) !(defined(__Userspace__)) __BEGIN_DECLS -int sctp_peeloff __P((int, sctp_assoc_t)); -int sctp_bindx __P((int, struct sockaddr *, int, int)); -int sctp_connectx __P((int, const struct sockaddr *, int, sctp_assoc_t *)); -int sctp_getaddrlen __P((sa_family_t)); -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freepaddrs __P((struct sockaddr *)); -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freeladdrs __P((struct sockaddr *)); -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t *)); +int sctp_peeloff(int, sctp_assoc_t); +int sctp_bindx(int, struct sockaddr *, int, int); +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t *); +int sctp_getaddrlen(sa_family_t); +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freepaddrs(struct sockaddr *); +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freeladdrs(struct sockaddr *); +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); sctp is fairly consistent in having style bugs on every line. It never indented fucntion names in prototypes. /* deprecated */ ssize_t sctp_sendmsg -__P((int, const void *, size_t, const struct sockaddr *, -socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); +(int, const void *, size_t, const struct sockaddr *, +socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); Putting the __P(( unindented on a new line was weird. It is weirder now with the __P( part. /* deprecated */ -ssize_t sctp_send __P((int, const void *, size_t, - const struct sctp_sndrcvinfo *, int)); +ssize_t sctp_send(int, const void *, size_t, + const struct sctp_sndrcvinfo *, int); Continuation lines were weirdly indented in at least this part of sctp. This one uses 14 spaces, underneath a line with 1 tab. 1 tab followed by 4 spaces would be normal. Since the 14 spaces didn't line up with anything, removing __P( leaves the continuation line not lined up with anything slightly differently. ... /* deprecated */ -ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr *, socklen_t *, - struct sctp_sndrcvinfo *, int *)); +ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, socklen_t *, + struct sctp_sndrcvinfo *, int *); Here there are 17 spaces instead of 14. Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.cMon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/icmp6.cMon Oct 22 21:49:56 2012 (r241916) @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); static void icmp6_errcount(struct icmp6errstat *, int, int); static int icmp6_rip6_input(struct mbuf **, int); static int icmp6_ratelimit(const struct in6_addr *, const int, const int); -static const char *icmp6_redirect_diag __P((struct in6_addr *, -struct in6_addr *, struct in6_addr *)); +static const char *icmp6_redirect_diag(struct in6_addr *, +struct in6_addr *, struct in6_addr *); Function names not indented. Continuation lines indented abnormally with 1 tab so that it doesn't line up with anything. static struct mbuf *ni6_input(struct mbuf *, int); static struct mbuf *ni6_nametodns(const char *, int, int); static int ni6_dnsmatch(const char *, int, const char *, int); -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, - struct ifnet **, struct in6_addr *)); -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, -struct ifnet *, int)); Here the continuation lines were indented abnormally but using Gnu style (indent -lp) so that they lined up with the parantheses using a mixture of tabs and spaces. +static int ni6_addrs(struct icmp6_nodeinfo *,
Re: svn commit: r241625 - head/usr.sbin/cron/cron
On Mon, Oct 22, 2012 at 09:10:17AM -0700, Maxim Sobolev wrote: Guys, The latest version of the patch against current HEAD is available here: http://sobomax.sippysoft.com/cron.diff Any comments/suggestions are appreciated. This version should default to previous behaviour of waking up every 60 seconds unless there is @every_second entry in the cron. Konstantin, can you please put it for testing to your boxes? Please make sure to do `make clean' after applying it, as libcron is not listed as a dependency for cron, so it's possible that some changes may not be picked up. I patched the HEAD with the provided diff, and did make clean all in usr.sbin/cron. The resulting binary correctly handled both /etc/crontab and personal crontabs with the each-minute jobs. I did not read the changed logic. Still, I suggest you to wrap the too-long line in the patch. Also, it seems that the changes would benefit from (extensive) commenting in the code. pgplaIi23YJRd.pgp Description: PGP signature
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Tue, 23 Oct 2012, Michael Tuexen wrote: On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. This was a chance to remove style bugs in the prototypes. At least it didn't create so many new ones, unlike the original __P axing. It still enlarged about a hundred by changing from Gnu style continuation to Gnu style continuation indentation with an off-by-5 error. please note that the SCTP code in the FreeBSD sources is generated via an export script from a codebase which runs on multiple platforms. The script tries to follow FreeBSDs guidelines, but is far from being perfect. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241957 - in head/contrib/libstdc++: config/os/bsd/freebsd include/bits include/std
Author: dim Date: Tue Oct 23 18:36:07 2012 New Revision: 241957 URL: http://svn.freebsd.org/changeset/base/241957 Log: Fix several clang warnings in libstdc++, which were exposed by the recent atf import. These changes are purely cosmetic, no functional change. MFC after:1 week Modified: head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h head/contrib/libstdc++/include/bits/fstream.tcc head/contrib/libstdc++/include/bits/locale_facets.h head/contrib/libstdc++/include/bits/locale_facets.tcc head/contrib/libstdc++/include/bits/streambuf_iterator.h head/contrib/libstdc++/include/std/std_sstream.h Modified: head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h == --- head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 23 17:53:20 2012(r241956) +++ head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 23 18:36:07 2012(r241957) @@ -38,8 +38,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /// @brief Base class for ctype. - struct ctype_base + class ctype_base { + public: // Non-standard typedefs. typedef const int* __to_type; Modified: head/contrib/libstdc++/include/bits/fstream.tcc == --- head/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 23 17:53:20 2012(r241956) +++ head/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 23 18:36:07 2012(r241957) @@ -641,21 +641,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) setbuf(char_type* __s, streamsize __n) { if (!this-is_open()) - if (__s == 0 __n == 0) - _M_buf_size = 1; - else if (__s __n 0) - { - // This is implementation-defined behavior, and assumes that - // an external char_type array of length __n exists and has - // been pre-allocated. If this is not the case, things will - // quickly blow up. When __n 1, __n - 1 positions will be - // used for the get area, __n - 1 for the put area and 1 - // position to host the overflow char of a full put area. - // When __n == 1, 1 position will be used for the get area - // and 0 for the put area, as in the unbuffered case above. - _M_buf = __s; - _M_buf_size = __n; - } + { + if (__s == 0 __n == 0) + _M_buf_size = 1; + else if (__s __n 0) + { + // This is implementation-defined behavior, and assumes that + // an external char_type array of length __n exists and has + // been pre-allocated. If this is not the case, things will + // quickly blow up. When __n 1, __n - 1 positions will be + // used for the get area, __n - 1 for the put area and 1 + // position to host the overflow char of a full put area. + // When __n == 1, 1 position will be used for the get area + // and 0 for the put area, as in the unbuffered case above. + _M_buf = __s; + _M_buf_size = __n; + } + } return this; } Modified: head/contrib/libstdc++/include/bits/locale_facets.h == --- head/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 23 17:53:20 2012(r241956) +++ head/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 23 18:36:07 2012(r241957) @@ -4335,8 +4335,9 @@ _GLIBCXX_END_LDBL_NAMESPACE /** * @brief Messages facet base class providing catalog typedef. */ - struct messages_base + class messages_base { + public: typedef int catalog; }; Modified: head/contrib/libstdc++/include/bits/locale_facets.tcc == --- head/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 23 17:53:20 2012(r241956) +++ head/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 23 18:36:07 2012(r241957) @@ -316,7 +316,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc-_M_use_grouping __c == __lc-_M_thousands_sep + if ((__lc-_M_use_grouping __c == __lc-_M_thousands_sep) || __c == __lc-_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) @@ -558,7 +558,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc-_M_use_grouping __c == __lc-_M_thousands_sep + if ((__lc-_M_use_grouping __c == __lc-_M_thousands_sep) || __c == __lc-_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] @@ -748,16 +748,20 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE const
svn commit: r241958 - in head/contrib/atf: atf-report atf-run
Author: dim Date: Tue Oct 23 18:38:04 2012 New Revision: 241958 URL: http://svn.freebsd.org/changeset/base/241958 Log: Fix two clang warnings in the recent atf import. These have also been sent upstream. Tested by:Garrett Cooper yaneg...@gmail.com Modified: head/contrib/atf/atf-report/atf-report.cpp head/contrib/atf/atf-run/io.hpp Modified: head/contrib/atf/atf-report/atf-report.cpp == --- head/contrib/atf/atf-report/atf-report.cpp Tue Oct 23 18:36:07 2012 (r241957) +++ head/contrib/atf/atf-report/atf-report.cpp Tue Oct 23 18:38:04 2012 (r241958) @@ -381,7 +381,6 @@ public: class xml_writer : public writer { ostream_ptr m_os; -size_t m_curtp, m_ntps; std::string m_tcname, m_tpname; static Modified: head/contrib/atf/atf-run/io.hpp == --- head/contrib/atf/atf-run/io.hpp Tue Oct 23 18:36:07 2012 (r241957) +++ head/contrib/atf/atf-run/io.hpp Tue Oct 23 18:38:04 2012 (r241958) @@ -378,11 +378,6 @@ class pistream : public std::istream, utils::noncopyable { //! -//! \brief The file handle managed by this stream. -//! -int m_fd; - -//! //! \brief The systembuf object used to manage this stream's data. //! systembuf m_systembuf; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Oct 23, 2012, at 8:28 PM, Bruce Evans wrote: On Tue, 23 Oct 2012, Michael Tuexen wrote: On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. This was a chance to remove style bugs in the prototypes. At least it didn't create so many new ones, unlike the original __P axing. It still enlarged about a hundred by changing from Gnu style continuation to Gnu style continuation indentation with an off-by-5 error. please note that the SCTP code in the FreeBSD sources is generated via an export script from a codebase which runs on multiple platforms. The script tries to follow FreeBSDs guidelines, but is far from being perfect. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Maybe I wasn't clear... * The removal of __P() needs also be done upstream. I'll handle this, not problem. I don't think we need __P on any platform. * My comment was regarding your list of formatting issues of the code. Changing the formatting would require changing the export script. If someone just changes the FreeBSD sources and these changes are not included upstream, they are lost by the next commit of rrs@ or mine. My point was: Getting rid of __P is fine and we can handle that upstream (as any other non whitespace/formatting changes needed), but changing the formatting is NOT that easy. I'm sorry about that and just wanted to let you know that there is a reason why the style 9 stuff is not followed exactly within the SCTP code. I hope this makes the situation clearer. Best regards Michael Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241959 - in head/contrib/libstdc++: include/debug include/ext libsupc++ src
Author: dim Date: Tue Oct 23 18:45:32 2012 New Revision: 241959 URL: http://svn.freebsd.org/changeset/base/241959 Log: Fix a number of other clang warnings in libstdc++, which could appear when building other C++ software with it. Also fix one actual bug in libsupc++, which was exposed by such a warning. This latter fix is the only functional change. MFC after:1 week Modified: head/contrib/libstdc++/include/debug/safe_iterator.tcc head/contrib/libstdc++/include/ext/ropeimpl.h head/contrib/libstdc++/libsupc++/tinfo.cc head/contrib/libstdc++/src/locale.cc head/contrib/libstdc++/src/strstream.cc head/contrib/libstdc++/src/tree.cc Modified: head/contrib/libstdc++/include/debug/safe_iterator.tcc == --- head/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 23 18:38:04 2012(r241958) +++ head/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 23 18:45:32 2012(r241959) @@ -54,8 +54,8 @@ namespace __gnu_debug static_castconst _Sequence*(_M_sequence)-begin(); std::pairdifference_type, _Distance_precision __dist = this-_M_get_distance(__begin, *this); - bool __ok = (__dist.second == __dp_exact __dist.first = -__n - || __dist.second != __dp_exact __dist.first 0); + bool __ok = ((__dist.second == __dp_exact __dist.first = -__n) + || (__dist.second != __dp_exact __dist.first 0)); return __ok; } else @@ -64,8 +64,8 @@ namespace __gnu_debug static_castconst _Sequence*(_M_sequence)-end(); std::pairdifference_type, _Distance_precision __dist = this-_M_get_distance(*this, __end); - bool __ok = (__dist.second == __dp_exact __dist.first = __n - || __dist.second != __dp_exact __dist.first 0); + bool __ok = ((__dist.second == __dp_exact __dist.first = __n) + || (__dist.second != __dp_exact __dist.first 0)); return __ok; } } Modified: head/contrib/libstdc++/include/ext/ropeimpl.h == --- head/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 23 18:38:04 2012(r241958) +++ head/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 23 18:45:32 2012(r241959) @@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } else { - char* __kind; + const char* __kind; switch (__r-_M_tag) { Modified: head/contrib/libstdc++/libsupc++/tinfo.cc == --- head/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -499,9 +499,9 @@ __do_dyncast (ptrdiff_t src2dst, result.whole2dst = __sub_kind (result.whole2dst | result2.whole2dst); } - else if ((result.dst_ptr != 0 result2.dst_ptr != 0) - || (result.dst_ptr != 0 result2_ambig) - || (result2.dst_ptr != 0 result_ambig)) + else if ((result.dst_ptr != 0 result2.dst_ptr != 0) + || (result.dst_ptr != 0 result2_ambig) + || (result2.dst_ptr != 0 result_ambig)) { // Found two different DST_TYPE bases, or a valid one and a set of // ambiguous ones, must disambiguate. See whether SRC_PTR is Modified: head/contrib/libstdc++/src/locale.cc == --- head/contrib/libstdc++/src/locale.ccTue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/src/locale.ccTue Oct 23 18:45:32 2012 (r241959) @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::_S_normalize_category(category __cat) { int __ret = 0; -if (__cat == none || (__cat all) !(__cat ~all)) +if (__cat == none || ((__cat all) !(__cat ~all))) __ret = __cat; else { Modified: head/contrib/libstdc++/src/strstream.cc == --- head/contrib/libstdc++/src/strstream.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/src/strstream.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -311,10 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf::_M_free(char* p) { if (p) - if (_M_free_fun) - _M_free_fun(p); - else - delete[] p; + { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; + } } void Modified: head/contrib/libstdc++/src/tree.cc == ---
svn commit: r241960 - in head/gnu/lib: libstdc++ libsupc++
Author: dim Date: Tue Oct 23 18:57:20 2012 New Revision: 241960 URL: http://svn.freebsd.org/changeset/base/241960 Log: For building GNU libstdc++ and libsupc++, filter out libc++-specific and -std= flags above c++98 or gnu++98 from CXXFLAGS *after* including bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might not be preserved. MFC after:1 week Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile == --- head/gnu/lib/libstdc++/Makefile Tue Oct 23 18:45:32 2012 (r241959) +++ head/gnu/lib/libstdc++/Makefile Tue Oct 23 18:57:20 2012 (r241960) @@ -22,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} @@ -626,3 +625,6 @@ ${VERSION_MAP}: ${SRCDIR}/config/abi/pre CLEANFILES+= ${VERSION_MAP} .include bsd.lib.mk + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} Modified: head/gnu/lib/libsupc++/Makefile == --- head/gnu/lib/libsupc++/Makefile Tue Oct 23 18:45:32 2012 (r241959) +++ head/gnu/lib/libsupc++/Makefile Tue Oct 23 18:57:20 2012 (r241960) @@ -24,7 +24,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS=${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h @@ -43,3 +42,6 @@ VERSION_MAP= ${.CURDIR}/Version.map .include bsd.lib.mk + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241896 - in head: . cddl/contrib/opensolaris/lib/libzpool/common/sys share/man/man9 sys/cam/ctl sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opens
On Mon, Oct 22, 2012 at 05:50:55PM +, Konstantin Belousov wrote: Author: kib Date: Mon Oct 22 17:50:54 2012 New Revision: 241896 URL: http://svn.freebsd.org/changeset/base/241896 Log: Remove the support for using non-mpsafe filesystem modules. In particular, do not lock Giant conditionally when calling into the filesystem module, remove the VFS_LOCK_GIANT() and related macros. Stop handling buffers belonging to non-mpsafe filesystems. The VFS_VERSION is bumped to indicate the interface change which does not result in the interface signatures changes. Conducted and reviewed by: attilio Tested by: pho FINALLY! Deleted: head/share/man/man9/VFS_LOCK_GIANT.9 Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/share/man/man9/Makefile head/share/man/man9/namei.9 head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_misc.c head/sys/compat/ndis/subr_ndis.c head/sys/compat/svr4/svr4_misc.c head/sys/conf/NOTES head/sys/conf/options head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/md/md.c head/sys/dev/nand/nandsim_swap.c head/sys/dev/xen/blkback/blkback.c head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/procfs/procfs_map.c head/sys/fs/unionfs/union_subr.c head/sys/geom/geom_vfs.c head/sys/geom/journal/g_journal.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/kern/imgact_elf.c head/sys/kern/kern_acct.c head/sys/kern/kern_alq.c head/sys/kern/kern_ctf.c head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_gzio.c head/sys/kern/kern_jail.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_linker.c head/sys/kern/kern_proc.c head/sys/kern/kern_sig.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/sys_process.c head/sys/kern/uipc_syscalls.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_acl.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_default.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_init.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/nfsserver/nfs.h head/sys/nfsserver/nfs_serv.c head/sys/nfsserver/nfs_srvsubs.c head/sys/nlm/nlm_prot_impl.c head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_syscalls.c head/sys/security/audit/audit_worker.c head/sys/security/mac/mac_process.c head/sys/security/mac/mac_syscalls.c head/sys/sys/buf.h head/sys/sys/bufobj.h head/sys/sys/mount.h head/sys/sys/namei.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/ufs_quota.c head/sys/vm/vm_fault.c head/sys/vm/vm_mmap.c head/sys/vm/vm_object.c head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.incMon Oct 22 17:47:37 2012(r241895) +++ head/ObsoleteFiles.incMon Oct 22 17:50:54 2012(r241896) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121022: VFS_LOCK_GIANT elimination +OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz # 20121004: remove incomplete unwind.h OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h == --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Oct 22 17:47:37 2012(r241895) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Oct 22 17:50:54 2012(r241896) @@ -430,14 +430,6 @@ extern int fop_getattr(vnode_t *vp, vatt #define vn_lock(vp, type) #define VOP_UNLOCK(vp, type) -#ifdef VFS_LOCK_GIANT -#undef VFS_LOCK_GIANT -#endif -#define VFS_LOCK_GIANT(mp) 0 -#ifdef VFS_UNLOCK_GIANT -#undef VFS_UNLOCK_GIANT -#endif -#define VFS_UNLOCK_GIANT(vfslocked) extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp, int x2, int x3); Modified: head/share/man/man9/Makefile ==
svn commit: r241964 - in head/sys: conf mips/rt305x
Author: imp Date: Tue Oct 23 19:17:43 2012 New Revision: 241964 URL: http://svn.freebsd.org/changeset/base/241964 Log: Turns out the nvram env was common, so move it back up to get PB92 working. Modified: head/sys/conf/files.mips head/sys/mips/rt305x/files.rt305x Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsTue Oct 23 19:15:24 2012(r241963) +++ head/sys/conf/files.mipsTue Oct 23 19:17:43 2012(r241964) @@ -96,3 +96,6 @@ dev/fdt/fdt_mips.coptionalfdt # crypto support -- use generic crypto/blowfish/bf_enc.c optionalcrypto | ipsec crypto/des/des_enc.c optionalcrypto | ipsec + +# AP common nvram interface +dev/nvram2env/nvram2env.c optionalnvram2env Modified: head/sys/mips/rt305x/files.rt305x == --- head/sys/mips/rt305x/files.rt305x Tue Oct 23 19:15:24 2012 (r241963) +++ head/sys/mips/rt305x/files.rt305x Tue Oct 23 19:17:43 2012 (r241964) @@ -12,4 +12,3 @@ mips/rt305x/uart_dev_rt305x.c optional u mips/mips/intr_machdep.cstandard mips/mips/tick.c standard dev/rt/if_rt.c optional rt -dev/nvram2env/nvram2env.c optional nvram2env ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241970 - head/sys/mips/conf
Author: thompsa Date: Tue Oct 23 22:58:25 2012 New Revision: 241970 URL: http://svn.freebsd.org/changeset/base/241970 Log: Fix spelling of NFSCL option. Modified: head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AR71XX_BASE == --- head/sys/mips/conf/AR71XX_BASE Tue Oct 23 21:20:05 2012 (r241969) +++ head/sys/mips/conf/AR71XX_BASE Tue Oct 23 22:58:25 2012 (r241970) @@ -33,7 +33,7 @@ options SCHED_4BSD #4BSD scheduler optionsINET#InterNETworking optionsINET6 # IPv6 -# options NFS_CL #Network Filesystem Client +# options NFSCL #Network Filesystem Client optionsPSEUDOFS#Pseudo-filesystem framework options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions Modified: head/sys/mips/conf/AR724X_BASE == --- head/sys/mips/conf/AR724X_BASE Tue Oct 23 21:20:05 2012 (r241969) +++ head/sys/mips/conf/AR724X_BASE Tue Oct 23 22:58:25 2012 (r241970) @@ -33,7 +33,7 @@ options KDB optionsSCHED_4BSD #4BSD scheduler optionsINET#InterNETworking #options INET6 # IPv6 -#options NFS_CL #Network Filesystem Client +#options NFSCL #Network Filesystem Client optionsPSEUDOFS#Pseudo-filesystem framework options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241972 - head/usr.bin/script
Author: obrien Date: Tue Oct 23 23:36:29 2012 New Revision: 241972 URL: http://svn.freebsd.org/changeset/base/241972 Log: Don't include both sys/param.h sys/types.h. Modified: head/usr.bin/script/script.c Modified: head/usr.bin/script/script.c == --- head/usr.bin/script/script.cTue Oct 23 23:13:44 2012 (r241971) +++ head/usr.bin/script/script.cTue Oct 23 23:36:29 2012 (r241972) @@ -27,28 +27,23 @@ * SUCH DAMAGE. */ -#include sys/cdefs.h - +#include sys/param.h __FBSDID($FreeBSD$); - #ifndef lint static const char copyright[] = @(#) Copyright (c) 1980, 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n; #endif - #ifndef lint static const char sccsid[] = @(#)script.c 8.1 (Berkeley) 6/6/93; #endif -#include sys/types.h #include sys/wait.h #include sys/stat.h #include sys/ioctl.h #include sys/time.h #include sys/uio.h #include sys/endian.h -#include sys/param.h #include err.h #include errno.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241974 - in head: lib/libpmc sys/dev/hwpmc
Author: sbruno Date: Wed Oct 24 01:26:29 2012 New Revision: 241974 URL: http://svn.freebsd.org/changeset/base/241974 Log: Cleanup and rename some variables in libpmc and hwpmc. Submitted by: hiren panchasara hiren.panchas...@gmail.com Reviewed by: jimharris@ sbruno@ Obtained from:Yahoo! Inc. MFC after:2 weeks Modified: head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.ivybridge.3 head/lib/libpmc/pmc.sandybridge.3 head/lib/libpmc/pmc.sandybridgexeon.3 head/sys/dev/hwpmc/pmc_events.h Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cTue Oct 23 23:49:17 2012(r241973) +++ head/lib/libpmc/libpmc.cWed Oct 24 01:26:29 2012(r241974) @@ -721,7 +721,7 @@ static struct pmc_masks iap_rsp_mask_sb_ PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL 20)), PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL 21)), PMCMASK(RES_SUPPLIER_LOCAL, (1ULL 22)), - PMCMASK(RES_SNOOP_SNPI_NONE,(1ULL 31)), + PMCMASK(RES_SNOOP_SNP_NONE, (1ULL 31)), PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL 32)), PMCMASK(RES_SNOOP_SNP_MISS, (1ULL 33)), PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL 34)), Modified: head/lib/libpmc/pmc.ivybridge.3 == --- head/lib/libpmc/pmc.ivybridge.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.ivybridge.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -134,7 +134,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/lib/libpmc/pmc.sandybridge.3 == --- head/lib/libpmc/pmc.sandybridge.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.sandybridge.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -138,7 +138,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/lib/libpmc/pmc.sandybridgexeon.3 == --- head/lib/libpmc/pmc.sandybridgexeon.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.sandybridgexeon.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -135,7 +135,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/sys/dev/hwpmc/pmc_events.h == --- head/sys/dev/hwpmc/pmc_events.h Tue Oct 23 23:49:17 2012 (r241973) +++ head/sys/dev/hwpmc/pmc_events.h Wed Oct 24 01:26:29 2012 (r241974) @@ -2640,7 +2640,7 @@ __PMC_EV_ALIAS(DTLB_STORE_MISSES.WALK_C __PMC_EV_ALIAS(DTLB_STORE_MISSES.WALK_DURATION, IAP_EVENT_49H_04H) \ __PMC_EV_ALIAS(DTLB_STORE_MISSES.STLB_HIT, IAP_EVENT_49H_10H) \ __PMC_EV_ALIAS(LOAD_HIT_PRE.SW_PF, IAP_EVENT_4CH_01H) \ -__PMC_EV_ALIAS(LOAD_HIT_PER.HW_PF, IAP_EVENT_4CH_02H) \ +__PMC_EV_ALIAS(LOAD_HIT_PRE.HW_PF, IAP_EVENT_4CH_02H) \ __PMC_EV_ALIAS(HW_PRE_REQ.DL1_MISS, IAP_EVENT_4EH_02H) \ __PMC_EV_ALIAS(L1D.REPLACEMENT, IAP_EVENT_51H_01H) \ __PMC_EV_ALIAS(L1D.ALLOCATED_IN_M, IAP_EVENT_51H_02H) \ @@ -2777,7 +2777,7 @@ __PMC_EV_ALIAS(MEM_LOAD_UOPS_LLC_HIT_RE __PMC_EV_ALIAS(MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE, IAP_EVENT_D2H_08H) \ __PMC_EV_ALIAS(MEM_LOAD_UOPS_LLC_HIT_RETIRED.LLC_MISS, IAP_EVENT_D4H_02H) \ __PMC_EV_ALIAS(L2_TRANS.DEMAND_DATA_RD, IAP_EVENT_F0H_01H) \ -__PMC_EV_ALIAS(L2_TRANS.RF0, IAP_EVENT_F0H_02H) \ +__PMC_EV_ALIAS(L2_TRANS.RFO, IAP_EVENT_F0H_02H) \ __PMC_EV_ALIAS(L2_TRANS.CODE_RD, IAP_EVENT_F0H_04H) \ __PMC_EV_ALIAS(L2_TRANS.ALL_PF, IAP_EVENT_F0H_08H) \ __PMC_EV_ALIAS(L2_TRANS.L1D_WB, IAP_EVENT_F0H_10H) \ @@ -2787,7 +2787,7 @@ __PMC_EV_ALIAS(L2_TRANS.ALL_REQUESTS, __PMC_EV_ALIAS(L2_LINES_IN.I, IAP_EVENT_F1H_01H) \ __PMC_EV_ALIAS(L2_LINES_IN.S, IAP_EVENT_F1H_02H) \ __PMC_EV_ALIAS(L2_LINES_IN.E, IAP_EVENT_F1H_04H)
svn commit: r241975 - head/usr.sbin/pkg_install/add
Author: kensmith Date: Wed Oct 24 01:42:46 2012 New Revision: 241975 URL: http://svn.freebsd.org/changeset/base/241975 Log: Add the release package directory for 9.1-RELEASE. Modified: head/usr.sbin/pkg_install/add/main.c Modified: head/usr.sbin/pkg_install/add/main.c == --- head/usr.sbin/pkg_install/add/main.cWed Oct 24 01:26:29 2012 (r241974) +++ head/usr.sbin/pkg_install/add/main.cWed Oct 24 01:42:46 2012 (r241975) @@ -89,6 +89,7 @@ struct { { 802000, 802499, /packages-8.2-release }, { 803000, 803499, /packages-8.3-release }, { 90, 900499, /packages-9.0-release }, + { 901000, 901499, /packages-9.1-release }, { 30, 399000, /packages-3-stable }, { 40, 499000, /packages-4-stable }, { 502100, 502128, /packages-5-current }, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241983 - head/sys/dev/bge
Author: yongari Date: Wed Oct 24 05:00:56 2012 New Revision: 241983 URL: http://svn.freebsd.org/changeset/base/241983 Log: Do not hardcode phy address. Multi-port controllers use different phy address. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Wed Oct 24 02:54:21 2012(r241982) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:00:56 2012(r241983) @@ -3215,7 +3215,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, msicount, phy_addr, reg, rid, trys; + int capmask, error, msicount, reg, rid, trys; sc = device_get_softc(dev); sc-bge_dev = dev; @@ -3275,7 +3275,7 @@ bge_attach(device_t dev) sc-bge_chiprev = BGE_CHIPREV(sc-bge_chipid); /* Set default PHY address. */ - phy_addr = 1; + sc-bge_phy_addr = 1; /* * PHY address mapping for various devices. * @@ -3304,15 +3304,15 @@ bge_attach(device_t dev) if (sc-bge_chipid != BGE_CHIPID_BCM5717_A0) { if (CSR_READ_4(sc, BGE_SGDIG_STS) BGE_SGDIGSTS_IS_SERDES) - phy_addr = sc-bge_func_addr + 8; + sc-bge_phy_addr = sc-bge_func_addr + 8; else - phy_addr = sc-bge_func_addr + 1; + sc-bge_phy_addr = sc-bge_func_addr + 1; } else { if (CSR_READ_4(sc, BGE_CPMU_PHY_STRAP) BGE_CPMU_PHY_STRAP_IS_SERDES) - phy_addr = sc-bge_func_addr + 8; + sc-bge_phy_addr = sc-bge_func_addr + 8; else - phy_addr = sc-bge_func_addr + 1; + sc-bge_phy_addr = sc-bge_func_addr + 1; } } @@ -3789,13 +3789,13 @@ again: bge_asf_driver_up(sc); error = mii_attach(dev, sc-bge_miibus, ifp, bge_ifmedia_upd, - bge_ifmedia_sts, capmask, phy_addr, MII_OFFSET_ANY, + bge_ifmedia_sts, capmask, sc-bge_phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { if (trys++ 4) { device_printf(sc-bge_dev, Try again\n); - bge_miibus_writereg(sc-bge_dev, 1, MII_BMCR, - BMCR_RESET); + bge_miibus_writereg(sc-bge_dev, + sc-bge_phy_addr, MII_BMCR, BMCR_RESET); goto again; } device_printf(sc-bge_dev, attaching PHYs failed\n); @@ -6017,9 +6017,10 @@ bge_link_upd(struct bge_softc *sc) /* Clear the interrupt. */ CSR_WRITE_4(sc, BGE_MAC_EVT_ENB, BGE_EVTENB_MI_INTERRUPT); - bge_miibus_readreg(sc-bge_dev, 1, BRGPHY_MII_ISR); - bge_miibus_writereg(sc-bge_dev, 1, BRGPHY_MII_IMR, - BRGPHY_INTRS); + bge_miibus_readreg(sc-bge_dev, sc-bge_phy_addr, + BRGPHY_MII_ISR); + bge_miibus_writereg(sc-bge_dev, sc-bge_phy_addr, + BRGPHY_MII_IMR, BRGPHY_INTRS); } return; } Modified: head/sys/dev/bge/if_bgereg.h == --- head/sys/dev/bge/if_bgereg.hWed Oct 24 02:54:21 2012 (r241982) +++ head/sys/dev/bge/if_bgereg.hWed Oct 24 05:00:56 2012 (r241983) @@ -2974,6 +2974,7 @@ struct bge_softc { #defineBGE_MFW_TYPE_DASH 0x0008 int bge_phy_ape_lock; int bge_func_addr; + int bge_phy_addr; uint32_tbge_phy_flags; #defineBGE_PHY_NO_WIRESPEED0x0001 #defineBGE_PHY_ADC_BUG 0x0002 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r241984 - head/sys/dev/bge
Author: yongari Date: Wed Oct 24 05:22:41 2012 New Revision: 241984 URL: http://svn.freebsd.org/changeset/base/241984 Log: Ethernet@WireSpeed is defined for 1000baseT adapter to establish a link at a lower speed so enabling it for fiber adapters is wrong. Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4) wouldn't enable the feature. While I'm here move PHY specific feature/bug configuration to new location(just before mii attach) for readability. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Wed Oct 24 05:00:56 2012(r241983) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:22:41 2012(r241984) @@ -3316,17 +3316,6 @@ bge_attach(device_t dev) } } - /* -* Don't enable Ethernet@WireSpeed for the 5700, 5906, or the -* 5705 A0 and A1 chips. -*/ - if (sc-bge_asicrev == BGE_ASICREV_BCM5700 || - (sc-bge_asicrev == BGE_ASICREV_BCM5705 - (sc-bge_chipid != BGE_CHIPID_BCM5705_A0 - sc-bge_chipid != BGE_CHIPID_BCM5705_A1)) || - sc-bge_asicrev == BGE_ASICREV_BCM5906) - sc-bge_phy_flags |= BGE_PHY_NO_WIRESPEED; - if (bge_has_eaddr(sc)) sc-bge_flags |= BGE_FLAG_EADDR; @@ -3411,38 +3400,6 @@ bge_attach(device_t dev) /* Add SYSCTLs, requires the chipset family to be set. */ bge_add_sysctls(sc); - /* Set various PHY bug flags. */ - if (sc-bge_chipid == BGE_CHIPID_BCM5701_A0 || - sc-bge_chipid == BGE_CHIPID_BCM5701_B0) - sc-bge_phy_flags |= BGE_PHY_CRC_BUG; - if (sc-bge_chiprev == BGE_CHIPREV_5703_AX || - sc-bge_chiprev == BGE_CHIPREV_5704_AX) - sc-bge_phy_flags |= BGE_PHY_ADC_BUG; - if (sc-bge_chipid == BGE_CHIPID_BCM5704_A0) - sc-bge_phy_flags |= BGE_PHY_5704_A0_BUG; - if (pci_get_subvendor(dev) == DELL_VENDORID) - sc-bge_phy_flags |= BGE_PHY_NO_3LED; - if ((BGE_IS_5705_PLUS(sc)) - sc-bge_asicrev != BGE_ASICREV_BCM5906 - sc-bge_asicrev != BGE_ASICREV_BCM5717 - sc-bge_asicrev != BGE_ASICREV_BCM5719 - sc-bge_asicrev != BGE_ASICREV_BCM5720 - sc-bge_asicrev != BGE_ASICREV_BCM5785 - sc-bge_asicrev != BGE_ASICREV_BCM57765 - sc-bge_asicrev != BGE_ASICREV_BCM57780) { - if (sc-bge_asicrev == BGE_ASICREV_BCM5755 || - sc-bge_asicrev == BGE_ASICREV_BCM5761 || - sc-bge_asicrev == BGE_ASICREV_BCM5784 || - sc-bge_asicrev == BGE_ASICREV_BCM5787) { - if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 - pci_get_device(dev) != BCOM_DEVICEID_BCM5756) - sc-bge_phy_flags |= BGE_PHY_JITTER_BUG; - if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M) - sc-bge_phy_flags |= BGE_PHY_ADJUST_TRIM; - } else - sc-bge_phy_flags |= BGE_PHY_BER_BUG; - } - /* Identify the chips that use an CPMU. */ if (BGE_IS_5717_PLUS(sc) || sc-bge_asicrev == BGE_ASICREV_BCM5784 || @@ -3760,12 +3717,56 @@ bge_attach(device_t dev) /* The SysKonnect SK-9D41 is a 1000baseSX card. */ if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) 16) == SK_SUBSYSID_9D41 || (hwcfg BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { - if (BGE_IS_5705_PLUS(sc)) + if (BGE_IS_5705_PLUS(sc)) { sc-bge_flags |= BGE_FLAG_MII_SERDES; - else + sc-bge_phy_flags |= BGE_PHY_NO_WIRESPEED; + } else sc-bge_flags |= BGE_FLAG_TBI; } + /* Set various PHY bug flags. */ + if (sc-bge_chipid == BGE_CHIPID_BCM5701_A0 || + sc-bge_chipid == BGE_CHIPID_BCM5701_B0) + sc-bge_phy_flags |= BGE_PHY_CRC_BUG; + if (sc-bge_chiprev == BGE_CHIPREV_5703_AX || + sc-bge_chiprev == BGE_CHIPREV_5704_AX) + sc-bge_phy_flags |= BGE_PHY_ADC_BUG; + if (sc-bge_chipid == BGE_CHIPID_BCM5704_A0) + sc-bge_phy_flags |= BGE_PHY_5704_A0_BUG; + if (pci_get_subvendor(dev) == DELL_VENDORID) + sc-bge_phy_flags |= BGE_PHY_NO_3LED; + if ((BGE_IS_5705_PLUS(sc)) + sc-bge_asicrev != BGE_ASICREV_BCM5906 + sc-bge_asicrev != BGE_ASICREV_BCM5717 + sc-bge_asicrev != BGE_ASICREV_BCM5719 + sc-bge_asicrev != BGE_ASICREV_BCM5720 + sc-bge_asicrev != BGE_ASICREV_BCM5785 + sc-bge_asicrev != BGE_ASICREV_BCM57765 + sc-bge_asicrev != BGE_ASICREV_BCM57780) { + if (sc-bge_asicrev == BGE_ASICREV_BCM5755 || + sc-bge_asicrev ==
svn commit: r241985 - head/sys/dev/bge
Author: yongari Date: Wed Oct 24 05:54:17 2012 New Revision: 241985 URL: http://svn.freebsd.org/changeset/base/241985 Log: For fast ethernet controllers, Ethernet@WireSpeed is not defined so explicitly set BGE_PHY_NO_WIRESPEED flag. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Wed Oct 24 05:22:41 2012(r241984) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:54:17 2012(r241985) @@ -3460,6 +3460,7 @@ bge_attach(device_t dev) sc-bge_asicrev == BGE_ASICREV_BCM5906) { /* These chips are 10/100 only. */ capmask = ~BMSR_EXTSTAT; + sc-bge_phy_flags |= BGE_PHY_NO_WIRESPEED; } /* @@ -3757,14 +3758,13 @@ bge_attach(device_t dev) } /* -* Don't enable Ethernet@WireSpeed for the 5700, 5906, or the +* Don't enable Ethernet@WireSpeed for the 5700 or the * 5705 A0 and A1 chips. */ if (sc-bge_asicrev == BGE_ASICREV_BCM5700 || (sc-bge_asicrev == BGE_ASICREV_BCM5705 (sc-bge_chipid != BGE_CHIPID_BCM5705_A0 - sc-bge_chipid != BGE_CHIPID_BCM5705_A1)) || - sc-bge_asicrev == BGE_ASICREV_BCM5906) + sc-bge_chipid != BGE_CHIPID_BCM5705_A1))) sc-bge_phy_flags |= BGE_PHY_NO_WIRESPEED; if (sc-bge_flags BGE_FLAG_TBI) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org