svn commit: r253351 - in head: sys/arm/arm sys/i386/i386 sys/kern sys/mips/mips sys/powerpc/aim sys/powerpc/booke sys/sparc64/sparc64 sys/sys usr.bin/netstat
Author: ae Date: Mon Jul 15 06:16:57 2013 New Revision: 253351 URL: http://svnweb.freebsd.org/changeset/base/253351 Log: Introduce new structure sfstat for collecting sendfile's statistics and remove corresponding fields from struct mbstat. Use PCPU counters and SFSTAT_INC() macro for update these statistics. Discussed with: glebius Modified: head/sys/arm/arm/vm_machdep.c head/sys/i386/i386/vm_machdep.c head/sys/kern/kern_mbuf.c head/sys/kern/uipc_syscalls.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/mbuf.h head/sys/sys/sf_buf.h head/usr.bin/netstat/main.c head/usr.bin/netstat/mbuf.c Modified: head/sys/arm/arm/vm_machdep.c == --- head/sys/arm/arm/vm_machdep.c Mon Jul 15 05:09:13 2013 (r253350) +++ head/sys/arm/arm/vm_machdep.c Mon Jul 15 06:16:57 2013 (r253351) @@ -251,7 +251,7 @@ sf_buf_alloc(struct vm_page *m, int flag if (flags SFB_NOWAIT) goto done; sf_buf_alloc_want++; - mbstat.sf_allocwait++; + SFSTAT_INC(sf_allocwait); error = msleep(sf_buf_freelist, sf_buf_lock, (flags SFB_CATCH) ? PCATCH | PVM : PVM, sfbufa, 0); sf_buf_alloc_want--; Modified: head/sys/i386/i386/vm_machdep.c == --- head/sys/i386/i386/vm_machdep.c Mon Jul 15 05:09:13 2013 (r253350) +++ head/sys/i386/i386/vm_machdep.c Mon Jul 15 06:16:57 2013 (r253351) @@ -833,7 +833,7 @@ sf_buf_alloc(struct vm_page *m, int flag if (flags SFB_NOWAIT) goto done; sf_buf_alloc_want++; - mbstat.sf_allocwait++; + SFSTAT_INC(sf_allocwait); error = msleep(sf_buf_freelist, sf_buf_lock, (flags SFB_CATCH) ? PCATCH | PVM : PVM, sfbufa, 0); sf_buf_alloc_want--; Modified: head/sys/kern/kern_mbuf.c == --- head/sys/kern/kern_mbuf.c Mon Jul 15 05:09:13 2013(r253350) +++ head/sys/kern/kern_mbuf.c Mon Jul 15 06:16:57 2013(r253351) @@ -401,8 +401,6 @@ mbuf_init(void *dummy) mbstat.m_numtypes = MT_NTYPES; mbstat.m_mcfail = mbstat.m_mpfail = 0; - mbstat.sf_iocnt = 0; - mbstat.sf_allocwait = mbstat.sf_allocfail = 0; } SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); Modified: head/sys/kern/uipc_syscalls.c == --- head/sys/kern/uipc_syscalls.c Mon Jul 15 05:09:13 2013 (r253350) +++ head/sys/kern/uipc_syscalls.c Mon Jul 15 06:16:57 2013 (r253351) @@ -115,6 +115,7 @@ static int getsockname1(struct thread *t static int getpeername1(struct thread *td, struct getpeername_args *uap, int compat); +counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)]; /* * NSFBUFS-related variables and associated sysctls */ @@ -129,6 +130,27 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsp SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, nsfbufsused, 0, Number of sendfile(2) sf_bufs in use); +static void +sfstat_init(const void *unused) +{ + + COUNTER_ARRAY_ALLOC(sfstat, sizeof(struct sfstat) / sizeof(uint64_t), + M_WAITOK); +} +SYSINIT(sfstat, SI_SUB_MBUF, SI_ORDER_FIRST, sfstat_init, NULL); + +static int +sfstat_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct sfstat s; + + COUNTER_ARRAY_COPY(sfstat, s, sizeof(s) / sizeof(uint64_t)); + if (req-newptr) + COUNTER_ARRAY_ZERO(sfstat, sizeof(s) / sizeof(uint64_t)); + return (SYSCTL_OUT(req, s, sizeof(s))); +} +SYSCTL_PROC(_kern_ipc, OID_AUTO, sfstat, CTLTYPE_OPAQUE | CTLFLAG_RW, +NULL, 0, sfstat_sysctl, I, sendfile statistics); /* * Convert a user file descriptor to a kernel file entry and check if required * capability rights are present. @@ -2241,7 +2263,7 @@ retry_space: vm_page_io_finish(pg); if (!error) VM_OBJECT_WUNLOCK(obj); - mbstat.sf_iocnt++; + SFSTAT_INC(sf_iocnt); } if (error) { vm_page_lock(pg); @@ -2273,7 +2295,7 @@ retry_space: sf = sf_buf_alloc(pg, (mnw || m != NULL) ? SFB_NOWAIT : SFB_CATCH); if (sf == NULL) { - mbstat.sf_allocfail++; + SFSTAT_INC(sf_allocfail);
svn commit: r253352 - head/sys/amd64/amd64
Author: kib Date: Mon Jul 15 06:30:57 2013 New Revision: 253352 URL: http://svnweb.freebsd.org/changeset/base/253352 Log: MFi386: add ddb show sysregs command. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Mon Jul 15 06:16:57 2013 (r253351) +++ head/sys/amd64/amd64/machdep.c Mon Jul 15 06:30:57 2013 (r253352) @@ -1228,6 +1228,36 @@ DB_SHOW_COMMAND(idt, db_show_idt) ip++; } } + +/* Show privileged registers. */ +DB_SHOW_COMMAND(sysregs, db_show_sysregs) +{ + struct { + uint16_t limit; + uint64_t base; + } __packed idtr, gdtr; + uint16_t ldt, tr; + + __asm __volatile(sidt %0 : =m (idtr)); + db_printf(idtr\t0x%016lx/%04x\n, + (u_long)idtr.base, (u_int)idtr.limit); + __asm __volatile(sgdt %0 : =m (gdtr)); + db_printf(gdtr\t0x%016lx/%04x\n, + (u_long)gdtr.base, (u_int)gdtr.limit); + __asm __volatile(sldt %0 : =r (ldt)); + db_printf(ldtr\t0x%04x\n, ldt); + __asm __volatile(str %0 : =r (tr)); + db_printf(tr\t0x%04x\n, tr); + db_printf(cr0\t0x%016lx\n, rcr0()); + db_printf(cr2\t0x%016lx\n, rcr2()); + db_printf(cr3\t0x%016lx\n, rcr3()); + db_printf(cr4\t0x%016lx\n, rcr4()); + db_printf(EFER\t%016lx\n, rdmsr(MSR_EFER)); + db_printf(FEATURES_CTL\t%016lx\n, rdmsr(MSR_IA32_FEATURE_CONTROL)); + db_printf(DEBUG_CTL\t%016lx\n, rdmsr(MSR_DEBUGCTLMSR)); + db_printf(PAT\t%016lx\n, rdmsr(MSR_PAT)); + db_printf(GSBASE\t%016lx\n, rdmsr(MSR_GSBASE)); +} #endif void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253355 - in head/sys/arm: broadcom/bcm2835 conf
Author: rpaulo Date: Mon Jul 15 07:01:30 2013 New Revision: 253355 URL: http://svnweb.freebsd.org/changeset/base/253355 Log: Move the Raspberry Pi low level options out of the kernel config and into std.rpi + std.bcm2835. Reviewed by: imp Added: head/sys/arm/broadcom/bcm2835/std.bcm2835 (contents, props changed) head/sys/arm/broadcom/bcm2835/std.rpi (contents, props changed) Modified: head/sys/arm/conf/RPI-B Added: head/sys/arm/broadcom/bcm2835/std.bcm2835 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Mon Jul 15 07:01:30 2013 (r253355) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +machinearm armv6 +cpuCPU_ARM1176 + +files ../broadcom/bcm2835/files.bcm2835 + Added: head/sys/arm/broadcom/bcm2835/std.rpi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/std.rpi Mon Jul 15 07:01:30 2013 (r253355) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +include../broadcom/bcm2835/std.bcm2835 + +optionsKERNVIRTADDR=0xc010 +makeoptionsKERNVIRTADDR=0xc010 +optionsKERNPHYSADDR=0x0010 +makeoptionsKERNPHYSADDR=0x0010 +optionsPHYSADDR=0x +optionsSTARTUP_PAGETABLE_ADDR=0x0100 +optionsFREEBSD_BOOT_LOADER +optionsLINUX_BOOT_ABI Modified: head/sys/arm/conf/RPI-B == --- head/sys/arm/conf/RPI-B Mon Jul 15 07:00:19 2013(r253354) +++ head/sys/arm/conf/RPI-B Mon Jul 15 07:01:30 2013(r253355) @@ -18,21 +18,10 @@ # $FreeBSD$ ident RPI-B -machinearm armv6 -cpuCPU_ARM1176 -files ../broadcom/bcm2835/files.bcm2835 +include../broadcom/bcm2835/std.rpi makeoptionsMODULES_OVERRIDE= -optionsKERNVIRTADDR=0xc010 -makeoptionsKERNVIRTADDR=0xc010 -optionsKERNPHYSADDR=0x0010 -makeoptionsKERNPHYSADDR=0x0010 -optionsPHYSADDR=0x -optionsSTARTUP_PAGETABLE_ADDR=0x0100 -optionsFREEBSD_BOOT_LOADER -optionsLINUX_BOOT_ABI - makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols optionsHZ=100 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253357 - head/etc/rc.d
Author: des Date: Mon Jul 15 08:48:45 2013 New Revision: 253357 URL: http://svnweb.freebsd.org/changeset/base/253357 Log: When stopping pfsync, remove the pfsync interface's syncpeer setting. MFC after:3 days Modified: head/etc/rc.d/pfsync Modified: head/etc/rc.d/pfsync == --- head/etc/rc.d/pfsyncMon Jul 15 07:26:41 2013(r253356) +++ head/etc/rc.d/pfsyncMon Jul 15 08:48:45 2013(r253357) @@ -42,7 +42,7 @@ pfsync_start() pfsync_stop() { echo Disabling pfsync. - ifconfig pfsync0 -syncdev down + ifconfig pfsync0 -syncdev -syncpeer down } load_rc_config $name ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253358 - in stable/8: tools/build/mk usr.sbin/authpf
Author: des Date: Mon Jul 15 09:02:57 2013 New Revision: 253358 URL: http://svnweb.freebsd.org/changeset/base/253358 Log: MFH (r253138,r253258): install authpf-noip Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc stable/8/usr.sbin/authpf/Makefile Directory Properties: stable/8/tools/build/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/usr.sbin/authpf/ (props changed) Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc == --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 15 08:48:45 2013(r253357) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Mon Jul 15 09:02:57 2013(r253358) @@ -31,9 +31,12 @@ OLD_FILES+=usr/share/man/man8/audit.8.gz OLD_FILES+=usr/share/man/man8/auditd.8.gz .endif -#.if ${MK_AUTHPF} == no -# to be filled in -#.endif +.if ${MK_AUTHPF} == no +OLD_FILES+=usr/sbin/authpf +OLD_FILES+=usr/sbin/authpf-noip +OLD_FILES+=usr/share/man/man8/authpf.8.gz +OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz +.endif .if ${MK_BIND} == no OLD_FILES+=usr/bin/dig Modified: stable/8/usr.sbin/authpf/Makefile == --- stable/8/usr.sbin/authpf/Makefile Mon Jul 15 08:48:45 2013 (r253357) +++ stable/8/usr.sbin/authpf/Makefile Mon Jul 15 09:02:57 2013 (r253358) @@ -19,4 +19,7 @@ CFLAGS+= -DENABLE_ALTQ LDADD+= -lm -lmd -lutil DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL} +LINKS= ${BINDIR}/authpf ${BINDIR}/authpf-noip +MLINKS=authpf.8 authpf-noip.8 + .include bsd.prog.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253210 - in head/sys: conf netinet
Hey Andre, I don't see why this commit triggers it, but Coverity Scan found a new resource leak in this file. syncache_expand() will leak *s when line 1071 is reached. The failed: case below correctly frees the resources. 1068/* how do we find the inp for the new socket? */ 22. Condition sc != scs, taking true branch 1069if (sc != scs) 1070syncache_free(sc); CID null (#1 of 1): Resource leak (RESOURCE_LEAK) 23. leaked_storage: Variable s going out of scope leaks the storage it points to. 1071return (1); 1072failed: 1073if (sc != NULL sc != scs) 1074syncache_free(sc); 1075if (s != NULL) 1076free(s, M_TCPLOG); 1077*lsop = NULL; 1078return (0); 1079} This has no CID yet ... Cheers, Uli ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253314 - head/sys/net
On Sat, Jul 13, 2013 at 04:25:03AM +, Adrian Chadd wrote: A Author: adrian A Date: Sat Jul 13 04:25:03 2013 A New Revision: 253314 A URL: http://svnweb.freebsd.org/changeset/base/253314 A A Log: A Bring over some link aggregation / LACP protocol improvements and debugging A additions. A A * Add some new tracing events to aid in debugging. A * Add in a debugging mode to drop transmit and received frames, specifically A to test whether seeing or hearing heartbeats correctly cause LACP to A drop the port. A * Add in (and make default) a strict LACP mode, which requires the A heartbeat on a port to be heard before it's used. Sometimes vendor ports A will hang but the link layer stays up, resulting in hung traffic. A * Add logging the number of link status flaps, again to aid in debugging A badly behaving switch ports. A * Calculate the lagg interface port speed as the multiple of the A configured ports, rather than the largest. Having the txtest, rxtest and lacp_strict a global sysctls makes them useless on a box that has more than one aggregate interface. Turning test on will down all laggs on a box. IMO, these should be ioctls that can be configured per-interface via ifconfig, and in perfect case documented in ifconfig.8. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253359 - stable/9/sys/kern
Author: mav Date: Mon Jul 15 11:45:58 2013 New Revision: 253359 URL: http://svnweb.freebsd.org/changeset/base/253359 Log: MFC r235899: Hide warning behind bootverbose. Average user has nothing to do about it. Approved by: re (marius) Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c == --- stable/9/sys/kern/kern_conf.c Mon Jul 15 09:02:57 2013 (r253358) +++ stable/9/sys/kern/kern_conf.c Mon Jul 15 11:45:58 2013 (r253359) @@ -992,9 +992,10 @@ make_dev_physpath_alias(int flags, struc max_parentpath_len = SPECNAMELEN - physpath_len - /*/*/1; parentpath_len = strlen(pdev-si_name); if (max_parentpath_len parentpath_len) { - printf(make_dev_physpath_alias: WARNING - Unable to alias %s - to %s/%s - path too long\n, - pdev-si_name, physpath, pdev-si_name); + if (bootverbose) + printf(WARNING: Unable to alias %s + to %s/%s - path too long\n, + pdev-si_name, physpath, pdev-si_name); ret = ENAMETOOLONG; goto out; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253360 - head/usr.bin/systat
Author: glebius Date: Mon Jul 15 12:15:14 2013 New Revision: 253360 URL: http://svnweb.freebsd.org/changeset/base/253360 Log: Nuke systat -mbuf. It was broken since FreeBSD 5, and since there haven't been any complaints, no one used it. Deleted: head/usr.bin/systat/mbufs.c Modified: head/usr.bin/systat/Makefile head/usr.bin/systat/cmdtab.c head/usr.bin/systat/extern.h head/usr.bin/systat/systat.1 Modified: head/usr.bin/systat/Makefile == --- head/usr.bin/systat/MakefileMon Jul 15 11:45:58 2013 (r253359) +++ head/usr.bin/systat/MakefileMon Jul 15 12:15:14 2013 (r253360) @@ -5,7 +5,7 @@ PROG= systat SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \ - mbufs.c netcmds.c netstat.c pigs.c swap.c icmp.c \ + netcmds.c netstat.c pigs.c swap.c icmp.c \ mode.c ip.c tcp.c \ vmstat.c convtbl.c ifcmds.c ifstat.c Modified: head/usr.bin/systat/cmdtab.c == --- head/usr.bin/systat/cmdtab.cMon Jul 15 11:45:58 2013 (r253359) +++ head/usr.bin/systat/cmdtab.cMon Jul 15 12:15:14 2013 (r253360) @@ -46,9 +46,6 @@ structcmdtab cmdtab[] = { { swap, showswap, fetchswap, labelswap, initswap, openswap, closeswap, 0, 0,CF_LOADAV }, - { mbufs, showmbufs, fetchmbufs, labelmbufs, - initmbufs,openmbufs, closembufs, 0, - 0,CF_LOADAV }, { iostat, showiostat, fetchiostat,labeliostat, initiostat, openiostat, closeiostat,cmdiostat, 0,CF_LOADAV }, Modified: head/usr.bin/systat/extern.h == --- head/usr.bin/systat/extern.hMon Jul 15 11:45:58 2013 (r253359) +++ head/usr.bin/systat/extern.hMon Jul 15 12:15:14 2013 (r253360) @@ -76,7 +76,6 @@ void closeiostat(WINDOW *); voidcloseip(WINDOW *); voidcloseip6(WINDOW *); voidclosekre(WINDOW *); -voidclosembufs(WINDOW *); voidclosenetstat(WINDOW *); voidclosepigs(WINDOW *); voidcloseswap(WINDOW *); @@ -99,7 +98,6 @@ void fetchip(void); voidfetchip6(void); voidfetchiostat(void); voidfetchkre(void); -voidfetchmbufs(void); voidfetchnetstat(void); voidfetchpigs(void); voidfetchswap(void); @@ -113,7 +111,6 @@ int initip(void); int initip6(void); int initiostat(void); int initkre(void); -int initmbufs(void); int initnetstat(void); int initpigs(void); int initswap(void); @@ -127,7 +124,6 @@ void labelip(void); voidlabelip6(void); voidlabeliostat(void); voidlabelkre(void); -voidlabelmbufs(void); voidlabelnetstat(void); voidlabelpigs(void); voidlabels(void); @@ -143,7 +139,6 @@ WINDOW *openip(void); WINDOW *openip6(void); WINDOW *openiostat(void); WINDOW *openkre(void); -WINDOW *openmbufs(void); WINDOW *opennetstat(void); WINDOW *openpigs(void); WINDOW *openswap(void); @@ -161,7 +156,6 @@ void showip(void); voidshowip6(void); voidshowiostat(void); voidshowkre(void); -voidshowmbufs(void); voidshownetstat(void); voidshowpigs(void); voidshowswap(void); Modified: head/usr.bin/systat/systat.1 == --- head/usr.bin/systat/systat.1Mon Jul 15 11:45:58 2013 (r253359) +++ head/usr.bin/systat/systat.1Mon Jul 15 12:15:14 2013 (r253360) @@ -28,7 +28,7 @@ .\@(#)systat.18.2 (Berkeley) 12/30/93 .\ $FreeBSD$ .\ -.Dd February 20, 2013 +.Dd July 15, 2013 .Dt SYSTAT 1 .Os .Sh NAME @@ -67,7 +67,6 @@ statistics (a la .Xr iostat 8 ) , virtual memory statistics (a la .Xr vmstat 8 ) , -network ``mbuf'' utilization, .Tn TCP/IP statistics, and network connections (a la @@ -94,7 +93,6 @@ to be one of: .Ic iostat , .Ic ip , .Ic ip6 , -.Ic mbufs , .Ic netstat , .Ic pigs , .Ic swap , @@ -280,9 +278,6 @@ the graph shows the percentage of space If there are more than one swap partition in use, a total line is also shown. Areas known to the kernel, but not in use are shown as not available. -.It Ic mbufs -Display, in the lower window, the number of mbufs allocated -for particular uses, i.e., data, socket structures, etc. .It Ic vmstat Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253361 - in head/sys: i386/i386 kern sys
Author: glebius Date: Mon Jul 15 12:18:36 2013 New Revision: 253361 URL: http://svnweb.freebsd.org/changeset/base/253361 Log: Nuke mbstat. It wasn't used for mbuf statistics since FreeBSD 5. Now that r253351 moved sendfile() stats to a separate struct, the last field used in mbstat is m_mcfail, which is updated, but never read or obtained from userland. Modified: head/sys/i386/i386/symbols.raw head/sys/kern/kern_mbuf.c head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/i386/i386/symbols.raw == --- head/sys/i386/i386/symbols.raw Mon Jul 15 12:15:14 2013 (r253360) +++ head/sys/i386/i386/symbols.raw Mon Jul 15 12:18:36 2013 (r253361) @@ -43,7 +43,6 @@ _averunnable _boottime #netstat - _mbstat _ipstat _tcb _tcpstat Modified: head/sys/kern/kern_mbuf.c == --- head/sys/kern/kern_mbuf.c Mon Jul 15 12:15:14 2013(r253360) +++ head/sys/kern/kern_mbuf.c Mon Jul 15 12:18:36 2013(r253361) @@ -102,7 +102,6 @@ int nmbclusters;/* limits number of mb int nmbjumbop; /* limits number of page size jumbo clusters */ int nmbjumbo9; /* limits number of 9k jumbo clusters */ int nmbjumbo16;/* limits number of 16k jumbo clusters */ -struct mbstat mbstat; static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ @@ -262,9 +261,6 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, nmbufs, 0, sysctl_nmbufs, IU, Maximum number of mbufs allowed); -SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, mbstat, mbstat, -Mbuf general information and statistics); - /* * Zones from which we allocate. */ @@ -384,23 +380,6 @@ mbuf_init(void *dummy) */ EVENTHANDLER_REGISTER(vm_lowmem, mb_reclaim, NULL, EVENTHANDLER_PRI_FIRST); - - /* -* [Re]set counters and local statistics knobs. -* XXX Some of these should go and be replaced, but UMA stat -* gathering needs to be revised. -*/ - mbstat.m_mbufs = 0; - mbstat.m_mclusts = 0; - mbstat.m_drain = 0; - mbstat.m_msize = MSIZE; - mbstat.m_mclbytes = MCLBYTES; - mbstat.m_minclsize = MINCLSIZE; - mbstat.m_mlen = MLEN; - mbstat.m_mhlen = MHLEN; - mbstat.m_numtypes = MT_NTYPES; - - mbstat.m_mcfail = mbstat.m_mpfail = 0; } SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); Modified: head/sys/kern/uipc_mbuf.c == --- head/sys/kern/uipc_mbuf.c Mon Jul 15 12:15:14 2013(r253360) +++ head/sys/kern/uipc_mbuf.c Mon Jul 15 12:18:36 2013(r253361) @@ -649,13 +649,10 @@ m_copym(struct mbuf *m, int off0, int le m = m-m_next; np = n-m_next; } - if (top == NULL) - mbstat.m_mcfail++; /* XXX: No consistency. */ return (top); nospace: m_freem(top); - mbstat.m_mcfail++; /* XXX: No consistency. */ return (NULL); } @@ -860,7 +857,6 @@ m_copypacket(struct mbuf *m, int how) return top; nospace: m_freem(top); - mbstat.m_mcfail++; /* XXX: No consistency. */ return (NULL); } @@ -964,7 +960,6 @@ m_dup(struct mbuf *m, int how) nospace: m_freem(top); - mbstat.m_mcfail++; /* XXX: No consistency. */ return (NULL); } @@ -1124,7 +1119,6 @@ m_pullup(struct mbuf *n, int len) return (m); bad: m_freem(n); - mbstat.m_mpfail++; /* XXX: No consistency. */ return (NULL); } Modified: head/sys/sys/mbuf.h == --- head/sys/sys/mbuf.h Mon Jul 15 12:15:14 2013(r253360) +++ head/sys/sys/mbuf.h Mon Jul 15 12:18:36 2013(r253361) @@ -317,31 +317,6 @@ struct mbuf { #define MB_NOTAGS 0x1UL /* no tags attached to mbuf */ /* - * General mbuf allocator statistics structure. - * - * Many of these statistics are no longer used; we instead track many - * allocator statistics through UMA's built in statistics mechanism. - */ -struct mbstat { - u_long m_mbufs;/* XXX */ - u_long m_mclusts; /* XXX */ - - u_long m_drain;/* times drained protocols for space */ - u_long m_mcfail; /* XXX: times m_copym failed */ - u_long m_mpfail; /* XXX: times m_pullup failed */ - u_long m_msize;/* length of an mbuf */ - u_long m_mclbytes; /* length of an mbuf cluster */ - u_long m_minclsize;/* min length of data to allocate a cluster */ - u_long m_mlen; /* length of data in an mbuf */ - u_long m_mhlen;/* length of data in a
svn commit: r253362 - head/share/man/man4
Author: pluknet Date: Mon Jul 15 14:28:59 2013 New Revision: 253362 URL: http://svnweb.freebsd.org/changeset/base/253362 Log: Add IBM ServeRAID M5110 to the hardware list. This is a rebranded MegaRAID SAS 2208 [Thunderbolt] found e.g. on x3550 M4. Reported by: Ilia Noskov nos...@nic.ru MFC after:3 days Modified: head/share/man/man4/mfi.4 Modified: head/share/man/man4/mfi.4 == --- head/share/man/man4/mfi.4 Mon Jul 15 12:18:36 2013(r253361) +++ head/share/man/man4/mfi.4 Mon Jul 15 14:28:59 2013(r253362) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 24, 2013 +.Dd July 15, 2013 .Dt MFI 4 .Os .Sh NAME @@ -99,6 +99,8 @@ IBM ServeRAID M1115 SAS/SATA .It IBM ServeRAID M5015 SAS/SATA .It +IBM ServeRAID M5110 SAS/SATA +.It IBM ServeRAID-MR10i .It Intel RAID Controller SRCSAS18E ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253322 - in head/sys/cam: . scsi
On Sat, 2013-07-13 at 13:35:10 +, Alexander Motin wrote: Author: mav Date: Sat Jul 13 13:35:09 2013 New Revision: 253322 URL: http://svnweb.freebsd.org/changeset/base/253322 Log: Improve handling of 0x3F/0x0E Reported LUNs data has changed and 0x25/0x00 Logical unit not supported errors. First initiates specific target rescan, second -- destroys specific LUN. That allows to automatically detect changes in list of device LUNs. This mechanism doesn't work when target is completely idle, but probably that is all what can be done without active polling. Reviewed by:ken Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_periph.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/cam_periph.c == @@ -1761,12 +1759,25 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_async(AC_LOST_DEVICE, newpath, NULL); xpt_free_path(newpath); } + } /* Broadcast UNIT ATTENTIONs to all periphs. */ - } else if (scsi_extract_sense_ccb(ccb, - error_code, sense_key, asc, ascq) - sense_key == SSD_KEY_UNIT_ATTENTION) { + if ((action SSQ_UA) != 0) xpt_async(AC_UNIT_ATTENTION, orig_ccb-ccb_h.path, orig_ccb); + + /* Rescan target on Reported LUNs data has changed */ + if ((action SSQ_RESCAN) != 0) { + if (xpt_create_path(newpath, NULL, + xpt_path_path_id(ccb-ccb_h.path), + xpt_path_target_id(ccb-ccb_h.path), + -1) == CAM_REQ_CMP) { + + scan_ccb = xpt_alloc_ccb_nowait(); + scan_ccb-ccb_h.path = newpath; + scan_ccb-ccb_h.func_CODe = XPT_SCAN_BUS; + scan_ccb-crcn.flags = 0; + xpt_rescan(scan_ccb); + } } /* Attempt a retry */ This introduces a possible NULL dereference. xpt_alloc_ccb_nowait() may return NULL. Coverity reports that this is checked for NULL returns 31 out of 36 times. Please grep over the tree and fix this plus the other 4 locations where this is not being null-checked. Thanks! This has no CID yet (they run a background check that merges and assigns CIDs, and this is a fresh run ...) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253364 - stable/8/share/man/man5
Author: gjb Date: Mon Jul 15 15:00:17 2013 New Revision: 253364 URL: http://svnweb.freebsd.org/changeset/base/253364 Log: MFC r253290: Document that a literal jail name of 0 (zero) is not allowed. PR: 174436 Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 == --- stable/8/share/man/man5/rc.conf.5 Mon Jul 15 14:59:45 2013 (r253363) +++ stable/8/share/man/man5/rc.conf.5 Mon Jul 15 15:00:17 2013 (r253364) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd July 22, 2012 +.Dd July 12, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -3502,6 +3502,11 @@ configure multiple jails. The names specified in this list will be used to identify settings common to an instance of a jail, and should contain alphanumeric characters only. +The literal jail name of +.Dq Li 0 +.Pq zero +is not allowed. +.Pp Assuming that the jail in question was named .Li vjail , you would have the following dependent variables: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253363 - stable/9/share/man/man5
Author: gjb Date: Mon Jul 15 14:59:45 2013 New Revision: 253363 URL: http://svnweb.freebsd.org/changeset/base/253363 Log: MFC r253290: Document that a literal jail name of 0 (zero) is not allowed. PR: 174436 Approved by: re (glebius) Modified: stable/9/share/man/man5/rc.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/rc.conf.5 == --- stable/9/share/man/man5/rc.conf.5 Mon Jul 15 14:28:59 2013 (r253362) +++ stable/9/share/man/man5/rc.conf.5 Mon Jul 15 14:59:45 2013 (r253363) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd June 20, 2013 +.Dd July 12, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -3858,6 +3858,11 @@ configure multiple jails. The names specified in this list will be used to identify settings common to an instance of a jail, and should contain alphanumeric characters only. +The literal jail name of +.Dq Li 0 +.Pq zero +is not allowed. +.Pp Assuming that the jail in question was named .Li vjail , you would have the following dependent variables: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253274 - head/sys/cam/scsi
On Fri, 2013-07-12 at 17:09:50 +, Kenneth D. Merry wrote: Author: ken Date: Fri Jul 12 17:09:50 2013 New Revision: 253274 URL: http://svnweb.freebsd.org/changeset/base/253274 Log: Fix a problem with READ ELEMENT STATUS that occurs on some changers that don't support the DVCID and CURDATA bits that were introduced in the SMC spec. These changers will return an Illegal Request type error if the bits are set. This causes chio status to fail. The fix is two-fold. First, for changers that claim to be SCSI-2 or older, don't set the DVCID and CURDATA bits for READ ELEMENT STATUS. For newer changers (SCSI-3 and newer), we default to setting the new bits, but back off and try the READ ELEMENT STATUS without the bits if we get an Illegal Request type error. This has been tested on a Qualstar TLS-8211, which is a SCSI-2 changer that does not support the new bits, and a Spectra T-380, which is a SCSI-3 changer that does support the new bits. In the absence of a SCSI-3 changer that does not support the bits, I tested that with some error injection code. (The SMC spec says that support for CURDATA is mandatory, and DVCID is optional.) scsi_ch.c: Add a new quirk, CH_Q_NO_DVCID that gets set for SCSI-2 and older libraries, or newer libraries that report errors when the DVCID/CURDATA bits are set. In chgetelemstatus(), use the new quirk to determine whether or not to set DVCID and CURDATA. If we get an error with the bits set, back off and try without the bits. Set the quirk flag if the read element status succeeds without the bits set. Increase the READ ELEMENT STATUS timeout to 60 seconds after testing with a Spectra T-380. The previous value was 10 seconds, and too short for the T-380. This may be decreased later after some additional testing and investigation. Tested by: Andre Albsmeier andre.albsme...@siemens.com Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c == --- head/sys/cam/scsi/scsi_ch.c Fri Jul 12 16:41:58 2013 (r253273) +++ head/sys/cam/scsi/scsi_ch.c Fri Jul 12 17:09:50 2013 (r253274) @@ -1284,8 +1342,8 @@ chgetelemstatus(struct cam_periph *perip /* voltag */ want_voltags, /* sea */ softc-sc_firsts[chet] + cesr-cesr_element_base, - /* dvcid */ 1, - /* curdata */ 1, + /* dvcid */ dvcid, + /* curdata */ curdata, /* count */ cesr-cesr_element_count, /* data_ptr */ data, /* dxfer_len */ size, Are you sure? Coverity flags this as being in the wrong argument order (there's no CID for this yet). CID null (#2 of 2): Arguments in wrong order (SWAPPED_ARGUMENTS) swapped_arguments: The positions of arguments curdata and dvcid are inconsistent with the positions of the corresponding parameters for scsi_read_element_status(struct ccb_scsiio *, u_int32_t, void (*)(struct cam_periph *, union ccb *), u_int8_t, int, u_int32_t, int, int, u_int32_t, u_int8_t *, u_int32_t, u_int8_t, u_int32_t). [show details] 1338scsi_read_element_status(ccb-csio, 1339 /* retries */ 1, 1340 /* cbfcnp */ chdone, 1341 /* tag_action */ MSG_SIMPLE_Q_TAG, 1342 /* voltag */ want_voltags, 1343 /* sea */ softc-sc_firsts[chet] 1344 + cesr-cesr_element_base, 1345 /* dvcid */ dvcid, 1346 /* curdata */ curdata, 1347 /* count */ cesr-cesr_element_count, 1348 /* data_ptr */ data, 1349 /* dxfer_len */ size, 1350 /* sense_len */ SSD_FULL_SIZE, 1351 /* timeout */ CH_TIMEOUT_READ_ELEMENT_STATUS); And this is the definition: 1860void 1861scsi_read_element_status(struct ccb_scsiio *csio, u_int32_t retries, 1862 void (*cbfcnp)(struct cam_periph *, union ccb *), 1863 u_int8_t tag_action, int voltag, u_int32_t sea, 1864 int curdata, int dvcid, 1865 u_int32_t count, u_int8_t *data_ptr, 1866 u_int32_t dxfer_len, u_int8_t sense_len, 1867
svn commit: r253365 - stable/9/share/man/man4
Author: jimharris Date: Mon Jul 15 15:37:13 2013 New Revision: 253365 URL: http://svnweb.freebsd.org/changeset/base/253365 Log: MFC r253178: Bump date for nvme(4) and nvd(4). Approved by: re (kib) Modified: stable/9/share/man/man4/nvd.4 stable/9/share/man/man4/nvme.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/nvd.4 == --- stable/9/share/man/man4/nvd.4 Mon Jul 15 15:00:17 2013 (r253364) +++ stable/9/share/man/man4/nvd.4 Mon Jul 15 15:37:13 2013 (r253365) @@ -33,7 +33,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 10, 2012 +.Dd July 9, 2013 .Dt NVD 4 .Os .Sh NAME Modified: stable/9/share/man/man4/nvme.4 == --- stable/9/share/man/man4/nvme.4 Mon Jul 15 15:00:17 2013 (r253364) +++ stable/9/share/man/man4/nvme.4 Mon Jul 15 15:37:13 2013 (r253365) @@ -33,7 +33,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 10, 2012 +.Dd July 9, 2013 .Dt NVME 4 .Os .Sh NAME ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253366 - stable/9/sys/dev/nvme
Author: jimharris Date: Mon Jul 15 15:38:16 2013 New Revision: 253366 URL: http://svnweb.freebsd.org/changeset/base/253366 Log: MFC r253209: Fix a poorly worded comment in nvme(4). Approved by: re (kib) Modified: stable/9/sys/dev/nvme/nvme.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme.h == --- stable/9/sys/dev/nvme/nvme.hMon Jul 15 15:37:13 2013 (r253365) +++ stable/9/sys/dev/nvme/nvme.hMon Jul 15 15:38:16 2013 (r253366) @@ -765,10 +765,10 @@ struct nvme_pt_command { /* * is_read = 1 if the passthrough command will read data into the -* supplied buffer. +* supplied buffer from the controller. * -* is_read = 0 if the passthrough command will write data into the -* supplied buffer. +* is_read = 0 if the passthrough command will write data from the +* supplied buffer to the controller. */ uint32_tis_read; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253367 - in head/sys: i386/i386 mips/mips powerpc/powerpc sparc64/sparc64
Author: ae Date: Mon Jul 15 15:40:57 2013 New Revision: 253367 URL: http://svnweb.freebsd.org/changeset/base/253367 Log: Include sys/systm.h after sys/param.h. Suggested by: pluknet Modified: head/sys/i386/i386/uio_machdep.c head/sys/mips/mips/uio_machdep.c head/sys/powerpc/powerpc/uio_machdep.c head/sys/sparc64/sparc64/uio_machdep.c Modified: head/sys/i386/i386/uio_machdep.c == --- head/sys/i386/i386/uio_machdep.cMon Jul 15 15:38:16 2013 (r253366) +++ head/sys/i386/i386/uio_machdep.cMon Jul 15 15:40:57 2013 (r253367) @@ -39,13 +39,13 @@ __FBSDID($FreeBSD$); #include sys/param.h +#include sys/systm.h #include sys/kernel.h #include sys/lock.h #include sys/mutex.h #include sys/proc.h #include sys/sched.h #include sys/sf_buf.h -#include sys/systm.h #include sys/uio.h #include vm/vm.h Modified: head/sys/mips/mips/uio_machdep.c == --- head/sys/mips/mips/uio_machdep.cMon Jul 15 15:38:16 2013 (r253366) +++ head/sys/mips/mips/uio_machdep.cMon Jul 15 15:40:57 2013 (r253367) @@ -39,12 +39,12 @@ __FBSDID($FreeBSD$); #include sys/param.h +#include sys/systm.h #include sys/kernel.h #include sys/lock.h #include sys/mutex.h #include sys/proc.h #include sys/sf_buf.h -#include sys/systm.h #include sys/uio.h #include vm/vm.h Modified: head/sys/powerpc/powerpc/uio_machdep.c == --- head/sys/powerpc/powerpc/uio_machdep.c Mon Jul 15 15:38:16 2013 (r253366) +++ head/sys/powerpc/powerpc/uio_machdep.c Mon Jul 15 15:40:57 2013 (r253367) @@ -39,11 +39,11 @@ __FBSDID($FreeBSD$); #include sys/param.h +#include sys/systm.h #include sys/kernel.h #include sys/lock.h #include sys/mutex.h #include sys/proc.h -#include sys/systm.h #include sys/uio.h #include sys/sf_buf.h Modified: head/sys/sparc64/sparc64/uio_machdep.c == --- head/sys/sparc64/sparc64/uio_machdep.c Mon Jul 15 15:38:16 2013 (r253366) +++ head/sys/sparc64/sparc64/uio_machdep.c Mon Jul 15 15:40:57 2013 (r253367) @@ -39,12 +39,12 @@ __FBSDID($FreeBSD$); #include sys/param.h +#include sys/systm.h #include sys/kernel.h #include sys/lock.h #include sys/mutex.h #include sys/proc.h #include sys/sf_buf.h -#include sys/systm.h #include sys/uio.h #include vm/vm.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253368 - head/sys/cam/scsi
Author: ken Date: Mon Jul 15 16:38:48 2013 New Revision: 253368 URL: http://svnweb.freebsd.org/changeset/base/253368 Log: Fix an argument reversal in calls to scsi_read_element_status(). Reported by: Ulrich Spoerlein u...@freebsd.org MFC after:3 days Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c == --- head/sys/cam/scsi/scsi_ch.c Mon Jul 15 15:40:57 2013(r253367) +++ head/sys/cam/scsi/scsi_ch.c Mon Jul 15 16:38:48 2013(r253368) @@ -1274,8 +1274,8 @@ retry_einval: /* tag_action */ MSG_SIMPLE_Q_TAG, /* voltag */ want_voltags, /* sea */ softc-sc_firsts[chet], -/* dvcid */ dvcid, /* curdata */ curdata, +/* dvcid */ dvcid, /* count */ 1, /* data_ptr */ data, /* dxfer_len */ 1024, @@ -1342,8 +1342,8 @@ retry_einval: /* voltag */ want_voltags, /* sea */ softc-sc_firsts[chet] + cesr-cesr_element_base, -/* dvcid */ dvcid, /* curdata */ curdata, +/* dvcid */ dvcid, /* count */ cesr-cesr_element_count, /* data_ptr */ data, /* dxfer_len */ size, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253274 - head/sys/cam/scsi
On Mon, Jul 15, 2013 at 17:14:00 +0200, Ulrich Sp??rlein wrote: On Fri, 2013-07-12 at 17:09:50 +, Kenneth D. Merry wrote: Author: ken Date: Fri Jul 12 17:09:50 2013 New Revision: 253274 URL: http://svnweb.freebsd.org/changeset/base/253274 Log: Fix a problem with READ ELEMENT STATUS that occurs on some changers that don't support the DVCID and CURDATA bits that were introduced in the SMC spec. These changers will return an Illegal Request type error if the bits are set. This causes chio status to fail. The fix is two-fold. First, for changers that claim to be SCSI-2 or older, don't set the DVCID and CURDATA bits for READ ELEMENT STATUS. For newer changers (SCSI-3 and newer), we default to setting the new bits, but back off and try the READ ELEMENT STATUS without the bits if we get an Illegal Request type error. This has been tested on a Qualstar TLS-8211, which is a SCSI-2 changer that does not support the new bits, and a Spectra T-380, which is a SCSI-3 changer that does support the new bits. In the absence of a SCSI-3 changer that does not support the bits, I tested that with some error injection code. (The SMC spec says that support for CURDATA is mandatory, and DVCID is optional.) scsi_ch.c:Add a new quirk, CH_Q_NO_DVCID that gets set for SCSI-2 and older libraries, or newer libraries that report errors when the DVCID/CURDATA bits are set. In chgetelemstatus(), use the new quirk to determine whether or not to set DVCID and CURDATA. If we get an error with the bits set, back off and try without the bits. Set the quirk flag if the read element status succeeds without the bits set. Increase the READ ELEMENT STATUS timeout to 60 seconds after testing with a Spectra T-380. The previous value was 10 seconds, and too short for the T-380. This may be decreased later after some additional testing and investigation. Tested by:Andre Albsmeier andre.albsme...@siemens.com Sponsored by: Spectra Logic MFC after:3 days Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c == --- head/sys/cam/scsi/scsi_ch.c Fri Jul 12 16:41:58 2013 (r253273) +++ head/sys/cam/scsi/scsi_ch.c Fri Jul 12 17:09:50 2013 (r253274) @@ -1284,8 +1342,8 @@ chgetelemstatus(struct cam_periph *perip /* voltag */ want_voltags, /* sea */ softc-sc_firsts[chet] + cesr-cesr_element_base, -/* dvcid */ 1, -/* curdata */ 1, +/* dvcid */ dvcid, +/* curdata */ curdata, /* count */ cesr-cesr_element_count, /* data_ptr */ data, /* dxfer_len */ size, Are you sure? Coverity flags this as being in the wrong argument order (there's no CID for this yet). CID null (#2 of 2): Arguments in wrong order (SWAPPED_ARGUMENTS) swapped_arguments: The positions of arguments curdata and dvcid are inconsistent with the positions of the corresponding parameters for scsi_read_element_status(struct ccb_scsiio *, u_int32_t, void (*)(struct cam_periph *, union ccb *), u_int8_t, int, u_int32_t, int, int, u_int32_t, u_int8_t *, u_int32_t, u_int8_t, u_int32_t). [show details] 1338scsi_read_element_status(ccb-csio, 1339 /* retries */ 1, 1340 /* cbfcnp */ chdone, 1341 /* tag_action */ MSG_SIMPLE_Q_TAG, 1342 /* voltag */ want_voltags, 1343 /* sea */ softc-sc_firsts[chet] 1344 + cesr-cesr_element_base, 1345 /* dvcid */ dvcid, 1346 /* curdata */ curdata, 1347 /* count */ cesr-cesr_element_count, 1348 /* data_ptr */ data, 1349 /* dxfer_len */ size, 1350 /* sense_len */ SSD_FULL_SIZE, 1351 /* timeout */ CH_TIMEOUT_READ_ELEMENT_STATUS); And this is the definition: 1860void 1861scsi_read_element_status(struct ccb_scsiio *csio, u_int32_t retries, 1862 void (*cbfcnp)(struct cam_periph *, union ccb *), 1863 u_int8_t tag_action, int voltag, u_int32_t sea, 1864 int curdata, int dvcid, 1865
Re: svn commit: r253322 - in head/sys/cam: . scsi
On 15.07.2013 17:48, Ulrich Spörlein wrote: On Sat, 2013-07-13 at 13:35:10 +, Alexander Motin wrote: Author: mav Date: Sat Jul 13 13:35:09 2013 New Revision: 253322 URL: http://svnweb.freebsd.org/changeset/base/253322 Log: Improve handling of 0x3F/0x0E Reported LUNs data has changed and 0x25/0x00 Logical unit not supported errors. First initiates specific target rescan, second -- destroys specific LUN. That allows to automatically detect changes in list of device LUNs. This mechanism doesn't work when target is completely idle, but probably that is all what can be done without active polling. Reviewed by: ken Sponsored by:iXsystems, Inc. Modified: head/sys/cam/cam_periph.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/cam_periph.c == @@ -1761,12 +1759,25 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_async(AC_LOST_DEVICE, newpath, NULL); xpt_free_path(newpath); } + } /* Broadcast UNIT ATTENTIONs to all periphs. */ - } else if (scsi_extract_sense_ccb(ccb, - error_code, sense_key, asc, ascq) - sense_key == SSD_KEY_UNIT_ATTENTION) { + if ((action SSQ_UA) != 0) xpt_async(AC_UNIT_ATTENTION, orig_ccb-ccb_h.path, orig_ccb); + + /* Rescan target on Reported LUNs data has changed */ + if ((action SSQ_RESCAN) != 0) { + if (xpt_create_path(newpath, NULL, + xpt_path_path_id(ccb-ccb_h.path), + xpt_path_target_id(ccb-ccb_h.path), + -1) == CAM_REQ_CMP) { + + scan_ccb = xpt_alloc_ccb_nowait(); + scan_ccb-ccb_h.path = newpath; + scan_ccb-ccb_h.func_CODe = XPT_SCAN_BUS; + scan_ccb-crcn.flags = 0; + xpt_rescan(scan_ccb); + } } /* Attempt a retry */ This introduces a possible NULL dereference. xpt_alloc_ccb_nowait() may return NULL. Coverity reports that this is checked for NULL returns 31 out of 36 times. Please grep over the tree and fix this plus the other 4 locations where this is not being null-checked. Thanks! This has no CID yet (they run a background check that merges and assigns CIDs, and this is a fresh run ...) Thank you. That was a copy-paste of the existing code. I am testing fix for three alike cases I've found in CAM. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253369 - stable/9/sys/cam/scsi
Author: ken Date: Mon Jul 15 18:02:26 2013 New Revision: 253369 URL: http://svnweb.freebsd.org/changeset/base/253369 Log: MFC r253274 and r253368: r253274 | ken | 2013-07-12 11:09:50 -0600 (Fri, 12 Jul 2013) | 40 lines Fix a problem with READ ELEMENT STATUS that occurs on some changers that don't support the DVCID and CURDATA bits that were introduced in the SMC spec. These changers will return an Illegal Request type error if the bits are set. This causes chio status to fail. The fix is two-fold. First, for changers that claim to be SCSI-2 or older, don't set the DVCID and CURDATA bits for READ ELEMENT STATUS. For newer changers (SCSI-3 and newer), we default to setting the new bits, but back off and try the READ ELEMENT STATUS without the bits if we get an Illegal Request type error. This has been tested on a Qualstar TLS-8211, which is a SCSI-2 changer that does not support the new bits, and a Spectra T-380, which is a SCSI-3 changer that does support the new bits. In the absence of a SCSI-3 changer that does not support the bits, I tested that with some error injection code. (The SMC spec says that support for CURDATA is mandatory, and DVCID is optional.) scsi_ch.c: Add a new quirk, CH_Q_NO_DVCID that gets set for SCSI-2 and older libraries, or newer libraries that report errors when the DVCID/CURDATA bits are set. In chgetelemstatus(), use the new quirk to determine whether or not to set DVCID and CURDATA. If we get an error with the bits set, back off and try without the bits. Set the quirk flag if the read element status succeeds without the bits set. Increase the READ ELEMENT STATUS timeout to 60 seconds after testing with a Spectra T-380. The previous value was 10 seconds, and too short for the T-380. This may be decreased later after some additional testing and investigation. Tested by: Andre Albsmeier andre.albsme...@siemens.com Sponsored by: Spectra Logic r253368 | ken | 2013-07-15 10:38:48 -0600 (Mon, 15 Jul 2013) | 5 lines Fix an argument reversal in calls to scsi_read_element_status(). Reported by:Ulrich Spoerlein u...@freebsd.org Approved by: re (kib) Modified: stable/9/sys/cam/scsi/scsi_ch.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_ch.c == --- stable/9/sys/cam/scsi/scsi_ch.c Mon Jul 15 16:38:48 2013 (r253368) +++ stable/9/sys/cam/scsi/scsi_ch.c Mon Jul 15 18:02:26 2013 (r253369) @@ -102,7 +102,7 @@ static const u_int32_t CH_TIMEOUT_MODE_S static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 10; static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 10; static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 10; -static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 1; +static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 6; static const u_int32_t CH_TIMEOUT_SEND_VOLTAG = 1; static const u_int32_t CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 50; @@ -122,12 +122,14 @@ typedef enum { typedef enum { CH_Q_NONE = 0x00, - CH_Q_NO_DBD = 0x01 + CH_Q_NO_DBD = 0x01, + CH_Q_NO_DVCID = 0x02 } ch_quirks; #define CH_Q_BIT_STRING\ \020 \ - \001NO_DBD + \001NO_DBD\ + \002NO_DVCID #define ccb_state ppriv_field0 #define ccb_bp ppriv_ptr1 @@ -396,6 +398,14 @@ chregister(struct cam_periph *periph, vo periph-softc = softc; softc-quirks = CH_Q_NONE; + /* +* The DVCID and CURDATA bits were not introduced until the SMC +* spec. If this device claims SCSI-2 or earlier support, then it +* very likely does not support these bits. +*/ + if (cgd-inq_data.version = SCSI_REV_2) + softc-quirks |= CH_Q_NO_DVCID; + bzero(cpi, sizeof(cpi)); xpt_setup_ccb(cpi.ccb_h, periph-path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; @@ -1208,6 +1218,8 @@ chgetelemstatus(struct cam_periph *perip caddr_t data = NULL; size_t size, desclen; int avail, i, error = 0; + int curdata, dvcid, sense_flags; + int try_no_dvcid = 0; struct changer_element_status *user_data = NULL; struct ch_softc *softc; union ccb *ccb; @@ -1239,14 +1251,31 @@ chgetelemstatus(struct cam_periph *perip cam_periph_lock(periph); ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); + sense_flags =
Re: svn commit: r253274 - head/sys/cam/scsi
2013/7/15 Kenneth D. Merry k...@freebsd.org: Oops, you're right! Thanks for pointing it out! I just committed a fix. How does Coverity detect something like that? Using the comment, or the variable name? I would guess the variable name, maybe with a fuzzy match. At least that's how I would do it, I don't know the internal workings of their software and I'm sure they won't tell anyone :) Cheers, Uli ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253370 - in head/sys/cam: . scsi
Author: mav Date: Mon Jul 15 18:17:31 2013 New Revision: 253370 URL: http://svnweb.freebsd.org/changeset/base/253370 Log: Make some improvements to r253322 to really rescan target, not a bus. Add there and in two more places checks for NULL on xpt_alloc_ccb_nowait(). Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Mon Jul 15 18:02:26 2013(r253369) +++ head/sys/cam/cam_periph.c Mon Jul 15 18:17:31 2013(r253370) @@ -1770,13 +1770,17 @@ cam_periph_error(union ccb *ccb, cam_fla if (xpt_create_path(newpath, NULL, xpt_path_path_id(ccb-ccb_h.path), xpt_path_target_id(ccb-ccb_h.path), - -1) == CAM_REQ_CMP) { + CAM_LUN_WILDCARD) == CAM_REQ_CMP) { scan_ccb = xpt_alloc_ccb_nowait(); - scan_ccb-ccb_h.path = newpath; - scan_ccb-ccb_h.func_code = XPT_SCAN_BUS; - scan_ccb-crcn.flags = 0; - xpt_rescan(scan_ccb); + if (scan_ccb != NULL) { + scan_ccb-ccb_h.path = newpath; + scan_ccb-ccb_h.func_code = XPT_SCAN_TGT; + scan_ccb-crcn.flags = 0; + xpt_rescan(scan_ccb); + } else + xpt_print(newpath, + Can't allocate CCB to rescan target\n); } } Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Mon Jul 15 18:02:26 2013(r253369) +++ head/sys/cam/cam_xpt.c Mon Jul 15 18:17:31 2013(r253370) @@ -3900,10 +3900,13 @@ xpt_bus_register(struct cam_sim *sim, de xpt_async(AC_PATH_REGISTERED, path, cpi); /* Initiate bus rescan. */ scan_ccb = xpt_alloc_ccb_nowait(); - scan_ccb-ccb_h.path = path; - scan_ccb-ccb_h.func_code = XPT_SCAN_BUS; - scan_ccb-crcn.flags = 0; - xpt_rescan(scan_ccb); + if (scan_ccb != NULL) { + scan_ccb-ccb_h.path = path; + scan_ccb-ccb_h.func_code = XPT_SCAN_BUS; + scan_ccb-crcn.flags = 0; + xpt_rescan(scan_ccb); + } else + xpt_print(path, Can't allocate CCB to scan bus\n); } else xpt_free_path(path); return (CAM_SUCCESS); Modified: head/sys/cam/scsi/scsi_xpt.c == --- head/sys/cam/scsi/scsi_xpt.cMon Jul 15 18:02:26 2013 (r253369) +++ head/sys/cam/scsi/scsi_xpt.cMon Jul 15 18:17:31 2013 (r253370) @@ -1881,8 +1881,8 @@ scsi_scan_bus(struct cam_periph *periph, if ((work_ccb-cpi.hba_inquiry (PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE)) !(work_ccb-cpi.hba_misc PIM_NOBUSRESET) - !timevalisset(request_ccb-ccb_h.path-bus-last_reset)) { - reset_ccb = xpt_alloc_ccb_nowait(); + !timevalisset(request_ccb-ccb_h.path-bus-last_reset) + (reset_ccb = xpt_alloc_ccb_nowait()) != NULL) { xpt_setup_ccb(reset_ccb-ccb_h, request_ccb-ccb_h.path, CAM_PRIORITY_NONE); reset_ccb-ccb_h.func_code = XPT_RESET_BUS; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253314 - head/sys/net
Yup and they will be turned into per-interface ioctls before I merge it into -9. Thanks! -adrian On 15 July 2013 02:47, Gleb Smirnoff gleb...@freebsd.org wrote: On Sat, Jul 13, 2013 at 04:25:03AM +, Adrian Chadd wrote: A Author: adrian A Date: Sat Jul 13 04:25:03 2013 A New Revision: 253314 A URL: http://svnweb.freebsd.org/changeset/base/253314 A A Log: A Bring over some link aggregation / LACP protocol improvements and debugging A additions. A A * Add some new tracing events to aid in debugging. A * Add in a debugging mode to drop transmit and received frames, specifically A to test whether seeing or hearing heartbeats correctly cause LACP to A drop the port. A * Add in (and make default) a strict LACP mode, which requires the A heartbeat on a port to be heard before it's used. Sometimes vendor ports A will hang but the link layer stays up, resulting in hung traffic. A * Add logging the number of link status flaps, again to aid in debugging A badly behaving switch ports. A * Calculate the lagg interface port speed as the multiple of the A configured ports, rather than the largest. Having the txtest, rxtest and lacp_strict a global sysctls makes them useless on a box that has more than one aggregate interface. Turning test on will down all laggs on a box. IMO, these should be ioctls that can be configured per-interface via ifconfig, and in perfect case documented in ifconfig.8. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253210 - in head/sys: conf netinet
On Mon, Jul 15, 2013 at 11:36:16AM +0200, Ulrich Spörlein wrote: Hey Andre, I don't see why this commit triggers it, but Coverity Scan found a new resource leak in this file. syncache_expand() will leak *s when line 1071 is reached. The failed: case below correctly frees the resources. 1068/* how do we find the inp for the new socket? */ 22. Condition sc != scs, taking true branch 1069if (sc != scs) 1070syncache_free(sc); CID null (#1 of 1): Resource leak (RESOURCE_LEAK) 23. leaked_storage: Variable s going out of scope leaks the storage it points to. 1071return (1); 1072failed: 1073if (sc != NULL sc != scs) 1074syncache_free(sc); 1075if (s != NULL) 1076free(s, M_TCPLOG); 1077*lsop = NULL; 1078return (0); 1079} It looks like free(s, M_TCPLOG) is missed in this branch: 1043 if ((sc-sc_flags SCF_TIMESTAMP) !(to-to_flags TOF_TS)) { 1044 if ((s = tcp_log_addrs(inc, th, NULL, NULL))) 1045 log(LOG_DEBUG, %s; %s: Timestamp missing, 1046 no action\n, s, __func__); 1047 } -- Mikolaj Golub ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r253210 - in head/sys: conf netinet
On 15.07.2013 20:38, Mikolaj Golub wrote: On Mon, Jul 15, 2013 at 11:36:16AM +0200, Ulrich Spörlein wrote: Hey Andre, I don't see why this commit triggers it, but Coverity Scan found a new resource leak in this file. syncache_expand() will leak *s when line 1071 is reached. The failed: case below correctly frees the resources. 1068/* how do we find the inp for the new socket? */ 22. Condition sc != scs, taking true branch 1069if (sc != scs) 1070syncache_free(sc); CID null (#1 of 1): Resource leak (RESOURCE_LEAK) 23. leaked_storage: Variable s going out of scope leaks the storage it points to. 1071return (1); 1072failed: 1073if (sc != NULL sc != scs) 1074syncache_free(sc); 1075if (s != NULL) 1076free(s, M_TCPLOG); 1077*lsop = NULL; 1078return (0); 1079} It looks like free(s, M_TCPLOG) is missed in this branch: 1043 if ((sc-sc_flags SCF_TIMESTAMP) !(to-to_flags TOF_TS)) { 1044 if ((s = tcp_log_addrs(inc, th, NULL, NULL))) 1045 log(LOG_DEBUG, %s; %s: Timestamp missing, 1046 no action\n, s, __func__); 1047 } Yes, I just figured that out and prepared a patch. -- Andre ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253371 - stable/9/sys/dev/isp
Author: mjacob Date: Mon Jul 15 20:33:54 2013 New Revision: 253371 URL: http://svnweb.freebsd.org/changeset/base/253371 Log: MFC of 253330 When fiddling with options of which registers to copy out for a mailbox command and which registers to copy back in when the command completes, the bits being set need to not only specify what bits you want to add from the default from the table but also what bits you want *subtract* (mask) from the default from the table. A failing ISP2200 command pointed this out. Approved by: re Modified: stable/9/sys/dev/isp/isp.c stable/9/sys/dev/isp/ispreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c == --- stable/9/sys/dev/isp/isp.c Mon Jul 15 18:17:31 2013(r253370) +++ stable/9/sys/dev/isp/isp.c Mon Jul 15 20:33:54 2013(r253371) @@ -2589,7 +2589,7 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i } mbs.param[9] = chan; } else { - mbs.ibits = 3; + mbs.ibitm = 3; mbs.param[1] = loopid 8; if (nodename) { mbs.param[1] |= 1; @@ -7363,6 +7363,13 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb ibits |= mbp-ibits; obits |= mbp-obits; + /* +* Mask any bits that the caller wants us to mask +*/ + ibits = mbp-ibitm; + obits = mbp-obitm; + + if (ibits == 0 obits == 0) { mbp-param[0] = MBOX_COMMAND_PARAM_ERROR; isp_prt(isp, ISP_LOGERR, no parameters for 0x%x, opcode); Modified: stable/9/sys/dev/isp/ispreg.h == --- stable/9/sys/dev/isp/ispreg.h Mon Jul 15 18:17:31 2013 (r253370) +++ stable/9/sys/dev/isp/ispreg.h Mon Jul 15 20:33:54 2013 (r253371) @@ -464,8 +464,10 @@ #defineMBCMD_DEFAULT_TIMEOUT 10 /* 100 ms */ typedef struct { uint16_t param[MAX_MAILBOX]; - uint32_t ibits; - uint32_t obits; + uint32_t ibits; /* bits to add for register copyin */ + uint32_t obits; /* bits to add for register copyout */ + uint32_t ibitm; /* bits to mask for register copyin */ + uint32_t obitm; /* bits to mask for register copyout */ uint32_t lineno : 16, : 12, @@ -475,6 +477,8 @@ typedef struct { } mbreg_t; #defineMBSINIT(mbxp, code, loglev, timo) \ ISP_MEMZERO((mbxp), sizeof (mbreg_t)); \ + (mbxp)-ibitm = ~0; \ + (mbxp)-obitm = ~0; \ (mbxp)-param[0] = code;\ (mbxp)-lineno = __LINE__; \ (mbxp)-func = __func__;\ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253372 - head/sbin/mount
Author: rmh Date: Mon Jul 15 21:57:21 2013 New Revision: 253372 URL: http://svnweb.freebsd.org/changeset/base/253372 Log: Add -n flag for compatibility with Linux version of mount(8). Reviewed by: freebsd-fs, eadler, mckusick, jh, wblock Modified: head/sbin/mount/mount.8 head/sbin/mount/mount.c Modified: head/sbin/mount/mount.8 == --- head/sbin/mount/mount.8 Mon Jul 15 20:33:54 2013(r253371) +++ head/sbin/mount/mount.8 Mon Jul 15 21:57:21 2013(r253372) @@ -118,6 +118,9 @@ When used in conjunction with the .Fl a option, also mount those file systems which are marked as .Dq Li late . +.It Fl n +For compatibility with some other implementations, this flag is +currently a no-op. .It Fl o Options are specified with a .Fl o Modified: head/sbin/mount/mount.c == --- head/sbin/mount/mount.c Mon Jul 15 20:33:54 2013(r253371) +++ head/sbin/mount/mount.c Mon Jul 15 21:57:21 2013(r253372) @@ -253,7 +253,7 @@ main(int argc, char *argv[]) options = NULL; vfslist = NULL; vfstype = ufs; - while ((ch = getopt(argc, argv, adF:fLlo:prt:uvw)) != -1) + while ((ch = getopt(argc, argv, adF:fLlno:prt:uvw)) != -1) switch (ch) { case 'a': all = 1; @@ -274,6 +274,9 @@ main(int argc, char *argv[]) case 'l': late = 1; break; + case 'n': + /* For compatibility with the Linux version of mount. */ + break; case 'o': if (*optarg) { options = catopt(options, optarg); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253373 - stable/9/sys/kern
Author: gavin Date: Mon Jul 15 23:12:42 2013 New Revision: 253373 URL: http://svnweb.freebsd.org/changeset/base/253373 Log: Merge r244451 from head (originally by pjd): Use correct file permissions when looking for available core file if kern.corefile contains %I. Discussed with: pjd (some time ago) Approved by: re (kib) Modified: stable/9/sys/kern/kern_sig.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sig.c == --- stable/9/sys/kern/kern_sig.cMon Jul 15 21:57:21 2013 (r253372) +++ stable/9/sys/kern/kern_sig.cMon Jul 15 23:12:42 2013 (r253373) @@ -3160,7 +3160,7 @@ nomem: struct nameidata nd; int error, n; int flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW; - int cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; + int cmode = S_IRUSR | S_IWUSR; int vfslocked; for (n = 0; n num_cores; n++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r253374 - in stable/9/sys: dev/e1000 dev/ixgbe modules/em modules/igb
Author: jfv Date: Mon Jul 15 23:27:48 2013 New Revision: 253374 URL: http://svnweb.freebsd.org/changeset/base/253374 Log: MFC: r253284, r253285, r253303: Correct the Intel network driver module builds. They were not defining INET or INET6, and in the case of ixgbe this will cause a panic in the TSO setup code, but in all cases the ioctl behavior is different, this change makes the module and static consistent. Approved by: re Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_lem.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/modules/em/Makefile stable/9/sys/modules/igb/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c == --- stable/9/sys/dev/e1000/if_em.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_em.c Mon Jul 15 23:27:48 2013 (r253374) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include opt_device_polling.h #include opt_inet.h #include opt_inet6.h + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include opt_device_polling.h #endif #include sys/param.h Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_igb.c Mon Jul 15 23:27:48 2013 (r253374) @@ -33,10 +33,11 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include opt_device_polling.h #include opt_inet.h #include opt_inet6.h + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include opt_device_polling.h #include opt_altq.h #endif Modified: stable/9/sys/dev/e1000/if_lem.c == --- stable/9/sys/dev/e1000/if_lem.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_lem.c Mon Jul 15 23:27:48 2013 (r253374) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include opt_device_polling.h #include opt_inet.h #include opt_inet6.h + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include opt_device_polling.h #endif #include sys/param.h Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/ixgbe/ixgbe.c Mon Jul 15 23:27:48 2013 (r253374) @@ -33,11 +33,8 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include opt_inet.h #include opt_inet6.h -#endif - #include ixgbe.h /* Modified: stable/9/sys/dev/ixgbe/ixv.c == --- stable/9/sys/dev/ixgbe/ixv.cMon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/ixgbe/ixv.cMon Jul 15 23:27:48 2013 (r253374) @@ -32,11 +32,8 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include opt_inet.h #include opt_inet6.h -#endif - #include ixv.h /* Modified: stable/9/sys/modules/em/Makefile == --- stable/9/sys/modules/em/MakefileMon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/modules/em/MakefileMon Jul 15 23:27:48 2013 (r253374) @@ -1,7 +1,10 @@ # $FreeBSD$ + +.include bsd.own.mk + .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_em -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS+= $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c @@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != no +opt_inet.h: + @echo #define INET 1 ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != no +opt_inet6.h: + @echo #define INET6 1 ${.TARGET} +.endif +.endif + .include bsd.kmod.mk Modified: stable/9/sys/modules/igb/Makefile == --- stable/9/sys/modules/igb/Makefile Mon Jul 15 23:12:42 2013
svn commit: r253376 - head/usr.sbin/rtsold
Author: kevlo Date: Tue Jul 16 03:12:31 2013 New Revision: 253376 URL: http://svnweb.freebsd.org/changeset/base/253376 Log: Silent warnings. Modified: head/usr.sbin/rtsold/rtsol.c Modified: head/usr.sbin/rtsold/rtsol.c == --- head/usr.sbin/rtsold/rtsol.cTue Jul 16 00:05:17 2013 (r253375) +++ head/usr.sbin/rtsold/rtsol.cTue Jul 16 03:12:31 2013 (r253376) @@ -237,7 +237,7 @@ sendpacket(struct ifinfo *ifi) void rtsol_input(int s) { - u_char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ]; + char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ]; int l, ifindex = 0, *hlimp = NULL; ssize_t msglen; struct in6_pktinfo *pi = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org