From owner-freebsd-current@FreeBSD.ORG Thu Jun 28 18:07:42 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6002D1065674 for ; Thu, 28 Jun 2012 18:07:42 +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 209E98FC0A for ; Thu, 28 Jun 2012 18:07:41 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id D05407300A; Thu, 28 Jun 2012 20:26:50 +0200 (CEST) Date: Thu, 28 Jun 2012 20:26:50 +0200 From: rizzo To: "root@9du.org" Message-ID: <20120628182650.GA24536@onelab2.iet.unipi.it> References: <20120628120031.460411065674@hub.freebsd.org> <2012062821245416134218@9du.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2012062821245416134218@9du.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current Subject: Re: about netmap NETMAP_HW_RING recv pcaket X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 18:07:42 -0000 On Thu, Jun 28, 2012 at 09:24:59PM +0800, root@9du.org wrote: > in pkt-gen.c > tifreq.nr_ringid = (g.nthreads > 1) ? (i | NETMAP_HW_RING) : 0; > > in netmap.c > if (priv->np_qlast != NETMAP_HW_RING) { > lim_tx = lim_rx = priv->np_qlast; > } > .... > > if nthreads 2.but have 8 num_tx_rings.(ixgbe default is 8) > looks like > thread #1 priv->np_qfirst = 0 priv->np_qlast = 1 > thread #2 priv->np_qfirst = 1 priv->np_qlast = 2 > > if packet in num_tx_rings 2-7 will be lost some packet? if you decide to attach to individual rings then it is up to you to bind enough threads as there are rings. pkt-gen.c is only a test program, not all combinations of options are necessary meaningful cheers luigi