From owner-freebsd-net@freebsd.org Thu Feb 16 20:38:22 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFDFBCE258C for ; Thu, 16 Feb 2017 20:38:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id BB9D2133A for ; Thu, 16 Feb 2017 20:38:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: by mailman.ysv.freebsd.org (Postfix) id B8270CE258B; Thu, 16 Feb 2017 20:38:22 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7DCDCE258A for ; Thu, 16 Feb 2017 20:38:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794751339 for ; Thu, 16 Feb 2017 20:38:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ceSog-000Iyi-1E; Thu, 16 Feb 2017 23:38:14 +0300 Date: Thu, 16 Feb 2017 23:38:14 +0300 From: Slawa Olhovchenkov To: Vincenzo Maffione Cc: amir alipour , "freebsd-net@freebsd.org" Subject: Re: netmap_mem_get_info Message-ID: <20170216203813.GR6035@zxy.spb.ru> References: <20170214123621.GA15630@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 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, 16 Feb 2017 20:38:22 -0000 On Thu, Feb 16, 2017 at 09:14:19PM +0100, Vincenzo Maffione wrote: > Hi, > You're right, we'll try to add more details. > > In any case, buf_size, ring_size and if_size are the sizes in bytes of each > buffer, ring and netmap_if (control data structure), respectively. > So the maximum amount of slots for each ring is ring_size/16, as 16 is the > size in bytes of struct netmap_slot. > > On the other side, buf_num, ring_num and if_num are the total number of > biffers, rings and netmap_if objects in each netmap memory area (aka > "allocator"). > By default there is a single memory area used by all the hardware NICs and > a separate memory area for each VALE port. > This is already configurable, however. This values also depends on open netmap descriptors, right? > 2017-02-14 13:36 GMT+01:00 Slawa Olhovchenkov : > > > On Tue, Feb 14, 2017 at 12:26:55PM +0100, Vincenzo Maffione wrote: > > > > > Hi, > > > Have you tried to play with netmap sysctl parameters like: > > > > > > dev.netmap.buf_num > > > dev.netmap.ring_num > > > dev.netmap.if_num > > > > > > those are listed in the sysctl section of the netmap man page. > > > > man page hide details about calcul rules of this parameters. > > > > > > -- > Vincenzo Maffione