Re: svn commit: r205070 - stable/8/lib/libc/stdio
On 2010-03-12, Oliver Pinter wrote: > this commit for 7-STABLE? I will commit it to stable/7 sooner or later. -- Jaakko ___ 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: r205115 - head/sys/mips/cavium/dev/rgmii
Author: jmallett Date: Sat Mar 13 04:55:47 2010 New Revision: 205115 URL: http://svn.freebsd.org/changeset/base/205115 Log: o) Use octeon_fpa_alloc_phys in a situation in which we don't need a usable pointer, rather than octeon_fpa_alloc. o) Report half duplex status properly. o) Do not unconditionally update the last known link status in the softc. If report_link isn't set, when octeon_rgmx_config_speed is called the first time it will tell the driver (essentially) that we have already marked the interface up. Likewise, don't change media speed and duplex if only the link status is at issue. [1] o) Remove manual changing of link state and let octeon_rgmx_config_speed do the heavy lifting. [1] Reviewed by: [1] imp Sponsored by: Packet Forensics Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c == --- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.cSat Mar 13 04:00:36 2010(r205114) +++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.cSat Mar 13 04:55:47 2010(r205115) @@ -1015,10 +1015,9 @@ static u_int octeon_rgmx_pko_xmit_packet * 3 words or less are left. We write our 2nd word now and then put in a chain link * to new PKO cmd buf. */ -void *pko_cmd_buf = octeon_fpa_alloc(OCTEON_FPA_TX_CMDBUF_POOL); -uint64_t phys_cmd_buf; +uint64_t phys_cmd_buf = octeon_fpa_alloc_phys(OCTEON_FPA_TX_CMDBUF_POOL); -if (!pko_cmd_buf) { +if (!phys_cmd_buf) { /* * FPA pool for xmit-buffer-commands is empty. */ @@ -1026,7 +1025,6 @@ static u_int octeon_rgmx_pko_xmit_packet octeon_spinlock_unlock(&(sc->outq_ptr[queue].lock)); return (0); } -phys_cmd_buf = OCTEON_PTR2PHYS(pko_cmd_buf); xmit_cmd_ptr[1] = pko_pkt_word.word64; xmit_cmd_ptr[2] = phys_cmd_buf; @@ -1678,8 +1676,13 @@ static void octeon_rgmx_medstat (struct break; } - /* Always full duplex. */ - ifm->ifm_active |= IFM_FDX; + /* +* Check duplex. +*/ + if (link_status.bits.duplex == 1) + ifm->ifm_active |= IFM_FDX; + else + ifm->ifm_active |= IFM_HDX; RGMX_UNLOCK(sc); } @@ -1815,7 +1818,6 @@ static int octeon_rgmx_ioctl (struct ifn static void octeon_rgmx_init (void *xsc) { struct rgmx_softc_dev *sc = xsc; - octeon_rgmx_rxx_rx_inbnd_t link_status; /* Enable interrupts. */ /* For RGMX they are already enabled earlier */ @@ -1836,19 +1838,7 @@ static void octeon_rgmx_init (void *xsc /* Hopefully PKO is running and will pick up packets via the timer or receive loop */ /* Set link status. */ - octeon_rgmx_config_speed(sc->port, 0); - - RGMX_LOCK(sc); - /* -* Parse link status. -*/ - link_status.word64 = sc->link_status; - - if (link_status.bits.status) - if_link_state_change(sc->ifp, LINK_STATE_UP); - else - if_link_state_change(sc->ifp, LINK_STATE_DOWN); - RGMX_UNLOCK(sc); + octeon_rgmx_config_speed(sc->port, 1); } @@ -1863,7 +1853,6 @@ static void octeon_rgmx_config_speed (u_ uint64_t val64_tx_clk, val64_tx_slot, val64_tx_burst; u_int last_enabled; - sc = get_rgmx_softc(port); if (!sc) { printf(" config_speed didn't find sc int:%u port:%u", iface, port); @@ -1875,79 +1864,96 @@ static void octeon_rgmx_config_speed (u_ */ link_status.word64 = oct_read64(OCTEON_RGMX_RXX_RX_INBND(index, iface)); +RGMX_LOCK(sc); + /* * Compre to prev known state. If same then nothing to do. */ if (link_status.word64 == sc->link_status) { + RGMX_UNLOCK(sc); return; } - -RGMX_LOCK(sc); - old_link_status.word64 = sc->link_status; -sc->link_status = link_status.word64; - -last_enabled = octeon_rgmx_stop_port(port); - -gmx_cfg.word64 = oct_read64(OCTEON_RGMX_PRTX_CFG(index, iface)); - -/* - * Duplex - */ -gmx_cfg.bits.duplex = 1; - -switch (link_status.bits.speed) { -case 0:/* 10Mbps */ -gmx_cfg.bits.speed = 0; -gmx_cfg.bits.slottime = 0; -val64_tx_clk = 50; val64_tx_slot = 0x40; val64_tx_burst = 0; -break; -case 1:/* 100Mbps */ -gmx_cfg.bits.speed = 0; -gmx_cfg.bits.slottime = 0; -val64_tx_clk = 5; val64_tx_slot = 0x40; val64_tx_burst = 0; -break; - -case 2:/* 1Gbps */ -gmx_cfg.bits.speed = 1; -gmx_c
Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
On 13 Mar 2010, at 11:53, Carlos A. M. dos Santos wrote: On Fri, Mar 12, 2010 at 10:52 AM, Rui Paulo wrote: On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote: On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Mar 11 14:49:06 2010 New Revision: 205014 URL: http://svn.freebsd.org/changeset/base/205014 Log: Provide groundwork for 32-bit binary compatibility on non-x86 platforms, for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. COMPAT_FREEBSD32 is an unfortunate choice. It can be easily interpreted as "compatible with FreeBSD 3.2". Something like "COMPAT_32BIT" would be more meaningful. There's a lengthy discussion about this on another mailing list. This is unlikely to be changed and emailing the committer who provided valuable time on this code wastes his time and everyone else's. So the user - the person to whom the software is made, theoretically - don't have the right to disagree when he sees a change that looks confusing "because the committers's time is too valuable". Sorry, I was not aware of that policy. Please forgive my audacity. Keep in mind that we, the users, are a bunch of idiots that don't like to become astonished by sudden changes in the meaning of the symbols that we use to see. Thanks God we have you, the holly committers to protect us from our own ignorance. You said that, I didn't. Please refrain from distorting my own words. If you want something discussed, do it on the other list and, please, do it with a grown up attitude because, quite frankly, what you wrote doesn't make sense. Thank you, -- Rui Paulo ___ 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: r205113 - head/lib
Author: imp Date: Sat Mar 13 03:06:48 2010 New Revision: 205113 URL: http://svn.freebsd.org/changeset/base/205113 Log: Make this conform to the other top-level Makefile subdir listings with one file per line. Suggested by: bde Modified: head/lib/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Sat Mar 13 02:10:20 2010(r205112) +++ head/lib/Makefile Sat Mar 13 03:06:48 2010(r205113) @@ -29,19 +29,83 @@ # # Except it appears bind needs to be compiled last -SUBDIR=${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm \ - msun libmd ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ - libtacplus libutil ${_libypclnt} -SUBDIR+=libalias libarchive ${_libatm} libbegemot ${_libbluetooth} \ - ${_libbsnmp} libbz2 libcalendar libcam libcompat libdevinfo \ - libdevstat libdisk libdwarf libedit ${_libefi} libexpat libfetch \ - libftpio libgeom ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \ - ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ - ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ - ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ - ${_libsmdb} ${_libsmutil} libstand \ - ${_libtelnet} ${_libthr} libthread_db libufs libugidfw libulog \ - ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ +SUBDIR_ORDERED=${_csu} \ + libc \ + libbsm \ + libauditd \ + libcom_err \ + libcrypt \ + libelf \ + libkvm \ + msun \ + libmd \ + ncurses \ + ${_libnetgraph} \ + libradius \ + librpcsvc \ + libsbuf \ + libtacplus \ + libutil \ + ${_libypclnt} + +SUBDIR=${SUBDIR_ORDERED} \ + libalias \ + libarchive \ + ${_libatm} \ + libbegemot \ + ${_libbluetooth} \ + ${_libbsnmp} \ + libbz2 \ + libcalendar \ + libcam \ + libcompat \ + libdevinfo \ + libdevstat \ + libdisk \ + libdwarf \ + libedit \ + ${_libefi} \ + libexpat \ + libfetch \ + libftpio \ + libgeom \ + ${_libgpib} \ + ${_libgssapi} \ + ${_librpcsec_gss} \ + libipsec \ + ${_libipx} \ + libjail \ + libkiconv \ + libmagic \ + libmemstat \ + ${_libmilter} \ + ${_libmp} \ + ${_libncp} \ + ${_libngatm} \ + libopie \ + libpam \ + libpcap \ + ${_libpmc} \ + libproc \ + librt \ + ${_libsdp} \ + ${_libsm} \ + ${_libsmb} \ + ${_libsmdb} \ + ${_libsmutil} \ + libstand \ + ${_libtelnet} \ + ${_libthr} \ + libthread_db \ + libufs \ + libugidfw \ + libulog \ + ${_libusbhid} \ + ${_libusb} \ + ${_libvgl} \ + libwrap \ + liby \ + libz \ ${_bind} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia6
On Fri, Mar 12, 2010 at 10:52 AM, Rui Paulo wrote: > > On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote: > >> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn >> wrote: >>> >>> Author: nwhitehorn >>> Date: Thu Mar 11 14:49:06 2010 >>> New Revision: 205014 >>> URL: http://svn.freebsd.org/changeset/base/205014 >>> >>> Log: >>> Provide groundwork for 32-bit binary compatibility on non-x86 platforms, >>> for upcoming 64-bit PowerPC and MIPS support. This renames the >>> COMPAT_IA32 >>> option to COMPAT_FREEBSD32, removes some IA32-specific code from MI >>> parts >>> of the kernel and enhances the freebsd32 compatibility code to support >>> big-endian platforms. >> >> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily >> interpreted as "compatible with FreeBSD 3.2". Something like >> "COMPAT_32BIT" would be more meaningful. > > There's a lengthy discussion about this on another mailing list. > > This is unlikely to be changed and emailing the committer who provided > valuable time on this code wastes his time and everyone else's. So the user - the person to whom the software is made, theoretically - don't have the right to disagree when he sees a change that looks confusing "because the committers's time is too valuable". Sorry, I was not aware of that policy. Please forgive my audacity. Keep in mind that we, the users, are a bunch of idiots that don't like to become astonished by sudden changes in the meaning of the symbols that we use to see. Thanks God we have you, the holly committers to protect us from our own ignorance. -- Not so young, but still crying out Full of anger full of doubt ___ 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: r205112 - head/lib/csu/mips
Author: jmallett Date: Sat Mar 13 02:10:20 2010 New Revision: 205112 URL: http://svn.freebsd.org/changeset/base/205112 Log: Fix spelling of noreorder. Modified: head/lib/csu/mips/crti.S Modified: head/lib/csu/mips/crti.S == --- head/lib/csu/mips/crti.SSat Mar 13 02:09:15 2010(r205111) +++ head/lib/csu/mips/crti.SSat Mar 13 02:10:20 2010(r205112) @@ -6,7 +6,7 @@ __FBSDID("$FreeBSD$"); .globl _init .type _init,%function _init: - .set nreoorder + .set noreorder #if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64)) SETUP_GP #endif ___ 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: r205108 - head/lib/libc/string
Author: delphij Date: Sat Mar 13 00:15:06 2010 New Revision: 205108 URL: http://svn.freebsd.org/changeset/base/205108 Log: Correct bugs fixed but not merged from my own tree. Pointy hat to:delphij MFC after:1 month Modified: head/lib/libc/string/strlen.c Modified: head/lib/libc/string/strlen.c == --- head/lib/libc/string/strlen.c Fri Mar 12 23:57:27 2010 (r205107) +++ head/lib/libc/string/strlen.c Sat Mar 13 00:15:06 2010 (r205108) @@ -99,14 +99,15 @@ strlen(const char *str) lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); va = (*lp - mask01); vb = ((~*lp) & mask80); + lp++; if (va & vb) /* Check if we have \0 in the first part */ - for (p = str; (uintptr_t)p & LONGPTR_MASK; p++) + for (p = str; p < (const char *)lp; p++) if (*p == '\0') return (p - str); /* Scan the rest of the string using word sized operation */ - for (lp = (const unsigned long *)p; ; lp++) { + for (; ; lp++) { va = (*lp - mask01); vb = ((~*lp) & mask80); if (va & vb) { ___ 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: r205105 - head/tools/regression/bin/sh/expansion
Author: jilles Date: Fri Mar 12 23:23:46 2010 New Revision: 205105 URL: http://svn.freebsd.org/changeset/base/205105 Log: sh: Add tests for " and $ inside `. Added: head/tools/regression/bin/sh/expansion/cmdsubst2.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/cmdsubst2.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst2.0 Fri Mar 12 23:23:46 2010(r205105) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '`echo /et[c]/` = "/etc/"' +check '`printf /var/empty%s /et[c]/` = "/var/empty/etc/"' +check '"`echo /et[c]/`" = "/etc/"' +check '`echo "/et[c]/"` = "/etc/"' +check '`printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"' +check '`printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""' +check '"`echo \"/et[c]/\"`" = "/et[c]/"' +check '"`echo "/et[c]/"`" = "/et[c]/"' +check '`echo $$` = $$' +check '"`echo $$`" = $$' +check '`echo \$\$` = $$' +check '"`echo \$\$`" = $$' + +# Command substitutions consisting of a single builtin may be treated +# differently. +check '`:; echo /et[c]/` = "/etc/"' +check '`:; printf /var/empty%s /et[c]/` = "/var/empty/etc/"' +check '"`:; echo /et[c]/`" = "/etc/"' +check '`:; echo "/et[c]/"` = "/etc/"' +check '`:; printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"' +check '`:; printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""' +check '"`:; echo \"/et[c]/\"`" = "/et[c]/"' +check '"`:; echo "/et[c]/"`" = "/et[c]/"' +check '`:; echo $$` = $$' +check '"`:; echo $$`" = $$' +check '`:; echo \$\$` = $$' +check '"`:; echo \$\$`" = $$' + +check '`set -f; echo /et[c]/` = "/etc/"' +check '"`set -f; echo /et[c]/`" = "/et[c]/"' + +exit $((failures > 0)) ___ 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: r205104 - in head/sys: dev/xen/netback netinet netinet6
Author: rrs Date: Fri Mar 12 22:58:52 2010 New Revision: 205104 URL: http://svn.freebsd.org/changeset/base/205104 Log: The proper fix for the delayed SCTP checksum is to have the delayed function take an argument as to the offset to the SCTP header. This allows it to work for V4 and V6. This of course means changing all callers of the function to either pass the header len, if they have it, or create it (ip_hl << 2 or sizeof(ip6_hdr)). PR: 144529 MFC after:2 weeks Modified: head/sys/dev/xen/netback/netback.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_output.c head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_crc32.h head/sys/netinet6/ip6_output.c Modified: head/sys/dev/xen/netback/netback.c == --- head/sys/dev/xen/netback/netback.c Fri Mar 12 22:39:35 2010 (r205103) +++ head/sys/dev/xen/netback/netback.c Fri Mar 12 22:58:52 2010 (r205104) @@ -302,7 +302,7 @@ fixup_checksum(struct mbuf *m) m->m_pkthdr.csum_flags &= ~CSUM_TCP; #ifdef SCTP } else if (sw_csum & CSUM_SCTP) { - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, iphlen); sw_csum &= ~CSUM_SCTP; #endif } else { Modified: head/sys/netinet/ip_divert.c == --- head/sys/netinet/ip_divert.cFri Mar 12 22:39:35 2010 (r205103) +++ head/sys/netinet/ip_divert.cFri Mar 12 22:58:52 2010 (r205104) @@ -227,7 +227,7 @@ divert_packet(struct mbuf *m, int incomi #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { ip->ip_len = ntohs(ip->ip_len); - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; ip->ip_len = htons(ip->ip_len); } Modified: head/sys/netinet/ip_ipsec.c == --- head/sys/netinet/ip_ipsec.c Fri Mar 12 22:39:35 2010(r205103) +++ head/sys/netinet/ip_ipsec.c Fri Mar 12 22:58:52 2010(r205104) @@ -342,7 +342,7 @@ ip_ipsec_output(struct mbuf **m, struct } #ifdef SCTP if ((*m)->m_pkthdr.csum_flags & CSUM_SCTP) { - sctp_delayed_cksum(*m); + sctp_delayed_cksum(*m, (uint32_t)(ip->ip_hl << 2)); (*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif Modified: head/sys/netinet/ip_output.c == --- head/sys/netinet/ip_output.cFri Mar 12 22:39:35 2010 (r205103) +++ head/sys/netinet/ip_output.cFri Mar 12 22:58:52 2010 (r205104) @@ -583,7 +583,7 @@ passout: } #ifdef SCTP if (sw_csum & CSUM_SCTP) { - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); sw_csum &= ~CSUM_SCTP; } #endif @@ -725,7 +725,7 @@ ip_fragment(struct ip *ip, struct mbuf * #ifdef SCTP if (m0->m_pkthdr.csum_flags & CSUM_SCTP && (if_hwassist_flags & CSUM_IP_FRAGS) == 0) { - sctp_delayed_cksum(m0); + sctp_delayed_cksum(m0, hlen); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif Modified: head/sys/netinet/sctp_crc32.c == --- head/sys/netinet/sctp_crc32.c Fri Mar 12 22:39:35 2010 (r205103) +++ head/sys/netinet/sctp_crc32.c Fri Mar 12 22:58:52 2010 (r205104) @@ -127,14 +127,12 @@ sctp_calculate_cksum(struct mbuf *m, uin void -sctp_delayed_cksum(struct mbuf *m) +sctp_delayed_cksum(struct mbuf *m, uint32_t offset) { struct ip *ip; uint32_t checksum; - uint32_t offset; ip = mtod(m, struct ip *); - offset = ip->ip_hl << 2; checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); Modified: head/sys/netinet/sctp_crc32.h == --- head/sys/netinet/sctp_crc32.h Fri Mar 12 22:39:35 2010 (r205103) +++ head/sys/netinet/sctp_crc32.h Fri Mar 12 22:58:52 2010 (r205104) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #if defined(_KERNEL) || defined(__Userspace__) uint32_t sctp_calculate_cksum(struct mbuf *, uint32_t); -void sctp_delayed_cksum(struct mbuf *); +void sctp_delayed_cksum(struct mbuf *, uint32_t offset); #endif /* _KERNEL */ Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Fri
svn commit: r205103 - head/sys/arm/conf
Author: ticso Date: Fri Mar 12 22:39:35 2010 New Revision: 205103 URL: http://svn.freebsd.org/changeset/base/205103 Log: fix type in comment Modified: head/sys/arm/conf/BWCT.hints Modified: head/sys/arm/conf/BWCT.hints == --- head/sys/arm/conf/BWCT.hintsFri Mar 12 21:34:23 2010 (r205102) +++ head/sys/arm/conf/BWCT.hintsFri Mar 12 22:39:35 2010 (r205103) @@ -4,6 +4,6 @@ hint.ds1672_rtc.0.at="iicbus0" hint.ds1672_rtc.0.addr=0xd0 -# NAtional Semiconductor LM75 temperature sensor sitting on the I2C bus +# National Semiconductor LM75 temperature sensor sitting on the I2C bus hint.lm75.0.at="iicbus0" hint.lm75.0.addr=0x9e ___ 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: r205102 - head/sys/dev/agp
Author: rnoland Date: Fri Mar 12 21:34:23 2010 New Revision: 205102 URL: http://svn.freebsd.org/changeset/base/205102 Log: Add support of Intel Pineview chips, aka IGD. MFC after:3 days Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c == --- head/sys/dev/agp/agp_i810.c Fri Mar 12 21:20:36 2010(r205101) +++ head/sys/dev/agp/agp_i810.c Fri Mar 12 21:34:23 2010(r205102) @@ -70,6 +70,7 @@ enum { CHIP_I915, /* 915G/915GM */ CHIP_I965, /* G965 */ CHIP_G33, /* G33/Q33/Q35 */ + CHIP_IGD, /* Pineview */ CHIP_G4X, /* G45/Q45 */ }; @@ -163,6 +164,10 @@ static const struct agp_i810_match { "Intel G33 SVGA controller"}, {0x29D28086, CHIP_G33, 0x0002, "Intel Q33 SVGA controller"}, + {0xA0018086, CHIP_IGD, 0x0001, + "Intel Pineview SVGA controller"}, + {0xA0118086, CHIP_IGD, 0x0001, + "Intel Pineview (M) SVGA controller"}, {0x2A028086, CHIP_I965, 0x0002, "Intel GM965 SVGA controller"}, {0x2A128086, CHIP_I965, 0x0002, @@ -170,7 +175,7 @@ static const struct agp_i810_match { {0x2A428086, CHIP_G4X, 0x0002, "Intel GM45 SVGA controller"}, {0x2E028086, CHIP_G4X, 0x0002, - "Intel 4 Series SVGA controller"}, + "Intel Eaglelake SVGA controller"}, {0x2E128086, CHIP_G4X, 0x0002, "Intel Q45 SVGA controller"}, {0x2E228086, CHIP_G4X, 0x0002, @@ -290,6 +295,7 @@ agp_i810_probe(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_IGD: case CHIP_G4X: deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); if ((deven & AGP_I915_DEVEN_D2F0) == @@ -355,6 +361,7 @@ agp_i810_dump_regs(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_IGD: case CHIP_G4X: device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); @@ -390,6 +397,7 @@ agp_i810_attach(device_t dev) break; case CHIP_I915: case CHIP_G33: + case CHIP_IGD: sc->sc_res_spec = agp_i915_res_spec; agp_set_aperture_resource(dev, AGP_I915_GMADR); break; @@ -405,7 +413,8 @@ agp_i810_attach(device_t dev) return error; if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && - sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xul) + sc->chiptype != CHIP_IGD && sc->chiptype != CHIP_G4X && + ptoa((vm_paddr_t)Maxmem) > 0xul) { device_printf(dev, "agp_i810.c does not support physical " "memory above 4GB.\n"); @@ -489,7 +498,7 @@ agp_i810_attach(device_t dev) gatt->ag_physical = pgtblctl & ~1; } else if (sc->chiptype == CHIP_I855 || sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || - sc->chiptype == CHIP_G4X) { + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { unsigned int gcc1, pgtblctl, stolen, gtt_size; /* Stolen memory is set up at the beginning of the aperture by @@ -551,6 +560,7 @@ agp_i810_attach(device_t dev) return EINVAL; } break; + case CHIP_IGD: case CHIP_G4X: gtt_size = 0; break; @@ -585,6 +595,7 @@ agp_i810_attach(device_t dev) if (sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 48 * 1024; } else { @@ -595,6 +606,7 @@ agp_i810_attach(device_t dev) if (sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 64 * 1024; } else { @@ -604,6 +616,7 @@ agp_i810_attach(device_t dev) case AGP_G33_GCC1_GMS_STOLEN_128M: if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 128 * 1024;
svn commit: r205100 - head/lib/libc/string
Author: delphij Date: Fri Mar 12 21:15:35 2010 New Revision: 205100 URL: http://svn.freebsd.org/changeset/base/205100 Log: Follow up commit to reindent the code. MFC after:1 month Modified: head/lib/libc/string/strlen.c Modified: head/lib/libc/string/strlen.c == --- head/lib/libc/string/strlen.c Fri Mar 12 21:14:56 2010 (r205099) +++ head/lib/libc/string/strlen.c Fri Mar 12 21:15:35 2010 (r205100) @@ -101,27 +101,27 @@ strlen(const char *str) vb = ((~*lp) & mask80); if (va & vb) /* Check if we have \0 in the first part */ - for (p = str; (uintptr_t)p & LONGPTR_MASK; p++) - if (*p == '\0') - return (p - str); + for (p = str; (uintptr_t)p & LONGPTR_MASK; p++) + if (*p == '\0') + return (p - str); /* Scan the rest of the string using word sized operation */ for (lp = (const unsigned long *)p; ; lp++) { va = (*lp - mask01); vb = ((~*lp) & mask80); if (va & vb) { - p = (const char *)(lp); - testbyte(0); - testbyte(1); - testbyte(2); - testbyte(3); + p = (const char *)(lp); + testbyte(0); + testbyte(1); + testbyte(2); + testbyte(3); #if (LONG_BIT >= 64) - testbyte(4); - testbyte(5); - testbyte(6); - testbyte(7); + testbyte(4); + testbyte(5); + testbyte(6); + testbyte(7); #endif - } + } } /* NOTREACHED */ ___ 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: r205099 - head/lib/libc/string
Author: delphij Date: Fri Mar 12 21:14:56 2010 New Revision: 205099 URL: http://svn.freebsd.org/changeset/base/205099 Log: Two optimizations to MI strlen(3) inspired by David S. Miller's blog posting [1]. - Use word-sized test for unaligned pointer before working the hard way. Memory page boundary is always integral multiple of a word alignment boundary. Therefore, if we can access memory referenced by pointer p, then (p & ~word mask) must be also accessible. - Better utilization of multi-issue processor's ability of concurrency. The previous implementation utilized a formular that must be executed sequentially. However, the ~, & and - operations can actually be caculated at the same time when the operand were different and unrelated. The original Hacker's Delight formular also offered consistent performance regardless whether the input would contain characters with their highest-bit set, as it catches real nul characters only. These two optimizations has shown further improvements over the previous implementation on microbenchmarks on i386 and amd64 CPU including Pentium 4, Core Duo 2 and i7. [1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1 MFC after:1 month Modified: head/lib/libc/string/strlen.c Modified: head/lib/libc/string/strlen.c == --- head/lib/libc/string/strlen.c Fri Mar 12 21:06:35 2010 (r205098) +++ head/lib/libc/string/strlen.c Fri Mar 12 21:14:56 2010 (r205099) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Xin LI + * Copyright (c) 2009, 2010 Xin LI * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,15 +43,17 @@ __FBSDID("$FreeBSD$"); * ((x - 0x0101) & ~x & 0x8080) * * would evaluate to a non-zero value iff any of the bytes in the - * original word is zero. However, we can further reduce ~1/3 of - * time if we consider that strlen() usually operate on 7-bit ASCII - * by employing the following expression, which allows false positive - * when high bit of 1 and use the tail case to catch these case: + * original word is zero. * - * ((x - 0x0101) & 0x8080) + * On multi-issue processors, we can divide the above expression into: + * a) (x - 0x0101) + * b) (~x & 0x8080) + * c) a & b * - * This is more than 5.2 times as fast as the raw implementation on - * Intel T7300 under long mode for strings longer than word length. + * Where, a) and b) can be partially computed in parallel. + * + * The algorithm above is found on "Hacker's Delight" by + * Henry S. Warren, Jr. */ /* Magic numbers for the algorithm */ @@ -82,15 +84,32 @@ strlen(const char *str) { const char *p; const unsigned long *lp; + long va, vb; - /* Skip the first few bytes until we have an aligned p */ + /* +* Before trying the hard (unaligned byte-by-byte access) way +* to figure out whether there is a nul character, try to see +* if there is a nul character is within this accessible word +* first. +* +* p and (p & ~LONGPTR_MASK) must be equally accessible since +* they always fall in the same memory page, as long as page +* boundaries is integral multiple of word size. +*/ + lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); + va = (*lp - mask01); + vb = ((~*lp) & mask80); + if (va & vb) + /* Check if we have \0 in the first part */ for (p = str; (uintptr_t)p & LONGPTR_MASK; p++) if (*p == '\0') return (p - str); /* Scan the rest of the string using word sized operation */ - for (lp = (const unsigned long *)p; ; lp++) - if ((*lp - mask01) & mask80) { + for (lp = (const unsigned long *)p; ; lp++) { + va = (*lp - mask01); + vb = ((~*lp) & mask80); + if (va & vb) { p = (const char *)(lp); testbyte(0); testbyte(1); @@ -103,8 +122,8 @@ strlen(const char *str) testbyte(7); #endif } + } /* NOTREACHED */ return (0); } - ___ 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: r205024 - head/sys/net
julian> probably should add a flag that means "we have media state" julian> and if it is not set, assume it is always on. qing> That's a good idea. I will take your approach. I do too. While I have many of the older cards that don't support media detect (because the chips don't report that info), it will take some time to test them all out... Warner ___ 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: r205097 - head/sys/net
Author: kmacy Date: Fri Mar 12 19:58:51 2010 New Revision: 205097 URL: http://svn.freebsd.org/changeset/base/205097 Log: flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB pointed out by jkim@ Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Mar 12 19:43:39 2010(r205096) +++ head/sys/net/flowtable.cFri Mar 12 19:58:51 2010(r205097) @@ -905,20 +905,6 @@ flowtable_set_hashkey(struct flentry *fl hashkey[i] = key[i]; } - -static uint32_t * -flowtable_get_hashkey(struct flentry *fle) -{ - uint32_t *hashkey; - - if (fle->f_flags & FL_IPV6) - hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; - else - hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; - - return (hashkey); -} - static int flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key, uint32_t fibnum, struct route *ro, uint16_t flags) @@ -1601,6 +1587,19 @@ VNET_SYSUNINIT(flowtable_uninit, SI_SUB_ #endif #ifdef DDB +static uint32_t * +flowtable_get_hashkey(struct flentry *fle) +{ + uint32_t *hashkey; + + if (fle->f_flags & FL_IPV6) + hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; + else + hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; + + return (hashkey); +} + static bitstr_t * flowtable_mask_pcpu(struct flowtable *ft, int cpuid) { ___ 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: r205096 - head/sys/dev/agp
Author: rnoland Date: Fri Mar 12 19:43:39 2010 New Revision: 205096 URL: http://svn.freebsd.org/changeset/base/205096 Log: Add pci ids for Intel Ironlake chipsets. These behave just like g45 for agp. Tested by:Torfinn Ingolfsen MFC after:3 days Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c == --- head/sys/dev/agp/agp_i810.c Fri Mar 12 19:42:42 2010(r205095) +++ head/sys/dev/agp/agp_i810.c Fri Mar 12 19:43:39 2010(r205096) @@ -177,6 +177,10 @@ static const struct agp_i810_match { "Intel G45 SVGA controller"}, {0x2E328086, CHIP_G4X, 0x0002, "Intel G41 SVGA controller"}, + {0x00428086, CHIP_G4X, 0x0002, + "Intel Ironlake (D) SVGA controller"}, + {0x00468086, CHIP_G4X, 0x0002, + "Intel Ironlake (M) SVGA controller"}, {0, 0, 0, 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"
svn commit: r205095 - head/sys/net
Author: jkim Date: Fri Mar 12 19:42:42 2010 New Revision: 205095 URL: http://svn.freebsd.org/changeset/base/205095 Log: Fix a style(9) nit. Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Fri Mar 12 19:29:27 2010(r205094) +++ head/sys/net/bpf.c Fri Mar 12 19:42:42 2010(r205095) @@ -1580,8 +1580,7 @@ filt_bpfread(struct knote *kn, long hint kn->kn_data = d->bd_slen; if (d->bd_hbuf) kn->kn_data += d->bd_hlen; - } - else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) { + } else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) { callout_reset(&d->bd_callout, d->bd_rtout, bpf_timed_out, d); d->bd_state = BPF_WAITING; ___ 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: r205024 - head/sys/net
On Mar 12, 2010, at 6:56 PM, Qing Li wrote: > Right now I like to implement Robert's suggestion of using if_capabilities > field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag. > The routing decision will check against the if_link_state if this bit > is set. > > Only a handful of drivers have this capability. So updating those drivers > is a small task. > > Do we agree on this approach? I'm good with this approach -- do you mind going with IFCAP_LINKSTATE or something similarly a bit shorter? Most of the other capability names are pretty short, and it will prevent the display in ifconfig from growing too much as the capability will be common. Thanks! Robert___ 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: r205093 - head/sys/net
Author: kmacy Date: Fri Mar 12 19:26:45 2010 New Revision: 205093 URL: http://svn.freebsd.org/changeset/base/205093 Log: re-update copyright to 2010 pointed out by danfe@ Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Mar 12 19:14:58 2010(r205092) +++ head/sys/net/flowtable.cFri Mar 12 19:26:45 2010(r205093) @@ -1,6 +1,6 @@ /** -Copyright (c) 2008-2009, BitGravity Inc. +Copyright (c) 2008-2010, BitGravity Inc. All rights reserved. Redistribution and use in source and binary forms, with or without ___ 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: r205092 - head/sys/net
Author: jkim Date: Fri Mar 12 19:14:58 2010 New Revision: 205092 URL: http://svn.freebsd.org/changeset/base/205092 Log: Tidy up callout for select(2) and read timeout. - Add a missing callout_drain(9) before the descriptor deallocation.[1] - Prefer callout_init_mtx(9) over callout_init(9) and let the callout subsystem handle the mutex for callout function. PR: kern/144453 Submitted by: Alexander Sack (asack at niksun dot com)[1] MFC after:1 week Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Fri Mar 12 18:41:41 2010(r205091) +++ head/sys/net/bpf.c Fri Mar 12 19:14:58 2010(r205092) @@ -614,6 +614,7 @@ bpf_dtor(void *data) mac_bpfdesc_destroy(d); #endif /* MAC */ knlist_destroy(&d->bd_sel.si_note); + callout_drain(&d->bd_callout); bpf_freed(d); free(d, M_BPF); } @@ -651,7 +652,7 @@ bpfopen(struct cdev *dev, int flags, int mac_bpfdesc_create(td->td_ucred, d); #endif mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF); - callout_init(&d->bd_callout, CALLOUT_MPSAFE); + callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0); knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx); return (0); @@ -807,13 +808,15 @@ bpf_timed_out(void *arg) { struct bpf_d *d = (struct bpf_d *)arg; - BPFD_LOCK(d); + BPFD_LOCK_ASSERT(d); + + if (callout_pending(&d->bd_callout) || !callout_active(&d->bd_callout)) + return; if (d->bd_state == BPF_WAITING) { d->bd_state = BPF_TIMED_OUT; if (d->bd_slen != 0) bpf_wakeup(d); } - BPFD_UNLOCK(d); } static int ___ 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: r205024 - head/sys/net
> > We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to > this value in ether_ifattach(). And Qing should treat this value as > LINK_STATE_UP in routing decision until better times. > Thanks everyone for your input. I generally try to avoid overloading a variable to have more than 1 meaning. For example, the if_tun interface is in LINK_STATE_UNKNOWN until it's opened, then the link can be one of the other two states. Also, some of the pseudo drivers such as if_tun do not call ether_ifattach(). Right now I like to implement Robert's suggestion of using if_capabilities field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag. The routing decision will check against the if_link_state if this bit is set. Only a handful of drivers have this capability. So updating those drivers is a small task. Do we agree on this approach? -- Qing ___ 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: r205091 - head/sys/dev/msk
Author: yongari Date: Fri Mar 12 18:41:41 2010 New Revision: 205091 URL: http://svn.freebsd.org/changeset/base/205091 Log: Implement Rx checksum offloading for Yukon EC, Yukon Ultra, Yukon FE and Yukon Ultra2. These controllers provide very simple checksum computation mechanism and it requires additional pseudo header checksum computation in upper stack. Even though I couldn't see much performance difference with/without Rx checksum offloading it may help notebook based controllers. Actually controller can compute two checksum value by giving different starting position of checksum computation on received frame. However, for long time, Marvell's checksum offloading engine have been known to have several silicon bugs so don't blindly trust computed partial checksum value. Instead, compute partial checksum twice by giving the same checksum computation position and compare the result. If the value is different it's clear indication of hardware bug. This configuration lose IP checksum offloading capability but I think it's better to take safe route. Note, Rx checksum offloading for Yukon XL was still disabled due to known silicon bug. Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c == --- head/sys/dev/msk/if_msk.c Fri Mar 12 18:18:04 2010(r205090) +++ head/sys/dev/msk/if_msk.c Fri Mar 12 18:41:41 2010(r205091) @@ -266,6 +266,7 @@ static void msk_intr_hwerr(struct msk_so #ifndef __NO_STRICT_ALIGNMENT static __inline void msk_fixup_rx(struct mbuf *); #endif +static __inline void msk_rxcsum(struct msk_if_softc *, uint32_t, struct mbuf *); static void msk_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int); static void msk_jumbo_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int); static void msk_txeof(struct msk_if_softc *, int); @@ -290,6 +291,7 @@ static int msk_txrx_dma_alloc(struct msk static int msk_rx_dma_jalloc(struct msk_if_softc *); static void msk_txrx_dma_free(struct msk_if_softc *); static void msk_rx_dma_jfree(struct msk_if_softc *); +static int msk_rx_fill(struct msk_if_softc *, int); static int msk_init_rx_ring(struct msk_if_softc *); static int msk_init_jumbo_rx_ring(struct msk_if_softc *); static void msk_init_tx_ring(struct msk_if_softc *); @@ -643,6 +645,54 @@ msk_setvlan(struct msk_if_softc *sc_if, } static int +msk_rx_fill(struct msk_if_softc *sc_if, int jumbo) +{ + uint16_t idx; + int i; + + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && + (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) { + /* Wait until controller executes OP_TCPSTART command. */ + for (i = 10; i > 0; i--) { + DELAY(10); + idx = CSR_READ_2(sc_if->msk_softc, + Y2_PREF_Q_ADDR(sc_if->msk_rxq, + PREF_UNIT_GET_IDX_REG)); + if (idx != 0) + break; + } + if (i == 0) { + device_printf(sc_if->msk_if_dev, + "prefetch unit stuck?\n"); + return (ETIMEDOUT); + } + /* +* Fill consumed LE with free buffer. This can be done +* in Rx handler but we don't want to add special code +* in fast handler. +*/ + if (jumbo > 0) { + if (msk_jumbo_newbuf(sc_if, 0) != 0) + return (ENOBUFS); + bus_dmamap_sync(sc_if->msk_cdata.msk_jumbo_rx_ring_tag, + sc_if->msk_cdata.msk_jumbo_rx_ring_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } else { + if (msk_newbuf(sc_if, 0) != 0) + return (ENOBUFS); + bus_dmamap_sync(sc_if->msk_cdata.msk_rx_ring_tag, + sc_if->msk_cdata.msk_rx_ring_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } + sc_if->msk_cdata.msk_rx_prod = 0; + CSR_WRITE_2(sc_if->msk_softc, + Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_PUT_IDX_REG), + sc_if->msk_cdata.msk_rx_prod); + } + return (0); +} + +static int msk_init_rx_ring(struct msk_if_softc *sc_if) { struct msk_ring_data *rd; @@ -658,7 +708,21 @@ msk_init_rx_ring(struct msk_if_softc *sc rd = &sc_if->msk_rdata; bzero(rd->msk_rx_ring, sizeof(struct msk_rx_desc) * MSK_RX_RING_CNT); prod = sc_if->msk_cdata.msk_rx_prod; - for (i = 0; i < MSK_RX_RING_CNT; i++) { + i = 0; + /* Have controller know how to compute Rx checksum. */ + if ((sc_if->msk_flags & MSK_FLAG_DESCV2
svn commit: r205090 - head/sys/dev/bge
Author: yongari Date: Fri Mar 12 18:18:04 2010 New Revision: 205090 URL: http://svn.freebsd.org/changeset/base/205090 Log: Reorder interrupt handler a bit such that producer/consumer index of status block is read first before acknowledging the interrupts. Otherwise bge(4) may get stale status block as acknowledging an interrupt may yield another status block update. Reviewed by: marius Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Fri Mar 12 17:55:29 2010(r205089) +++ head/sys/dev/bge/if_bge.c Fri Mar 12 18:18:04 2010(r205090) @@ -3654,6 +3654,22 @@ bge_intr(void *xsc) #endif /* +* Do the mandatory PCI flush as well as get the link status. +*/ + statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; + + /* Make sure the descriptor ring indexes are coherent. */ + bus_dmamap_sync(sc->bge_cdata.bge_status_tag, + sc->bge_cdata.bge_status_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; + tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; + sc->bge_ldata.bge_status_block->bge_status = 0; + bus_dmamap_sync(sc->bge_cdata.bge_status_tag, + sc->bge_cdata.bge_status_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + + /* * Ack the interrupt by writing something to BGE_MBX_IRQ0_LO. Don't * disable interrupts by writing nonzero like we used to, since with * our current organization this just gives complications and @@ -3675,22 +3691,6 @@ bge_intr(void *xsc) */ bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); - /* -* Do the mandatory PCI flush as well as get the link status. -*/ - statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; - - /* Make sure the descriptor ring indexes are coherent. */ - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, - sc->bge_cdata.bge_status_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; - tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; - sc->bge_ldata.bge_status_block->bge_status = 0; - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, - sc->bge_cdata.bge_status_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 && sc->bge_chipid != BGE_CHIPID_BCM5700_B2) || statusword || sc->bge_link_evt) ___ 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: r205089 - head/usr.bin/unifdef
Author: fanf Date: Fri Mar 12 17:55:29 2010 New Revision: 205089 URL: http://svn.freebsd.org/changeset/base/205089 Log: Update to upstream version 2.3 Add -V (display version) and -S (list controlling symbols per #if with nesting information) options, and improve unifdefall debug output. Done committing 0 revisions to SVN Obtained from: http://dotat.at/prog/unifdef Modified: head/usr.bin/unifdef/unifdef.1 head/usr.bin/unifdef/unifdef.c head/usr.bin/unifdef/unifdefall.sh Modified: head/usr.bin/unifdef/unifdef.1 == --- head/usr.bin/unifdef/unifdef.1 Fri Mar 12 17:23:26 2010 (r205088) +++ head/usr.bin/unifdef/unifdef.1 Fri Mar 12 17:55:29 2010 (r205089) @@ -29,11 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 -.\"$dotat: unifdef/unifdef.1,v 1.63 2010/02/19 16:41:15 fanf2 Exp $ .\" $FreeBSD$ .\" -.Dd January 19, 2010 +.Dd March 11, 2010 .Dt UNIFDEF 1 .Os .Sh NAME @@ -41,7 +39,7 @@ .Nd remove preprocessor conditionals from code .Sh SYNOPSIS .Nm -.Op Fl BbcdeKknst +.Op Fl bBcdeKknsStV .Op Fl I Ns Ar path .Op Fl D Ns Ar sym Ns Op = Ns Ar val .Op Fl U Ns Ar sym @@ -184,12 +182,6 @@ Specify that a symbol is undefined. If the same symbol appears in more than one argument, the last occurrence dominates. .Pp -.It Fl B -Compress blank lines around a deleted section. -Mutually exclusive with the -.Fl b -option. -.Pp .It Fl b Replace removed lines with blank lines instead of deleting them. @@ -197,6 +189,12 @@ Mutually exclusive with the .Fl B option. .Pp +.It Fl B +Compress blank lines around a deleted section. +Mutually exclusive with the +.Fl b +option. +.Pp .It Fl c If the .Fl c @@ -285,6 +283,13 @@ for creating .Nm command lines. .Pp +.It Fl S +Like the +.Fl s +option, but the nesting depth of each symbol is also printed. +This is useful for working out the number of possible combinations +of interdependent defined/undefined symbols. +.Pp .It Fl t Disables parsing for C comments and line continuations, @@ -329,6 +334,9 @@ for compatibility with .Xr cpp 1 and to simplify the implementation of .Nm unifdefall . +.Pp +.It Fl V +Print version details. .El .Pp The Modified: head/usr.bin/unifdef/unifdef.c == --- head/usr.bin/unifdef/unifdef.c Fri Mar 12 17:23:26 2010 (r205088) +++ head/usr.bin/unifdef/unifdef.c Fri Mar 12 17:55:29 2010 (r205089) @@ -56,12 +56,12 @@ #include #include -#ifdef __IDSTRING -__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.198 2010/02/19 16:37:05 fanf2 Exp $"); -#endif -#ifdef __FBSDID -__FBSDID("$FreeBSD$"); -#endif +const char copyright[] = +"@(#) $Version: unifdef-2.3 $\n" +"@(#) $FreeBSD$\n" +"@(#) $Author: Tony Finch (d...@dotat.at) $\n" +"@(#) $URL: http://dotat.at/prog/unifdef $\n" +; /* types of input lines: */ typedef enum { @@ -172,6 +172,7 @@ static bool strictlogic;/* static bool killconsts;/* -k: eval constant #ifs */ static bool lnnum; /* -n: add #line directives */ static bool symlist; /* -s: output symbol list */ +static bool symdepth; /* -S: output symbol depth */ static bool text; /* -t: this is a text file */ static const char *symname[MAXSYMS]; /* symbol name */ @@ -204,6 +205,8 @@ static int delcount; /* co static unsigned blankcount;/* count of blank lines */ static unsigned blankmax; /* maximum recent blankcount */ static bool constexpr; /* constant #if expression */ +static bool zerosyms = true; /* to format symdepth output */ +static bool firstsym; /* ditto */ static int exitstat; /* program exit status */ @@ -228,6 +231,7 @@ static void state(Ifstate); static int strlcmp(const char *, const char *, size_t); static void unnest(void); static void usage(void); +static void version(void); #define endsym(c) (!isalnum((unsigned char)c) && c != '_') @@ -239,7 +243,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:o:BbcdeKklnst")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:I:o:bBcdeKklnsStV")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -261,16 +265,15 @@ main(int argc, char *argv[]) case 'U': /* undef a symbol */ addsym(false, false, optarg); brea
Re: svn commit: r205024 - head/sys/net
In message: Juli Mallett writes: : On Thu, Mar 11, 2010 at 15:30, Qing Li wrote: : >> : >> A couple of questions: : >> : >> (1) It used to be the case that quite a few interface drivers and types : >> didn't have a notion of "link up" -- especially older ethernet devices. Do : >> those all have the same problem? It was probably a design oversight that : >> devices don't declare an explicit capability for "can report link state". : >> : > : > What you raised is definitely a possibility and these fixes take the : > similar approach. I am going to try and go through each of these : > drivers in /sys/dev/ and converting them, very soon. : : Go through drivers in the embedded port directories, too. The Octeon : port's Ethernet driver was broken by this, and it looks like the : Atheros if_arge is probably broken, too. I would even suggest going : back to the old behavior briefly while the port maintainers are given : an opportunity to update their drivers. Actually, it looks like only : MIPS has Ethernet drivers outside of dev/ at a quick glance, but I'd : be surprised if there weren't other broken examples. arm has them as well. sys/arm/at91/if_ate.c. Powerpc does as well. Warner ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
On Fri, Mar 12, 2010 at 10:52:27PM +0900, Rui Paulo wrote: > On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote: >> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn >> wrote: >>> Author: nwhitehorn >>> Date: Thu Mar 11 14:49:06 2010 >>> New Revision: 205014 >>> URL: http://svn.freebsd.org/changeset/base/205014 >>> >>> Log: >>> Provide groundwork for 32-bit binary compatibility on non-x86 platforms, >>> for upcoming 64-bit PowerPC and MIPS support. This renames the >>> COMPAT_IA32 >>> option to COMPAT_FREEBSD32, removes some IA32-specific code from MI >>> parts >>> of the kernel and enhances the freebsd32 compatibility code to support >>> big-endian platforms. >> >> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily >> interpreted as "compatible with FreeBSD 3.2". Something like >> "COMPAT_32BIT" would be more meaningful. > > There's a lengthy discussion about this on another mailing list. > > This is unlikely to be changed and emailing the committer who provided > valuable time on this code wastes his time and everyone else's. $ cd /usr/src/sys $ wcfind . -type f | xargs sed -i '' -e 's/COMPAT_FREEBSD32/COMPAT_32BIT/g' really doesn't take much developer time. I can whip up the patch for review. -- -- David (obr...@freebsd.org) ___ 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: r205024 - head/sys/net
On Thu, Mar 11, 2010 at 11:15:21PM -0800, Julian Elischer wrote: J> Juli Mallett wrote: J> > On Thu, Mar 11, 2010 at 15:39, Qing Li wrote: J> >> I guess it's a good time to clean things up. The if_link_state code has been J> >> around for quite some time, either it be fully utilized or not be there at all. J> >> The inconsistency is the root cause. J> > J> > Sure. There is an increasing amount of stuff that network drivers are J> > expected to do, but they work without doing them. It's easy to think J> > you have a functioning network driver and that you can get by without J> > adding support for media changes and link status reporting, etc. J> > J> >> I will try going through these tonight and hopefully the fix all take a J> >> common approach. J> J> probably should add a flag that means "we have media state" J> and if it is not set, assume it is always on. We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to this value in ether_ifattach(). And Qing should treat this value as LINK_STATE_UP in routing decision until better times. -- 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
Quoting Nathan Whitehorn (from Fri, 12 Mar 2010 08:19:00 -0600): This name was picked for the following reasons, after discussion with several others: it is analogous to the existing COMPAT_LINUX32, the Datapoint: COMPAT_LINUX is native (64bit on 64bit arch, 32bit on 32bit arch) emulation COMPAT_LINUX32 is 32bit on 64bit arch emulation (useless on 32bit arch) There is no COMAPT_LINUXxyz with xyz being a specific linux version, the linux version to emulate is chosen by a sysctl (run time switch possible if no linux program is running). As such the COMPAT_LINUXyy is conceptionally different from what we have with COMPAT_FREEBSDy (compatibility stuff for FreeBSD version y). I think this is the base of the complains we see here. Bye, Alexander. -- Etiquette is for those with no breeding; fashion for those with no taste. http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ 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: r205083 - in head: sys/netgraph usr.bin/netstat
Author: glebius Date: Fri Mar 12 15:04:59 2010 New Revision: 205083 URL: http://svn.freebsd.org/changeset/base/205083 Log: Now fix functionality of 'netstat -f netgraph' that hasn't worked starting from netgraph import in 1999. netstat(8) used pointer to node as node address, oops. That didn't work, we need the node ID in brackets to successfully address a node. We can't look into ng_node, due to inability to include netgraph/netgraph.h in userland code. So let the node make a hint for a userland, storing the node ID in its private data. MFC after:2 weeks Modified: head/sys/netgraph/ng_socket.c head/sys/netgraph/ng_socketvar.h head/usr.bin/netstat/netgraph.c Modified: head/sys/netgraph/ng_socket.c == --- head/sys/netgraph/ng_socket.c Fri Mar 12 14:51:42 2010 (r205082) +++ head/sys/netgraph/ng_socket.c Fri Mar 12 15:04:59 2010 (r205083) @@ -552,6 +552,9 @@ ng_attach_cntl(struct socket *so) return (error); } + /* Store a hint for netstat(1). */ + priv->node_id = priv->node->nd_ID; + /* Link the node and the private data. */ NG_NODE_SET_PRIVATE(priv->node, priv); NG_NODE_REF(priv->node); Modified: head/sys/netgraph/ng_socketvar.h == --- head/sys/netgraph/ng_socketvar.hFri Mar 12 14:51:42 2010 (r205082) +++ head/sys/netgraph/ng_socketvar.hFri Mar 12 15:04:59 2010 (r205083) @@ -61,6 +61,7 @@ struct ngsock { intrefs; struct mtx mtx;/* mtx to wait on */ int error; /* place to store error */ + ng_ID_t node_id;/* a hint for netstat(1) to find the node */ }; #defineNGS_FLAG_NOLINGER 1 /* close with last hook */ Modified: head/usr.bin/netstat/netgraph.c == --- head/usr.bin/netstat/netgraph.c Fri Mar 12 14:51:42 2010 (r205082) +++ head/usr.bin/netstat/netgraph.c Fri Mar 12 15:04:59 2010 (r205083) @@ -166,14 +166,14 @@ netgraphprotopr(u_long off, const char * name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); /* Get ngsock structure */ - if (ngpcb.sockdata == 0)/* unconnected data socket */ + if (ngpcb.sockdata == NULL) /* unconnected data socket */ goto finish; kread((u_long)ngpcb.sockdata, (char *)&info, sizeof(info)); /* Get info on associated node */ - if (info.node == 0 || csock == -1) + if (info.node_id == 0 || csock == -1) goto finish; - snprintf(path, sizeof(path), "[%lx]:", (u_long) info.node); + snprintf(path, sizeof(path), "[%x]:", info.node_id); if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_NODEINFO, NULL, 0) < 0) goto finish; ___ 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: r205082 - head/sys/netgraph
Author: glebius Date: Fri Mar 12 14:51:42 2010 New Revision: 205082 URL: http://svn.freebsd.org/changeset/base/205082 Log: Fix 'netstat -f netgraph', which I had broken in r163463 ling time ago in 2006. This linked list is actually needed for userland. PR: kern/140446 Submitted by: Adrian Steinmann Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c == --- head/sys/netgraph/ng_socket.c Fri Mar 12 13:53:52 2010 (r205081) +++ head/sys/netgraph/ng_socket.c Fri Mar 12 14:51:42 2010 (r205082) @@ -156,6 +156,11 @@ static u_long ngpdg_recvspace = 20 * 102 SYSCTL_INT(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW, &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams"); +/* List of all sockets (for netstat -f netgraph) */ +static LIST_HEAD(, ngpcb) ngsocklist; + +static struct mtx ngsocketlist_mtx; + #define sotongpcb(so) ((struct ngpcb *)(so)->so_pcb) /* If getting unexplained errors returned, set this to "kdb_enter("X"); */ @@ -584,6 +589,10 @@ ng_attach_common(struct socket *so, int so->so_pcb = (caddr_t)pcbp; pcbp->ng_socket = so; + /* Add the socket to linked list */ + mtx_lock(&ngsocketlist_mtx); + LIST_INSERT_HEAD(&ngsocklist, pcbp, socks); + mtx_unlock(&ngsocketlist_mtx); return (0); } @@ -617,6 +626,9 @@ ng_detach_common(struct ngpcb *pcbp, int } pcbp->ng_socket->so_pcb = NULL; + mtx_lock(&ngsocketlist_mtx); + LIST_REMOVE(pcbp, socks); + mtx_unlock(&ngsocketlist_mtx); free(pcbp, M_PCB); } @@ -1115,8 +1127,14 @@ ngs_mod_event(module_t mod, int event, v switch (event) { case MOD_LOAD: + mtx_init(&ngsocketlist_mtx, "ng_socketlist", NULL, MTX_DEF); break; case MOD_UNLOAD: + /* Ensure there are no open netgraph sockets. */ + if (!LIST_EMPTY(&ngsocklist)) { + error = EBUSY; + break; + } #ifdef NOTYET /* Unregister protocol domain XXX can't do this yet.. */ #endif ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
Quoting Rui Paulo (from Fri, 12 Mar 2010 22:52:27 +0900): On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote: On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Mar 11 14:49:06 2010 New Revision: 205014 URL: http://svn.freebsd.org/changeset/base/205014 Log: Provide groundwork for 32-bit binary compatibility on non-x86 platforms, for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. COMPAT_FREEBSD32 is an unfortunate choice. It can be easily interpreted as "compatible with FreeBSD 3.2". Something like "COMPAT_32BIT" would be more meaningful. There's a lengthy discussion about this on another mailing list. This is unlikely to be changed and emailing the committer who provided valuable time on this code wastes his time and everyone else's. As someone "outside of the box" (I do not care which name is used), I have to say that the current influx of mails regarding this is some kind of indication that there are POLA implications ahead or if you want to have a buzzword, it looks to me like people think the usability of the COMPAT_FREEBSD* stuff was lowered by this, respectively the userfriendlyness degraded, or with again some different words, the COMPAT_FREEBSD* options are not intuitive to use anymore. When I look at our man-pages or the handbook, it looks like one of the goals is to make a feature easy (relative to the complexity of the topic) to use. I do not care much about what you (plural) do about this, but to me it looks like the fastest way to not waste more time with this is to change the name to something less ambiguous compared to what the other COMPAT_FREEBSD* options do. Bye, Alexander. -- My weight is perfect for my height -- which varies. http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
Dag-Erling Smørgrav wrote: Rui Paulo writes: Carlos A. M. dos Santos writes: COMPAT_FREEBSD32 is an unfortunate choice. It can be easily interpreted as "compatible with FreeBSD 3.2". Something like "COMPAT_32BIT" would be more meaningful. This is unlikely to be changed and emailing the committer who provided valuable time on this code wastes his time and everyone else's. The committer who provided valuable time on this code was warned that COMPAT_FREEBSD32 was probably the worst imaginable option and that it would set off a bikeshed. DES This name was picked for the following reasons, after discussion with several others: it is analogous to the existing COMPAT_LINUX32, the directory containing the relevant support code lives in /sys/compat/freebsd32, it is almost entirely specific to running 32-bit FreeBSD binaries, and it is a descriptive name. I also think it extremely unlikely that given the choice of interepretations "FreeBSD 3.2", "32-bit FreeBSD", "FreeBSD version 32" (which, at our current rate, will be released in 2058, probably before Linux 3.2), anyone will fail to pick the correct meaning, especially given that it is documented and accompanied by a comment. -Nathan ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
Rui Paulo writes: > Carlos A. M. dos Santos writes: > > COMPAT_FREEBSD32 is an unfortunate choice. It can be easily > > interpreted as "compatible with FreeBSD 3.2". Something like > > "COMPAT_32BIT" would be more meaningful. > This is unlikely to be changed and emailing the committer who provided > valuable time on this code wastes his time and everyone else's. The committer who provided valuable time on this code was warned that COMPAT_FREEBSD32 was probably the worst imaginable option and that it would set off a bikeshed. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r205070 - stable/8/lib/libc/stdio
this commit for 7-STABLE? On 3/12/10, Jaakko Heinonen wrote: > Author: jh > Date: Fri Mar 12 06:56:51 2010 > New Revision: 205070 > URL: http://svn.freebsd.org/changeset/base/205070 > > Log: > MFC r204447: > > In _gettemp(), check that the length of the path doesn't exceed > MAXPATHLEN. Otherwise the path name (or part of it) may not fit to > carrybuf causing a buffer overflow. > > PR: bin/140228 > > Modified: > stable/8/lib/libc/stdio/mktemp.c > Directory Properties: > stable/8/lib/libc/ (props changed) > stable/8/lib/libc/stdtime/ (props changed) > > Modified: stable/8/lib/libc/stdio/mktemp.c > == > --- stable/8/lib/libc/stdio/mktemp.c Fri Mar 12 06:31:19 2010 > (r205069) > +++ stable/8/lib/libc/stdio/mktemp.c Fri Mar 12 06:56:51 2010 > (r205070) > @@ -116,6 +116,10 @@ _gettemp(path, doopen, domkdir, slen) > > for (trv = path; *trv != '\0'; ++trv) > ; > + if (trv - path >= MAXPATHLEN) { > + errno = ENAMETOOLONG; > + return (0); > + } > trv -= slen; > suffp = trv; > --trv; > ___ > svn-src-sta...@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscr...@freebsd.org" > ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64
On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote: On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Mar 11 14:49:06 2010 New Revision: 205014 URL: http://svn.freebsd.org/changeset/base/205014 Log: Provide groundwork for 32-bit binary compatibility on non-x86 platforms, for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. COMPAT_FREEBSD32 is an unfortunate choice. It can be easily interpreted as "compatible with FreeBSD 3.2". Something like "COMPAT_32BIT" would be more meaningful. There's a lengthy discussion about this on another mailing list. This is unlikely to be changed and emailing the committer who provided valuable time on this code wastes his time and everyone else's. -- Rui Paulo ___ 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: r205079 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek writes: > Grr, it was bug 6920880. Unfortunately no forced commits in subversion. Forced commits are possible, as discussed on -developers a few months ago. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r205080 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Fri Mar 12 13:36:58 2010 New Revision: 205080 URL: http://svn.freebsd.org/changeset/base/205080 Log: Force commit to correct Bug ID: Obtained from:OpenSolaris, Bug ID 6920880 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == ___ 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: r205024 - head/sys/net
Any objections to making AF_NETLINK Foundation proposal public? Might help FreeBSD get out of the niche a bit more; energy quantum wells are never great. ___ 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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia6
On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Mar 11 14:49:06 2010 > New Revision: 205014 > URL: http://svn.freebsd.org/changeset/base/205014 > > Log: > Provide groundwork for 32-bit binary compatibility on non-x86 platforms, > for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 > option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts > of the kernel and enhances the freebsd32 compatibility code to support > big-endian platforms. COMPAT_FREEBSD32 is an unfortunate choice. It can be easily interpreted as "compatible with FreeBSD 3.2". Something like "COMPAT_32BIT" would be more meaningful. -- Not so young, but still crying out Full of anger full of doubt ___ 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: r205079 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Fri, Mar 12, 2010 at 12:07:21PM +, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Fri Mar 12 12:07:21 2010 > New Revision: 205079 > URL: http://svn.freebsd.org/changeset/base/205079 > > Log: > Remove bogus assertion. > > Reported by:Johan Ström > Obtained from: OpenSolaris, Bug ID 6827260 Grr, it was bug 6920880. Unfortunately no forced commits in subversion. > MFC after: 1 week > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > == > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.cFri Mar > 12 11:05:37 2010(r205078) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.cFri Mar > 12 12:07:21 2010(r205079) > @@ -2210,9 +2210,6 @@ dbuf_write_ready(zio_t *zio, arc_buf_t * > for (i = db->db.db_size >> SPA_BLKPTRSHIFT; i > 0; i--, ibp++) { > if (BP_IS_HOLE(ibp)) > continue; > - ASSERT3U(BP_GET_LSIZE(ibp), ==, > - db->db_level == 1 ? dn->dn_datablksz : > - (1dn_indblkshift)); > fill += ibp->blk_fill; > } > } -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgpJ8APYcKbEX.pgp Description: PGP signature
svn commit: r205079 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Fri Mar 12 12:07:21 2010 New Revision: 205079 URL: http://svn.freebsd.org/changeset/base/205079 Log: Remove bogus assertion. Reported by: Johan Ström Obtained from:OpenSolaris, Bug ID 6827260 MFC after:1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Mar 12 11:05:37 2010(r205078) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Mar 12 12:07:21 2010(r205079) @@ -2210,9 +2210,6 @@ dbuf_write_ready(zio_t *zio, arc_buf_t * for (i = db->db.db_size >> SPA_BLKPTRSHIFT; i > 0; i--, ibp++) { if (BP_IS_HOLE(ibp)) continue; - ASSERT3U(BP_GET_LSIZE(ibp), ==, - db->db_level == 1 ? dn->dn_datablksz : - (1dn_indblkshift)); fill += ibp->blk_fill; } } ___ 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: r205078 - in head/contrib/bsnmp: gensnmptree snmpd
Author: uqs Date: Fri Mar 12 11:05:37 2010 New Revision: 205078 URL: http://svn.freebsd.org/changeset/base/205078 Log: Fix typo in macro name and macro usage. Found by: make manlint Reviewed by: ru Approved by: harti, philip (mentor) Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1 head/contrib/bsnmp/snmpd/snmpmod.3 Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1 == --- head/contrib/bsnmp/gensnmptree/gensnmptree.1Fri Mar 12 10:24:58 2010(r205077) +++ head/contrib/bsnmp/gensnmptree/gensnmptree.1Fri Mar 12 11:05:37 2010(r205078) @@ -58,7 +58,7 @@ If none of the options .Fl e , .Fl E or -.FL t +.Fl t are used .Nm reads a MIB description from its standard input and creates two files: a Modified: head/contrib/bsnmp/snmpd/snmpmod.3 == --- head/contrib/bsnmp/snmpd/snmpmod.3 Fri Mar 12 10:24:58 2010 (r205077) +++ head/contrib/bsnmp/snmpd/snmpmod.3 Fri Mar 12 11:05:37 2010 (r205078) @@ -777,7 +777,8 @@ is used for GET or GETNEXT. The function .It Fn string_get_max can be used instead of -.Nf stringto ensure that the returned string has a certain maximum length. +.Fn string_get +to ensure that the returned string has a certain maximum length. If .Fa len is -1, the length is computed via ___ 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: r205077 - head/sys/net
Author: qingli Date: Fri Mar 12 10:24:58 2010 New Revision: 205077 URL: http://svn.freebsd.org/changeset/base/205077 Log: The flow-table module retrieves the destination and source address as well as the transport protocol port information from the outbound packets. The routing code is generic and compares every byte in the given sockaddr object. Therefore the temporary sockaddr objects must be cleared due to padding bytes. In addition, the port information must be stripped or the route search will either fail or return the incorrect route entry. Unit testing is done using OpenVPN over the if_tun interface. MFC after:7 days Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Mar 12 10:01:06 2010(r205076) +++ head/sys/net/flowtable.cFri Mar 12 10:24:58 2010(r205077) @@ -593,6 +593,8 @@ flowtable_lookup_mbuf4(struct flowtable dsin = (struct sockaddr_in *)&dsa; ssin = (struct sockaddr_in *)&ssa; + bzero(dsin, sizeof(*dsin)); + bzero(ssin, sizeof(*ssin)); flags = ft->ft_flags; if (ipv4_mbuf_demarshal(ft, m, ssin, dsin, &flags) != 0) return (NULL); @@ -796,6 +798,8 @@ flowtable_lookup_mbuf6(struct flowtable dsin6 = (struct sockaddr_in6 *)&dsa; ssin6 = (struct sockaddr_in6 *)&ssa; + bzero(dsin6, sizeof(*dsin6)); + bzero(ssin6, sizeof(*ssin6)); flags = ft->ft_flags; if (ipv6_mbuf_demarshal(ft, m, ssin6, dsin6, &flags) != 0) @@ -1088,6 +1092,14 @@ flowtable_lookup(struct flowtable *ft, s ro = &sro; memcpy(&ro->ro_dst, dsa, sizeof(struct sockaddr_in)); + /* +* The harvested source and destination addresses +* may contain port information if the packet is +* from a transport protocol (e.g. TCP/UDP). The +* port field must be cleared before performing +* a route lookup. +*/ + ((struct sockaddr_in *)&ro->ro_dst)->sin_port = 0; dsin = (struct sockaddr_in *)dsa; ssin = (struct sockaddr_in *)ssa; if ((dsin->sin_addr.s_addr == ssin->sin_addr.s_addr) || @@ -1105,6 +1117,7 @@ flowtable_lookup(struct flowtable *ft, s ro = (struct route *)&sro6; memcpy(&sro6.ro_dst, dsa, sizeof(struct sockaddr_in6)); + ((struct sockaddr_in6 *)&ro->ro_dst)->sin6_port = 0; dsin6 = (struct sockaddr_in6 *)dsa; ssin6 = (struct sockaddr_in6 *)ssa; ___ 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: r205069 - head/sys/net
On 2010-03-12 07:31, Kip Macy wrote: Author: kmacy Date: Fri Mar 12 06:31:19 2010 New Revision: 205069 URL: http://svn.freebsd.org/changeset/base/205069 Log: fix stats reporting sysctl Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Mar 12 05:16:24 2010(r205068) +++ head/sys/net/flowtable.cFri Mar 12 06:31:19 2010(r205069) @@ -1,6 +1,6 @@ /** -Copyright (c) 2008-2010, BitGravity Inc. +Copyright (c) 2008-2009, BitGravity Inc. All rights reserved. Was it on purpose the copyright went backwards? //Niclas ___ 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: r205076 - in head: games/pom lib/libc/compat-43 lib/libgssapi lib/libkvm lib/librpcsec_gss lib/msun/man libexec/tftpd sbin/quotacheck share/man/man4 share/man/man9 usr.bin/tar usr.sbin/...
Author: uqs Date: Fri Mar 12 10:01:06 2010 New Revision: 205076 URL: http://svn.freebsd.org/changeset/base/205076 Log: Fix several typos in macros or macro misusage. Found by: make manlint Reviewed by: ru Approved by: philip (mentor) Modified: head/games/pom/pom.6 head/lib/libc/compat-43/sigpause.2 head/lib/libgssapi/gss_init_sec_context.3 head/lib/libgssapi/gss_unwrap.3 head/lib/libkvm/kvm_getpcpu.3 head/lib/librpcsec_gss/rpcsec_gss.3 head/lib/msun/man/cimag.3 head/libexec/tftpd/tftpd.8 head/sbin/quotacheck/quotacheck.8 head/share/man/man4/acpi_wmi.4 head/share/man/man4/altq.4 head/share/man/man4/amdtemp.4 head/share/man/man4/cxgb.4 head/share/man/man4/ddb.4 head/share/man/man4/iscsi_initiator.4 head/share/man/man4/textdump.4 head/share/man/man4/uart.4 head/share/man/man9/fail.9 head/usr.bin/tar/bsdtar.1 head/usr.sbin/freebsd-update/freebsd-update.8 head/usr.sbin/pkg_install/updating/pkg_updating.1 head/usr.sbin/pmcannotate/pmcannotate.8 head/usr.sbin/uhsoctl/uhsoctl.1 Modified: head/games/pom/pom.6 == --- head/games/pom/pom.6Fri Mar 12 08:10:30 2010(r205075) +++ head/games/pom/pom.6Fri Mar 12 10:01:06 2010(r205076) @@ -34,7 +34,6 @@ .\" .Dd May 31, 1993 .Dt POM 6 -.UC 7 .Sh NAME .Nm pom .Nd display the phase of the moon Modified: head/lib/libc/compat-43/sigpause.2 == --- head/lib/libc/compat-43/sigpause.2 Fri Mar 12 08:10:30 2010 (r205075) +++ head/lib/libc/compat-43/sigpause.2 Fri Mar 12 10:01:06 2010 (r205076) @@ -195,6 +195,7 @@ functions, an attempt was made to catch .Dv SIGKILL or .Dv SIGSTOP . +.El .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , Modified: head/lib/libgssapi/gss_init_sec_context.3 == --- head/lib/libgssapi/gss_init_sec_context.3 Fri Mar 12 08:10:30 2010 (r205075) +++ head/lib/libgssapi/gss_init_sec_context.3 Fri Mar 12 10:01:06 2010 (r205076) @@ -153,7 +153,7 @@ The values of the .Dv GSS_C_MUTUAL_FLAG , .Dv GSS_C_REPLAY_FLAG , .Dv GSS_C_SEQUENCE_FLAG , -.Fv GSS_C_CONF_FLAG , +.Dv GSS_C_CONF_FLAG , .Dv GSS_C_INTEG_FLAG and .Dv GSS_C_ANON_FLAG bits returned via the .Fa ret_flags Modified: head/lib/libgssapi/gss_unwrap.3 == --- head/lib/libgssapi/gss_unwrap.3 Fri Mar 12 08:10:30 2010 (r205075) +++ head/lib/libgssapi/gss_unwrap.3 Fri Mar 12 10:01:06 2010 (r205076) @@ -155,6 +155,7 @@ The context_handle parameter did not ide Generic Security Service Application Program Interface Version 2, Update 1 .It RFC 2744 Generic Security Service API Version 2 : C-bindings +.El .Sh HISTORY The .Nm Modified: head/lib/libkvm/kvm_getpcpu.3 == --- head/lib/libkvm/kvm_getpcpu.3 Fri Mar 12 08:10:30 2010 (r205075) +++ head/lib/libkvm/kvm_getpcpu.3 Fri Mar 12 10:01:06 2010 (r205076) @@ -96,7 +96,7 @@ will return pointers to that data on the .Sh CACHING .Fn kvm_getmaxcpu and -.Vn kvm_getpcpu +.Fn kvm_getpcpu cache the nlist values for various kernel variables which are reused in successive calls. You may call either function with Modified: head/lib/librpcsec_gss/rpcsec_gss.3 == --- head/lib/librpcsec_gss/rpcsec_gss.3 Fri Mar 12 08:10:30 2010 (r205075) +++ head/lib/librpcsec_gss/rpcsec_gss.3 Fri Mar 12 10:01:06 2010 (r205076) @@ -173,6 +173,7 @@ typedef struct { #define RPC_GSS_ER_SUCCESS 0 /* no error */ #define RPC_GSS_ER_SYSTEMERROR 1 /* system error */ .Ed +.El .Sh INDEX .Bl -tag -width "" .It Xr rpc_gss_seccreate 3 Modified: head/lib/msun/man/cimag.3 == --- head/lib/msun/man/cimag.3 Fri Mar 12 08:10:30 2010(r205075) +++ head/lib/msun/man/cimag.3 Fri Mar 12 10:01:06 2010(r205076) @@ -118,4 +118,4 @@ functions first appeared in The .Fn cproj functions appeared in -.Fx 8.0. +.Fx 8.0 . Modified: head/libexec/tftpd/tftpd.8 == --- head/libexec/tftpd/tftpd.8 Fri Mar 12 08:10:30 2010(r205075) +++ head/libexec/tftpd/tftpd.8 Fri Mar 12 10:01:06 2010(r205076) @@ -240,7 +240,7 @@ and the and .Fl W options were introduced in -.Fx 7 . +.Fx 8.0 . .Pp .Sh BUGS Files larger than 33488896 octets (65535 blocks) cannot be transferred Modified: head/sbin/quotacheck/quotacheck.8 == --- head/sbin/quotacheck/quotacheck.8 Fri Mar 12 08:10:30 2010
Re: svn commit: r205024 - head/sys/net
On Mar 12, 2010, at 8:44 AM, Julian Elischer wrote: > I'm confused about Julian's proposal because it seems to me that we > already know when a driver hasn't set or is unable to determine the link > state: it will (should) be set to LINK_STATE_UNKNOWN by default. > > the question is whether there is any other meaning for this state. > For example "I have not started up yet" Right now LINK_STATE_UNKNOWN conflates three different conditions: (1) I haven't and won't ever set the link state (2) I haven't yet, but may in the future set the link state (3) I wanted to check the link state, and the hardware is $*$**£*@@ so I left or set this value instead My preferred solution is to advertise driver capabilities via the driver capabilities flag, if_capabilities, and define a new flag IFCAP_LINKSTATE (or something similar) that allows a driver to declare that it is able to determine link state. If the flag is set, then components like ECMP, but also dhclient, can reasonably expect that the driver will do its best to provide link state information, addressing the difference between (1) and (2) when a value of LINK_STATE_UNKNOWN is found. If we are able to explicitly handle (3) in any of our drivers, then a new link state definition should be defined, LINK_STATE_ERROR, which should be set by the driver if it declared ICAP_LINKSTATE but was unable, due to hardware failure, to check it. Robert___ 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: r205024 - head/sys/net
Julian Elischer wrote: Robert N. M. Watson wrote: Today, we support three link state values: 170 /* 171 * Values for if_link_state. 172 */ 173 #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ 174 #define LINK_STATE_DOWN 1 /* link is down */ 175 #define LINK_STATE_UP 2 /* link is up */ I'm confused about Julian's proposal because it seems to me that we already know when a driver hasn't set or is unable to determine the link state: it will (should) be set to LINK_STATE_UNKNOWN by default. the question is whether there is any other meaning for this state. For example "I have not started up yet" So the only question we don't know the answer to, at run-time, is whether a driver may *ever* set the link state (i.e., it thinks it knows how to), and hence whether or not tools like dhclient should try to wait for that to happen. That is the problem that an interface capability would solve. For the purposes of ECMP, you just need to decide on your policy: map UNKNOWN to either UP or DOWN for your purposes. yes this is a good approach assuming that there is no other meaning. Robert ___ 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: r205024 - head/sys/net
Robert N. M. Watson wrote: On Mar 12, 2010, at 8:30 AM, Qing Li wrote: I believe what Julian means is the following: 1. in the driver, I do this ifp->if_flags |= IFF_KNOWS_LINK_STATE; 2. In route.h, I do this if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state == LINK_STATE_UP) return 1; Please do *NOT* do this: (1) Do not overload if_flags with more run-time set flags without well-defined atomicity properties (2) Why isn't LINK_STATE_UNKNOWN already sufficient here? The only change I think would be useful is adding a new IFCAP flag that allows a driver to statically declare that it will someday set the link state. But I don't think that helps with ECMP, that's just for the benefit of programs like dhclient that care about future events rather than current state. Robert I think that any driver that can set link stats will set it to 1 or 2 and that we can treat a state of 0 as "I don't know what the heck you are talking about". My comment on a flag for this purpose was in the abstract. I didn't necessarily mean that a particular bit in a particular register be used for this purpose.. The aim is to be able to discern a driver that will not give a useful result and should therefore be assumed to be online at all times. It looks to me that this can be achieved several ways, including looking for the UNKNOWN link state, or adding a bit in the word to indicate it is valid, to adding a bit somewhere else. -- Qing On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson wrote: On Mar 12, 2010, at 8:11 AM, Qing Li wrote: I like Julian's suggestion because it is simple and very low risk. And there isn't a need to check for interface type any more. Here is why: 1. The interfaces that are popular and modern are already supporting link_state. So for these drivers, and there are just a few, I will go set its if_flags to include "can change link_state". 2. For the existing dated drivers, because that flag bit is never set, no check is done. 3. In the mean time, we try to convert the drivers progressively. 4. If one wants to do ECMP and not having packets go into a black hole when the physical link is down, that person can ping the ML and ask for driver compatibility list. If we haven't converted that particular driver by then, we will update the driver if it's capable at that time. Today, we support three link state values: 170 /* 171 * Values for if_link_state. 172 */ 173 #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ 174 #define LINK_STATE_DOWN 1 /* link is down */ 175 #define LINK_STATE_UP 2 /* link is up */ I'm confused about Julian's proposal because it seems to me that we already know when a driver hasn't set or is unable to determine the link state: it will (should) be set to LINK_STATE_UNKNOWN by default. So the only question we don't know the answer to, at run-time, is whether a driver may *ever* set the link state (i.e., it thinks it knows how to), and hence whether or not tools like dhclient should try to wait for that to happen. That is the problem that an interface capability would solve. For the purposes of ECMP, you just need to decide on your policy: map UNKNOWN to either UP or DOWN for your purposes. Robert ___ 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: r205024 - head/sys/net
On Mar 12, 2010, at 8:30 AM, Qing Li wrote: > I believe what Julian means is the following: > > 1. in the driver, I do this > > ifp->if_flags |= IFF_KNOWS_LINK_STATE; > > 2. In route.h, I do this > >if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state == > LINK_STATE_UP) > return 1; Please do *NOT* do this: (1) Do not overload if_flags with more run-time set flags without well-defined atomicity properties (2) Why isn't LINK_STATE_UNKNOWN already sufficient here? The only change I think would be useful is adding a new IFCAP flag that allows a driver to statically declare that it will someday set the link state. But I don't think that helps with ECMP, that's just for the benefit of programs like dhclient that care about future events rather than current state. Robert > > -- Qing > > > On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson > wrote: >> >> On Mar 12, 2010, at 8:11 AM, Qing Li wrote: >> >>> I like Julian's suggestion because it is simple and very low risk. >>> And there isn't a need to check for interface type any more. >>> Here is why: >>> >>> 1. The interfaces that are popular and modern are already supporting >>>link_state. So for these drivers, and there are just a few, I will go set >>>its if_flags to include "can change link_state". >>> >>> 2. For the existing dated drivers, because that flag bit is never set, >>>no check is done. >>> >>> 3. In the mean time, we try to convert the drivers progressively. >>> >>> 4. If one wants to do ECMP and not having packets go into a black >>>hole when the physical link is down, that person can ping the ML >>>and ask for driver compatibility list. If we haven't converted that >>>particular driver by then, we will update the driver if it's capable >>>at that time. >> >> >> Today, we support three link state values: >> >> 170 /* >> 171 * Values for if_link_state. >> 172 */ >> 173 #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ >> 174 #define LINK_STATE_DOWN 1 /* link is down */ >> 175 #define LINK_STATE_UP 2 /* link is up */ >> >> I'm confused about Julian's proposal because it seems to me that we already >> know when a driver hasn't set or is unable to determine the link state: it >> will (should) be set to LINK_STATE_UNKNOWN by default. >> >> So the only question we don't know the answer to, at run-time, is whether a >> driver may *ever* set the link state (i.e., it thinks it knows how to), and >> hence whether or not tools like dhclient should try to wait for that to >> happen. That is the problem that an interface capability would solve. >> >> For the purposes of ECMP, you just need to decide on your policy: map >> UNKNOWN to either UP or DOWN for your purposes. >> >> Robert ___ 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: r205024 - head/sys/net
Nope, I meant Julian, and what he proposed, and if I understood correctly, is the simplest approach and easily done. -- Qing On Fri, Mar 12, 2010 at 12:29 AM, Robert N. M. Watson wrote: > > On Mar 12, 2010, at 8:11 AM, Qing Li wrote: > >> I like Julian's suggestion because it is simple and very low risk. >> And there isn't a need to check for interface type any more. >> Here is why: > > Re-reading this e-mail: perhaps you mean Juli, not Julian? > ___ 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: r205024 - head/sys/net
I believe what Julian means is the following: 1. in the driver, I do this ifp->if_flags |= IFF_KNOWS_LINK_STATE; 2. In route.h, I do this if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state == LINK_STATE_UP) return 1; -- Qing On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson wrote: > > On Mar 12, 2010, at 8:11 AM, Qing Li wrote: > >> I like Julian's suggestion because it is simple and very low risk. >> And there isn't a need to check for interface type any more. >> Here is why: >> >> 1. The interfaces that are popular and modern are already supporting >> link_state. So for these drivers, and there are just a few, I will go set >> its if_flags to include "can change link_state". >> >> 2. For the existing dated drivers, because that flag bit is never set, >> no check is done. >> >> 3. In the mean time, we try to convert the drivers progressively. >> >> 4. If one wants to do ECMP and not having packets go into a black >> hole when the physical link is down, that person can ping the ML >> and ask for driver compatibility list. If we haven't converted that >> particular driver by then, we will update the driver if it's capable >> at that time. > > > Today, we support three link state values: > > 170 /* > 171 * Values for if_link_state. > 172 */ > 173 #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ > 174 #define LINK_STATE_DOWN 1 /* link is down */ > 175 #define LINK_STATE_UP 2 /* link is up */ > > I'm confused about Julian's proposal because it seems to me that we already > know when a driver hasn't set or is unable to determine the link state: it > will (should) be set to LINK_STATE_UNKNOWN by default. > > So the only question we don't know the answer to, at run-time, is whether a > driver may *ever* set the link state (i.e., it thinks it knows how to), and > hence whether or not tools like dhclient should try to wait for that to > happen. That is the problem that an interface capability would solve. > > For the purposes of ECMP, you just need to decide on your policy: map UNKNOWN > to either UP or DOWN for your purposes. > > Robert ___ 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: r205024 - head/sys/net
On Mar 12, 2010, at 8:11 AM, Qing Li wrote: > I like Julian's suggestion because it is simple and very low risk. > And there isn't a need to check for interface type any more. > Here is why: Re-reading this e-mail: perhaps you mean Juli, not Julian? Robert > > 1. The interfaces that are popular and modern are already supporting >link_state. So for these drivers, and there are just a few, I will go set >its if_flags to include "can change link_state". > > 2. For the existing dated drivers, because that flag bit is never set, >no check is done. > > 3. In the mean time, we try to convert the drivers progressively. > > 4. If one wants to do ECMP and not having packets go into a black >hole when the physical link is down, that person can ping the ML >and ask for driver compatibility list. If we haven't converted that >particular driver by then, we will update the driver if it's capable >at that time. > > -- Qing > > > On Fri, Mar 12, 2010 at 12:00 AM, Robert N. M. Watson > wrote: >> >> On Mar 12, 2010, at 7:52 AM, Qing Li wrote: >> Is there any way we can pick up via an assertion that an interface driver has failed to implement this functionality? This has never been a historic requirement, so I suspect there are a lot of drivers floating around that fail to meet the requirement. Also, is this for IFT_ETHER only, or also other link types? >>> >>> Not sure if I get the assertion suggestion. How would an assertion help >>> here ? >> >> I think my proposal is similar to what Juli is suggesting: >> >> - Define a new interface capability for link state detection. >> - If a packet is sent or received on the interface, the capability is set, >> but the link state hasn't been set, panic. >> - If a packet is sent received on the interface, the capability isn't set, >> and the link state has been set, panic. >> >> That way the system blows up nicely and immediately, rather than dhclient >> simply never working, etc. Also, that way, testing for link state support is >> done at a point when we know the interface is live (a packet is sent or >> received). >> >> Finally, it means that code interested in link state isn't testing for one >> of (n) IFT_ types it thinks should have link state, but instead testing >> specifically whether the driver declares link state support. Of course, then >> you have to decide how to behave if a configured interface ECMP is running >> on doesn't support link state: the answer there is probably to assume it is >> always up, which would make this work for all those drivers that current >> fail to implement it. And if the hardware can't support link state, which >> some historic (and perhaps future) link types can't, things still work. >> >> Robert ___ 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: r205024 - head/sys/net
On Fri, Mar 12, 2010 at 00:11, Qing Li wrote: > I like Julian's suggestion because it is simple and very low risk. > And there isn't a need to check for interface type any more. > Here is why: For actual link state, you can already see whether a driver is in UNKNOWN state, like: %%% /* * Values for if_link_state. */ #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ #define LINK_STATE_DOWN 1 /* link is down */ #define LINK_STATE_UP 2 /* link is up */ %%% Therefore you should be able to easily add assertions and debugging printfs for interfaces that don't event support *setting* link state -- which is the real problem more than changing link state, since a driver probably won't report link as down if it has no intention of changing it. It doesn't help that there are two things wrt link state floating around -- one in the form of LINK_STATE (the one that matters here) and the other in ifmedia stuff. I think that's confusing this discussion gratuitously. Juli. ___ 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: r205024 - head/sys/net
On Mar 12, 2010, at 8:11 AM, Qing Li wrote: > I like Julian's suggestion because it is simple and very low risk. > And there isn't a need to check for interface type any more. > Here is why: > > 1. The interfaces that are popular and modern are already supporting >link_state. So for these drivers, and there are just a few, I will go set >its if_flags to include "can change link_state". > > 2. For the existing dated drivers, because that flag bit is never set, >no check is done. > > 3. In the mean time, we try to convert the drivers progressively. > > 4. If one wants to do ECMP and not having packets go into a black >hole when the physical link is down, that person can ping the ML >and ask for driver compatibility list. If we haven't converted that >particular driver by then, we will update the driver if it's capable >at that time. Today, we support three link state values: 170 /* 171 * Values for if_link_state. 172 */ 173 #define LINK_STATE_UNKNOWN 0 /* link invalid/unknown */ 174 #define LINK_STATE_DOWN 1 /* link is down */ 175 #define LINK_STATE_UP 2 /* link is up */ I'm confused about Julian's proposal because it seems to me that we already know when a driver hasn't set or is unable to determine the link state: it will (should) be set to LINK_STATE_UNKNOWN by default. So the only question we don't know the answer to, at run-time, is whether a driver may *ever* set the link state (i.e., it thinks it knows how to), and hence whether or not tools like dhclient should try to wait for that to happen. That is the problem that an interface capability would solve. For the purposes of ECMP, you just need to decide on your policy: map UNKNOWN to either UP or DOWN for your purposes. Robert___ 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: r205024 - head/sys/net
I like Julian's suggestion because it is simple and very low risk. And there isn't a need to check for interface type any more. Here is why: 1. The interfaces that are popular and modern are already supporting link_state. So for these drivers, and there are just a few, I will go set its if_flags to include "can change link_state". 2. For the existing dated drivers, because that flag bit is never set, no check is done. 3. In the mean time, we try to convert the drivers progressively. 4. If one wants to do ECMP and not having packets go into a black hole when the physical link is down, that person can ping the ML and ask for driver compatibility list. If we haven't converted that particular driver by then, we will update the driver if it's capable at that time. -- Qing On Fri, Mar 12, 2010 at 12:00 AM, Robert N. M. Watson wrote: > > On Mar 12, 2010, at 7:52 AM, Qing Li wrote: > >>> Is there any way we can pick up via an assertion that an interface driver >>> has failed to implement this functionality? This has never been a historic >>> requirement, so I suspect there are a lot of drivers floating around that >>> fail to meet the requirement. Also, is this for IFT_ETHER only, or also >>> other link types? >> >> Not sure if I get the assertion suggestion. How would an assertion help here >> ? > > I think my proposal is similar to what Juli is suggesting: > > - Define a new interface capability for link state detection. > - If a packet is sent or received on the interface, the capability is set, > but the link state hasn't been set, panic. > - If a packet is sent received on the interface, the capability isn't set, > and the link state has been set, panic. > > That way the system blows up nicely and immediately, rather than dhclient > simply never working, etc. Also, that way, testing for link state support is > done at a point when we know the interface is live (a packet is sent or > received). > > Finally, it means that code interested in link state isn't testing for one of > (n) IFT_ types it thinks should have link state, but instead testing > specifically whether the driver declares link state support. Of course, then > you have to decide how to behave if a configured interface ECMP is running on > doesn't support link state: the answer there is probably to assume it is > always up, which would make this work for all those drivers that current fail > to implement it. And if the hardware can't support link state, which some > historic (and perhaps future) link types can't, things still work. > > Robert ___ 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: r205075 - head/sys/netinet6
Author: rrs Date: Fri Mar 12 08:10:30 2010 New Revision: 205075 URL: http://svn.freebsd.org/changeset/base/205075 Log: With the recent change of the sctp checksum to support offload, no delayed checksum was added to the ip6 output code. This causes cards that do not support SCTP checksum offload to have SCTP packets that are IPv6 NOT have the sctp checksum performed. Thus you could not communicate with a peer. This adds the missing bits to make the checksum happen for these cards. PR: 144529 MFC after:2 weeks Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Fri Mar 12 07:49:10 2010 (r205074) +++ head/sys/netinet6/ip6_output.c Fri Mar 12 08:10:30 2010 (r205075) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_sctp.h" #include #include @@ -102,6 +103,10 @@ __FBSDID("$FreeBSD$"); #include #include #endif /* IPSEC */ +#ifdef SCTP +#include +#include +#endif #include #include @@ -208,6 +213,9 @@ ip6_output(struct mbuf *m0, struct ip6_p struct route_in6 *ro_pmtu = NULL; int hdrsplit = 0; int needipsec = 0; +#ifdef SCTP + int sw_csum; +#endif #ifdef IPSEC struct ipsec_output_state state; struct ip6_rthdr *rh = NULL; @@ -829,6 +837,10 @@ again: } m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID; +#ifdef SCTP + if (m->m_pkthdr.csum_flags & CSUM_SCTP) + m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; +#endif error = netisr_queue(NETISR_IPV6, m); goto done; } else @@ -857,6 +869,13 @@ passout: * 4: if dontfrag == 1 && alwaysfrag == 1 * error, as we cannot handle this conflicting request */ +#ifdef SCTP + sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist; + if (sw_csum & CSUM_SCTP) { + sctp_delayed_cksum(m); + sw_csum &= ~CSUM_SCTP; + } +#endif tlen = m->m_pkthdr.len; if (opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) ___ 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: r205024 - head/sys/net
On Mar 12, 2010, at 7:52 AM, Qing Li wrote: >> Is there any way we can pick up via an assertion that an interface driver >> has failed to implement this functionality? This has never been a historic >> requirement, so I suspect there are a lot of drivers floating around that >> fail to meet the requirement. Also, is this for IFT_ETHER only, or also >> other link types? > > Not sure if I get the assertion suggestion. How would an assertion help here ? I think my proposal is similar to what Juli is suggesting: - Define a new interface capability for link state detection. - If a packet is sent or received on the interface, the capability is set, but the link state hasn't been set, panic. - If a packet is sent received on the interface, the capability isn't set, and the link state has been set, panic. That way the system blows up nicely and immediately, rather than dhclient simply never working, etc. Also, that way, testing for link state support is done at a point when we know the interface is live (a packet is sent or received). Finally, it means that code interested in link state isn't testing for one of (n) IFT_ types it thinks should have link state, but instead testing specifically whether the driver declares link state support. Of course, then you have to decide how to behave if a configured interface ECMP is running on doesn't support link state: the answer there is probably to assume it is always up, which would make this work for all those drivers that current fail to implement it. And if the hardware can't support link state, which some historic (and perhaps future) link types can't, things still work. Robert___ 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"