From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 13:33:37 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F2D106566B for ; Tue, 9 Sep 2008 13:33:37 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id C87B28FC1B for ; Tue, 9 Sep 2008 13:33:36 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by gxk10 with SMTP id 10so10390880gxk.19 for ; Tue, 09 Sep 2008 06:33:31 -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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=enJuPypZdciP0RFWbCDL/cOmukwgDVohaEI292XGi8I=; b=vD1DENOpkUnqApHx6U8tNqcM0h/oRjhSGPxvDqWHYa2m/ekz2RxkNslQW/+YFOvSHH 5x6n3UMkrGg4vE10/OZPedKQt+125net3IQF57eZHafa5VapN9+tCP7FMQUmqkf/k49O s9lmnrvCtUC7AsWWzzfU3Yu29owjWxGvm2Gmk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=UOt1CKfG4OijbpWTQ2QogC30DBc30MAS8x+Bi0OyL6Bo09r1LRUkAeQZscgM4xRiUf ocq4MyWS5nCS1wKJnRPk52inE4Xu1T8IqsVWcfCssyVjSeG4um7DXeTNS8ohF/H78URc oaVkVMRwjPPJMy8qUHUI6/U8oyBzH0OtAzIkY= Received: by 10.103.212.20 with SMTP id o20mr748284muq.22.1220967210214; Tue, 09 Sep 2008 06:33:30 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Tue, 9 Sep 2008 06:33:30 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 15:33:30 +0200 From: "Jacques Fourie" To: freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 13:33:37 -0000 Hi, I've performed some benchmark tests on my Gumstix Connex 400 (Intel Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. This board has two smc network interfaces. I configure the gumstix as a router and measure network throughput with netperf running on seperate boxes on either side of the gumstix. My initial tests showed a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA this figure went up to 7Mbit/s. Although this is a significant improvement, it still seems to be a bit slow. Does anyone have any tips on how I can go about to try and figure out where the bottleneck lies? Initial profiling showed that a significant amount of time was spent doing memory to memory copies of data, but after the DMA change profiling does not show any obvious culprits. Jacques From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 13:56:12 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF4921065672 for ; Tue, 9 Sep 2008 13:56:12 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 941DD8FC12 for ; Tue, 9 Sep 2008 13:56:11 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1Kd3hQ-0005qk-Be; Tue, 09 Sep 2008 17:56:08 +0400 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id 3E1C373020; Tue, 9 Sep 2008 17:56:02 +0400 (MSD) Date: Tue, 9 Sep 2008 17:55:56 +0400 From: Stanislav Sedov To: "Jacques Fourie" Message-Id: <20080909175556.07bac5f0.stas@FreeBSD.org> In-Reply-To: References: Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__9_Sep_2008_17_55_56_+0400_Hd1Nlq5DAZQvs1od" Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 13:56:13 -0000 --Signature=_Tue__9_Sep_2008_17_55_56_+0400_Hd1Nlq5DAZQvs1od Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 9 Sep 2008 15:33:30 +0200 "Jacques Fourie" mentioned: > Hi, >=20 > I've performed some benchmark tests on my Gumstix Connex 400 (Intel > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. > This board has two smc network interfaces. I configure the gumstix as > a router and measure network throughput with netperf running on > seperate boxes on either side of the gumstix. My initial tests showed > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA > this figure went up to 7Mbit/s. Although this is a significant > improvement, it still seems to be a bit slow. Does anyone have any > tips on how I can go about to try and figure out where the bottleneck > lies? Initial profiling showed that a significant amount of time was > spent doing memory to memory copies of data, but after the DMA change > profiling does not show any obvious culprits. >=20 Have you tried checking the speed of the interface itself? Without routing involved? May it be the interfaces itself being so slow? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Tue__9_Sep_2008_17_55_56_+0400_Hd1Nlq5DAZQvs1od Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjGgHIACgkQK/VZk+smlYFaCwCeOOMspWnQD9cgfw4mbnPmcIkW OtAAn0Wtq3vmd7DMHrh4sgSz6A1yU30y =1OcM -----END PGP SIGNATURE----- --Signature=_Tue__9_Sep_2008_17_55_56_+0400_Hd1Nlq5DAZQvs1od-- From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 14:06:01 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DD9C1065675 for ; Tue, 9 Sep 2008 14:06:01 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 94C148FC0A for ; Tue, 9 Sep 2008 14:06:00 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m89DoRD4011704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Sep 2008 15:50:28 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id m89DoMqp000291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Sep 2008 15:50:22 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id m89DoLMv005079; Tue, 9 Sep 2008 15:50:21 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id m89DoLLj005078; Tue, 9 Sep 2008 15:50:21 +0200 (CEST) (envelope-from ticso) Date: Tue, 9 Sep 2008 15:50:21 +0200 From: Bernd Walter To: Jacques Fourie Message-ID: <20080909135021.GR1147@cicely7.cicely.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.067, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 14:06:01 -0000 On Tue, Sep 09, 2008 at 03:33:30PM +0200, Jacques Fourie wrote: > Hi, > > I've performed some benchmark tests on my Gumstix Connex 400 (Intel > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. > This board has two smc network interfaces. I configure the gumstix as > a router and measure network throughput with netperf running on > seperate boxes on either side of the gumstix. My initial tests showed > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA > this figure went up to 7Mbit/s. Although this is a significant > improvement, it still seems to be a bit slow. Does anyone have any > tips on how I can go about to try and figure out where the bottleneck > lies? Initial profiling showed that a significant amount of time was > spent doing memory to memory copies of data, but after the DMA change > profiling does not show any obvious culprits. I don't know the PXA255, but I do know the AT91RM9200 and I expect the PXA255 to be a bit faster. With the RM9200 I can get ~8Mbit/s routing PPPoE with NAT and small ipfw table. This is done with the internal MAC using VLAN, so there is also VLAN overhead. Plain routing should be faster. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 14:36:24 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01DCF106566C for ; Tue, 9 Sep 2008 14:36:24 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 80BBB8FC23 for ; Tue, 9 Sep 2008 14:36:23 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by gxk10 with SMTP id 10so10593640gxk.19 for ; Tue, 09 Sep 2008 07:36: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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ukmXHTsSZQGZZf7T4OX3H18MAfBciAMaVJN7+7QyHF4=; b=K9GN6H3qf73Jp1oocAxku1agfdGFblLBojuE1KFd5mCkOKwBvoYa30inua/2hDd7w8 wQRoImr35BbhPa/RwaHyiMC9jysI8Kx8MN7eCnbal+I+l1s3qDlAQODCfWk+ogEeTiW6 gtgetLaVwZZcJhkpvryPFs4TF+Vc86/9FsARk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HlIF4gxVE2vHTYbN+WXlaS+l9V11cy4OYI3Hq0LFoaEKAyBXFM65vTnKRswEvZ64V0 Bjvx637nytvwxJ+PfkLx1s2XciDb1T6WfD+NH3tke2YjpGsEUrwlWzE14+M3eBEYROhq jRm/QCfAX7EO2B8LRFawhrLD5Cj3dCdQ0QnuA= Received: by 10.102.253.6 with SMTP id a6mr11285307mui.92.1220970981423; Tue, 09 Sep 2008 07:36:21 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Tue, 9 Sep 2008 07:36:21 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 16:36:21 +0200 From: "Jacques Fourie" To: "Stanislav Sedov" In-Reply-To: <20080909175556.07bac5f0.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080909175556.07bac5f0.stas@FreeBSD.org> Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 14:36:24 -0000 On Tue, Sep 9, 2008 at 3:55 PM, Stanislav Sedov wrote: > On Tue, 9 Sep 2008 15:33:30 +0200 > "Jacques Fourie" mentioned: > >> Hi, >> >> I've performed some benchmark tests on my Gumstix Connex 400 (Intel >> Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. >> This board has two smc network interfaces. I configure the gumstix as >> a router and measure network throughput with netperf running on >> seperate boxes on either side of the gumstix. My initial tests showed >> a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA >> this figure went up to 7Mbit/s. Although this is a significant >> improvement, it still seems to be a bit slow. Does anyone have any >> tips on how I can go about to try and figure out where the bottleneck >> lies? Initial profiling showed that a significant amount of time was >> spent doing memory to memory copies of data, but after the DMA change >> profiling does not show any obvious culprits. >> > > Have you tried checking the speed of the interface itself? Without > routing involved? May it be the interfaces itself being so slow? > > -- > Stanislav Sedov > ST4096-RIPE > Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At the moment I can't get if_bridge to work - will try to figure out what is going on. A bridging benchmark may be more informative. From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 14:42:38 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93856106564A for ; Tue, 9 Sep 2008 14:42:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5490B8FC16 for ; Tue, 9 Sep 2008 14:42:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m89EeEeS006437; Tue, 9 Sep 2008 08:40:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Sep 2008 08:40:53 -0600 (MDT) Message-Id: <20080909.084053.-1816817147.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20080909135021.GR1147@cicely7.cicely.de> References: <20080909135021.GR1147@cicely7.cicely.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 14:42:38 -0000 In message: <20080909135021.GR1147@cicely7.cicely.de> Bernd Walter writes: : On Tue, Sep 09, 2008 at 03:33:30PM +0200, Jacques Fourie wrote: : > Hi, : > : > I've performed some benchmark tests on my Gumstix Connex 400 (Intel : > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. : > This board has two smc network interfaces. I configure the gumstix as : > a router and measure network throughput with netperf running on : > seperate boxes on either side of the gumstix. My initial tests showed : > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA : > this figure went up to 7Mbit/s. Although this is a significant : > improvement, it still seems to be a bit slow. Does anyone have any : > tips on how I can go about to try and figure out where the bottleneck : > lies? Initial profiling showed that a significant amount of time was : > spent doing memory to memory copies of data, but after the DMA change : > profiling does not show any obvious culprits. : : I don't know the PXA255, but I do know the AT91RM9200 and I expect the : PXA255 to be a bit faster. : With the RM9200 I can get ~8Mbit/s routing PPPoE with NAT and small : ipfw table. : This is done with the internal MAC using VLAN, so there is also VLAN : overhead. : Plain routing should be faster. Does the gumstick have 100BaseTX? The AT91RM9200 is 10BaseT only... Well, 10Mbps only since the phy is external.. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 14:47:38 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 543541065670 for ; Tue, 9 Sep 2008 14:47:38 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id E69398FC29 for ; Tue, 9 Sep 2008 14:47:37 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by gxk10 with SMTP id 10so10631442gxk.19 for ; Tue, 09 Sep 2008 07:47:37 -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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=WyJ+Ls/jQLqK/v3TGthqnRr7AGj4hcL6RLWrTjCtVzU=; b=WZIAWRPFdnZNu7tu/cvLYvq3mRg9np6rUiZChG4Nb8rVhLY2i1EPGdtopakKBCXc+K vaPgb3kJvuVjN0qkADvfnA1iLKkjoHBEXKOCavVUDstlSz901q1FDOzbNpS0ED5rr/QZ Zd7ea0NMFLYFpl/HojI283DOn6ppDckwzTau8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hGGdYbcl9Iv+FMCFpLyjRaP4JxVkv0drfWwWqiZRs6mn7b6Wc1mshtKuIK5dZnPFsh sh/XaT9wZwtIS+fDXbXjPX1EqTLyS3GQ+WVjBEtPRwOTeJTxIYMZVZmyP8jK8WyaBKiX hQKUHAtFQV7uDNzSS2Z9xVoZGuYcER4VlF/XQ= Received: by 10.103.246.1 with SMTP id y1mr11309636mur.53.1220971656260; Tue, 09 Sep 2008 07:47:36 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Tue, 9 Sep 2008 07:47:36 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 16:47:36 +0200 From: "Jacques Fourie" To: "M. Warner Losh" In-Reply-To: <20080909.084053.-1816817147.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080909135021.GR1147@cicely7.cicely.de> <20080909.084053.-1816817147.imp@bsdimp.com> Cc: freebsd-arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 14:47:38 -0000 On Tue, Sep 9, 2008 at 4:40 PM, M. Warner Losh wrote: > In message: <20080909135021.GR1147@cicely7.cicely.de> > Bernd Walter writes: > : On Tue, Sep 09, 2008 at 03:33:30PM +0200, Jacques Fourie wrote: > : > Hi, > : > > : > I've performed some benchmark tests on my Gumstix Connex 400 (Intel > : > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. > : > This board has two smc network interfaces. I configure the gumstix as > : > a router and measure network throughput with netperf running on > : > seperate boxes on either side of the gumstix. My initial tests showed > : > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA > : > this figure went up to 7Mbit/s. Although this is a significant > : > improvement, it still seems to be a bit slow. Does anyone have any > : > tips on how I can go about to try and figure out where the bottleneck > : > lies? Initial profiling showed that a significant amount of time was > : > spent doing memory to memory copies of data, but after the DMA change > : > profiling does not show any obvious culprits. > : > : I don't know the PXA255, but I do know the AT91RM9200 and I expect the > : PXA255 to be a bit faster. > : With the RM9200 I can get ~8Mbit/s routing PPPoE with NAT and small > : ipfw table. > : This is done with the internal MAC using VLAN, so there is also VLAN > : overhead. > : Plain routing should be faster. > > Does the gumstick have 100BaseTX? The AT91RM9200 is 10BaseT only... > Well, 10Mbps only since the phy is external.. > > Warner > Yes, it does have 100BaseTX - both according to the specs and ifconfig : smc0: flags=8943 metric 0 mtu 1500 ether 00:0a:95:a5:47:3a media: Ethernet autoselect (100baseTX ) status: active smc1: flags=8943 metric 0 mtu 1500 ether 00:0a:95:a5:47:3b media: Ethernet autoselect (100baseTX ) status: active From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 15:01:09 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0A59106566B for ; Tue, 9 Sep 2008 15:01:09 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0D58FC18 for ; Tue, 9 Sep 2008 15:01:09 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m89F1352014591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Sep 2008 17:01:04 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id m89F0xqq002437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Sep 2008 17:00:59 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id m89F0xYn005290; Tue, 9 Sep 2008 17:00:59 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id m89F0waT005289; Tue, 9 Sep 2008 17:00:58 +0200 (CEST) (envelope-from ticso) Date: Tue, 9 Sep 2008 17:00:57 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20080909150057.GT1147@cicely7.cicely.de> References: <20080909135021.GR1147@cicely7.cicely.de> <20080909.084053.-1816817147.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909.084053.-1816817147.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.067, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 15:01:10 -0000 On Tue, Sep 09, 2008 at 08:40:53AM -0600, M. Warner Losh wrote: > In message: <20080909135021.GR1147@cicely7.cicely.de> > Bernd Walter writes: > : On Tue, Sep 09, 2008 at 03:33:30PM +0200, Jacques Fourie wrote: > : > Hi, > : > > : > I've performed some benchmark tests on my Gumstix Connex 400 (Intel > : > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. > : > This board has two smc network interfaces. I configure the gumstix as > : > a router and measure network throughput with netperf running on > : > seperate boxes on either side of the gumstix. My initial tests showed > : > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA > : > this figure went up to 7Mbit/s. Although this is a significant > : > improvement, it still seems to be a bit slow. Does anyone have any > : > tips on how I can go about to try and figure out where the bottleneck > : > lies? Initial profiling showed that a significant amount of time was > : > spent doing memory to memory copies of data, but after the DMA change > : > profiling does not show any obvious culprits. > : > : I don't know the PXA255, but I do know the AT91RM9200 and I expect the > : PXA255 to be a bit faster. > : With the RM9200 I can get ~8Mbit/s routing PPPoE with NAT and small > : ipfw table. > : This is done with the internal MAC using VLAN, so there is also VLAN > : overhead. > : Plain routing should be faster. > > Does the gumstick have 100BaseTX? The AT91RM9200 is 10BaseT only... > Well, 10Mbps only since the phy is external.. The RM9200 is definitive 100mbit (MII and RMII interface). -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 15:02:39 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18E20106564A; Tue, 9 Sep 2008 15:02:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id C0B2D8FC22; Tue, 9 Sep 2008 15:02:38 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m89F2aGP054541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Sep 2008 08:02:38 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48C6900C.8070708@freebsd.org> Date: Tue, 09 Sep 2008 08:02:36 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Jacques Fourie References: <20080909175556.07bac5f0.stas@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 15:02:39 -0000 Jacques Fourie wrote: > On Tue, Sep 9, 2008 at 3:55 PM, Stanislav Sedov wrote: > >> On Tue, 9 Sep 2008 15:33:30 +0200 >> "Jacques Fourie" mentioned: >> >> >>> Hi, >>> >>> I've performed some benchmark tests on my Gumstix Connex 400 (Intel >>> Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. >>> This board has two smc network interfaces. I configure the gumstix as >>> a router and measure network throughput with netperf running on >>> seperate boxes on either side of the gumstix. My initial tests showed >>> a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA >>> this figure went up to 7Mbit/s. Although this is a significant >>> improvement, it still seems to be a bit slow. Does anyone have any >>> tips on how I can go about to try and figure out where the bottleneck >>> lies? Initial profiling showed that a significant amount of time was >>> spent doing memory to memory copies of data, but after the DMA change >>> profiling does not show any obvious culprits. >>> >>> >> Have you tried checking the speed of the interface itself? Without >> routing involved? May it be the interfaces itself being so slow? >> >> -- >> Stanislav Sedov >> ST4096-RIPE >> >> > > Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At > the moment I can't get if_bridge to work - will try to figure out what > is going on. A bridging benchmark may be more informative. > You said you did profiling but you didn't provide the data to inspect. It's possible kernel profiling has never been tried on your platform; did you sanity check the results? (e.g. run a known test load and check results; verify all routines that should execute appear in the profile). Also if copy overhead shows up as significant look to see why those copies are being done; it's often possible to avoid a copy. My experience in working with architectures like this is that cache handling can be a significant cost that doesn't always show up on a profile. Also you may find useful information by tracking mbufs using the h/w clock at important places along the "fast path" then look at whether the overhead for each step is reasonable. I did this for bridged traffic by forcing the rx dma to go to an mbuf+cluster then used the free storage in the mbuf header to store timestamps. At the end of the processing path I sorted the data into buckets by the sample points and added a sysctl to dump the histogram to see min/max/avg. Sam From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 15:12:28 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2632106566C for ; Tue, 9 Sep 2008 15:12:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6000D8FC1A for ; Tue, 9 Sep 2008 15:12:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m89FAoW1006936; Tue, 9 Sep 2008 09:10:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Sep 2008 09:11:30 -0600 (MDT) Message-Id: <20080909.091130.-1185936283.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20080909150057.GT1147@cicely7.cicely.de> References: <20080909135021.GR1147@cicely7.cicely.de> <20080909.084053.-1816817147.imp@bsdimp.com> <20080909150057.GT1147@cicely7.cicely.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 15:12:28 -0000 In message: <20080909150057.GT1147@cicely7.cicely.de> Bernd Walter writes: : On Tue, Sep 09, 2008 at 08:40:53AM -0600, M. Warner Losh wrote: : > In message: <20080909135021.GR1147@cicely7.cicely.de> : > Bernd Walter writes: : > : On Tue, Sep 09, 2008 at 03:33:30PM +0200, Jacques Fourie wrote: : > : > Hi, : > : > : > : > I've performed some benchmark tests on my Gumstix Connex 400 (Intel : > : > Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. : > : > This board has two smc network interfaces. I configure the gumstix as : > : > a router and measure network throughput with netperf running on : > : > seperate boxes on either side of the gumstix. My initial tests showed : > : > a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA : > : > this figure went up to 7Mbit/s. Although this is a significant : > : > improvement, it still seems to be a bit slow. Does anyone have any : > : > tips on how I can go about to try and figure out where the bottleneck : > : > lies? Initial profiling showed that a significant amount of time was : > : > spent doing memory to memory copies of data, but after the DMA change : > : > profiling does not show any obvious culprits. : > : : > : I don't know the PXA255, but I do know the AT91RM9200 and I expect the : > : PXA255 to be a bit faster. : > : With the RM9200 I can get ~8Mbit/s routing PPPoE with NAT and small : > : ipfw table. : > : This is done with the internal MAC using VLAN, so there is also VLAN : > : overhead. : > : Plain routing should be faster. : > : > Does the gumstick have 100BaseTX? The AT91RM9200 is 10BaseT only... : > Well, 10Mbps only since the phy is external.. : : The RM9200 is definitive 100mbit (MII and RMII interface). Yea. You're right... Warner From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 15:16:35 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B3171065684 for ; Tue, 9 Sep 2008 15:16:35 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.freebsd.org (Postfix) with ESMTP id AF8E48FC12 for ; Tue, 9 Sep 2008 15:16:34 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s17so570885wxc.7 for ; Tue, 09 Sep 2008 08:16:33 -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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=y+R8/O9Ym4QRIxETb25r6S0tGtcxesQVDMt9s3Tkm2Q=; b=MhMiPEHTFT4CPshg804zWcgRIK3xdUyuvVmRk7jN6redlatgJlnD+wUCQdksLxCPVw TU/zLC3FEKWi2lei0LJYXyRSj9UGSH+2iwzfUrksv/pgNP8AF3azRBlxOpTSrvkSJrWl 8rJZVXJJ0n15L5Hh7gyPvi7+f7dOQzEImSr4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hDsBtCscmBMP3jicstqynsH97WNuwNs5IA7otCuXvIqxGaatBxZoVbBGm7bTS69fm8 P/E7gIoVlzdlfCXZzaTTHSpyOfRKiY9utOEADJmOtBrbVe/Md/FEeWDspqoeUTFaM0rF U0SysfbhmsXWymt7lgSEMfEbpBe5+D7F9rl/U= Received: by 10.103.192.10 with SMTP id u10mr11343612mup.29.1220973391711; Tue, 09 Sep 2008 08:16:31 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Tue, 9 Sep 2008 08:16:31 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 17:16:31 +0200 From: "Jacques Fourie" To: "Sam Leffler" In-Reply-To: <48C6900C.8070708@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080909175556.07bac5f0.stas@FreeBSD.org> <48C6900C.8070708@freebsd.org> Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 15:16:35 -0000 On Tue, Sep 9, 2008 at 5:02 PM, Sam Leffler wrote: > Jacques Fourie wrote: >> >> On Tue, Sep 9, 2008 at 3:55 PM, Stanislav Sedov wrote: >> >>> >>> On Tue, 9 Sep 2008 15:33:30 +0200 >>> "Jacques Fourie" mentioned: >>> >>> >>>> >>>> Hi, >>>> >>>> I've performed some benchmark tests on my Gumstix Connex 400 (Intel >>>> Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. >>>> This board has two smc network interfaces. I configure the gumstix as >>>> a router and measure network throughput with netperf running on >>>> seperate boxes on either side of the gumstix. My initial tests showed >>>> a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA >>>> this figure went up to 7Mbit/s. Although this is a significant >>>> improvement, it still seems to be a bit slow. Does anyone have any >>>> tips on how I can go about to try and figure out where the bottleneck >>>> lies? Initial profiling showed that a significant amount of time was >>>> spent doing memory to memory copies of data, but after the DMA change >>>> profiling does not show any obvious culprits. >>>> >>>> >>> >>> Have you tried checking the speed of the interface itself? Without >>> routing involved? May it be the interfaces itself being so slow? >>> >>> -- >>> Stanislav Sedov >>> ST4096-RIPE >>> >>> >> >> Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At >> the moment I can't get if_bridge to work - will try to figure out what >> is going on. A bridging benchmark may be more informative. >> > > You said you did profiling but you didn't provide the data to inspect. It's > possible kernel profiling has never been tried on your platform; did you > sanity check the results? (e.g. run a known test load and check results; > verify all routines that should execute appear in the profile). Also if > copy overhead shows up as significant look to see why those copies are being > done; it's often possible to avoid a copy. > > My experience in working with architectures like this is that cache handling > can be a significant cost that doesn't always show up on a profile. > > Also you may find useful information by tracking mbufs using the h/w clock > at important places along the "fast path" then look at whether the overhead > for each step is reasonable. I did this for bridged traffic by forcing the > rx dma to go to an mbuf+cluster then used the free storage in the mbuf > header to store timestamps. At the end of the processing path I sorted the > data into buckets by the sample points and added a sysctl to dump the > histogram to see min/max/avg. > > Sam > > Thanks for the nice idea - will try something similar. At the moment I'm also suspecting that cache handling has got a lot to do with the performance figures that I'm seeing. The PXA255 has a 32KB data and 32KB instruction cache. Jacques From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 15:33:08 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9E5106567C for ; Tue, 9 Sep 2008 15:33:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id F31C18FC16 for ; Tue, 9 Sep 2008 15:33:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m89FX7Pw054746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Sep 2008 08:33:07 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48C69733.2050601@freebsd.org> Date: Tue, 09 Sep 2008 08:33:07 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Jacques Fourie References: <20080909175556.07bac5f0.stas@FreeBSD.org> <48C6900C.8070708@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 15:33:08 -0000 Jacques Fourie wrote: > On Tue, Sep 9, 2008 at 5:02 PM, Sam Leffler wrote: > >> Jacques Fourie wrote: >> >>> On Tue, Sep 9, 2008 at 3:55 PM, Stanislav Sedov wrote: >>> >>> >>>> On Tue, 9 Sep 2008 15:33:30 +0200 >>>> "Jacques Fourie" mentioned: >>>> >>>> >>>> >>>>> Hi, >>>>> >>>>> I've performed some benchmark tests on my Gumstix Connex 400 (Intel >>>>> Xscale PXA 255 CPU clocked at 400MHz) with a netDuo expansion board. >>>>> This board has two smc network interfaces. I configure the gumstix as >>>>> a router and measure network throughput with netperf running on >>>>> seperate boxes on either side of the gumstix. My initial tests showed >>>>> a TCP throughput of 2Mbit/s. After adapting the smc driver to use DMA >>>>> this figure went up to 7Mbit/s. Although this is a significant >>>>> improvement, it still seems to be a bit slow. Does anyone have any >>>>> tips on how I can go about to try and figure out where the bottleneck >>>>> lies? Initial profiling showed that a significant amount of time was >>>>> spent doing memory to memory copies of data, but after the DMA change >>>>> profiling does not show any obvious culprits. >>>>> >>>>> >>>>> >>>> Have you tried checking the speed of the interface itself? Without >>>> routing involved? May it be the interfaces itself being so slow? >>>> >>>> -- >>>> Stanislav Sedov >>>> ST4096-RIPE >>>> >>>> >>>> >>> Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At >>> the moment I can't get if_bridge to work - will try to figure out what >>> is going on. A bridging benchmark may be more informative. >>> >>> >> You said you did profiling but you didn't provide the data to inspect. It's >> possible kernel profiling has never been tried on your platform; did you >> sanity check the results? (e.g. run a known test load and check results; >> verify all routines that should execute appear in the profile). Also if >> copy overhead shows up as significant look to see why those copies are being >> done; it's often possible to avoid a copy. >> >> My experience in working with architectures like this is that cache handling >> can be a significant cost that doesn't always show up on a profile. >> >> Also you may find useful information by tracking mbufs using the h/w clock >> at important places along the "fast path" then look at whether the overhead >> for each step is reasonable. I did this for bridged traffic by forcing the >> rx dma to go to an mbuf+cluster then used the free storage in the mbuf >> header to store timestamps. At the end of the processing path I sorted the >> data into buckets by the sample points and added a sysctl to dump the >> histogram to see min/max/avg. >> >> Sam >> >> >> > > Thanks for the nice idea - will try something similar. At the moment > I'm also suspecting that cache handling has got a lot to do with the > performance figures that I'm seeing. The PXA255 has a 32KB data and > 32KB instruction cache. > I was thinking more of cases where you must flush the d-cache because a memory object is treated r/w (e.g. packet data). bus_dmamap_sync ops can do cache flushes and may not be required or may be overly expensive. Also, sometimes you can get away with treating objects as read-only and avoid the cache flush. Sam From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 16:24:02 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFDEA1065678 for ; Tue, 9 Sep 2008 16:24:02 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 60F4F8FC1E for ; Tue, 9 Sep 2008 16:24:02 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so252461ywe.13 for ; Tue, 09 Sep 2008 09:24:01 -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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=64ZKVamW4VVZy0qdWW3K/SqL28nZZq5lGR3FX/YoSH4=; b=AMDTPjWKyqLVDImvpu2OSypQ/ZSSXdUfZGXmXb5WhrFY4sX0AOdjRQyG70vV5peVnU Ng+wzPZxxTCwDTePzxma4q2BhN3IGi2r90uPJRksVzKfXEH7qNlkkAj9xKrHZsFLTlJb 6xsznOfawu4MdGYTrGMV0UOscOC533aX76/6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=i3bQ4NdbwtgrAYbPgmaWbKk91StNwOGGdJ8EnphiP5fog5mTy17ouTR36qYTavY+ZT hEyCG/VprUS6rrRKMuAdqPfZMKJi3/KZPZkCVXK3RsIrM1uZPbuHnmIBfjuKS2em2YBL PVNPooE7EaSPsz4t7MIdW/EEeijLX08a7vuy0= Received: by 10.103.175.8 with SMTP id c8mr11412853mup.26.1220977439676; Tue, 09 Sep 2008 09:23:59 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Tue, 9 Sep 2008 09:23:59 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 18:23:59 +0200 From: "Jacques Fourie" To: "Mark Tinguely" In-Reply-To: <200809091614.m89GEAc4088266@casselton.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200809091614.m89GEAc4088266@casselton.net> Cc: freebsd-arm@freebsd.org, sam@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 16:24:02 -0000 On Tue, Sep 9, 2008 at 6:14 PM, Mark Tinguely wrote: > > (trimmed the thread text) > >> >> Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At >> >> the moment I can't get if_bridge to work - will try to figure out what >> >> is going on. A bridging benchmark may be more informative. > >> > My experience in working with architectures like this is that cache handling >> > can be a significant cost that doesn't always show up on a profile. >> > >> >> Thanks for the nice idea - will try something similar. At the moment >> I'm also suspecting that cache handling has got a lot to do with the >> performance figures that I'm seeing. The PXA255 has a 32KB data and >> 32KB instruction cache. >> >> Jacques > > which version of freebsd are you using - we changed some cache flushing > routines between FreeBSD 7.x and current. Unless errors were introduced > or removed, there should not be that large of a change. > > As mentioned, the ARM caches are pretty small. The ARM processors before > version 6, (anything before ARM10) uses virtually indexed / virtually tagged > caches, so they need to be flushed on context changes. > > The version 6 and version 7 ARM processors (ARM10/ARM11) are either virtually > indexed / physically tagged or physically indexed / physically tagged. > The PIPT caches don't need to be flushed on context changes and were needed > for multiple processor support. The pmap code will have to be re-written to > take advantage of the PIPT caches (put a process value into the MMU and remove > most flushes). > > Also, the pre version 6 ARM processors didn't allow for any spare bits in the > PTE for OS use. The newer processors have a bit or two, still not enough > for FreeBSD's needs, so we need to shadow these bits. > > Thirdly, we dynamically allocate a seperate structure that mirrors the > page table. I think I have all the "paper scratching" required to move from > this structure to the FreeBSD i386/amd64 recursive page table approach. > > --Mark Tinguely. > I'm using -current from about a week ago. Jacques From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 16:27:37 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17A8E1065677; Tue, 9 Sep 2008 16:27:37 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9CC8FC08; Tue, 9 Sep 2008 16:27:36 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id m89GEAhO088267; Tue, 9 Sep 2008 11:14:10 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1220976850; bh=37IKxo3eJS2RhYuTNlGYSMTKhsR6ZVSAoKRzRZC Du3w=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=ZKSEB7p1 4CgBwBCXYpGEVW34NPU4v2Gz10zF0VyPJrD2ZJ7bbXhjqXamkBqeQlsCJZ/zB2vrRpM oZ4t7M60OnH76oRtSAiFF+3Url2rCCVCRlXeM8zAukgBnSTuDc7+vCw6XDZ1pWI5Kcs gpiIknFjUudDFj6/K0IYU7pFPjMP4= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id m89GEAc4088266; Tue, 9 Sep 2008 11:14:10 -0500 (CDT) (envelope-from tinguely) Date: Tue, 9 Sep 2008 11:14:10 -0500 (CDT) From: Mark Tinguely Message-Id: <200809091614.m89GEAc4088266@casselton.net> To: jacques.fourie@gmail.com, sam@freebsd.org In-Reply-To: Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 16:27:37 -0000 (trimmed the thread text) > >> Running netserver on the gumstix shows a throughput of 2.4Mbit/s. At > >> the moment I can't get if_bridge to work - will try to figure out what > >> is going on. A bridging benchmark may be more informative. > > My experience in working with architectures like this is that cache handling > > can be a significant cost that doesn't always show up on a profile. > > > > Thanks for the nice idea - will try something similar. At the moment > I'm also suspecting that cache handling has got a lot to do with the > performance figures that I'm seeing. The PXA255 has a 32KB data and > 32KB instruction cache. > > Jacques which version of freebsd are you using - we changed some cache flushing routines between FreeBSD 7.x and current. Unless errors were introduced or removed, there should not be that large of a change. As mentioned, the ARM caches are pretty small. The ARM processors before version 6, (anything before ARM10) uses virtually indexed / virtually tagged caches, so they need to be flushed on context changes. The version 6 and version 7 ARM processors (ARM10/ARM11) are either virtually indexed / physically tagged or physically indexed / physically tagged. The PIPT caches don't need to be flushed on context changes and were needed for multiple processor support. The pmap code will have to be re-written to take advantage of the PIPT caches (put a process value into the MMU and remove most flushes). Also, the pre version 6 ARM processors didn't allow for any spare bits in the PTE for OS use. The newer processors have a bit or two, still not enough for FreeBSD's needs, so we need to shadow these bits. Thirdly, we dynamically allocate a seperate structure that mirrors the page table. I think I have all the "paper scratching" required to move from this structure to the FreeBSD i386/amd64 recursive page table approach. --Mark Tinguely. From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 17:02:05 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BF3D1065675; Tue, 9 Sep 2008 17:02:05 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 597A08FC13; Tue, 9 Sep 2008 17:02:05 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id m89H24Bt091764; Tue, 9 Sep 2008 12:02:04 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1220979724; bh=1JfJjcdEdl1C2qQiCO4mw2+KxDAGub6FuCz52vT 7rEU=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=hRVA7GYC U+CevfCaXqBr0T6mV70mNo1C/pPaU5SiTNj7k5GslJiug9oe2de3VMIdru49VSEwS1J 4N/MyTpUeXEyanKmkE1e1sOVrkEeZzZR49P3L/sJlq2EuZm1PbLOYoSLLnCg7cwpCH5 awCdbZPrpjCGcPL+4KjjB2r/Kumso= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id m89H24Bs091763; Tue, 9 Sep 2008 12:02:04 -0500 (CDT) (envelope-from tinguely) Date: Tue, 9 Sep 2008 12:02:04 -0500 (CDT) From: Mark Tinguely Message-Id: <200809091702.m89H24Bs091763@casselton.net> To: jacques.fourie@gmail.com, tinguely@casselton.net In-Reply-To: Cc: freebsd-arm@freebsd.org, sam@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 17:02:05 -0000 (more trimmed thread text) I asked: > > which version of freebsd are you using - we changed some cache flushing > > routines between FreeBSD 7.x and current. Unless errors were introduced > > or removed, there should not be that large of a change. Jacques answered: > I'm using -current from about a week ago. I doubt FreeBSD 7.x will be faster, but it may be worth a try. Also a fourth item, If I remember correctly, the ARM DMA is done to RAM only. The cache had to be flushed before the read and write DMAs. Therefore, any access by the processor to the packet brought in by DMA (to do checksum, decrease the TTL, read header for packet for IP destination, etc), involves a cache miss. Also we need to flush the cache before another DMA can be performed - for example transmit the packet. I am hazy on remembering, but I think this cache non-involvement in DMA feature is still in the newer ARMv6/ARMv7 arch. These arch features can't be programmed around, but keeping the processor involvement in the packet as little are possible and profiling may tell us what we are doing inefficiently. --Mark Tinguely. From owner-freebsd-arm@FreeBSD.ORG Tue Sep 9 23:32:58 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A011065675 for ; Tue, 9 Sep 2008 23:32:58 +0000 (UTC) (envelope-from benno@jeamland.net) Received: from mail.jeamland.net (rafe.jeamland.net [203.20.99.33]) by mx1.freebsd.org (Postfix) with ESMTP id C080D8FC14 for ; Tue, 9 Sep 2008 23:32:57 +0000 (UTC) (envelope-from benno@jeamland.net) Received: from mail.jeamland.net (localhost [127.0.0.1]) by mail.jeamland.net (Postfix) with ESMTP id 809CF1CC94; Wed, 10 Sep 2008 09:17:24 +1000 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on rafe.jeamland.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 Received: from [10.1.1.17] (r124-19-60-146.cpe.unwired.net.au [124.19.60.146]) by mail.jeamland.net (Postfix) with ESMTPSA id 0F1AD1CC45; Wed, 10 Sep 2008 09:17:22 +1000 (EST) Message-Id: <200B1D7A-5D33-4E0F-A0C3-7F1C21FCF324@jeamland.net> From: Benno Rice To: Jacques Fourie In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Date: Wed, 10 Sep 2008 09:17:09 +1000 References: <20080909175556.07bac5f0.stas@FreeBSD.org> <48C6900C.8070708@freebsd.org> X-Mailer: Apple Mail (2.928.1) X-Virus-Scanned: ClamAV using ClamSMTP at rafe.jeamland.net Cc: freebsd-arm@freebsd.org Subject: Re: Routing benchmarks X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 23:32:58 -0000 On 10/09/2008, at 1:16 AM, Jacques Fourie wrote: [snip] > Thanks for the nice idea - will try something similar. At the moment > I'm also suspecting that cache handling has got a lot to do with the > performance figures that I'm seeing. The PXA255 has a 32KB data and > 32KB instruction cache. As the author of the pxa, smc and related code, I can also attest to the fact that they could do with work. In particular, I always seemed to get what I thought were oddly high interrupt rates coming off the smc interfaces. This would be tying the CPU up in the interrupt/gpio- as-interrupt code and slowing things down. -- Benno Rice benno@jeamland.net From owner-freebsd-arm@FreeBSD.ORG Wed Sep 10 14:40:45 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F15A6106566B; Wed, 10 Sep 2008 14:40:45 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id B67968FC20; Wed, 10 Sep 2008 14:40:45 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from smtp2.sentex.ca (smtp2c.sentex.ca [64.7.153.30]) by smarthost1.sentex.ca (8.14.2/8.14.2) with ESMTP id m8AEee3B044075; Wed, 10 Sep 2008 10:40:40 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by smtp2.sentex.ca (8.14.3/8.14.3) with ESMTP id m8AEeefk033630; Wed, 10 Sep 2008 10:40:40 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: by freebsd-current.sentex.ca (Postfix, from userid 666) id EC8CC73039; Wed, 10 Sep 2008 10:40:39 -0400 (EDT) Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Message-Id: <20080910144039.EC8CC73039@freebsd-current.sentex.ca> Date: Wed, 10 Sep 2008 10:40:39 -0400 (EDT) X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on clamscanner3 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 14:40:46 -0000 TB --- 2008-09-10 14:40:01 - tinderbox 2.3 running on freebsd-current.sentex.ca TB --- 2008-09-10 14:40:01 - starting HEAD tinderbox run for arm/arm TB --- 2008-09-10 14:40:01 - cleaning the object tree TB --- 2008-09-10 14:40:31 - cvsupping the source tree TB --- 2008-09-10 14:40:31 - /usr/bin/csup -r 3 -g -L 1 -h localhost -s /tinderbox/HEAD/arm/arm/supfile TB --- 2008-09-10 14:40:39 - building world (CFLAGS=-O -pipe) TB --- 2008-09-10 14:40:39 - cd /src TB --- 2008-09-10 14:40:39 - /usr/bin/make -B buildworld TB --- 2008-09-10 14:40:39 - WARNING: /usr/bin/make returned exit code 1 TB --- 2008-09-10 14:40:39 - ERROR: failed to build world TB --- 2008-09-10 14:40:39 - tinderbox aborted TB --- 1.85 user 2.09 system 38.69 real http://tinderbox.des.no/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Sat Sep 13 12:08:51 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3B19106566C for ; Sat, 13 Sep 2008 12:08:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 87B0D8FC14 for ; Sat, 13 Sep 2008 12:08:50 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=JP8p9NPrEe3r11CP3ZIA:9 a=dfM8LvlN1hMkq6fQo9gA:7 a=s1rUxnOM9vspRvAl1GCOEm68ehQA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1072697741; Sat, 13 Sep 2008 13:08:42 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, freebsd-arm@freebsd.org Date: Sat, 13 Sep 2008 13:10:32 +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: <200809131310.33495.hselasky@c2i.net> Cc: Subject: Openmoko phones and USB on FreeBSD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 12:08:51 -0000 Hi, There are some problems using the dfu-util to flash Openmoko phones from FreeBSD. The problem resides in the USB stack on the phone, which does not support the libusb-0.1 string requests. I'm planning to work around this in the kernel to avoid future problems. I have tested patches for this, but they have not committed yet. Secondly I plan to add support for RNDIS so that you can access the OpenMoko phone through USB ethernet. I'm currently awaiting approval from the Linux people to port their RNDIS driver to the new USB stack under a BSD license. Really they should have used CDC ethernet, but there are too many Windows users out there I guess :-) --HPS From owner-freebsd-arm@FreeBSD.ORG Sat Sep 13 12:25:16 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9A1B1065677; Sat, 13 Sep 2008 12:25:16 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 250118FC2D; Sat, 13 Sep 2008 12:25:15 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id OAA19072; Sat, 13 Sep 2008 14:14:42 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-93-104-115-110.dynamic.mnet-online.de(93.104.115.110) by hunter.Sisis.de via smap (V2.1) id xma018990; Sat, 13 Sep 08 14:14:05 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8DCMK8O003502; Sat, 13 Sep 2008 14:22:20 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Sat, 13 Sep 2008 14:22:20 +0200 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20080913122220.GA3162@rebelion.Sisis.de> References: <200809131310.33495.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200809131310.33495.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Openmoko phones and USB on FreeBSD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 12:25:17 -0000 El día Saturday, September 13, 2008 a las 01:10:32PM +0200, Hans Petter Selasky escribió: > Hi, > > There are some problems using the dfu-util to flash Openmoko phones from > FreeBSD. The problem resides in the USB stack on the phone, which does not > support the libusb-0.1 string requests. I'm planning to work around this in > the kernel to avoid future problems. I have tested patches for this, but they > have not committed yet. Hi Hans, I'm using FreeBSD on my normal laptop and my eeePC 900 gadget; my Openmoko will arrive next week (hopefully) and so I'm interested and willing to test your stuff (hoping that it is based on RELENG_7); > Secondly I plan to add support for RNDIS so that you can access the OpenMoko > phone through USB ethernet. I'm currently awaiting approval from the Linux > people to port their RNDIS driver to the new USB stack under a BSD license. > Really they should have used CDC ethernet, but there are too many Windows > users out there I guess :-) Concerning accessing the Openmoko through USB I thought that this is possible, at least the Openmoko's Wiki says this: http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD or are you talking about running FreeBSD on the Openmoko at all (this would be great news :-)) Thx matthias PD: I'm only subscribed to -arm, not to -usb; -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows From owner-freebsd-arm@FreeBSD.ORG Sat Sep 13 14:31:35 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E05106566B; Sat, 13 Sep 2008 14:31:35 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id E66A98FC08; Sat, 13 Sep 2008 14:31:34 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=0DHSzo6Uc4gA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=OCGuPPFrAAAA:8 a=1SJrhn37x-ojIz45z9oA:9 a=KQWXEiOvhUgapV7ZGnwA:7 a=s59pC9ttPYbFCkWEZwPZP6pk1boA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 905374355; Sat, 13 Sep 2008 16:31:32 +0200 From: Hans Petter Selasky To: Matthias Apitz Date: Sat, 13 Sep 2008 16:33:18 +0200 User-Agent: KMail/1.9.7 References: <200809131310.33495.hselasky@c2i.net> <20080913122220.GA3162@rebelion.Sisis.de> In-Reply-To: <20080913122220.GA3162@rebelion.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200809131633.21922.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Openmoko phones and USB on FreeBSD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 14:31:35 -0000 Hi Matthias, The OpenMoko distributions I've tried so far does not come with CDC-etherne= t=20 like default. The network page you are referring to assumes that the OpenMo= ko=20 software is programmed for CDC ethernet on the device side. No, I'm not talking about FreeBSD on the OpenMoko itself. =2D-HPS On Saturday 13 September 2008, Matthias Apitz wrote: > El d=EDa Saturday, September 13, 2008 a las 01:10:32PM +0200, Hans Petter= =20 Selasky escribi=F3: > > Hi, > > > > There are some problems using the dfu-util to flash Openmoko phones from > > FreeBSD. The problem resides in the USB stack on the phone, which does > > not support the libusb-0.1 string requests. I'm planning to work around > > this in the kernel to avoid future problems. I have tested patches for > > this, but they have not committed yet. > > Hi Hans, > > I'm using FreeBSD on my normal laptop and my eeePC 900 gadget; my > Openmoko will arrive next week (hopefully) and so I'm interested and > willing to test your stuff (hoping that it is based on RELENG_7); > > > Secondly I plan to add support for RNDIS so that you can access the > > OpenMoko phone through USB ethernet. I'm currently awaiting approval fr= om > > the Linux people to port their RNDIS driver to the new USB stack under a > > BSD license. Really they should have used CDC ethernet, but there are t= oo > > many Windows users out there I guess :-) > > Concerning accessing the Openmoko through USB I thought that this is > possible, at least the Openmoko's Wiki says this: > http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD > > or are you talking about running FreeBSD on the Openmoko at all (this > would be great news :-)) > > Thx > > matthias From owner-freebsd-arm@FreeBSD.ORG Sat Sep 13 19:46:55 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 856CE1065676; Sat, 13 Sep 2008 19:46:55 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 3B05B8FC1B; Sat, 13 Sep 2008 19:46:55 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K75009Z5DHZ4FC0@osl1smout1.broadpark.no>; Sat, 13 Sep 2008 20:46:47 +0200 (CEST) Received: from kg-work2.kg4.no ([80.202.72.251]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0K7500D1FDHY5C10@osl1sminn1.broadpark.no>; Sat, 13 Sep 2008 20:46:47 +0200 (CEST) Date: Sat, 13 Sep 2008 20:46:46 +0200 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20080913204646.fe60109d.torfinn.ingolfsen@broadpark.no> In-reply-to: <20080913122220.GA3162@rebelion.Sisis.de> References: <200809131310.33495.hselasky@c2i.net> <20080913122220.GA3162@rebelion.Sisis.de> X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: freebsd-arm@freebsd.org Subject: Re: Openmoko phones and USB on FreeBSD X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 19:46:55 -0000 On Sat, 13 Sep 2008 14:22:20 +0200 Matthias Apitz wrote: > Concerning accessing the Openmoko through USB I thought that this is > possible, at least the Openmoko's Wiki says this: > http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD Yes, this is possible. When I plug in my Neo FreeRunner into this FreeeBSD workstation, I get this in /var/log/messages: Sep 13 20:36:14 kg-work2 root: Unknown USB device: vendor 0x1457 product 0x5122 bus uhub1 Sep 13 20:36:15 kg-work2 kernel: cdce0: on uhub1 Sep 13 20:36:15 kg-work2 kernel: cdce0: faking MAC address Sep 13 20:36:15 kg-work2 kernel: cdce0: Ethernet address: 2a:fd:05:61:9b:00 Sep 13 20:36:15 kg-work2 kernel: cdce0: if_start running deferred for Giant This machine is running: tingo@kg-work2$ uname -a FreeBSD kg-work2.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Mon Jul 21 20:40:31 CEST 2008 root@kg-work2.kg4.no:/usr/obj/usr/src/sys/GENERIC i386 Lets set up the interface: root@kg-work2# ifconfig cdce0 inet 192.168.0.200 netmask 255.255.255.0 root@kg-work2# ifconfig cdce0 cdce0: flags=108843 metric 0 mtu 1500 ether 2a:fd:05:61:9b:00 inet 192.168.0.200 netmask 0xffffff00 broadcast 192.168.0.255 media: Ethernet 10baseT/UTP status: active root@kg-work2# ping 192.168.0.202 PING 192.168.0.202 (192.168.0.202): 56 data bytes 64 bytes from 192.168.0.202: icmp_seq=0 ttl=64 time=5.501 ms 64 bytes from 192.168.0.202: icmp_seq=1 ttl=64 time=0.856 ms 64 bytes from 192.168.0.202: icmp_seq=2 ttl=64 time=1.672 ms ^C --- 192.168.0.202 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.856/2.676/5.501/2.025 ms Ok, try ssh now: root@kg-work2# ssh 192.168.0.202 root@192.168.0.202's password: root@om-gta02:~# uptime 20:43:48 up 7 days, 22:36, 2 users, load average: 0.28, 0.37, 0.45 root@om-gta02:~# uname -a Linux om-gta02 2.6.24 #1 PREEMPT Tue Aug 26 08:33:29 CST 2008 armv4tl unknown root@om-gta02:~# cat /etc/angstrom-version Angstrom P1-Snapshot-20080902 HTH -- Regards, Torfinn Ingolfsen