From owner-freebsd-net@freebsd.org Thu Feb 16 20:14:21 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 0CFD7CE2BF7 for ; Thu, 16 Feb 2017 20:14:21 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id DF8E91F88 for ; Thu, 16 Feb 2017 20:14:20 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id DBFF2CE2BF6; Thu, 16 Feb 2017 20:14:20 +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 DB9C4CE2BF5 for ; Thu, 16 Feb 2017 20:14:20 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com [IPv6:2607:f8b0:4003:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FE111F87 for ; Thu, 16 Feb 2017 20:14:20 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x229.google.com with SMTP id s131so872728oie.1 for ; Thu, 16 Feb 2017 12:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tXQLPt2wfQ8eA2fMTihHzkTTB68Jj6jU/ph/TZg0/ec=; b=s1OI1OwLniB2my6KmF7l0qjp+1kXeJ3lXIm+I0MTvcs57oRyq/ngRH5K4HobAhpzGx J1owTERGrLkVqtkIaLduH2n2o624zDGDa5aBNyDW1pRTAP1KTZvUXyrw5WrG+4k+9RHI gXT7Aj4QXoEF+WnFdGglVYrU3BqbYyYJW+VjqeNu8Wpnml7kyPq/74XiVhs0IPEOK7o7 7GR0EaYOpko9X/zWb2Ex0kAfyqt6M+jNyAgnqJAeSCUEO4t2uKUIpGlGoIqVRWS7e2Td mv4jKUZ1BYRvyK//dALyN4tGs0q6sWTQ3JAnLM7WKkYKzkBe0y0tuX1Lu4PeUjm39Hhm SUqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tXQLPt2wfQ8eA2fMTihHzkTTB68Jj6jU/ph/TZg0/ec=; b=eyNvCfJTgmFUEmOQQ/UiNFy5F7ss4wHSphAmthGlz33V0xRyp1u4psnXhuNLSVWhaL /NP3/9DbSk6pPGlJhElaMIz0IIPKqIy18pEPXeBoWWnTzqGfk68MScakbp346JuupZeI AIg1mB7NfVPo6pjJx8ciSjF2FyT2gxe5As5/wpSAHtdtviAZUr5oVRbXv/+kxpaoGeWh 9cSgvih2L1kmprJL4A1ZbmEGMFeHGBRooQZuOsgBZItwYXKoQacKgxX/biMXHgpcvbL7 Z9L31gm/0l9YnQH0C1VFNlNfoKq+uPcsly/lFrDHhy4kNBQe8XccY7yqxF3xinrS30bb eQLA== X-Gm-Message-State: AMke39nMprNXmrYtMgW81aoiDwgn33EbtU2MniXTF6Fl0K3XH0NqRedWXX+cyOHXJ/S8hL39bCdx25lAyiYJ8g== X-Received: by 10.202.95.5 with SMTP id t5mr2039410oib.103.1487276059996; Thu, 16 Feb 2017 12:14:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.7.201 with HTTP; Thu, 16 Feb 2017 12:14:19 -0800 (PST) In-Reply-To: <20170214123621.GA15630@zxy.spb.ru> References: <20170214123621.GA15630@zxy.spb.ru> From: Vincenzo Maffione Date: Thu, 16 Feb 2017 21:14:19 +0100 Message-ID: Subject: Re: netmap_mem_get_info To: Slawa Olhovchenkov Cc: amir alipour , "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:14:21 -0000 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. Cheers, Vincenzo 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