Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers
On 7 Aug 2013, at 21:56, Jilles Tjoelker jil...@stack.nl wrote: The code_model stuff is not for x32 support but for PIC/PIE code where code+data exceed 2GB so relative addressing cannot always be used. The ABI then prescribes that %r15 be loaded with the GOT pointer when invoking a large model (code2GB) PLT entry; otherwise (medium model or no PLT entry used), much like i386, any register can be used for the GOT pointer. Does our rtld provide support for this? We recently encountered a problem with the new LLVM JIT because FreeBSD's mmap() does not provide a way of requesting memory that is below the 2GB line and so we can't use the small code model. 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: r254091 - head/lib/libc/gen
Author: ache Date: Thu Aug 8 09:04:02 2013 New Revision: 254091 URL: http://svnweb.freebsd.org/changeset/base/254091 Log: According to POSIX \ in the fnmatch(3) pattern should escape any character including '\0', but our version replace escaped '\0' with '\\'. I.e. fnmatch(\\, \\, 0) should not match while fnmatch(\\, , 0) should (Linux and NetBSD does the same). Was vice versa. PR: 181129 MFC after: 1 week Modified: head/lib/libc/gen/fnmatch.c Modified: head/lib/libc/gen/fnmatch.c == --- head/lib/libc/gen/fnmatch.c Thu Aug 8 06:15:58 2013(r254090) +++ head/lib/libc/gen/fnmatch.c Thu Aug 8 09:04:02 2013(r254091) @@ -194,8 +194,6 @@ fnmatch1(pattern, string, stringstart, f patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); - if (pclen == 0) - pc = '\\'; pattern += pclen; } /* FALLTHROUGH */ ___ 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: r254082 - head/sys/net80211
On Thu, Aug 08, 2013 at 05:09:36AM +, Adrian Chadd wrote: A Author: adrian A Date: Thu Aug 8 05:09:35 2013 A New Revision: 254082 A URL: http://svnweb.freebsd.org/changeset/base/254082 A A Log: A Convert net80211 over to using if_transmit for the dispatch from the A upper layer(s). A A This eliminates the if_snd queue from net80211. Yay! A A This unfortunately has a few side effects: A A * It breaks ALTQ to net80211 for now - sorry everyone, but fixing A parallelism and eliminating the if_snd queue is more important A than supporting this broken traffic scheduling model. :-) A A * There's no VAP and IC flush methods just yet - I think I'll add A some NULL methods for now just as placeholders. A A * It reduces throughput a little because now net80211 will drop packets A rather than buffer them if the driver doesn't do its own buffering. A This will be addressed in the future as I implement per-node software A queues. Now access to IFF_DRV_OACTIVE bit isn't locked. Is this okay? Ideally drivers should be written in such way that they don't need to set and clear this flag at all. Is it still needed for net80211? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r254082 - head/sys/net80211
Hi, I'm going to eventually nuke OACTIVE. It just doesn't hold any meaning nowdays. Having OACTIVE serialised behind the iflock doesn't actuallly help as much as it used to - because there's multiple concurrent TX path entry points, it's very possible that OACTIVE will get set in one TXing thread during the _middle_ of the execution of another TX thread. That's why you need some kind of higher level serialisation or locking around the TX path to have it make any sense. -adrian ___ 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: r254025 - in head/sys: amd64/amd64 arm/arm arm/at91 arm/mv/armadaxp arm/s3c2xx0 arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 cddl/compat/opensolaris/kern cddl/compat/opensolar
On 07.08.2013 20:55, Jeff Roberson wrote: On Wed, 7 Aug 2013, Zbyszek Bodek wrote: On 07.08.2013 08:21, Jeff Roberson wrote: Author: jeff Date: Wed Aug 7 06:21:20 2013 New Revision: 254025 URL: http://svnweb.freebsd.org/changeset/base/254025 Log: Replace kernel virtual address space allocation with vmem. This provides transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by:alc Tested by:pho Sponsored by:EMC / Isilon Storage Division Hello Jeff, I'm having some trouble on my ARM platform staring from this commit. Kernel panics on assertion very early. Please check out log below (as you can see bt doesn't look helpful but assertion message is visible. I can send you which functions are in bt if it is necessary). It would be very helpful to know which function is passing the unaligned value. I will resolve this later today if you can get me that information. Thanks, Jeff Hello Jeff, I'm attaching the BT with functions names included. Please give me a notice when you need something more. Best regards Zbyszek Bodek ___ 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: r254092 - head/sys/boot/common
Author: ae Date: Thu Aug 8 11:24:25 2013 New Revision: 254092 URL: http://svnweb.freebsd.org/changeset/base/254092 Log: Make the check for number of entries less strict. Some partitioning tools can create GPT with number of entries less than 128. MFC after:1 week Modified: head/sys/boot/common/part.c Modified: head/sys/boot/common/part.c == --- head/sys/boot/common/part.c Thu Aug 8 09:04:02 2013(r254091) +++ head/sys/boot/common/part.c Thu Aug 8 11:24:25 2013(r254092) @@ -181,7 +181,7 @@ gpt_checkhdr(struct gpt_hdr *hdr, uint64 } hdr-hdr_entries = le32toh(hdr-hdr_entries); hdr-hdr_entsz = le32toh(hdr-hdr_entsz); - if (hdr-hdr_entries 128 || + if (hdr-hdr_entries == 0 || hdr-hdr_entsz sizeof(struct gpt_ent) || sectorsize % hdr-hdr_entsz != 0) { DEBUG(invalid entry size or number of entries); @@ -203,11 +203,14 @@ gpt_checktbl(const struct gpt_hdr *hdr, int i, cnt; cnt = size / hdr-hdr_entsz; - /* Check CRC only when buffer size is enough for table. */ - if (hdr-hdr_entries = cnt - crc32(tbl, size) != hdr-hdr_crc_table) { - DEBUG(GPT table's CRC doesn't match); - return (-1); + if (hdr-hdr_entries = cnt) { + cnt = hdr-hdr_entries; + /* Check CRC only when buffer size is enough for table. */ + if (hdr-hdr_crc_table != + crc32(tbl, hdr-hdr_entries * hdr-hdr_entsz)) { + DEBUG(GPT table's CRC doesn't match); + return (-1); + } } ent = (struct gpt_ent *)tbl; for (i = 0; i cnt; i++, ent++) { ___ 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: r254093 - head/gnu/usr.bin/grep
Author: ache Date: Thu Aug 8 11:53:47 2013 New Revision: 254093 URL: http://svnweb.freebsd.org/changeset/base/254093 Log: Part of r245761 makes grep -D skip broken for pipes, i.e. echo xxx | grep -D skip xxx returns nothing. Instead of just removing added S_ISFIFO condition (originally absent in this version of grep), make it work as latest GNU version does: don't skip directories and devices if fd == STDIN_FILENO. Modified: head/gnu/usr.bin/grep/grep.c Modified: head/gnu/usr.bin/grep/grep.c == --- head/gnu/usr.bin/grep/grep.cThu Aug 8 11:24:25 2013 (r254092) +++ head/gnu/usr.bin/grep/grep.cThu Aug 8 11:53:47 2013 (r254093) @@ -301,14 +301,16 @@ reset (int fd, char const *file, struct error (0, errno, fstat); return 0; } - if (directories == SKIP_DIRECTORIES S_ISDIR (stats-stat.st_mode)) -return 0; + if (fd != STDIN_FILENO) { +if (directories == SKIP_DIRECTORIES S_ISDIR (stats-stat.st_mode)) + return 0; #ifndef DJGPP - if (devices == SKIP_DEVICES (S_ISCHR(stats-stat.st_mode) || S_ISBLK(stats-stat.st_mode) || S_ISSOCK(stats-stat.st_mode) || S_ISFIFO(stats-stat.st_mode))) +if (devices == SKIP_DEVICES (S_ISCHR(stats-stat.st_mode) || S_ISBLK(stats-stat.st_mode) || S_ISSOCK(stats-stat.st_mode) || S_ISFIFO(stats-stat.st_mode))) #else - if (devices == SKIP_DEVICES (S_ISCHR(stats-stat.st_mode) || S_ISBLK(stats-stat.st_mode))) +if (devices == SKIP_DEVICES (S_ISCHR(stats-stat.st_mode) || S_ISBLK(stats-stat.st_mode))) #endif -return 0; + return 0; + } if ( BZflag || #if HAVE_LIBZ 0 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r254094 - head/sys/conf
Author: gjb Date: Thu Aug 8 15:59:00 2013 New Revision: 254094 URL: http://svnweb.freebsd.org/changeset/base/254094 Log: When newvers.sh is run, it is possible that the svnversion (or svnliteversion) in the current lookup path is not what was used to check out the tree. If an incompatible version is used, the svn revision number is not reported in uname(1). Run ${svnversion} on newvers.sh itself when evaluating if the svn(1) in use is compatible with the tree. Fallback to an empty ${svnversion} if necessary. With this change, svnliteversion from base is only used if no compatible svnversion is found, so with this change, the version of svn(1) from the ports tree is evaluated first. Requested by: many MFC after:3 days X-MFC-To: stable/9, releng/9.2 only Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shThu Aug 8 11:53:47 2013(r254093) +++ head/sys/conf/newvers.shThu Aug 8 15:59:00 2013(r254094) @@ -88,19 +88,31 @@ v=`cat version` u=${USER:-root} d=`pwd` i=`${MAKE:-make} -V KERN_IDENT` compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep 'version') -if [ -x /usr/bin/svnliteversion ] ; then - svnversion=/usr/bin/svnliteversion -fi - for dir in /usr/bin /usr/local/bin; do if [ ! -z ${svnversion} ] ; then break fi if [ -x ${dir}/svnversion ] [ -z ${svnversion} ] ; then - svnversion=${dir}/svnversion - break + # Run svnversion from ${dir} on this script; if return code + # is not zero, the checkout might not be compatible with the + # svnversion being used. + ${dir}/svnversion $(basename ${0}) /dev/null 21 + if [ $? -eq 0 ]; then + svnversion=${dir}/svnversion + break + fi fi done + +if [ -z ${svnversion} ] [ -x /usr/bin/svnliteversion ] ; then + /usr/bin/svnversion $(basename ${0}) /dev/null 21 + if [ $? -eq 0 ]; then + svnversion=/usr/bin/svnliteversion + else + svnversion= + fi +fi + for dir in /usr/bin /usr/local/bin; do if [ -x ${dir}/p4 ] [ -z ${p4_cmd} ] ; then p4_cmd=${dir}/p4 ___ 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: r254094 - head/sys/conf
On Thursday, August 08, 2013 11:59:01 am Glen Barber wrote: Author: gjb Date: Thu Aug 8 15:59:00 2013 New Revision: 254094 URL: http://svnweb.freebsd.org/changeset/base/254094 Log: When newvers.sh is run, it is possible that the svnversion (or svnliteversion) in the current lookup path is not what was used to check out the tree. If an incompatible version is used, the svn revision number is not reported in uname(1). Run ${svnversion} on newvers.sh itself when evaluating if the svn(1) in use is compatible with the tree. Fallback to an empty ${svnversion} if necessary. With this change, svnliteversion from base is only used if no compatible svnversion is found, so with this change, the version of svn(1) from the ports tree is evaluated first. Requested by: many MFC after: 3 days X-MFC-To: stable/9, releng/9.2 only Thanks! -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r254095 - head/sys/geom/part
Author: ae Date: Thu Aug 8 16:09:20 2013 New Revision: 254095 URL: http://svnweb.freebsd.org/changeset/base/254095 Log: gpt_entries is used as limit for the number of partition entries in the GEOM_PART. Instead of just using number of entries from the GPT header, calculate this limit based on the reserved space between GPT header and first available LBA. MFC after:2 weeks Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c == --- head/sys/geom/part/g_part_gpt.c Thu Aug 8 15:59:00 2013 (r254094) +++ head/sys/geom/part/g_part_gpt.c Thu Aug 8 16:09:20 2013 (r254095) @@ -916,9 +916,10 @@ g_part_gpt_read(struct g_part_table *bas basetable-gpt_first = table-hdr-hdr_lba_start; basetable-gpt_last = table-hdr-hdr_lba_end; - basetable-gpt_entries = table-hdr-hdr_entries; + basetable-gpt_entries = (table-hdr-hdr_lba_start - 2) * + pp-sectorsize / table-hdr-hdr_entsz; - for (index = basetable-gpt_entries - 1; index = 0; index--) { + for (index = table-hdr-hdr_entries - 1; index = 0; index--) { if (EQUUID(tbl[index].ent_type, gpt_uuid_unused)) continue; entry = (struct g_part_gpt_entry *)g_part_new_entry( ___ 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: r253680 - in head: lib/libfetch usr.bin/fetch
On Fri, 2013-07-26 at 15:53:43 +, Dag-Erling SmÞrgrav wrote: Modified: head/lib/libfetch/common.c == --- head/lib/libfetch/common.cFri Jul 26 14:43:38 2013 (r253679) +++ head/lib/libfetch/common.cFri Jul 26 15:53:43 2013 (r253680) +static struct addrinfo * +fetch_ssl_get_numeric_addrinfo(const char *hostname, size_t len) +{ + struct addrinfo hints, *res; + char *host; + + host = (char *)malloc(len + 1); + memcpy(host, hostname, len); + host[len] = '\0'; + memset(hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + hints.ai_flags = AI_NUMERICHOST; + /* port is not relevant for this purpose */ + getaddrinfo(host, 443, hints, res); We check the return value for getaddrinfo() 210 out of 217 times in our tree, please check it here too. Thanks! CID 1061016 +static int +fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) +{ + X509_LOOKUP *crl_lookup; + X509_STORE *crl_store; + const char *ca_cert_file, *ca_cert_path, *crl_file; + + if (getenv(SSL_NO_VERIFY_PEER) == NULL) { + ca_cert_file = getenv(SSL_CA_CERT_FILE) != NULL ? + getenv(SSL_CA_CERT_FILE) : /etc/ssl/cert.pem; + ca_cert_path = getenv(SSL_CA_CERT_PATH); + if (verbose) { + fetch_info(Peer verification enabled); + if (ca_cert_file != NULL) + fetch_info(Using CA cert file: %s, + ca_cert_file); + if (ca_cert_path != NULL) + fetch_info(Using CA cert path: %s, + ca_cert_path); + } + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, + fetch_ssl_cb_verify_crt); The return value is unchecked here. Coverity claims we check it 4 out of 5 times in our tree, please fix this one too. CID 1061015 Cheers, Uli ___ 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: r254094 - head/sys/conf
Glen Barber g...@freebsd.org wrote in 201308081559.r78fx1h6034...@svn.freebsd.org: gj Author: gjb gj Date: Thu Aug 8 15:59:00 2013 gj New Revision: 254094 gj URL: http://svnweb.freebsd.org/changeset/base/254094 gj gj Log: gj When newvers.sh is run, it is possible that the svnversion gj (or svnliteversion) in the current lookup path is not what gj was used to check out the tree. If an incompatible version gj is used, the svn revision number is not reported in uname(1). gj gj Run ${svnversion} on newvers.sh itself when evaluating if the gj svn(1) in use is compatible with the tree. Fallback to an gj empty ${svnversion} if necessary. gj gj With this change, svnliteversion from base is only used gj if no compatible svnversion is found, so with this change, gj the version of svn(1) from the ports tree is evaluated first. gj gj Requested by: many gj MFC after:3 days gj X-MFC-To: stable/9, releng/9.2 only gj gj Modified: gj head/sys/conf/newvers.sh gj gj Modified: head/sys/conf/newvers.sh gj == gj --- head/sys/conf/newvers.shThu Aug 8 11:53:47 2013 (r254093) gj +++ head/sys/conf/newvers.shThu Aug 8 15:59:00 2013 (r254094) gj @@ -88,19 +88,31 @@ v=`cat version` u=${USER:-root} d=`pwd` gj i=`${MAKE:-make} -V KERN_IDENT` gj compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep 'version') gj gj -if [ -x /usr/bin/svnliteversion ] ; then gj - svnversion=/usr/bin/svnliteversion gj -fi gj - gj for dir in /usr/bin /usr/local/bin; do gj if [ ! -z ${svnversion} ] ; then gj break gj fi gj if [ -x ${dir}/svnversion ] [ -z ${svnversion} ] ; then gj - svnversion=${dir}/svnversion gj - break gj + # Run svnversion from ${dir} on this script; if return code gj + # is not zero, the checkout might not be compatible with the gj + # svnversion being used. gj + ${dir}/svnversion $(basename ${0}) /dev/null 21 gj + if [ $? -eq 0 ]; then gj + svnversion=${dir}/svnversion gj + break gj + fi gj fi gj done gj + gj +if [ -z ${svnversion} ] [ -x /usr/bin/svnliteversion ] ; then gj + /usr/bin/svnversion $(basename ${0}) /dev/null 21 gj + if [ $? -eq 0 ]; then gj + svnversion=/usr/bin/svnliteversion gj + else gj + svnversion= gj + fi gj +fi gj + I think this logic is unnecessarily complex. svnversion does not need to run twice, at least. How about the attached patch? -- Hiroki Index: sys/conf/newvers.sh === --- sys/conf/newvers.sh (revision 254095) +++ sys/conf/newvers.sh (working copy) @@ -88,31 +88,20 @@ i=`${MAKE:-make} -V KERN_IDENT` compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep 'version') -for dir in /usr/bin /usr/local/bin; do - if [ ! -z ${svnversion} ] ; then - break +for bin in $svnversion /usr/bin/svnversion /usr/local/bin/svnversion \ +/usr/bin/svnliteversion; do + if svn=$($bin ${SYSDIR} 2/dev/null); then + case $svn in + [0-9]*) svn= r${svn}; break ;; + esac + else + # If return code is not zero, the binary is not found or + # the checkout might not be compatible with the svnversion + # being used. + unset svn fi - if [ -x ${dir}/svnversion ] [ -z ${svnversion} ] ; then - # Run svnversion from ${dir} on this script; if return code - # is not zero, the checkout might not be compatible with the - # svnversion being used. - ${dir}/svnversion $(basename ${0}) /dev/null 21 - if [ $? -eq 0 ]; then - svnversion=${dir}/svnversion - break - fi - fi done -if [ -z ${svnversion} ] [ -x /usr/bin/svnliteversion ] ; then - /usr/bin/svnversion $(basename ${0}) /dev/null 21 - if [ $? -eq 0 ]; then - svnversion=/usr/bin/svnliteversion - else - svnversion= - fi -fi - for dir in /usr/bin /usr/local/bin; do if [ -x ${dir}/p4 ] [ -z ${p4_cmd} ] ; then p4_cmd=${dir}/p4 @@ -127,14 +116,6 @@ done fi -if [ -n $svnversion ] ; then - svn=`cd ${SYSDIR} $svnversion 2/dev/null` - case $svn in - [0-9]*) svn= r${svn} ;; - *) unset svn ;; - esac -fi - if [ -n $git_cmd ] ; then git=`$git_cmd rev-parse --verify --short HEAD 2/dev/null` svn=`$git_cmd svn find-rev $git 2/dev/null` pgptleE__drzg.pgp Description: PGP signature
Re: svn commit: r254094 - head/sys/conf
On Fri, Aug 09, 2013 at 02:01:53AM +0900, Hiroki Sato wrote: I think this logic is unnecessarily complex. svnversion does not need to run twice, at least. svnversion is only invoked the first time on the newvers.sh file, so the impact is minimal. How about the attached patch? I have no objection. Glen pgpe8R50z0Y_c.pgp Description: PGP signature
svn commit: r254100 - head/sys/kern
Author: rstone Date: Thu Aug 8 19:30:49 2013 New Revision: 254100 URL: http://svnweb.freebsd.org/changeset/base/254100 Log: Allow drivers to return BUS_PROBE_NOWILDCARD from their attach routine to match devices where the driver class was fixed but the unit number was wildcarded. This better matches the documented behaviour in DEVICE_PROBE(9). Reviewed by: imp Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cThu Aug 8 18:40:19 2013(r254099) +++ head/sys/kern/subr_bus.cThu Aug 8 19:30:49 2013(r254100) @@ -2077,11 +2077,11 @@ device_probe_child(device_t dev, device_ if (best == NULL || result pri) { /* * Probes that return BUS_PROBE_NOWILDCARD -* or lower only match when they are set -* in stone by the parent bus. +* or lower only match on devices whose +* driver was explicitly specified. */ if (result = BUS_PROBE_NOWILDCARD - child-flags DF_WILDCARD) + !(child-flags DF_FIXEDCLASS)) continue; best = dl; pri = result; ___ 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: r253680 - in head: lib/libfetch usr.bin/fetch
On Thu, 8 Aug 2013, Ulrich [utf-8] Sp??rlein wrote: On Fri, 2013-07-26 at 15:53:43 +, Dag-Erling Smrgrav wrote: Modified: head/lib/libfetch/common.c == --- head/lib/libfetch/common.c Fri Jul 26 14:43:38 2013(r253679) +++ head/lib/libfetch/common.c Fri Jul 26 15:53:43 2013(r253680) +static struct addrinfo * +fetch_ssl_get_numeric_addrinfo(const char *hostname, size_t len) +{ + struct addrinfo hints, *res; + char *host; + + host = (char *)malloc(len + 1); + memcpy(host, hostname, len); + host[len] = '\0'; + memset(hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + hints.ai_flags = AI_NUMERICHOST; + /* port is not relevant for this purpose */ + getaddrinfo(host, 443, hints, res); We check the return value for getaddrinfo() 210 out of 217 times in our tree, please check it here too. Thanks! CID 1061016 We sometimes check the return value of malloc() too. Though checking is usually just a waste of space and time, libraries should do it. Style bugs in the above include: - 'hostname' shadows a global function name - bogus cast of malloc(). Old code in this file doesn't cast malloc(). - we labouriously use a home made strdup() since the string length is an arg. But len must be strlen(hostname) for the home made strdup() to work. - hints.ai_protocol is initialized twice - the comment is neither capitalized nor terminated with a .. Old code in this file has mixed style bugs in comments, and uses the same style bugs often but not always. 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: r254105 - head/sys/boot/forth
Author: dteske Date: Thu Aug 8 22:09:46 2013 New Revision: 254105 URL: http://svnweb.freebsd.org/changeset/base/254105 Log: Since the introduction of SVN r244048 and [follow-up] r244089, it is now safe to build upon ``boot_serial?'' functionality to make safer UI choices. Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/color.4th head/sys/boot/forth/color.4th.8 head/sys/boot/forth/loader.conf.5 head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.4th.8 head/sys/boot/forth/menu.rc head/sys/boot/forth/version.4th.8 Modified: head/sys/boot/forth/beastie.4th == --- head/sys/boot/forth/beastie.4th Thu Aug 8 22:07:59 2013 (r254104) +++ head/sys/boot/forth/beastie.4th Thu Aug 8 22:09:46 2013 (r254105) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long sco...@freebsd.org \ Copyright (c) 2003 Aleksander Fafula a...@fafula.com -\ Copyright (c) 2006-2011 Devin Teske dte...@freebsd.org +\ Copyright (c) 2006-2013 Devin Teske dte...@freebsd.org \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -181,8 +181,8 @@ variable logoY \ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) \ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) \ fbsdbw FreeBSD logo in B/W (13 rows x 21 columns) -\ orb Color ``Orb'' mascot (15 rows x 30 columns) -\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) (default) +\ orb Color ``Orb'' mascot (15 rows x 30 columns) (default) +\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) \ \ NOTE: Setting `loader_logo' to an undefined value (such as none) will \ prevent beastie from being drawn. Modified: head/sys/boot/forth/color.4th == --- head/sys/boot/forth/color.4th Thu Aug 8 22:07:59 2013 (r254104) +++ head/sys/boot/forth/color.4th Thu Aug 8 22:09:46 2013 (r254105) @@ -1,4 +1,4 @@ -\ Copyright (c) 2011 Devin Teske dte...@freebsd.org +\ Copyright (c) 2011-2013 Devin Teske dte...@freebsd.org \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -26,23 +26,24 @@ marker task-color.4th -\ This function returns TRUE if the `loader_color' environment variable is set -\ to YES, yes, or 1. Otherwise, FALSE is returned. +\ This function returns FALSE if the `loader_color' environment variable is set +\ to NO, no, or 0. Otherwise, TRUE is returned (unless booting serial). \ : loader_color? ( -- N ) s loader_color getenv dup -1 if - 2dup s YES compare-insensitive 0= if + 2dup s NO compare-insensitive 0= if 2drop - TRUE exit + FALSE exit then - 2dup s 1 compare 0= if + 2dup s 0 compare 0= if 2drop - TRUE exit + FALSE exit then drop then + drop - drop FALSE exit + boot_serial? if FALSE else TRUE then ; Modified: head/sys/boot/forth/color.4th.8 == --- head/sys/boot/forth/color.4th.8 Thu Aug 8 22:07:59 2013 (r254104) +++ head/sys/boot/forth/color.4th.8 Thu Aug 8 22:09:46 2013 (r254105) @@ -1,4 +1,4 @@ -.\ Copyright (c) 2011 Devin Teske +.\ Copyright (c) 2011-2013 Devin Teske .\ All rights reserved. .\ .\ Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd May 18, 2011 +.Dd August 6, 2013 .Dt COLOR.4TH 8 .Os .Sh NAME @@ -57,26 +57,26 @@ The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic loader_color? -Returns TRUE if the +Returns FALSE if the .Ic loader_color environment variable is set to -.Dq YES +.Dq NO (case-insensitive) or -.Dq 1 . -Otherwise returns FALSE. +.Dq 0 . +Otherwise returns TRUE +.Pq unless booting serial . .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va loader_color If set to -.Dq YES +.Dq NO (case-insensitive) or -.Dq 1 , +.Dq 0 , causes .Ic loader_color? -to return TRUE, indicating to many other modules that color should be used -whenever/wherever possible. +to return FALSE, indicating to many modules that color should not be used. .El .Sh FILES .Bl -tag -width /boot/loader.4th -compact Modified: head/sys/boot/forth/loader.conf.5 == --- head/sys/boot/forth/loader.conf.5 Thu Aug 8 22:07:59 2013 (r254104) +++ head/sys/boot/forth/loader.conf.5 Thu Aug 8 22:09:46 2013 (r254105)
svn commit: r254108 - head/sys/boot/forth
Author: dteske Date: Thu Aug 8 22:34:00 2013 New Revision: 254108 URL: http://svnweb.freebsd.org/changeset/base/254108 Log: Update legacy static assignments in old code to support dynamic framing, plotting, and alignment coinciding with enhancements in SVN r242667. Modified: head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.4th.8 Modified: head/sys/boot/forth/menu.4th == --- head/sys/boot/forth/menu.4thThu Aug 8 22:29:35 2013 (r254107) +++ head/sys/boot/forth/menu.4thThu Aug 8 22:34:00 2013 (r254108) @@ -35,6 +35,8 @@ f_double\ Set frames to double ( \ f_single if you want single frames. 46 constant dot \ ASCII definition of a period (in decimal) + 5 constant menu_default_x \ default column position of timeout +10 constant menu_default_y \ default row position of timeout msg 4 constant menu_timeout_default_x \ default column position of timeout 23 constant menu_timeout_default_y \ default row position of timeout msg 10 constant menu_timeout_default \ default timeout (in seconds) @@ -128,15 +130,19 @@ create init_text8 255 allot : cycle_stateN ( N -- ADDR ) s cycle_stateN 11 +c! evaluate ; : init_textN( N -- C-ADDR ) s init_textN 9 +c! evaluate ; -: str_loader_menu_title ( -- C-ADDR/U ) s loader_menu_title ; -: str_loader_menu_timeout_x ( -- C-ADDR/U ) s loader_menu_timeout_x ; -: str_loader_menu_timeout_y ( -- C-ADDR/U ) s loader_menu_timeout_y ; -: str_menu_init ( -- C-ADDR/U ) s menu_init ; -: str_menu_timeout_command ( -- C-ADDR/U ) s menu_timeout_command ; -: str_menu_reboot ( -- C-ADDR/U ) s menu_reboot ; -: str_menu_acpi ( -- C-ADDR/U ) s menu_acpi ; -: str_menu_options ( -- C-ADDR/U ) s menu_options ; -: str_menu_optionstext ( -- C-ADDR/U ) s menu_optionstext ; +: str_loader_menu_frame ( -- C-ADDR/U ) s loader_menu_frame ; +: str_loader_menu_title ( -- C-ADDR/U ) s loader_menu_title ; +: str_loader_menu_title_align ( -- C-ADDR/U ) s loader_menu_title_align ; +: str_loader_menu_x ( -- C-ADDR/U ) s loader_menu_x ; +: str_loader_menu_y ( -- C-ADDR/U ) s loader_menu_y ; +: str_loader_menu_timeout_x ( -- C-ADDR/U ) s loader_menu_timeout_x ; +: str_loader_menu_timeout_y ( -- C-ADDR/U ) s loader_menu_timeout_y ; +: str_menu_init ( -- C-ADDR/U ) s menu_init ; +: str_menu_timeout_command( -- C-ADDR/U ) s menu_timeout_command ; +: str_menu_reboot ( -- C-ADDR/U ) s menu_reboot ; +: str_menu_acpi ( -- C-ADDR/U ) s menu_acpi ; +: str_menu_options( -- C-ADDR/U ) s menu_options ; +: str_menu_optionstext( -- C-ADDR/U ) s menu_optionstext ; : str_menu_init[x] ( -- C-ADDR/U ) s menu_init[x] ; : str_menu_command[x] ( -- C-ADDR/U ) s menu_command[x] ; @@ -441,7 +447,24 @@ create init_text8 255 allot str_loader_menu_title getenv dup -1 = if drop s Welcome to FreeBSD then - 24 over 2 / - 9 at-xy type + TRUE ( use default alignment ) + str_loader_menu_title_align getenv dup -1 if + 2dup s left compare-insensitive 0= if ( 1 ) + 2drop ( c-addr/u ) drop ( bool ) + menuX @ menuY @ 1- + FALSE ( don't use default alignment ) + else ( 1 ) 2dup s right compare-insensitive 0= if ( 2 ) + 2drop ( c-addr/u ) drop ( bool ) + menuX @ 42 + 4 - over - menuY @ 1- + FALSE ( don't use default alignment ) + else ( 2 ) 2drop ( c-addr/u ) then ( 1 ) then + else + drop ( getenv cruft ) + then + if ( use default center alignement? ) + menuX @ 19 + over 2 / - menuY @ 1- + then + at-xy type \ If $menu_init is set, evaluate it (allowing for whole menus to be \ constructed dynamically -- as this function could conceivably set @@ -733,8 +756,45 @@ create init_text8 255 allot menu_start 1- menuidx !\ Initialize the starting index for the menu 0 menurow ! \ Initialize the starting position for the menu - 42 13 2 9 box \ Draw frame (w,h,x,y) - 0 25 at-xy \ Move cursor to the bottom for output + + \ Assign configuration values + str_loader_menu_y getenv dup -1 = if + drop \ no custom row position + menu_default_y + else + \ make sure custom position is a number + ?number 0= if + menu_default_y \ or use default + then + then + menuY ! + str_loader_menu_x getenv dup -1 = if + drop \ no custom column position + menu_default_x + else + \ make sure custom position is a number +
svn commit: r254112 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys sys/cddl/contrib/opensolaris/uts/...
Author: delphij Date: Thu Aug 8 23:38:31 2013 New Revision: 254112 URL: http://svnweb.freebsd.org/changeset/base/254112 Log: MFV r254079: Illumos ZFS issues: 3957 ztest should update the cachefile before killing itself 3958 multiple scans can lead to partial resilvering 3959 ddt entries are not always resilvered 3960 dsl_scan can skip over dedup-ed blocks if physical birth != logical birth 3961 freed gang blocks are not resilvered and can cause pool to suspend 3962 ztest should print out zfs debug buffer before exiting Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c == --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 8 23:24:36 2013(r254111) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 8 23:38:31 2013(r254112) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska m...@freebsd.org. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -769,6 +769,16 @@ ztest_kill(ztest_shared_t *zs) { zs-zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); zs-zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); + + /* +* Before we kill off ztest, make sure that the config is updated. +* See comment above spa_config_sync(). +*/ + mutex_enter(spa_namespace_lock); + spa_config_sync(ztest_spa, B_FALSE, B_FALSE); + mutex_exit(spa_namespace_lock); + + zfs_dbgmsg_print(FTAG); (void) kill(getpid(), SIGKILL); } @@ -2733,7 +2743,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t leaf, top; uint64_t ashift = ztest_get_ashift(); uint64_t oldguid, pguid; - size_t oldsize, newsize; + uint64_t oldsize, newsize; char oldpath[MAXPATHLEN], newpath[MAXPATHLEN]; int replacing; int oldvd_has_siblings = B_FALSE; @@ -2892,8 +2902,8 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, if (error != expected_error expected_error != EBUSY) { fatal(0, attach (%s %llu, %s %llu, %d) returned %d, expected %d, - oldpath, (longlong_t)oldsize, newpath, - (longlong_t)newsize, replacing, error, expected_error); + oldpath, oldsize, newpath, + newsize, replacing, error, expected_error); } VERIFY(mutex_unlock(ztest_vdev_lock) == 0); @@ -4803,7 +4813,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint6 */ if (vd0 != NULL maxfaults != 1 (!vdev_resilver_needed(vd0-vdev_top, NULL, NULL) || - vd0-vdev_resilvering)) { + vd0-vdev_resilver_txg != 0)) { /* * Make vd0 explicitly claim to be unreadable, * or unwriteable, or reach behind its back @@ -5654,6 +5664,7 @@ ztest_run(ztest_shared_t *zs) zs-zs_alloc = metaslab_class_get_alloc(spa_normal_class(spa)); zs-zs_space = metaslab_class_get_space(spa_normal_class(spa)); + zfs_dbgmsg_print(FTAG); umem_free(tid, ztest_opts.zo_threads * sizeof (thread_t)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Aug 8 23:24:36 2013(r254111) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Aug 8 23:38:31 2013(r254112) @@ -224,6 +224,7 @@ dsl_scan_setup_sync(void *arg, dmu_tx_t scn-scn_phys.scn_errors = 0; scn-scn_phys.scn_to_examine = spa-spa_root_vdev-vdev_stat.vs_alloc; scn-scn_restart_txg = 0; +
svn commit: r254115 - head/sys/kern
Author: scottl Date: Fri Aug 9 01:04:44 2013 New Revision: 254115 URL: http://svnweb.freebsd.org/changeset/base/254115 Log: Add a helpful message that can help point to why a sysctl tree removal failed Obtained from:Netflix MFC after:3 days Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Fri Aug 9 00:39:20 2013(r254114) +++ head/sys/kern/kern_sysctl.c Fri Aug 9 01:04:44 2013(r254115) @@ -412,8 +412,12 @@ sysctl_remove_oid_locked(struct sysctl_o if (oidp-oid_refcnt == 1) { SLIST_FOREACH_SAFE(p, SYSCTL_CHILDREN(oidp), oid_link, tmp) { - if (!recurse) + if (!recurse) { + printf(Warning: failed attempt to + remove oid %s with child %s\n, + oidp-oid_name, p-oid_name); return (ENOTEMPTY); + } error = sysctl_remove_oid_locked(p, del, recurse); if (error) ___ 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: r254116 - head/sys/dev/mps
Author: scottl Date: Fri Aug 9 01:09:02 2013 New Revision: 254116 URL: http://svnweb.freebsd.org/changeset/base/254116 Log: Sometimes a device misbehaves so badly that it disrupts the entire system. Add a tunable that allows such a device to be excluded from the driver. The id parameter is the target id that the driver assigns to a given device. dev.mps.X.exclude_ids=id,id Obtained from:Netflix MFC after:3 days Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas.h head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mps.c == --- head/sys/dev/mps/mps.c Fri Aug 9 01:04:44 2013(r254115) +++ head/sys/dev/mps/mps.c Fri Aug 9 01:09:02 2013(r254116) @@ -1371,6 +1371,11 @@ mps_get_tunables(struct mps_softc *sc) snprintf(tmpstr, sizeof(tmpstr), dev.mps.%d.max_chains, device_get_unit(sc-mps_dev)); TUNABLE_INT_FETCH(tmpstr, sc-max_chains); + + bzero(sc-exclude_ids, sizeof(sc-exclude_ids)); + snprintf(tmpstr, sizeof(tmpstr), dev.mps.%d.exclude_ids, + device_get_unit(sc-mps_dev)); + TUNABLE_STR_FETCH(tmpstr, sc-exclude_ids, sizeof(sc-exclude_ids)); } static void Modified: head/sys/dev/mps/mps_sas.c == --- head/sys/dev/mps/mps_sas.c Fri Aug 9 01:04:44 2013(r254115) +++ head/sys/dev/mps/mps_sas.c Fri Aug 9 01:09:02 2013(r254116) @@ -3553,3 +3553,20 @@ mpssas_portenable_complete(struct mps_so xpt_release_simq(sassc-sim, 1); } +int +mpssas_check_id(struct mpssas_softc *sassc, int id) +{ + struct mps_softc *sc = sassc-sc; + char *ids; + char *name; + + ids = sc-exclude_ids[0]; + while((name = strsep(ids, ,)) != NULL) { + if (name[0] == '\0') + continue; + if (strtol(name, NULL, 0) == (long)id) + return (1); + } + + return (0); +} Modified: head/sys/dev/mps/mps_sas.h == --- head/sys/dev/mps/mps_sas.h Fri Aug 9 01:04:44 2013(r254115) +++ head/sys/dev/mps/mps_sas.h Fri Aug 9 01:09:02 2013(r254116) @@ -158,3 +158,4 @@ void mpssas_startup_decrement(struct mps struct mps_command * mpssas_alloc_tm(struct mps_softc *sc); void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm); void mpssas_firmware_event_work(void *arg, int pending); +int mpssas_check_id(struct mpssas_softc *sassc, int id); Modified: head/sys/dev/mps/mps_sas_lsi.c == --- head/sys/dev/mps/mps_sas_lsi.c Fri Aug 9 01:04:44 2013 (r254115) +++ head/sys/dev/mps/mps_sas_lsi.c Fri Aug 9 01:09:02 2013 (r254116) @@ -669,6 +669,13 @@ mpssas_add_device(struct mps_softc *sc, error = ENXIO; goto out; } + + if (mpssas_check_id(sassc, id) != 0) { + device_printf(sc-mps_dev, Excluding target id %d\n, id); + error = ENXIO; + goto out; + } + mps_dprint(sc, MPS_MAPPING, SAS Address from SAS device page0 = %jx\n, sas_address); targ = sassc-targets[id]; Modified: head/sys/dev/mps/mpsvar.h == --- head/sys/dev/mps/mpsvar.h Fri Aug 9 01:04:44 2013(r254115) +++ head/sys/dev/mps/mpsvar.h Fri Aug 9 01:09:02 2013(r254116) @@ -414,6 +414,8 @@ struct mps_softc { uint16_tDD_block_exponent; uint64_tDD_max_lba; struct mps_column_map DD_column_map[MPS_MAX_DISKS_IN_VOL]; + + charexclude_ids[80]; }; struct mps_config_params { ___ 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: r254117 - head/sys/dev/mps
Author: scottl Date: Fri Aug 9 01:10:33 2013 New Revision: 254117 URL: http://svnweb.freebsd.org/changeset/base/254117 Log: Rate limit the 'out of chain frame' messages to once per 60 seconds. Obtained from:Netflix MFC after:3 days Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mps.c == --- head/sys/dev/mps/mps.c Fri Aug 9 01:09:02 2013(r254116) +++ head/sys/dev/mps/mps.c Fri Aug 9 01:10:33 2013(r254117) @@ -123,6 +123,9 @@ typedef union _reply_descriptor { } u; }reply_descriptor,address_descriptor; +/* Rate limit chain-fail messages to 1 per minute */ +static struct timeval mps_chainfail_interval = { 60, 0 }; + /* * sleep_flag can be either CAN_SLEEP or NO_SLEEP. * If this function is called from process context, it can sleep @@ -1467,6 +1470,7 @@ mps_attach(struct mps_softc *sc) mtx_init(sc-mps_mtx, MPT2SAS lock, NULL, MTX_DEF); callout_init_mtx(sc-periodic, sc-mps_mtx, 0); TAILQ_INIT(sc-event_list); + timevalclear(sc-lastfail); if ((error = mps_transition_ready(sc)) != 0) { mps_printf(sc, %s failed to transition ready\n, __func__); @@ -2413,8 +2417,9 @@ mps_data_cb(void *arg, bus_dma_segment_t sflags, nsegs - i); if (error != 0) { /* Resource shortage, roll back! */ - mps_dprint(sc, MPS_INFO, Out of chain frames, - consider increasing hw.mps.max_chains.\n); + if (ratecheck(sc-lastfail, mps_chainfail_interval)) + mps_dprint(sc, MPS_INFO, Out of chain frames, + consider increasing hw.mps.max_chains.\n); cm-cm_flags |= MPS_CM_FLAGS_CHAIN_FAILED; mps_complete_command(sc, cm); return; Modified: head/sys/dev/mps/mpsvar.h == --- head/sys/dev/mps/mpsvar.h Fri Aug 9 01:09:02 2013(r254116) +++ head/sys/dev/mps/mpsvar.h Fri Aug 9 01:10:33 2013(r254117) @@ -416,6 +416,7 @@ struct mps_softc { struct mps_column_map DD_column_map[MPS_MAX_DISKS_IN_VOL]; charexclude_ids[80]; + struct timeval lastfail; }; struct mps_config_params { ___ 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: r254118 - head/sys/dev/bge
Author: yongari Date: Fri Aug 9 01:15:32 2013 New Revision: 254118 URL: http://svnweb.freebsd.org/changeset/base/254118 Log: Fix for IPv4 fragment packets treated as RMCP. bit25 of rxMode MAC register of 5762 needs to be set for rx mgmt filter to work correctly when processing match for UDP header fields. Otherwise false positive can occur which causes IPv4 fragment to be received by APE instead of host. Reported by: Geans Pin geans...@broadcom.com 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 Fri Aug 9 01:10:33 2013(r254117) +++ head/sys/dev/bge/if_bge.c Fri Aug 9 01:15:32 2013(r254118) @@ -5542,6 +5542,8 @@ bge_init_locked(struct bge_softc *sc) mode = CSR_READ_4(sc, BGE_RX_MODE); if (BGE_IS_5755_PLUS(sc)) mode |= BGE_RXMODE_IPV6_ENABLE; + if (sc-bge_asicrev == BGE_ASICREV_BCM5762) + mode |= BGE_RXMODE_IPV4_FRAG_FIX; CSR_WRITE_4(sc,BGE_RX_MODE, mode | BGE_RXMODE_ENABLE); DELAY(10); Modified: head/sys/dev/bge/if_bgereg.h == --- head/sys/dev/bge/if_bgereg.hFri Aug 9 01:10:33 2013 (r254117) +++ head/sys/dev/bge/if_bgereg.hFri Aug 9 01:15:32 2013 (r254118) @@ -841,6 +841,7 @@ #defineBGE_RXMODE_RX_NO_CRC_CHECK 0x0200 #defineBGE_RXMODE_RX_KEEP_VLAN_DIAG0x0400 #defineBGE_RXMODE_IPV6_ENABLE 0x0100 +#defineBGE_RXMODE_IPV4_FRAG_FIX0x0200 /* Receive MAC status register */ #defineBGE_RXSTAT_REMOTE_XOFFED0x0001 ___ 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: r254120 - head/sys/ofed/include/linux
Author: jeff Date: Fri Aug 9 03:24:12 2013 New Revision: 254120 URL: http://svnweb.freebsd.org/changeset/base/254120 Log: - Use the correct type in the linux bitops emulation. Submitted by: Maxim Ignatenko gelraen...@gmail.com Modified: head/sys/ofed/include/linux/bitops.h Modified: head/sys/ofed/include/linux/bitops.h == --- head/sys/ofed/include/linux/bitops.hFri Aug 9 01:27:05 2013 (r254119) +++ head/sys/ofed/include/linux/bitops.hFri Aug 9 03:24:12 2013 (r254120) @@ -272,22 +272,25 @@ bitmap_empty(unsigned long *addr, int si return (1); } -#defineNBINT (NBBY * sizeof(int)) +#defineNBLONG (NBBY * sizeof(long)) #defineset_bit(i, a) \ -atomic_set_int(((volatile int *)(a))[(i)/NBINT], 1 (i) % NBINT) +atomic_set_long(((volatile long *)(a))[(i)/NBLONG], 1 (i) % NBLONG) #defineclear_bit(i, a) \ -atomic_clear_int(((volatile int *)(a))[(i)/NBINT], 1 (i) % NBINT) +atomic_clear_long(((volatile long *)(a))[(i)/NBLONG], 1 (i) % NBLONG) #definetest_bit(i, a) \ -!!(atomic_load_acq_int(((volatile int *)(a))[(i)/NBINT]) 1 ((i) % NBINT)) +!!(atomic_load_acq_long(((volatile long *)(a))[(i)/NBLONG]) \ +1 ((i) % NBLONG)) static inline long test_and_clear_bit(long bit, long *var) { long val; + var += bit / (sizeof(long) * NBBY); + bit %= sizeof(long) * NBBY; bit = 1 bit; do { val = *(volatile long *)var; @@ -301,6 +304,8 @@ test_and_set_bit(long bit, long *var) { long val; + var += bit / (sizeof(long) * NBBY); + bit %= sizeof(long) * NBBY; bit = 1 bit; do { val = *(volatile long *)var; ___ 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: r254121 - head/sys/ofed/include/linux
Author: jeff Date: Fri Aug 9 03:24:48 2013 New Revision: 254121 URL: http://svnweb.freebsd.org/changeset/base/254121 Log: - Correctly handle various edge cases in sysfs emulation. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/include/linux/sysfs.h Modified: head/sys/ofed/include/linux/sysfs.h == --- head/sys/ofed/include/linux/sysfs.h Fri Aug 9 03:24:12 2013 (r254120) +++ head/sys/ofed/include/linux/sysfs.h Fri Aug 9 03:24:48 2013 (r254121) @@ -97,11 +97,14 @@ sysctl_handle_attr(SYSCTL_HANDLER_ARGS) error = -len; if (error != EIO) goto out; + buf[0] = '\0'; + } else if (len) { + len--; + if (len = PAGE_SIZE) + len = PAGE_SIZE - 1; + /* Trim trailing newline. */ + buf[len] = '\0'; } - - /* Trim trailing newline. */ - len--; - buf[len] = '\0'; } /* Leave one trailing byte to append a newline. */ ___ 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: r254122 - in head/sys: ofed/include/rdma sys
Author: jeff Date: Fri Aug 9 03:26:17 2013 New Revision: 254122 URL: http://svnweb.freebsd.org/changeset/base/254122 Log: - Reserve a special AF for SDP. The one we were incorrectly using before was taken by another AF. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/include/rdma/sdp_socket.h head/sys/sys/socket.h Modified: head/sys/ofed/include/rdma/sdp_socket.h == --- head/sys/ofed/include/rdma/sdp_socket.h Fri Aug 9 03:24:48 2013 (r254121) +++ head/sys/ofed/include/rdma/sdp_socket.h Fri Aug 9 03:26:17 2013 (r254122) @@ -3,10 +3,12 @@ #ifndef SDP_SOCKET_H #define SDP_SOCKET_H +#ifndef __FreeBSD__ #ifndef AF_INET_SDP #define AF_INET_SDP 27 #define PF_INET_SDP AF_INET_SDP #endif +#endif #ifndef SDP_ZCOPY_THRESH #define SDP_ZCOPY_THRESH 80 Modified: head/sys/sys/socket.h == --- head/sys/sys/socket.h Fri Aug 9 03:24:48 2013(r254121) +++ head/sys/sys/socket.h Fri Aug 9 03:26:17 2013(r254122) @@ -230,7 +230,9 @@ struct accept_filter_arg { #defineAF_ARP 35 #defineAF_BLUETOOTH36 /* Bluetooth sockets */ #defineAF_IEEE8021137 /* IEEE 802.11 protocol */ -#defineAF_MAX 38 +#defineAF_INET_SDP 40 /* OFED Socket Direct Protocol ipv4 */ +#defineAF_INET6_SDP42 /* OFED Socket Direct Protocol ipv6 */ +#defineAF_MAX 42 /* * When allocating a new AF_ constant, please only allocate * even numbered constants for FreeBSD until 134 as odd numbered AF_ @@ -353,6 +355,8 @@ struct sockproto { #definePF_ARP AF_ARP #definePF_BLUETOOTHAF_BLUETOOTH #definePF_IEEE80211AF_IEEE80211 +#definePF_INET_SDP AF_INET_SDP +#definePF_INET6_SDPAF_INET6_SDP #definePF_MAX AF_MAX ___ 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: r254123 - in head/contrib/ofed: libsdp/src/linux management/infiniband-diags/src management/opensm/opensm
Author: jeff Date: Fri Aug 9 03:29:46 2013 New Revision: 254123 URL: http://svnweb.freebsd.org/changeset/base/254123 Log: - Fix compile errors from the clang conversion - Grab AF_SDP_INET from sys/socket.h Submitted by: Garrett Cooper Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/libsdp/src/linux/sdp_inet.h head/contrib/ofed/management/infiniband-diags/src/sminfo.c head/contrib/ofed/management/opensm/opensm/osm_console.c head/contrib/ofed/management/opensm/opensm/osm_subnet.c Modified: head/contrib/ofed/libsdp/src/linux/sdp_inet.h == --- head/contrib/ofed/libsdp/src/linux/sdp_inet.h Fri Aug 9 03:26:17 2013(r254122) +++ head/contrib/ofed/libsdp/src/linux/sdp_inet.h Fri Aug 9 03:29:46 2013(r254123) @@ -29,8 +29,12 @@ */ #ifndef SOLARIS_BUILD +#ifdef __FreeBSD__ +#include sys/socket.h +#else #define AF_INET_SDP 27 /* SDP socket protocol family */ #define AF_INET6_SDP 28 /* SDP socket protocol family */ +#endif #else #define AF_INET_SDP 31 /* This is an invalid family on native solaris * and will only work using QuickTransit */ Modified: head/contrib/ofed/management/infiniband-diags/src/sminfo.c == --- head/contrib/ofed/management/infiniband-diags/src/sminfo.c Fri Aug 9 03:26:17 2013(r254122) +++ head/contrib/ofed/management/infiniband-diags/src/sminfo.c Fri Aug 9 03:29:46 2013(r254123) @@ -72,10 +72,10 @@ enum { }; char *statestr[] = { - [SMINFO_NOTACT] SMINFO_NOTACT, - [SMINFO_DISCOVER] SMINFO_DISCOVER, - [SMINFO_STANDBY] SMINFO_STANDBY, - [SMINFO_MASTER] SMINFO_MASTER, + [SMINFO_NOTACT] = SMINFO_NOTACT, + [SMINFO_DISCOVER] = SMINFO_DISCOVER, + [SMINFO_STANDBY] = SMINFO_STANDBY, + [SMINFO_MASTER] = SMINFO_MASTER, }; #define STATESTR(s)(((unsigned)(s)) SMINFO_STATE_LAST ? statestr[s] : ???) Modified: head/contrib/ofed/management/opensm/opensm/osm_console.c == --- head/contrib/ofed/management/opensm/opensm/osm_console.cFri Aug 9 03:26:17 2013(r254122) +++ head/contrib/ofed/management/opensm/opensm/osm_console.cFri Aug 9 03:29:46 2013(r254123) @@ -67,7 +67,10 @@ static struct { time_t previous; void (*loop_function) (osm_opensm_t * p_osm, FILE * out); } loop_command = { -on: 0, delay_s: 2, loop_function:NULL}; + .on = 0, + .delay_s = 2, + .loop_function = NULL, +}; static const struct command console_cmds[]; Modified: head/contrib/ofed/management/opensm/opensm/osm_subnet.c == --- head/contrib/ofed/management/opensm/opensm/osm_subnet.c Fri Aug 9 03:26:17 2013(r254122) +++ head/contrib/ofed/management/opensm/opensm/osm_subnet.c Fri Aug 9 03:29:46 2013(r254123) @@ -482,7 +482,7 @@ static void log_report(const char *fmt, va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); - printf(buf); + printf(%s, buf); cl_log_event(OpenSM, CL_LOG_INFO, buf, NULL, 0); } @@ -500,7 +500,7 @@ static void log_config_value(char *name, n = sizeof(buf); snprintf(buf + n, sizeof(buf) - n, \n); va_end(args); - printf(buf); + printf(%s, buf); cl_log_event(OpenSM, CL_LOG_INFO, buf, NULL, 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