From owner-freebsd-net@FreeBSD.ORG Tue Nov 4 22:17:10 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43ACD58C for ; Tue, 4 Nov 2014 22:17:10 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 024F18A7 for ; Tue, 4 Nov 2014 22:17:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A0B917300A; Tue, 4 Nov 2014 23:12:16 +0100 (CET) Date: Tue, 4 Nov 2014 23:12:16 +0100 From: Luigi Rizzo To: Evandro Nunes Subject: Re: netmap-ipfw on em0 em1 Message-ID: <20141104221216.GA17502@onelab2.iet.unipi.it> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.18-1 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, 04 Nov 2014 22:17:10 -0000 On Tue, Nov 04, 2014 at 05:44:43PM -0200, Evandro Nunes wrote: > On Tue, Nov 4, 2014 at 5:26 PM, Luigi Rizzo wrote: ... > >> i gues I am missing a piece of the architecture... > >> > > > > ???probably yes :) > > > > kipfw em1 em2 connects the two interfaces to each other, keeping the > > rest ??? > > > > ???of the host stack completely out of the game. > > > > got it uhmmm... probably not, see below: > however it's still not counting any packets coming in or out of the > interfaces > > > > ???I am not sure where you are running pkt-gen (is it on a separate > > machine ?) and what the 'em1' used in ??? > > ??? > > ???pkt-gen is connected to. > > > > > I am running one pkt-gen in TX mode on the same machine, and another one in > RX mode in a separate machine, but this is just for reference, to make sure > packets are actually getting transmitted, and it is... you cannot run two netmap clients on the same NIC at the same time (unless you know how to do that, and avoid they stomp on each other). In this particular case it means that you should test things as follows machine A: pkt-gen -i em1 -f tx ... machine B kipfw em1 em2 machine C pkt-gen -i em3 -f rx And the connection between the ports is the following [A em1] <--> [em1 B em2] <--> [em3 C] cheers luigi