From owner-freebsd-net@FreeBSD.ORG Tue May 21 14:36:34 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F11B1DC for ; Tue, 21 May 2013 14:36:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 04F736A7 for ; Tue, 21 May 2013 14:36:33 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id B9D9073027; Tue, 21 May 2013 16:39:06 +0200 (CEST) Date: Tue, 21 May 2013 16:39:06 +0200 From: Luigi Rizzo To: Hooman Fazaeli Subject: Re: netmap bridge can tranmit big packet in line rate ? Message-ID: <20130521143906.GA80993@onelab2.iet.unipi.it> References: <1369140007.80942.YahooMailClassic@web121602.mail.ne1.yahoo.com> <519B82D8.9010508@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <519B82D8.9010508@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 21 May 2013 14:36:34 -0000 On Tue, May 21, 2013 at 06:51:12PM +0430, Hooman Fazaeli wrote: > On 5/21/2013 5:10 PM, Barney Cordoba wrote: > > > > --- On Tue, 5/21/13, liujie wrote: > > > >> From: liujie > >> Subject: Re: netmap bridge can tranmit big packet in line rate ? > >> To: freebsd-net@freebsd.org > >> Date: Tuesday, May 21, 2013, 5:25 AM > >> Hi, Prof.Luigi RIZZO > >> > >> Firstly i should thank you for netmap. I tried to send a > >> e-mail to you > >> yestoday, but it was rejected. > >> > >> I used two machines to test netmap bridge. all with i7-2600 > >> cpu and intel > >> 82599 dual-interfaces card. > >> > >> One worked as sender and receiver with pkt-gen, the other > >> worked as bridge > >> with bridge.c. > >> > >> as you said,I feeled comfous too when i saw the big packet > >> performance > >> dropped, i tried to change the memory parameters of > >> netmap(netmap_mem1.c > >> netmap_mem2.c),but it seemed that can not resove the > >> problem. > >> 60-byte packet send 14882289 pps recv > >> 13994753 pps > >> 124-byte > >> send 8445770 pps > >> recv 7628942 pps > >> 252-byte > >> send 4529819 pps > >> recv 3757843 pps > >> 508-byte > >> send 2350815 pps > >> recv 1645647 pps > >> 1514-byte send > >> 814288 pps recv 489133 > >> pps > > These numbers indicate you're tx'ing 7.2Gb/s with 60 byte packets and > > 9.8Gb/s with 1514, so maybe you just need a new calculator? > > > > BC > > _______________________________________________ > > > AsBarney pointed outalready, your numbers are reasonable. You have almost saturated > the link with 1514 byte packets.In the case of 64 byte packets, you do not achieve line > rate probably because of the congestion on the bus.Can you show us "top -SI" output on the > sender machine? the OP is commenting that on the receive side he is seeing a much lower number than on the tx side (A:ix1 489Kpps vs A:ix0 814Kpps). [pkt-gen -f tx ix0]-->--[ix0 bridge ] [ HOST A ] [ HOST B ] [pkt-gen -f rx ix1]--<--[ix1 ] What is unclear is where the loss occurs. cheers luigi