From owner-freebsd-net@FreeBSD.ORG Sun Oct 5 19:05:18 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69CF3106568B; Sun, 5 Oct 2008 19:05:18 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 408918FC0A; Sun, 5 Oct 2008 19:05:18 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (vwe@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m95J5IEh018993; Sun, 5 Oct 2008 19:05:18 GMT (envelope-from vwe@freefall.freebsd.org) Received: (from vwe@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m95J5Ile018989; Sun, 5 Oct 2008 19:05:18 GMT (envelope-from vwe) Date: Sun, 5 Oct 2008 19:05:18 GMT Message-Id: <200810051905.m95J5Ile018989@freefall.freebsd.org> To: vwe@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: vwe@FreeBSD.org Cc: Subject: Re: kern/126924: [an] [patch] printf -> device_printf and simplify probe X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2008 19:05:18 -0000 Synopsis: [an] [patch] printf -> device_printf and simplify probe Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: vwe Responsible-Changed-When: Sun Oct 5 19:04:54 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=126924 From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 04:10:08 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27FE61065693; Mon, 6 Oct 2008 04:10:08 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F29B88FC0C; Mon, 6 Oct 2008 04:10:07 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m964A7IQ060574; Mon, 6 Oct 2008 04:10:07 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m964A7qB060570; Mon, 6 Oct 2008 04:10:07 GMT (envelope-from linimon) Date: Mon, 6 Oct 2008 04:10:07 GMT Message-Id: <200810060410.m964A7qB060570@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/127888: [ip6] [panic] kernel trap freebsd6.3p2 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 04:10:08 -0000 Old Synopsis: kernel trap freebsd6.3p2 New Synopsis: [ip6] [panic] kernel trap freebsd6.3p2 Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Oct 6 04:09:26 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=127888 From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 04:51:39 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C511065688 for ; Mon, 6 Oct 2008 04:51:39 +0000 (UTC) (envelope-from rfrench@freebsd.org) Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8298FC0C for ; Mon, 6 Oct 2008 04:51:39 +0000 (UTC) (envelope-from rfrench@freebsd.org) Received: from mini-tank.local (ip-118-90-41-173.xdsl.xnet.co.nz [118.90.41.173]) by titania.wxnz.net (Postfix) with ESMTP id 193B51DB803C for ; Mon, 6 Oct 2008 17:30:24 +1300 (NZDT) From: Ryan French To: freebsd-net@freebsd.org Date: Mon, 6 Oct 2008 17:30:23 +1300 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200810061730.23641.rfrench@freebsd.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Getting packets MAC source address in if_ethersubr.c X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 04:51:39 -0000 Hi All, For my implementation of MPLS I have just about run out of time for my dissertation so at the moment I am trying to create fake routing table entries e.t.c. rather than doing this properly (I will be doing this once uni is finished and I have more free time to work on it). I now have receiving, decoding and sending of packets working, except for one small problem. When I send a packet back out the MAC address is wrong. I am looking for a way in the ether_output function in if_ethersubr.c that I can get the MAC address of the source of the packet and then just send it back to that source. If anyone knows how to do this without having to use arpresolve or anything like that (the IP address of the destination is not going to be the same as the IP destination in the packet) or without having to setup a proper routing table then it would be much appreciated. Thanks, -Ryan From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 05:56:29 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BDE0106569E for ; Mon, 6 Oct 2008 05:56:29 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id D0BBE8FC12 for ; Mon, 6 Oct 2008 05:56:28 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=YuPMG/L76JznxzuCtKZxH2rcNcH5741K6eEIRV39NoVpiONsAfjYJyCys3jgcqzckoU5vVd4E4ZY3brLyQsn0G6myTI6LO78AuFzLTiZ/XKgwsc+23FbngYWOptJeAnPf/Rwy2IFHNGxKLoJFbBUZZ5gWf0uWY02CMqJ1ZgA59c=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1Kmj51-000KNa-U7; Mon, 06 Oct 2008 09:56:28 +0400 Date: Mon, 6 Oct 2008 09:56:26 +0400 From: Eygene Ryabinkin To: Ryan French Message-ID: References: <200810061730.23641.rfrench@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9bFcvWzl0n6AFYF" Content-Disposition: inline In-Reply-To: <200810061730.23641.rfrench@freebsd.org> Sender: rea-fbsd@codelabs.ru Cc: freebsd-net@freebsd.org Subject: Re: Getting packets MAC source address in if_ethersubr.c X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 05:56:29 -0000 --M9bFcvWzl0n6AFYF Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ryan, good day. Mon, Oct 06, 2008 at 05:30:23PM +1300, Ryan French wrote: > I now have receiving,=20 > decoding and sending of packets working, except for one small problem. Wh= en I=20 > send a packet back out the MAC address is wrong. I am looking for a way i= n=20 > the ether_output function in if_ethersubr.c that I can get the MAC addres= s of=20 > the source of the packet and then just send it back to that source. Do you mean by 'the source of the packet' the MAC address of the incoming packet to what you're sending a reply packet? If you can somehow "remember" the MAC address of the packet you're replying to (don't know about internals of your application, so can't judge if it is feasible), you can try to look at the sys/net/if_bridge.c (bridge_enqueue at the first place and bridge_input as the example on how to manipulate the Ethernet header). These might help you, unless you're not using Ethernet as the transport. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --M9bFcvWzl0n6AFYF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjpqIoACgkQthUKNsbL7YgSvgCgj/MymxDyfk7ejaTT7m6HaTJJ KesAn0mfDKrvNpNfqdBlq5N8QAu47s51 =mupS -----END PGP SIGNATURE----- --M9bFcvWzl0n6AFYF-- From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 06:04:55 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 395441065694 for ; Mon, 6 Oct 2008 06:04:55 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outK.internet-mail-service.net (outk.internet-mail-service.net [216.240.47.234]) by mx1.freebsd.org (Postfix) with ESMTP id 21FED8FC18 for ; Mon, 6 Oct 2008 06:04:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id BD2902478; Sun, 5 Oct 2008 23:04:54 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 80DD32D6017; Sun, 5 Oct 2008 23:04:53 -0700 (PDT) Message-ID: <48E9AA84.90804@elischer.org> Date: Mon, 06 Oct 2008 14:04:52 +0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Ryan French References: <200810061730.23641.rfrench@freebsd.org> In-Reply-To: <200810061730.23641.rfrench@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Getting packets MAC source address in if_ethersubr.c X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 06:04:55 -0000 Ryan French wrote: > Hi All, > > For my implementation of MPLS I have just about run out of time for my > dissertation so at the moment I am trying to create fake routing table > entries e.t.c. rather than doing this properly (I will be doing this once uni > is finished and I have more free time to work on it). I now have receiving, > decoding and sending of packets working, except for one small problem. When I > send a packet back out the MAC address is wrong. I am looking for a way in > the ether_output function in if_ethersubr.c that I can get the MAC address of > the source of the packet and then just send it back to that source. If anyone > knows how to do this without having to use arpresolve or anything like that > (the IP address of the destination is not going to be the same as the IP > destination in the packet) or without having to setup a proper routing table > then it would be much appreciated. > > Thanks, > -Ryan > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" You could create a tag type that holds a layer 2 address, and attach it to the packet on ingresss, it should stay with the packet as long as it's not destroyed.. then on egress you could find it and use it.. From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 11:06:59 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 100981065688 for ; Mon, 6 Oct 2008 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F25718FC17 for ; Mon, 6 Oct 2008 11:06:58 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m96B6w2t035555 for ; Mon, 6 Oct 2008 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m96B6wER035551 for freebsd-net@FreeBSD.org; Mon, 6 Oct 2008 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Oct 2008 11:06:58 GMT Message-Id: <200810061106.m96B6wER035551@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-net@FreeBSD.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 11:06:59 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/127888 net [ip6] [panic] kernel trap freebsd6.3p2 o kern/127834 net [ixgbe] [patch] wrong error counting o kern/127826 net [iwi] iwi0 driver has reduced performance and connecti o kern/127815 net [gif] [patch] if_gif does not set vlan attributes from o kern/127724 net [rtalloc] rtfree: 0xc5a8f870 has 1 refs f bin/127719 net arp: Segmentation fault (core dumped) s kern/127587 net [bge] [request] if_bge(4) doesn't support BCM576X fami f kern/127528 net [icmp]: icmp socket receives icmp replies not owned by o bin/127192 net routed(8) removes the secondary alias IP of interface f kern/127145 net [wi]: prism (wi) driver crash at bigger traffic o kern/127102 net [wpi] Intel 3945ABG low throughput o kern/127057 net [udp] Unable to send UDP packet via IPv6 socket to IPv o kern/127050 net [carp] ipv6 does not work on carp interfaces [regressi o kern/126984 net [carp][patch] add carp userland notifications via devc o kern/126945 net [carp] CARP interface destruction with ifconfig destro o kern/126924 net [an] [patch] printf -> device_printf and simplify prob o kern/126895 net [patch] [ral] Add antenna selection (marked as TBD) o kern/126874 net [vlan]: Zebra problem if ifconfig vlanX destroy o bin/126822 net wpa_supplicant(8): WPA PSK does not work in adhoc mode o kern/126714 net [carp] CARP interface renaming makes system no longer o kern/126695 net rtfree messages and network disruption upon use of if_ o kern/126688 net [ixgbe] [patch] 1.4.7 ixgbe driver panic with 4GB and f kern/126564 net [ath] doesn't work with my PCI-E X1 wireless network a o kern/126561 net [nlm] [patch] NLM (rpclockd) RPC UNLOCK failure (stall o kern/126475 net [ath] [panic] ath pcmcia card inevitably panics under o kern/126469 net [fxp] [panic] fxp(4) related kernel panic o kern/126339 net [ipw] ipw driver drops the connection o kern/126214 net [ath] txpower problem with Atheros wifi card o kern/126075 net [in] Network: internet control accesses beyond end of o bin/125922 net [patch] Deadlock in arp(8) o kern/125920 net [arp] Kernel Routing Table loses Ethernet Link status o kern/125845 net [netinet] [patch] tcp_lro_rx() should make use of hard o kern/125816 net [carp] [if_bridge] carp stuck in init when using bridg f kern/125502 net [ral] ifconfig ral0 scan produces no output unless in o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre f kern/125195 net [fxp] fxp(4) driver failed to initialize device Intel o kern/125181 net [ndis] [patch] with wep enters kdb.enter.unknown, pani o kern/125079 net [ppp] host routes added by ppp with gateway flag (regr o kern/124904 net [fxp] EEPROM corruption with Compaq NC3163 NIC o kern/124767 net [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 net [ieee80211] net80211 discards power-save queue packets o kern/124609 net [ipsec] [panic] ipsec 'remainder too big' panic with p o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124127 net [msk] watchdog timeout (missed Tx interrupts) -- recov o kern/124021 net [ip6] [panic] page fault in nd6_output() o bin/124004 net ifconfig(8): Cannot assign both an IP and a MAC addres o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. p kern/123961 net [vr] [patch] Allow vr interface to handle vlans o kern/123892 net [tap] [patch] No buffer space available o kern/123881 net [tcp] Turning on TCP blackholing causes slow localhost o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123617 net [tcp] breaking connection when client downloading file o kern/123603 net [tcp] tcp_do_segment and Received duplicate SYN o kern/123559 net [iwi] iwi periodically disassociates/associates [regre o bin/123465 net [ip6] route(8): route add -inet6 -interfac o kern/123463 net [ipsec] [panic] repeatable crash related to ipsec-tool o kern/123429 net [nfe] [hang] "ifconfig nfe up" causes a hard system lo o kern/123347 net [bge] bge1: watchdog timeout -- linkstate changed to D o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123256 net [wpi] panic: blockable sleep lock with wpi(4) f kern/123200 net [netgraph] Server failure due to netgraph mpd and dhcp f kern/123172 net [bce] Watchdog timeout problems with if_bce o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 o kern/123066 net [ipsec] [panic] kernel trap with ipsec o kern/122989 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/122954 net [lagg] IPv6 EUI64 incorrectly chosen for lagg devices o kern/122928 net [em] interface watchdog timeouts and stops receiving p f kern/122839 net [multicast] FreeBSD 7 multicast routing problem p kern/122794 net [lagg] Kernel panic after brings lagg(8) up if NICs ar o kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122772 net [em] em0 taskq panic, tcp reassembly bug causes radix o kern/122743 net [panic] vm_page_unwire: invalid wire count: 0 o kern/122697 net [ath] Atheros card is not well supported o kern/122685 net It is not visible passing packets in tcpdump(1) o kern/122551 net [bge] Broadcom 5715S no carrier on HP BL460c blade usi o kern/122427 net [apm] [panic] apm and mDNSResponder cause panic during o kern/122319 net [wi] imposible to enable ad-hoc demo mode with Orinoco o kern/122290 net [netgraph] [panic] Netgraph related "kmem_map too smal f kern/122252 net [ipmi] [bge] IPMI problem with BCM5704 (does not work o kern/122195 net [ed] Alignment problems in if_ed o kern/122082 net [in_pcb] NULL pointer dereference in in_pcbdrop o kern/122068 net [ppp] ppp can not set the correct interface with pptpd o kern/122058 net [em] [panic] Panic on em1: taskq o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup [reg o kern/121983 net [fxp] fxp0 MBUF and PAE o kern/121872 net [wpi] driver fails to attach on a fujitsu-siemens s711 s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121706 net [netinet] [patch] "rtfree: 0xc4383870 has 1 refs" emit o kern/121624 net [em] [regression] Intel em WOL fails after upgrade to o kern/121555 net [panic] Fatal trap 12: current process = 12 (swi1: net o kern/121443 net [gif] LOR icmp6_input/nd6_lookup o kern/121437 net [vlan] Routing to layer-2 address does not work on VLA o kern/121298 net [em] [panic] Fatal trap 12: page fault while in kernel o kern/121257 net [tcp] TSO + natd -> slow outgoing tcp traffic o kern/121181 net [panic] Fatal trap 3: breakpoint instruction fault whi o kern/121080 net [bge] IPv6 NUD problem on multi address config on bge0 o kern/120966 net [rum] kernel panic with if_rum and WPA encryption p docs/120945 net [PATCH] ip6(4) man page lacks documentation for TCLASS o kern/120566 net [request]: ifconfig(8) make order of arguments more fr o kern/120304 net [netgraph] [patch] netgraph source assumes 32-bit time o kern/120266 net [panic] gnugk causes kernel panic when closing UDP soc o kern/120232 net [nfe] [patch] Bring in nfe(4) to RELENG_6 o kern/120130 net [carp] [panic] carp causes kernel panics in any conste o kern/119945 net [rum] [panic] rum device in hostap mode, cause kernel o kern/119791 net [nfs] UDP NFS mount of aliased IP addresses from a Sol o kern/119617 net [nfs] nfs error on wpa network when reseting/shutdown f kern/119516 net [ip6] [panic] _mtx_lock_sleep: recursed on non-recursi o kern/119432 net [arp] route add -host -iface causes arp e o kern/119361 net [bge] bge(4) transmit performance problem o kern/119345 net [ath] Unsuported Atheros 5424/2424 and CPU speedstep n o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o bin/118987 net ifconfig(8): ifconfig -l (address_family) does not wor o kern/118880 net [ip6] IP_RECVDSTADDR & IP_SENDSRCADDR not implemented a kern/118879 net [bge] [patch] bge has checksum problems on the 5703 ch o kern/118727 net [netgraph] [patch] [request] add new ng_pf module o kern/117448 net [carp] 6.2 kernel crash [regression] o kern/117423 net [vlan] Duplicate IP on different interfaces o bin/117339 net [patch] route(8): loading routing management commands o kern/117271 net [tap] OpenVPN TAP uses 99% CPU on releng_6 when if_tap o kern/117043 net [em] Intel PWLA8492MT Dual-Port Network adapter EEPROM o kern/116837 net [tun] [panic] [patch] ifconfig tunX destroy: panic o kern/116747 net [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116328 net [bge]: Solid hang with bge interface o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/116077 net [ip] [patch] 6.2-STABLE panic during use of multi-cast o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/114839 net [fxp] fxp looses ability to speak with traffic o kern/114714 net [gre][patch] gre(4) is not MPSAFE and does not support o kern/113842 net [ip6] PF_INET6 proto domain state can't be cleared wit o kern/112722 net [udp] IP v4 udp fragmented packet reject o kern/112686 net [patm] patm driver freezes System (FreeBSD 6.2-p4) i38 o bin/112557 net [patch] ppp(8) lock file should not use symlink name o kern/112528 net [nfs] NFS over TCP under load hangs with "impossible p o kern/109733 net [bge] bge link state issues [regression] o kern/109470 net [wi] Orinoco Classic Gold PC Card Can't Channel Hop o kern/109308 net [pppd] [panic] Multiple panics kernel ppp suspected [r o bin/108895 net pppd(8): PPPoE dead connections on 6.2 [regression] o kern/108542 net [bce]: Huge network latencies with 6.2-RELEASE / STABL o kern/107944 net [wi] [patch] Forget to unlock mutex-locks o conf/107035 net [patch] bridge interface given in rc.conf not taking a o kern/106438 net [ipf] ipfilter: keep state does not seem to allow repl o kern/106316 net [dummynet] dummynet with multipass ipfw drops packets s kern/105943 net Network stack may modify read-only mbuf chain copies o bin/105925 net problems with ifconfig(8) and vlan(4) [regression] o conf/102502 net [patch] ifconfig name does't rename netgraph node in n o kern/102035 net [plip] plip networking disables parallel port printing o kern/101948 net [ipf] [panic] Kernel Panic Trap No 12 Page Fault - cau o kern/100519 net [netisr] suggestion to fix suboptimal network polling o kern/98978 net [ipf] [patch] ipfilter drops OOW packets under 6.1-Rel o kern/95288 net [pppd] [tty] [panic] if_ppp panic in sys/kern/tty_subr o kern/95277 net [netinet] [patch] IP Encapsulation mask_match() return o kern/95267 net packet drops periodically appear o kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo f kern/92552 net A serious bug in most network drivers from 5.X to 6.X o kern/92090 net [bge] bge0: watchdog timeout -- resetting s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91594 net [em] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/10 o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k s kern/86920 net [ndis] ifconfig: SIOCS80211: Invalid argument [regress o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter s kern/81147 net [net] [patch] em0 reinitialization while adding aliase o kern/79895 net [ipf] 5.4-RC2 breaks ipfilter NAT when using netgraph o bin/79228 net [patch] extend arp(8) to be able to create blackhole r o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if p kern/77913 net [wi] [patch] Add the APDL-325 WLAN pccard to wi(4) o kern/77273 net [ipf] ipfilter breaks ipv6 statefull filtering on 5.3 s kern/77195 net [ipf] [patch] ipfilter ioctl SIOCGNATL does not match o kern/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/64556 net [sis] if_sis short cable fix problems with NetGear FA3 s kern/60293 net FreeBSD arp poison patch o kern/54383 net [nfs] [patch] NFS root configurations without dynamic s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr s kern/39937 net ipstealth issue a kern/38554 net [patch] changing interface ipaddress doesn't seem to w o kern/35442 net [sis] [patch] Problem transmitting runts in if_sis dri o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c o conf/23063 net [PATCH] for static ARP tables in rc.network 183 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 11:48:21 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F27F106569B for ; Mon, 6 Oct 2008 11:48:21 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 9138B8FC0C for ; Mon, 6 Oct 2008 11:48:20 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so714190eyi.7 for ; Mon, 06 Oct 2008 04:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=C7OVEYMDns79ego23JU9Cm8n3hwIBL2T4+mAhlf6xck=; b=cKxY+nV+w83rlnHYTRpi/qmPeclyHIN4VNlV/USs52HUKAUjIBuua8FWc7//zzb1Gt kKyAldKC008K7Ira1IyS+4BizfvapeiCYbpMBfw2t2Jyg+ewMAWmT8164uEJdN0XdXHm 3Jybld7yXdXFvrCmuBtxIYrsLJp6xDUcbg5A8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Elci1Lz43ZJ5Jfj+pwaGnUPIldncHni5iOvxFxTQKsFhruCf7avnqXvXLZ2zrDHIpE iB/18WZ9RfwjPoTEUMX1oX8/dI4zaB1P2wYGa6YawCF3GZj5U046Sb/stiB4nyBV9+BH /SIT1+uo9Kb+m0jH1N//ZGEKPMjoaZWkQniVQ= Received: by 10.103.247.14 with SMTP id z14mr2714055mur.39.1223293698929; Mon, 06 Oct 2008 04:48:18 -0700 (PDT) Received: from localhost (cable-234-140.cgates.lt [79.133.234.140]) by mx.google.com with ESMTPS id e10sm10584173muf.14.2008.10.06.04.48.17 (version=SSLv3 cipher=RC4-MD5); Mon, 06 Oct 2008 04:48:18 -0700 (PDT) Date: Mon, 6 Oct 2008 14:48:14 +0300 From: Gleb Kurtsou To: Julian Elischer Message-ID: <20081006114814.GB3497@rybacik> References: <200810061730.23641.rfrench@freebsd.org> <48E9AA84.90804@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <48E9AA84.90804@elischer.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Ryan French , freebsd-net@freebsd.org Subject: Re: Getting packets MAC source address in if_ethersubr.c X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 11:48:21 -0000 On (06/10/2008 14:04), Julian Elischer wrote: > Ryan French wrote: > > Hi All, > > > > For my implementation of MPLS I have just about run out of time for my > > dissertation so at the moment I am trying to create fake routing table > > entries e.t.c. rather than doing this properly (I will be doing this once uni > > is finished and I have more free time to work on it). I now have receiving, > > decoding and sending of packets working, except for one small problem. When I > > send a packet back out the MAC address is wrong. I am looking for a way in > > the ether_output function in if_ethersubr.c that I can get the MAC address of > > the source of the packet and then just send it back to that source. If anyone > > knows how to do this without having to use arpresolve or anything like that > > (the IP address of the destination is not going to be the same as the IP > > destination in the packet) or without having to setup a proper routing table > > then it would be much appreciated. > > > > Thanks, > > -Ryan > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > You could create a tag type that holds a layer 2 address, and attach > it to the packet on ingresss, > > it should stay with the packet as long as it's not destroyed.. > then on egress you could find it and use it.. That's exactly what I did for Google Summer Of Code project this year http://wiki.freebsd.org/GlebKurtsov/Improving_layer2_filtering Ryan, you can have a look at first changesets in perforce and extract only functionality you need. From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 17:44:34 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B39106568B; Mon, 6 Oct 2008 17:44:34 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 480CF8FC20; Mon, 6 Oct 2008 17:44:34 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (vwe@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m96HiYnk070426; Mon, 6 Oct 2008 17:44:34 GMT (envelope-from vwe@freefall.freebsd.org) Received: (from vwe@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m96HiYgg070422; Mon, 6 Oct 2008 17:44:34 GMT (envelope-from vwe) Date: Mon, 6 Oct 2008 17:44:34 GMT Message-Id: <200810061744.m96HiYgg070422@freefall.freebsd.org> To: nospam@ofloo.net, vwe@FreeBSD.org, freebsd-net@FreeBSD.org, vwe@FreeBSD.org From: vwe@FreeBSD.org Cc: Subject: Re: kern/127888: [ip6] [panic] kernel trap freebsd6.3p2 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 17:44:34 -0000 Synopsis: [ip6] [panic] kernel trap freebsd6.3p2 State-Changed-From-To: open->feedback State-Changed-By: vwe State-Changed-When: Mon Oct 6 17:38:30 UTC 2008 State-Changed-Why: Wouter, by knowing your setup, I wildly guess it's again stf related (the instruction pointer suggests that). Again, we need to do the same procedure as we did last weekend. Please use all my information, how to load the KLD's into kgdb, get a backtrace, inspect the sourcecode and the like, the same way. The manpages to asf(8), kldstat(8) and kgdb(1) are there to help you. Please report back to the backtrace, find the faulting frame (a stf call), do a list and attach all that to the PR. Please understand I do not find much time in the weekdays to respond quickly. Responsible-Changed-From-To: freebsd-net->vwe Responsible-Changed-By: vwe Responsible-Changed-When: Mon Oct 6 17:38:30 UTC 2008 Responsible-Changed-Why: grab http://www.freebsd.org/cgi/query-pr.cgi?pr=127888 From owner-freebsd-net@FreeBSD.ORG Mon Oct 6 21:33:48 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ACA41065689; Mon, 6 Oct 2008 21:33:48 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 60F368FC1F; Mon, 6 Oct 2008 21:33:48 +0000 (UTC) (envelope-from vwe@FreeBSD.org) Received: from freefall.freebsd.org (vwe@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m96LXmkD088509; Mon, 6 Oct 2008 21:33:48 GMT (envelope-from vwe@freefall.freebsd.org) Received: (from vwe@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m96LXmkt088505; Mon, 6 Oct 2008 21:33:48 GMT (envelope-from vwe) Date: Mon, 6 Oct 2008 21:33:48 GMT Message-Id: <200810062133.m96LXmkt088505@freefall.freebsd.org> To: vwe@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: vwe@FreeBSD.org Cc: Subject: Re: kern/123858: [stf] [patch] stf not usable behind a NAT X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 21:33:48 -0000 Synopsis: [stf] [patch] stf not usable behind a NAT Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: vwe Responsible-Changed-When: Mon Oct 6 21:33:23 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=123858 From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 11:54:11 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67C501065693; Tue, 7 Oct 2008 11:54:11 +0000 (UTC) (envelope-from qj@huawei.com) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) by mx1.freebsd.org (Postfix) with ESMTP id 095B98FC17; Tue, 7 Oct 2008 11:54:10 +0000 (UTC) (envelope-from qj@huawei.com) Received: from huawei.com (szxga02-in [172.24.2.6]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K8D00BEE9XGRL@szxga02-in.huawei.com>; Tue, 07 Oct 2008 19:44:05 +0800 (CST) Received: from huawei.com ([172.24.1.18]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K8D00H4R9XGTN@szxga02-in.huawei.com>; Tue, 07 Oct 2008 19:44:04 +0800 (CST) Received: from q00130354 ([10.111.9.38]) by szxml03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0K8D00GJZ9XDFL@szxml03-in.huawei.com>; Tue, 07 Oct 2008 19:44:04 +0800 (CST) Date: Tue, 07 Oct 2008 19:44:00 +0800 From: =?gb2312?B?x/G9ow==?= To: freebsd-questions@freebsd.org Message-id: <004001c92871$fdec0a10$01000001@china.huawei.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Mailer: Microsoft Office Outlook 11 Thread-index: Ackocf2blBPcE5DVRuCv/5eRYj2bEg== Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@FreeBSD.org, freebsd-threads@freebsd.org Subject: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 11:54:11 -0000 Hi, folks, I did kernel profiling when a single thread client sends UDP packets to a single thread server on the same machine. In the output kernel profile, the first few kernel functions that consumes the most CPU time are listed below: granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 seconds % cumulative self self total time seconds seconds calls ms/call ms/call name 42.4 10.88 10.88 0 100.00% __mcount [1] 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43] 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [48] 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [3] 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46] 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic [9] 0.7 22.80 0.19 3145852 0.00 0.00 free [47] 0.6 22.96 0.15 6292172 0.00 0.00 uma_zfree_arg [52] 0.6 23.10 0.14 5243413 0.00 0.00 generic_bzero [53] 0.5 23.23 0.14 1048581 0.00 0.00 ip_output [23] 0.5 23.36 0.13 4221855 0.00 0.00 generic_bcopy [57] 0.4 23.47 0.11 36865859 0.00 0.00 critical_enter [61] 0.4 23.57 0.10 36865859 0.00 0.00 critical_exit [62] 0.4 23.67 0.09 17937541 0.00 0.00 spinlock_enter [63] 0.4 23.76 0.09 1048582 0.00 0.00 udp_input [21] 0.3 23.85 0.09 2108904 0.00 0.00 syscall [5] 0.3 23.93 0.08 1048587 0.00 0.00 ip_input [20] 0.3 24.00 0.07 2097156 0.00 0.00 getsock [65] 0.3 24.07 0.07 1048576 0.00 0.00 udp_send [22] It is very strange that spinlock_exit consumes over 36% CPU time while it seems a very simple function. For clarity, I paste the code of spinlock_exit here: void spinlock_exit(void) { struct thread *td; td = curthread; critical_exit(); td->td_md.md_spinlock_count--; if (td->td_md.md_spinlock_count == 0) intr_restore(td->td_md.md_saved_flags); } Since critical_exit consumes only 0.4% CPU time, does this mean the rest of spinlock_exit consume ~36% CPU time? Am I missing something? Could anybody help me understand this? Many thanks. BTW, the kernel is compiled with SMP and PREEMPTION disabled. The scheduler is ULE. Best regards, Qiu Jian From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 12:13:51 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D90E10656A8 for ; Tue, 7 Oct 2008 12:13:51 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA04.emeryville.ca.mail.comcast.net (qmta04.emeryville.ca.mail.comcast.net [76.96.30.40]) by mx1.freebsd.org (Postfix) with ESMTP id 512318FC49 for ; Tue, 7 Oct 2008 12:13:51 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by QMTA04.emeryville.ca.mail.comcast.net with comcast id PnZX1a0020S2fkCA4nxrzL; Tue, 07 Oct 2008 11:57:51 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA09.emeryville.ca.mail.comcast.net with comcast id Pnxo1a00R2P6wsM8VnxpSF; Tue, 07 Oct 2008 11:57:49 +0000 X-Authority-Analysis: v=1.0 c=1 a=j1-vOjvzWS4A:10 a=qbkBlHUnetAA:10 a=QycZ5dHgAAAA:8 a=830efeqVd1-BpMj3v6YA:9 a=OaTEfa5PdL42xPuouuoA:7 a=_rQjeZhtyJV0AH9nAlltBONLT1IA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 7D66EC9419; Tue, 7 Oct 2008 04:57:48 -0700 (PDT) Date: Tue, 7 Oct 2008 04:57:48 -0700 From: Jeremy Chadwick To: ???? Message-ID: <20081007115748.GA48154@icarus.home.lan> References: <004001c92871$fdec0a10$01000001@china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004001c92871$fdec0a10$01000001@china.huawei.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-net@FreeBSD.org, freebsd-questions@freebsd.org, freebsd-threads@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 12:13:51 -0000 On Tue, Oct 07, 2008 at 07:44:00PM +0800, ???? wrote: > Hi, folks, > > I did kernel profiling when a single thread client sends UDP packets to a > single thread server on the same machine. > > In the output kernel profile, the first few kernel functions that consumes > the most CPU time are listed below: > > granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 seconds > > % cumulative self self total > time seconds seconds calls ms/call ms/call name > 42.4 10.88 10.88 0 100.00% __mcount [1] > 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] > 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] > 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43] > 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [48] > 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [3] > 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46] > 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic [9] > 0.7 22.80 0.19 3145852 0.00 0.00 free [47] > 0.6 22.96 0.15 6292172 0.00 0.00 uma_zfree_arg [52] > 0.6 23.10 0.14 5243413 0.00 0.00 generic_bzero [53] > 0.5 23.23 0.14 1048581 0.00 0.00 ip_output [23] > 0.5 23.36 0.13 4221855 0.00 0.00 generic_bcopy [57] > 0.4 23.47 0.11 36865859 0.00 0.00 critical_enter [61] > 0.4 23.57 0.10 36865859 0.00 0.00 critical_exit [62] > 0.4 23.67 0.09 17937541 0.00 0.00 spinlock_enter [63] > 0.4 23.76 0.09 1048582 0.00 0.00 udp_input [21] > 0.3 23.85 0.09 2108904 0.00 0.00 syscall [5] > 0.3 23.93 0.08 1048587 0.00 0.00 ip_input [20] > 0.3 24.00 0.07 2097156 0.00 0.00 getsock [65] > 0.3 24.07 0.07 1048576 0.00 0.00 udp_send [22] > > It is very strange that spinlock_exit consumes over 36% CPU time while it > seems a very simple function. > > For clarity, I paste the code of spinlock_exit here: > > void > spinlock_exit(void) > { > struct thread *td; > > td = curthread; > critical_exit(); > td->td_md.md_spinlock_count--; > if (td->td_md.md_spinlock_count == 0) > intr_restore(td->td_md.md_saved_flags); > } > > Since critical_exit consumes only 0.4% CPU time, does this mean the rest of > spinlock_exit consume ~36% CPU time? > > Am I missing something? Could anybody help me understand this? Many thanks. > > BTW, the kernel is compiled with SMP and PREEMPTION disabled. The scheduler > is ULE. What FreeBSD version, and what build date of the kernel? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 13:28:07 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87FCB106568A for ; Tue, 7 Oct 2008 13:28:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 715978FC21 for ; Tue, 7 Oct 2008 13:28:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id E883022C0; Tue, 7 Oct 2008 06:28:07 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id CE2C52D601A; Tue, 7 Oct 2008 06:28:03 -0700 (PDT) Message-ID: <48EB63E3.60604@elischer.org> Date: Tue, 07 Oct 2008 21:28:03 +0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: =?GB2312?B?x/G9ow==?= References: <004001c92871$fdec0a10$01000001@china.huawei.com> In-Reply-To: <004001c92871$fdec0a10$01000001@china.huawei.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Cc: freebsd-net@FreeBSD.org, freebsd-questions@freebsd.org, freebsd-threads@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 13:28:07 -0000 Ηρ½£ wrote: > Hi, folks, [...] spinlocks disable interrupts so the profiling interrupt is held off from the moment that the spinlock is entered to the moment it is exited, and all of that time is attributed to spinlock_exit(). so that this tells you that 3% of your time is spent under spinlocks which is a lot. as others have asked, "what version"? you should look up lock profiling to see WHICH lock is teh ine in question. From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 13:29:55 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 782B910656A8; Tue, 7 Oct 2008 13:29:55 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id 307358FC2C; Tue, 7 Oct 2008 13:29:55 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.21.141] (helo=devil.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KnCdM-0006EK-Q6; Tue, 07 Oct 2008 21:29:52 +0800 Message-ID: <48EB6450.9050004@micom.mng.net> Date: Tue, 07 Oct 2008 21:29:52 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.16 (X11/20080901) MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org References: <48DA1B65.8030106@micom.mng.net> In-Reply-To: <48DA1B65.8030106@micom.mng.net> X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: ipfw port lookup table patch for review X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 13:29:55 -0000 Hi, I have just made the patches that use arrays for port entries. It is under the same directory: http://people.freebsd.org/~ganbold/ipfw_port_table/ Array version (each array can have IPFW_TABLES_MAX entries): http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_array_unsorted/ List version is still at: http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_list_unsorted/ thanks, Ganbold Ganbold wrote: > Hi, > > I thought it might be useful to have port lookup table similar to > existing IP lookup table > in ipfw and I have made patch for that. > > The downside of the patch so far I'm seeing is the port entries are in > linked list > (no limitation yet, memory overhead), not sorted and it uses linear > search > to match (could be slow when lot of entries). > > Just after I've made the patch I saw > http://www.freebsd.org/cgi/query-pr.cgi?pr=121807&cat= . :( > > I agree with PR's reply however for small number of port entries I > thought > this functionality is quite useful. It gives benefit like no need to > modify existing rule, > adding/deleting port entries is easy. > > I did some small tests and it seems like working. > > Patches are at: > http://people.freebsd.org/~ganbold/ipfw_port_table/ > > The output of some usage samples is at: > http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_usage_sample.txt > > > Patches can be successfully applied to CURRENT. Didn't test RELENG_7 > due to > no RELENG_7 PC :) > Please let me know your thoughts. I'm happy to discuss to improve the > patch. > Correct me if I'm doing something wrong here. > > thanks, > > Ganbold > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 14:04:17 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 841F51065695; Tue, 7 Oct 2008 14:04:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 060658FC08; Tue, 7 Oct 2008 14:04:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m97E4AvC042408; Tue, 7 Oct 2008 10:04:10 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-threads@freebsd.org Date: Tue, 7 Oct 2008 09:38:04 -0400 User-Agent: KMail/1.9.7 References: <004001c92871$fdec0a10$01000001@china.huawei.com> In-Reply-To: <004001c92871$fdec0a10$01000001@china.huawei.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200810070938.04673.jhb@freebsd.org> Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 07 Oct 2008 10:04:10 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8384/Tue Oct 7 06:37:18 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: =?gb2312?q?=C7=F1=BD=A3?= , freebsd-net@freebsd.org, freebsd-questions@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 14:04:17 -0000 On Tuesday 07 October 2008 07:44:00 am =C7=F1=BD=A3 wrote: > Hi, folks, > =20 > I did kernel profiling when a single thread client sends UDP packets to a > single thread server on the same machine. > =20 > In the output kernel profile, the first few kernel functions that consumes > the most CPU time are listed below: > =20 > granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 seconds >=20 > % cumulative self self total > time seconds seconds calls ms/call ms/call name > 42.4 10.88 10.88 0 100.00% __mcount [1] > 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] > 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] > 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43] > 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [48] > 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [3] > 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46] > 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic [= 9] > > It is very strange that spinlock_exit consumes over 36% CPU time while it > seems a very simple function. It's because the intr_restore() re-enables interrupts and the resulting tim= e=20 spent executing the handlers for any pending interrupts are attributed to=20 spinlock_exit(). =2D-=20 John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 19:09:14 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BE321065688 for ; Tue, 7 Oct 2008 19:09:14 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 0264F8FC19 for ; Tue, 7 Oct 2008 19:09:13 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 5BE5F178601 for ; Tue, 7 Oct 2008 15:09:12 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 07 Oct 2008 15:09:12 -0400 X-Sasl-enc: Kb0pRdR9w+RDHq9xyb4fAbfp/ovavV97jhGT+B4KBoy5 1223406552 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id DC2EB4235E for ; Tue, 7 Oct 2008 15:09:11 -0400 (EDT) Message-ID: <48EBB3D6.600@incunabulum.net> Date: Tue, 07 Oct 2008 20:09:10 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-net@FreeBSD.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: How to support an Ethernet PHY without ID registers? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 19:09:14 -0000 Hi, I have been trying to get FreeBSD onto the Freecom FSG3 Storage Gateway. It is an xScale based ARM system. Whilst the npe(4) driver appears to attach, the PHY does not. It is a Realtel RTL8305SB switch chip in dual miibus mode. Unfortunately the RTL8305SB does not have ID registers. The RTL8305SC does, but it's a totally different chip. We do have a driver in the tree for the RTL8305SC, however these chips are different enough for this to cause problems. Is there any way I could for example force ukphy(4) to attach? Note: Because there are no ID registers, mii_phy_probe_gen() WILL NOT work. It looks like I'd have to override this by hacking if_npe.c itself. Can anyone clarify? cheers BMS From owner-freebsd-net@FreeBSD.ORG Tue Oct 7 20:57:12 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D2D310656A5; Tue, 7 Oct 2008 20:57:12 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 72D138FC1B; Tue, 7 Oct 2008 20:57:12 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m97KvCKH035897; Tue, 7 Oct 2008 20:57:12 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m97KvC03035893; Tue, 7 Oct 2008 20:57:12 GMT (envelope-from linimon) Date: Tue, 7 Oct 2008 20:57:12 GMT Message-Id: <200810072057.m97KvC03035893@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/127928: [tcp] [patch] TCP bandwidth gets squeezed every time tcp_xmit_bandwidth_limit() kicks in X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 20:57:12 -0000 Old Synopsis: The TCP bandwidth gets squeezed every time tcp_xmit_bandwidth_limit() kicks in New Synopsis: [tcp] [patch] TCP bandwidth gets squeezed every time tcp_xmit_bandwidth_limit() kicks in Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Tue Oct 7 20:55:46 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=127928 From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 04:15:23 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 986CA1065694 for ; Wed, 8 Oct 2008 04:15:23 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-gx0-f21.google.com (mail-gx0-f21.google.com [209.85.217.21]) by mx1.freebsd.org (Postfix) with ESMTP id 54D458FC27 for ; Wed, 8 Oct 2008 04:15:23 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by gxk14 with SMTP id 14so7449066gxk.19 for ; Tue, 07 Oct 2008 21:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IcZeay9X5RZAA6mf5ZG6efFa6u7x423kfwv+HR580G8=; b=Nsw7hc+dfeVu/PQK4R5LmZBqLw6UmlP2dVu6/1t8Un0pKPKLZRFIuSv/fLUkhZjEAM e+xCopPE/5/zdKxP89sVcEa0+P80AZadl0IFledB9nbffxPxdtFjSVgmooLORLmbbhnq 5E9xixLrcrUUMinW8rsMvP4BK6dcaSsB9V8M4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=eiDoxfxouuPy2kQTM08yk5iaGTXwDo6I1goWPhEvqSV42BuVBq0R0EMjkcGxgn+sAU MC/KneXPID6dDXhxahlJ/INhgmK+C+rrNKifQg35rixwcaB5YVNdbMMUe9U8YfR5lx3s Vek62q20nF+uZkKvKOimTfvyvgPa034tHqpus= Received: by 10.151.153.14 with SMTP id f14mr11078668ybo.99.1223437882472; Tue, 07 Oct 2008 20:51:22 -0700 (PDT) Received: by 10.151.142.19 with HTTP; Tue, 7 Oct 2008 20:51:22 -0700 (PDT) Message-ID: Date: Wed, 8 Oct 2008 11:51:22 +0800 From: "Sepherosa Ziehau" To: "freebsd-net@freebsd.org" In-Reply-To: <48EBB3D6.600@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48EBB3D6.600@incunabulum.net> Subject: Re: How to support an Ethernet PHY without ID registers? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 04:15:23 -0000 On Wed, Oct 8, 2008 at 3:09 AM, Bruce M Simpson wrote: > Hi, > > I have been trying to get FreeBSD onto the Freecom FSG3 Storage Gateway. > It is an xScale based ARM system. > > Whilst the npe(4) driver appears to attach, the PHY does not. It is a > Realtel RTL8305SB switch chip in dual miibus mode. Unfortunately the > RTL8305SB does not have ID registers. The RTL8305SC does, but it's a totally Are you sure you could read from BMSR? Return invalid value from BMSR is the usual cause of miibus attaching/probing failure. For ID1/ID2 reading, you could just fake some values in npe(4)'s miibus_readreg implementation. Best Regards, sephe -- Live Free or Die From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 07:13:10 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D7110656D9; Wed, 8 Oct 2008 07:13:10 +0000 (UTC) (envelope-from qj@huawei.com) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) by mx1.freebsd.org (Postfix) with ESMTP id CD7FD8FC2F; Wed, 8 Oct 2008 07:13:09 +0000 (UTC) (envelope-from qj@huawei.com) Received: from huawei.com (szxga02-in [172.24.2.6]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K8E00L7NRZK4Y@szxga02-in.huawei.com>; Wed, 08 Oct 2008 15:11:44 +0800 (CST) Received: from huawei.com ([172.24.1.12]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K8E00IHGRZKD4@szxga02-in.huawei.com>; Wed, 08 Oct 2008 15:11:44 +0800 (CST) Received: from q00130354 ([10.111.9.38]) by szxml05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0K8E00A8ZRZFIX@szxml05-in.huawei.com>; Wed, 08 Oct 2008 15:11:44 +0800 (CST) Date: Wed, 08 Oct 2008 15:11:40 +0800 From: =?gb2312?B?x/G9ow==?= In-reply-to: <20081007115748.GA48154@icarus.home.lan> To: 'Jeremy Chadwick' Message-id: <000301c92915$1cd0ae60$01000001@china.huawei.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Mailer: Microsoft Office Outlook 11 Content-type: text/plain; charset=gb2312 Content-transfer-encoding: 7BIT Thread-index: AckodL2oSBjwz6W/R9ecg3XW/kxmlwAoABWQ Cc: freebsd-net@FreeBSD.org, freebsd-questions@freebsd.org, freebsd-threads@freebsd.org Subject: RE: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 07:13:10 -0000 Forgot to meantion that the test is based on FreeBSD kernel 7.0 2000807 snapshot. The kernel was compiled with a modified version of GENERIC configuration. With SMP and PREEMPTION disabled and kernel profiling enabled. -----Original Message----- From: Jeremy Chadwick [mailto:koitsu@FreeBSD.org] Sent: Tuesday, October 07, 2008 7:58 PM To: ???? Cc: freebsd-questions@freebsd.org; freebsd-net@FreeBSD.org; freebsd-threads@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. On Tue, Oct 07, 2008 at 07:44:00PM +0800, ???? wrote: > Hi, folks, > > I did kernel profiling when a single thread client sends UDP packets > to a single thread server on the same machine. > > In the output kernel profile, the first few kernel functions that > consumes the most CPU time are listed below: > > granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 > seconds > > % cumulative self self total > time seconds seconds calls ms/call ms/call name > 42.4 10.88 10.88 0 100.00% __mcount [1] > 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] > 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] > 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43] > 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [48] > 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [3] > 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46] > 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic [9] > 0.7 22.80 0.19 3145852 0.00 0.00 free [47] > 0.6 22.96 0.15 6292172 0.00 0.00 uma_zfree_arg [52] > 0.6 23.10 0.14 5243413 0.00 0.00 generic_bzero [53] > 0.5 23.23 0.14 1048581 0.00 0.00 ip_output [23] > 0.5 23.36 0.13 4221855 0.00 0.00 generic_bcopy [57] > 0.4 23.47 0.11 36865859 0.00 0.00 critical_enter [61] > 0.4 23.57 0.10 36865859 0.00 0.00 critical_exit [62] > 0.4 23.67 0.09 17937541 0.00 0.00 spinlock_enter [63] > 0.4 23.76 0.09 1048582 0.00 0.00 udp_input [21] > 0.3 23.85 0.09 2108904 0.00 0.00 syscall [5] > 0.3 23.93 0.08 1048587 0.00 0.00 ip_input [20] > 0.3 24.00 0.07 2097156 0.00 0.00 getsock [65] > 0.3 24.07 0.07 1048576 0.00 0.00 udp_send [22] > > It is very strange that spinlock_exit consumes over 36% CPU time while > it seems a very simple function. > > For clarity, I paste the code of spinlock_exit here: > > void > spinlock_exit(void) > { > struct thread *td; > > td = curthread; > critical_exit(); > td->td_md.md_spinlock_count--; > if (td->td_md.md_spinlock_count == 0) > intr_restore(td->td_md.md_saved_flags); > } > > Since critical_exit consumes only 0.4% CPU time, does this mean the > rest of spinlock_exit consume ~36% CPU time? > > Am I missing something? Could anybody help me understand this? Many thanks. > > BTW, the kernel is compiled with SMP and PREEMPTION disabled. The > scheduler is ULE. What FreeBSD version, and what build date of the kernel? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 13:47:45 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A816106568D for ; Wed, 8 Oct 2008 13:47:45 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [IPv6:2001:4200:7000:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 275B08FC3C for ; Wed, 8 Oct 2008 13:47:45 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from jeep.meraka.csir.co.za (jeep.meraka.csir.co.za [IPv6:2001:4200:7000:3:211:43ff:feba:aff1]) by marge.meraka.csir.co.za (Postfix) with ESMTP id E457B78C5C for ; Wed, 8 Oct 2008 15:47:43 +0200 (SAST) From: Johann Hugo Organization: CSIR To: freebsd-net@freebsd.org Date: Wed, 8 Oct 2008 15:47:43 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810081547.43450.jhugo@meraka.csir.co.za> Subject: "route flush" does not delete routes created with -interface option X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 13:47:45 -0000 Is there a way to get rid of all the routes in a routing table ? This is more or less what I do: route add 146.64.80.0/24 192.168.0.100 route add 146.141.0.0 -interface tun1 route add 146.182.0.0 -interface tun1 route add 146.230.0.0 -interface tun1 netstat -rn inet 146.64.80.0/24 192.168.0.100 UGS 0 0 sis0 146.141.0.0/16 tun1 US 0 0 tun1 146.182.0.0/16 tun1 US 0 0 tun1 146.230.0.0/16 tun1 US 0 0 tun1 If I do "route -n flush -inet" then it does not delete the routes created with a -interface option. see verbose output: route -vn flush -inet RTM_GET: Report Metrics: len 204, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_DELETE: Delete Route: len 204, pid: 0, seq 2, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.141.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.182.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.230.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za uname -a FreeBSD groenwifi.cids.org.za 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #19: Tue Aug 26 13:40:13 UTC 2008 From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 15:11:20 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 560D8106568D; Wed, 8 Oct 2008 15:11:20 +0000 (UTC) (envelope-from prvs=1167892f71=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id ABF2F8FC1B; Wed, 8 Oct 2008 15:11:19 +0000 (UTC) (envelope-from prvs=1167892f71=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1223477593; x=1224082393; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=6w618BKOYQtfrTe8ekppK iyHdrgzUvH1NkNGcgtv0Fs=; b=a/ArZwPTxX1exbTUaLcb1ZpUYrpu2yrAp70TP W06tchyKnEfRVpqWXD7UN3WF6j2vJouxuhSYQ8SAOjswkyaaImbdQ4ZH0qPsF4PB 5ektMPhF37QnGN/16Zc0sLv2+fMGBy5sXoF8UViQK3/QTwj82PvxUO9/xJQLKk1Y sOSwOE= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.6) with ESMTP id md50006300532.msg; Wed, 08 Oct 2008 15:53:08 +0100 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 85.236.106.102 X-Return-Path: prvs=1167892f71=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <19BC920CEFA644B5896E89FFB00B81F6@multiplay.co.uk> From: "Steven Hartland" To: "Sam Leffler" , "Jack Vogel" References: <2a41acea0705161030k40831aa5o168b5bc40fcf3352@mail.gmail.com> <464B70F4.3010109@errno.com> Date: Wed, 8 Oct 2008 15:53:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Spam-Processed: mail1.multiplay.co.uk, Wed, 08 Oct 2008 15:53:09 +0100 X-MDAV-Processed: mail1.multiplay.co.uk, Wed, 08 Oct 2008 15:53:13 +0100 Cc: freebsd-net , FreeBSD Current Subject: Re: EM and TSO X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 15:11:20 -0000 Even on PCI-e devices this has some nasty side effects i.e. on a PFSence firewall box based on 7.0-RELEASE-p3 with TSO enabled, access via the public network to the web interface is almost impossible. Simply disabling TSO and all was good. This may not be strictly down to the HW or driver but is another reason to not enable it by default if it causes such poor performance. Regards Steve ----- Original Message ----- From: "Sam Leffler" To: "Jack Vogel" Cc: "freebsd-net" ; "FreeBSD Current" Sent: Wednesday, May 16, 2007 10:00 PM Subject: Re: EM and TSO > Jack Vogel wrote: >> I introduced a change yesterday that limited TSO to PCI Express >> adapters, I did this more for avoidance rather than a bug fix, and >> I'm not 100% sure its the right thing, so I thought I would poll >> everyone, do you have a PCI-X adapter and are using TSO without >> problems and wish to keep the support in? >> >> If no one is then I'll just leave it as is. > > It might be better to enable it by default on pci-e adapters and require > manual enable on other adapters that are capable but may not function > correctly. > > Sam > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 15:23:55 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7384106568B for ; Wed, 8 Oct 2008 15:23:55 +0000 (UTC) (envelope-from fazaeli@sepehrs.com) Received: from sepehrs.com (mail2.sepehrs.com [213.217.59.98]) by mx1.freebsd.org (Postfix) with ESMTP id C3E848FC24 for ; Wed, 8 Oct 2008 15:23:54 +0000 (UTC) (envelope-from fazaeli@sepehrs.com) Received: from [192.168.1.180] ([192.168.1.180]) by sepehrs.com (8.13.6/8.13.6) with ESMTP id m98F5b1x039541 for ; Wed, 8 Oct 2008 18:35:38 +0330 (IRST) (envelope-from fazaeli@sepehrs.com) Message-ID: <48ECCC0C.30208@sepehrs.com> Date: Wed, 08 Oct 2008 18:34:44 +0330 From: "H.fazaeli" User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sepehr-MailScanner-Information: Please contact the ISP for more information X-Sepehr-MailScanner: Found to be clean X-Sepehr-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.886, required 5, ALL_TRUSTED -1.80, BAYES_00 -2.60, DNS_FROM_SECURITYSAGE 1.51) X-MailScanner-From: fazaeli@sepehrs.com X-Spam-Status: No Subject: em(4) status X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 15:23:55 -0000 Hi all and Jack Are the changes discussed in: http://lists.freebsd.org/pipermail/freebsd-net/2008-January/016584.html http://lists.freebsd.org/pipermail/freebsd-net/2007-August/014959.html incorporated into em(4)? If not, is there any near plans to do so? -- Best regards. Hooman Fazaeli Sepehr S. T. Co. Ltd. Web: http://www.sepehrs.com Tel: (9821)88975701-2 Fax: (9821)88983352 From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 19:11:02 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 125D61065765; Wed, 8 Oct 2008 19:11:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id EC2A98FC20; Wed, 8 Oct 2008 19:10:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m98JAd6H057756; Wed, 8 Oct 2008 15:10:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: =?gb2312?q?=C7=F1=BD=A3?= Date: Wed, 8 Oct 2008 11:16:10 -0400 User-Agent: KMail/1.9.7 References: <000a01c9291a$b81fa560$01000001@china.huawei.com> In-Reply-To: <000a01c9291a$b81fa560$01000001@china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200810081116.10298.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 08 Oct 2008 15:10:51 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8395/Wed Oct 8 12:44:51 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=4.2 tests=BAYES_00, DATE_IN_PAST_03_06, NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-net@freebsd.org, freebsd-questions@freebsd.org, freebsd-threads@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 19:11:02 -0000 On Wednesday 08 October 2008 03:51:48 am =C7=F1=BD=A3 wrote: > Many thanks for the information. >=20 > Could we say that interrupt handlers consumed ~36% execution time? >=20 > Is this number too high? Is it possible that we abuse the use of critical > sections in kernel? I think whether or not it is high depends on the workload. =2D-=20 John Baldwin From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 19:32:40 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7321B106569B; Wed, 8 Oct 2008 19:32:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 044E18FC13; Wed, 8 Oct 2008 19:32:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m98C9SS1004217; Wed, 8 Oct 2008 23:09:28 +1100 Received: from c211-30-84-14.carlnfd3.nsw.optusnet.com.au (c211-30-84-14.carlnfd3.nsw.optusnet.com.au [211.30.84.14]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m98C9OVj014049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Oct 2008 23:09:26 +1100 Date: Wed, 8 Oct 2008 22:09:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200810070938.04673.jhb@freebsd.org> Message-ID: <20081008210104.S20625@delplex.bde.org> References: <004001c92871$fdec0a10$01000001@china.huawei.com> <200810070938.04673.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-242184313-1223467764=:20625" Cc: =?gb2312?q?=C7=F1=BD=A3?= , freebsd-net@freebsd.org, freebsd-questions@freebsd.org, freebsd-threads@freebsd.org Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 19:32:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-242184313-1223467764=:20625 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 7 Oct 2008, John Baldwin wrote: > On Tuesday 07 October 2008 07:44:00 am =C7=F1=BD=A3 wrote: >> Hi, folks, >> >> I did kernel profiling when a single thread client sends UDP packets to = a >> single thread server on the same machine. >> >> In the output kernel profile, the first few kernel functions that consum= es >> the most CPU time are listed below: >> >> granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 second= s >> >> % cumulative self self total >> time seconds seconds calls ms/call ms/call name >> 42.4 10.88 10.88 0 100.00% __mcount [1] >> 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] >> 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] >> 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43= ] >> 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [4= 8] >> 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [= 3] >> 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46= ] >> 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic = [9] >> >> It is very strange that spinlock_exit consumes over 36% CPU time while i= t >> seems a very simple function. > > It's because the intr_restore() re-enables interrupts and the resulting t= ime > spent executing the handlers for any pending interrupts are attributed to > spinlock_exit(). This is one of many defects that are not present in high resolution kernel profiling (kgmon -B instead of kgmon -b; availaible on amd64 and i386). However, high resolution kernel profiling doesn't work right with SMP, and was completely broken by gcc-4. Ordinary profiling was less completely broken by gcc-4, and you can recover the old behaviour by turning off new optimizations (mainly -funit-at-a-time and/or -finline-functions-called-once and or all of -O2). Bruce --0-242184313-1223467764=:20625-- From owner-freebsd-net@FreeBSD.ORG Thu Oct 9 21:49:25 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B0F1065686 for ; Thu, 9 Oct 2008 21:49:25 +0000 (UTC) (envelope-from elias@artx.ru) Received: from round.artx.ru (round.artx.ru [80.73.175.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0408FC19 for ; Thu, 9 Oct 2008 21:49:25 +0000 (UTC) (envelope-from elias@artx.ru) Received: by round.artx.ru (Postfix, from userid 1001) id 1D0725C2A; Fri, 10 Oct 2008 01:30:06 +0400 (MSD) Date: Fri, 10 Oct 2008 01:30:06 +0400 From: Ilya Orehov To: freebsd-net@freebsd.org Message-ID: <20081009213006.GA98053@artx.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: duplicate vlan panic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 21:49:26 -0000 Hi! RELENG_7 from October,9 ( em card ) Also repeatable on another box with RELENG_7 from last Saturday. ( xl and nfe ) Boot single user or remount readonly. ifconfig vlan1 create vlan 1 vlandev xl0 ifconfig vlan2 create vlan 1 vlandev xl0 instant panic. Call stack snapshot captured as jpeg, I can send it to interested person. On 6.2-STABLE : both vlans created, no errors printed. On -current from Sep,21 "ifconfig: SIOCIFCREATE2: File exists", only first vlan created. best regards, Ilya Orehov. From owner-freebsd-net@FreeBSD.ORG Thu Oct 9 22:12:45 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63D151065689 for ; Thu, 9 Oct 2008 22:12:45 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from k7.mavetju.org (ppp121-44-11-81.lns10.syd7.internode.on.net [121.44.11.81]) by mx1.freebsd.org (Postfix) with ESMTP id 66DD98FC1A for ; Thu, 9 Oct 2008 22:12:44 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by k7.mavetju.org (Postfix, from userid 1001) id 99F3E4503D; Fri, 10 Oct 2008 08:53:04 +1100 (EST) Date: Fri, 10 Oct 2008 08:53:04 +1100 From: Edwin Groothuis To: freebsd-net@freebsd.org Message-ID: <20081009215304.GA71459@mavetju.org> References: <20081009213006.GA98053@artx.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081009213006.GA98053@artx.ru> User-Agent: Mutt/1.4.2.3i Subject: Re: duplicate vlan panic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 22:12:45 -0000 On Fri, Oct 10, 2008 at 01:30:06AM +0400, Ilya Orehov wrote: > RELENG_7 from October,9 ( em card ) > Also repeatable on another box with RELENG_7 from last Saturday. ( xl and nfe ) > > Boot single user or remount readonly. > > ifconfig vlan1 create vlan 1 vlandev xl0 > ifconfig vlan2 create vlan 1 vlandev xl0 Another one, which was reported on IRC but I don't know if it was send-pr'd: ifconfig fxp0.-1 inet 1.2.3.4 Also instant panic. Edwin -- Edwin Groothuis Website: http://www.mavetju.org/ edwin@mavetju.org Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 14:15:03 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39C81065686 for ; Fri, 10 Oct 2008 14:15:03 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [IPv6:2001:4200:7000:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 1B55D8FC17 for ; Fri, 10 Oct 2008 14:15:03 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from jeep.meraka.csir.co.za (jeep.meraka.csir.co.za [IPv6:2001:4200:7000:3:211:43ff:feba:aff1]) by marge.meraka.csir.co.za (Postfix) with ESMTP id 62F8578C5C for ; Fri, 10 Oct 2008 16:15:01 +0200 (SAST) From: Johann Hugo Organization: CSIR To: freebsd-net@freebsd.org Date: Fri, 10 Oct 2008 16:15:00 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810101615.00557.jhugo@meraka.csir.co.za> Subject: Should "route flush" delete all routes ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 14:15:03 -0000 According to the man page it looks like it: The route utility provides six commands: add Add a route. flush Remove all routes. ...... but I cannot get it to delete routes created with -interface option. -------------------------------------------------------------------------------- My setup: route add 146.64.80.0/24 192.168.0.100 route add 146.141.0.0 -interface tun1 route add 146.182.0.0 -interface tun1 netstat -rn inet 146.64.80.0/24 192.168.0.100 UGS 0 0 sis0 146.141.0.0/16 tun1 US 0 0 tun1 146.182.0.0/16 tun1 US 0 0 tun1 If I do "route -n flush -inet" then it does not delete the routes created with a -interface option. see verbose output: route -vn flush -inet RTM_GET: Report Metrics: len 204, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_DELETE: Delete Route: len 204, pid: 0, seq 2, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.141.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.182.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za netstat -rn inet 146.141.0.0/16 tun1 US 0 0 tun1 146.182.0.0/16 tun1 US 0 0 tun1 uname -a FreeBSD groenwifi.cids.org.za 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #19: Tue Aug 26 13:40:13 UTC 2008 From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 15:50:14 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AB94106568F; Fri, 10 Oct 2008 15:50:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 40F808FC1C; Fri, 10 Oct 2008 15:50:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9AFoEX5075713; Fri, 10 Oct 2008 15:50:14 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9AFoEwO075709; Fri, 10 Oct 2008 15:50:14 GMT (envelope-from linimon) Date: Fri, 10 Oct 2008 15:50:14 GMT Message-Id: <200810101550.m9AFoEwO075709@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: bin/128001: wpa_supplicant(8), wlan(4), and wi(4) issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 15:50:14 -0000 Synopsis: wpa_supplicant(8), wlan(4), and wi(4) issues Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Fri Oct 10 15:50:04 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=128001 From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 16:30:04 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BA781065689 for ; Fri, 10 Oct 2008 16:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1BEA48FC14 for ; Fri, 10 Oct 2008 16:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9AGU3hJ078490 for ; Fri, 10 Oct 2008 16:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9AGU3YN078489; Fri, 10 Oct 2008 16:30:03 GMT (envelope-from gnats) Date: Fri, 10 Oct 2008 16:30:03 GMT Message-Id: <200810101630.m9AGU3YN078489@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: David Wolfskill Cc: Subject: Re: bin/128001: wpa_supplicant(8), wlan(4), and wi(4) issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Wolfskill List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 16:30:04 -0000 The following reply was made to PR bin/128001; it has been noted by GNATS. From: David Wolfskill To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: Subject: Re: bin/128001: wpa_supplicant(8), wlan(4), and wi(4) issues Date: Fri, 10 Oct 2008 09:22:05 -0700 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Follow-up: Here's sme additional detail, as I was a bit rushed to get to work when I filed the PR. * The NIC is a "Dell TrueMobile 1150 Series PC Card" (in a miniPCI form factor). That NIC is explicitly listed in wi(4) as supported. * On killing & re-starting wpa-supplicant, ifconfig(8) shows another "fake" association to an access point with a null SSDI, but this time, using channel 8 (vs. the use of 3 in the previously-cited example). * I have a 3rd access point (that is small enough that I'm in the habit of keeping it in my laptop bag when it's not in use). Since it, unlike the previously-cited access points, is not normally being used by other folks, I can experiment with its settings as part of testing, if that would be useful. * I also have available an iwi(4) miniPCI card for which wpa_supplicant has worked. However, I'd prefer to minimize switching the miniPCI cards back & forth, as it's a bit difficult to get the antenna lead reconnected each time, and breaking the lead is pretty easy (I've managed to accomplish this once before, much to my chagrin and annoyance). I will start poking around again to see if I can persuade wpa_cli to do something useful. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkjvgSoACgkQmprOCmdXAD0BBQCfZC61/rv75U/DI4infcbpYPGe R2QAn3q3++WmdcKMd4MYMy/Zf9SGOIM+ =pUzb -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq-- From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 18:55:10 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD33E10656A3 for ; Fri, 10 Oct 2008 18:55:10 +0000 (UTC) (envelope-from elias@artx.ru) Received: from round.artx.ru (round.artx.ru [80.73.175.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3F48FC2E for ; Fri, 10 Oct 2008 18:55:10 +0000 (UTC) (envelope-from elias@artx.ru) Received: by round.artx.ru (Postfix, from userid 1001) id C3CBE5C2A; Fri, 10 Oct 2008 22:55:08 +0400 (MSD) Date: Fri, 10 Oct 2008 22:55:08 +0400 From: Ilya Orehov To: freebsd-net@freebsd.org Message-ID: <20081010185508.GA3092@artx.ru> References: <20081009213006.GA98053@artx.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20081009213006.GA98053@artx.ru> User-Agent: Mutt/1.4.2.3i Subject: Re: duplicate vlan panic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 18:55:10 -0000 +------- Ilya Orehov, 2008-10-10 ------- | Hi! | | RELENG_7 from October,9 ( em card ) | Also repeatable on another box with RELENG_7 from last Saturday. ( xl and nfe ) | | Boot single user or remount readonly. | | ifconfig vlan1 create vlan 1 vlandev xl0 | ifconfig vlan2 create vlan 1 vlandev xl0 | | instant panic. | Now found time to repeat with serial console: %/sbin/ifconfig vlan1 create vlan 1 vlandev xl0 %/sbin/ifconfig vlan2 create vlan 1 vlandev xl0 Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x0 fault code = supervisor read, page not present instruction pointer = 0x20:0xc3e7cc40 stack pointer = 0x28:0xe51e2a9c frame pointer = 0x28:0xe51e2b00 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 60 (ifconfig) trap number = 12 panic: page fault cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper(c075e582,e51e2938,c0584d4f,c07758b3,1,...) at 0xc048b576 = db_trace_self_wrapper+0x26 kdb_backtrace(c07758b3,1,c074c5ed,e51e2944,1,...) at 0xc05ae719 = kdb_backtrace+ 0x29 panic(c074c5ed,c0776b25,c3e59a4c,1,1,...) at 0xc0584d4f = panic+0x10f trap_fatal(c39e6d98,0,1,0,0,...) at 0xc0717cb3 = trap_fatal+0x333 trap_pfault(0,0,201e2a10,0,c,...) at 0xc0717f10 = trap_pfault+0x250 trap(e51e2a5c) at 0xc0718892 = trap+0x3b2 calltrap() at 0xc06fe07b = calltrap+0x6 --- trap 0xc, eip = 0xc3e7cc40, esp = 0xe51e2a9c, ebp = 0xe51e2b00 --- vlan_unconfig_locked(c3e7f98c,0,c3e7e517,435,11,...) at 0xc3e7cc40 = vlan_unconfig_locked+0x10 vlan_unconfig(c3dd5c00,c3e7f978,10,101,1,...) at 0xc3e7cfb4 = vlan_unconfig+0x34 vlan_clone_create(c3e7f760,c3e18620,10,805d9d8,c3e7d235,...) at 0xc3e7daee = vlan_clone_create+0x25e if_clone_createif(805d9d8,c3e18620,e51e2bb4,c0578c46,c39b3800) at 0xc061e563 = if_clone_createif+0x43 if_clone_create(c3e18620,10,805d9d8,c3eadd5c,c07d6f80,...) at 0xc061ec0a = if_clone_create+0xca ifioctl(c3eab9c0,c020697c,c3e18620,c3e5ccc0,3,...) at 0xc061bfac = ifioctl+0xccsoo_ioctl(c3e627b8,c020697c,c3e18620,c39b3800,c3e5ccc0,...) at 0xc05c2a8a = soo_ioctl+0x56a kern_ioctl(c3e5ccc0,3,c020697c,c3e18620,1000001,...) at 0xc05bb955 = kern_ioctl+0x355 ioctl(c3e5ccc0,e51e2cfc,c,e51e2d38,e51e2d2c,...) at 0xc05bbab4 = ioctl+0x134 syscall(e51e2d38) at 0xc0718249 = syscall+0x319 Xint0x80_syscall() at 0xc06fe0e0 = Xint0x80_syscall+0x20 --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x2816e6f3, esp = 0xbfbfe58c, ebp = 0xbfbfe5a8 --- Uptime: 1m29s Cannot dump. No dump device defined. Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... cpu_reset: Stopping other CPUs best regards, Ilya Orehov. From owner-freebsd-net@FreeBSD.ORG Sat Oct 11 00:48:38 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4D9D106568B; Sat, 11 Oct 2008 00:48:38 +0000 (UTC) (envelope-from bh@izb.knu.ac.kr) Received: from pinus.izb.knu.ac.kr (pinus.izb.knu.ac.kr [IPv6:2001:470:1f05:5f6:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 555AE8FC08; Sat, 11 Oct 2008 00:48:38 +0000 (UTC) (envelope-from bh@izb.knu.ac.kr) Received: by pinus.izb.knu.ac.kr (Postfix, from userid 59) id DD6473EA4; Sat, 11 Oct 2008 09:48:35 +0900 (KST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on pinus.izb.knu.ac.kr X-Spam-Level: X-Spam-Status: No, score=-48.5 required=15.1 tests=DKIM_SIGNED, DKIM_VERIFIED, DNS_FROM_SECURITYSAGE autolearn=disabled version=3.2.3 Received: from pinus.izb.knu.ac.kr (localhost.izb.knu.ac.kr [127.0.0.1]) by pinus.izb.knu.ac.kr (Postfix) with ESMTP id BD94D3EA3; Sat, 11 Oct 2008 09:48:27 +0900 (KST) Comment: DKIM? See http://www.google.com/search?btnI&q=RFC+4871 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=izb.knu.ac.kr; h= message-id:date:from:reply-to:mime-version:to:cc:subject :content-type:content-transfer-encoding; s=s1024; bh=WTWqspvg29A HKMci1JGFZ6SHtErbNd5VZVx8Ng/bLl4=; b=P5GOwgkkVTQM6ZroiYkRhQBoTrA COH+6BIaq2/oG6Q1E88YrRdYKPFzTpSWaM/Z/yrF1pp8+zaL3JnJKRSkx4G9kyjf XHBl/GJ/9mKzMlFS4P9O9fhvHBSau0n7ccJiQnvOEAOKy8Iok387YtTzC8osYYOu SHBIvmG9dYjNZHCI= Received: from chrys.izb.knu.ac.kr (chrys.izb.knu.ac.kr [IPv6:2001:470:1f05:5f8:3::1]) by pinus.izb.knu.ac.kr (Postfix) with ESMTP id 4E49B3EA0; Sat, 11 Oct 2008 09:48:27 +0900 (KST) Received: from [118.129.178.25] (unknown [118.129.178.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bh@chrys.izb.knu.ac.kr) by chrys.izb.knu.ac.kr (Postfix) with ESMTP id 08E151CCF2; Sat, 11 Oct 2008 09:48:25 +0900 (KST) Message-ID: <48EFF7D8.1000201@izb.knu.ac.kr> Date: Sat, 11 Oct 2008 09:48:24 +0900 From: Byung-Hee HWANG Organization: InZealBomb User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: postmaster@freebsd.org Subject: freebsd.org and DKIM X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bh@izb.knu.ac.kr List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 00:48:38 -0000 (i'm very sorry if this subject is not related to freebsd-net@) ;; Hello, my name is byunghee from South Korea. And more, i'm now maintain one port (misc/...godfather) ;; I love your policy for mailing list at freebsd.org. But, the MIME converting is dangerous at some point. Recently, somebody use DKIM [RFC 4871] to make truth over the Internet at email. I don't know you are interested in DKIM, however, i wish freebsd.org offer that other email servers can verify the DKIM signatures if that's OK with you. What do you think of that? Or any comments? Sincerely, byunghee From owner-freebsd-net@FreeBSD.ORG Sat Oct 11 08:46:41 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6981106568B for ; Sat, 11 Oct 2008 08:46:41 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 691D98FC14 for ; Sat, 11 Oct 2008 08:46:41 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id D9FA0177DC0; Sat, 11 Oct 2008 04:46:40 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 04:46:40 -0400 X-Sasl-enc: 9x7z7UzjeTje/h1zMGlQqvsNHnRlO7cTGNlA+U0F+5NO 1223714800 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 5E83227776; Sat, 11 Oct 2008 04:46:40 -0400 (EDT) Message-ID: <48F067EF.7010901@FreeBSD.org> Date: Sat, 11 Oct 2008 09:46:39 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Sepherosa Ziehau References: <48EBB3D6.600@incunabulum.net> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" Subject: Re: How to support an Ethernet PHY without ID registers? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 08:46:41 -0000 Sepherosa Ziehau wrote: > Are you sure you could read from BMSR? Return invalid value from BMSR > is the usual cause of miibus attaching/probing failure. For ID1/ID2 > reading, you could just fake some values in npe(4)'s miibus_readreg > implementation. > Thanks for the tip (from you and Pyun). I had to spoof the BMSR read to get npe(4) to attach just to begin with. For whatever reason the chip doesn't seem to respond on any of the PHY IDs which the Linux folk are using (5 and 4 for npe0 (-B) and npe1 (-C) respectively). I noticed the ucLinux folk needed a similar patch to force driver attach under Linux w/the IXP: http://mailman.uclinux.org/pipermail/uclinux-dev/2005-March/031419.html The switch pretty much disappears after npe(4) attaches, I don't see any activity lights or link lights at that point. This seems to happen after any mii register access. If I frob things to allow rlswitch to attach, by using hints and hacking if_npe.c, I can get dumps of the PHY register space, but it's all ones, suggesting that it failed at xScale register level -- that would suggest the PHY IDs are *wrong*, or something else isn't right. Pyun also suggested trying to manually take the PHYs out of power-down mode. I tried that with a code snippet I sent him, but still no dice. I can't even be sure that the PHYs are being addressed right. At this point I kind of have to go, whoah, wish I had a logic analyzer and grabbers! I believe the firmware configures the switch chip in a certain VLAN configuration which isn't meant to be disrupted, although Freecom's own SnapGear-based distro apparently does the right thing. I've looked through all of their GPL materials and cannot find the driver for the switch. I suppose one thing I could try is re-flashing the box with the official Freecom firmware, and using mii-diag to dump out what Linux thinks the registers are. thanks BMS From owner-freebsd-net@FreeBSD.ORG Sat Oct 11 19:12:40 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1451F106568A; Sat, 11 Oct 2008 19:12:40 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 468B78FC1A; Sat, 11 Oct 2008 19:12:39 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48F0FAC6.8040307@FreeBSD.org> Date: Sat, 11 Oct 2008 20:13:10 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: =?GB2312?B?x/G9ow==?= References: <000a01c9291a$b81fa560$01000001@china.huawei.com> In-Reply-To: <000a01c9291a$b81fa560$01000001@china.huawei.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Cc: freebsd-net@freebsd.org, 'John Baldwin' Subject: Re: kernel profiling: spinlock_exit consumes 36% CPU time. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 19:12:40 -0000 Ηρ½£ wrote: > Many thanks for the information. > > Could we say that interrupt handlers consumed ~36% execution time? > > Is this number too high? Is it possible that we abuse the use of critical > sections in kernel? Also note that profiling itself is using ~40% of CPU. That means you need to worry about whether it is seriously skewing the results away from what they would be without profiling. If you can use hwpmc then the profiling overhead is much less. However support for modern Intel CPUs was only recently added in -CURRENT and may not have been merged to 7.x yet, so it might not be usable for you yet. If you run without profiling then top(1) will show you the CPU use of the interrupt handlers. Kris > > Looking forward to your options. Many thanks. > > Qiu Jian > > > On Tuesday 07 October 2008 07:44:00 am Ηρ½£ wrote: >> Hi, folks, >> >> I did kernel profiling when a single thread client sends UDP packets >> to a single thread server on the same machine. >> >> In the output kernel profile, the first few kernel functions that >> consumes the most CPU time are listed below: >> >> granularity: each sample hit covers 16 byte(s) for 0.01% of 25.68 >> seconds >> >> % cumulative self self total >> time seconds seconds calls ms/call ms/call name >> 42.4 10.88 10.88 0 100.00% __mcount [1] >> 36.1 20.14 9.26 17937541 0.00 0.00 spinlock_exit [4] >> 4.2 21.22 1.08 3145728 0.00 0.00 in_cksum_skip [40] >> 1.8 21.68 0.45 7351987 0.00 0.00 generic_copyin [43] >> 1.1 21.96 0.29 3146028 0.00 0.00 generic_copyout [48] >> 1.0 22.21 0.24 2108904 0.00 0.00 Xint0x80_syscall [3] >> 0.8 22.42 0.21 6292131 0.00 0.00 uma_zalloc_arg [46] >> 0.8 22.62 0.20 1048576 0.00 0.00 soreceive_generic > [9] >> It is very strange that spinlock_exit consumes over 36% CPU time while >> it seems a very simple function. > > It's because the intr_restore() re-enables interrupts and the resulting time > spent executing the handlers for any pending interrupts are attributed to > spinlock_exit(). > > -- > John Baldwin > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > >