From owner-freebsd-net@FreeBSD.ORG Tue Dec 30 15:13:12 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 EC1552F1 for ; Tue, 30 Dec 2014 15:13:12 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB391A6E for ; Tue, 30 Dec 2014 15:13:12 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id ms9so12670711lab.10 for ; Tue, 30 Dec 2014 07:13:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=8cVgunzULr/xQmcyqRnbEwUgpQQ96ip3mQvKBy+gZ0k=; b=HfOG9WB7CDnGaupx44ZrNDCKxUnLTgN9AYl+AoGHyBvYC/eTAzF5f69BNnCyml8ksW AcKuXBoD3QM4gh9hzNNj7CeZihpP3BcteWdewEEzv9o1nWHwpggpKtgUSRre6NMDZuOQ e7l1II2IN6+dSswTK7DxzFfsmFPX8lb4vcdstODNurQQ82frJgWr9v69tG57S1hRHhsC wOaydoeYKVn5QoNYPpBX8M4IeG9PoqR362MPxZmJXGzcb0Qbj7vK2vjsZUShPpKN213x 8O6ws72l45BfN3sHHS0VXcfkaRC4MJHS+l0IR+9koB6U35vsz9gVTAMrVqNFZMLT2Ohg +Fsw== X-Received: by 10.152.45.65 with SMTP id k1mr63095887lam.14.1419952390459; Tue, 30 Dec 2014 07:13:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.36.215 with HTTP; Tue, 30 Dec 2014 07:12:30 -0800 (PST) In-Reply-To: References: From: Carlos Ferreira Date: Tue, 30 Dec 2014 15:12:30 +0000 Message-ID: Subject: Re: Regarding Netmap internal memory allocation. To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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, 30 Dec 2014 15:13:13 -0000 Update: I noticed that the netmap module was still crashing, after changing the OpenWRT VM ram to 256MB. I now raised to 1GB and it no longer crashed. The netmap module is now consuming about 350MB of Ram, which for my objectives is just too much... On 30 December 2014 at 14:06, Carlos Ferreira wrote: > To Luigi and to whom may be able to help > > Hello all. > > Is it possible to reduce the size of the memory buffer allocated by the > netmap module? > I'm asking this because I was implementing some testing code, using NICs > and a Tap device in an OpenWRT VM with 64MB of RAM. > Because of the small RAM amount, the nm_open crashed when the program > tried to netmap the tap device, after I previously netmapped one NIC > successfully. > After the crash, I bumped the VM RAM to 256MB and the test program ran > well, but not without me noticing that the VM RAM consumption was > increased about 90 MB by netmap. > > Resuming, I want to know if there is a way to reduce the memory buffer > allocation, without recompiling the netmap kernel module. > > Thank you for the attention. > > -- > > Carlos Miguel Ferreira > Researcher at Telecommunications Institute > Aveiro - Portugal > Work E-mail - cmf@av.it.pt > Skype & GTalk -> carlosmf.pt@gmail.com > LinkedIn -> http://www.linkedin.com/in/carlosmferreira > -- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira