From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 8A5962E8A for ; Thu, 2 Jan 2014 14:31:14 +0100 (CET) Received: by mail-wg0-f46.google.com with SMTP id m15so12275207wgh.13 for ; Thu, 02 Jan 2014 05:32:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=Ru8ccwZFD1GaP0bw5G3k4lG4/AXc+UJ+OSu9s86jlNA=; b=NMadHjc9ScHHemyc00mwzb3jcvxPBiaB3f35C4tBF6+5LApHl+hpv0jf6sYCH9crr+ gNV87BGiy77s6oDD3Ukz7HSpOsifGliNzvVInXKglQmkXksNfjAak78c0yxvsY+KNObU o/LyILs1l41oT8TmSgSlxCryQIhpcvjyCD0uFLbXtaq84aWX5HX6QmgQgD/YXOWscgkj w2GeTqhVXbUEDOnMITK5Ym/W810OsG0dq0hCFCkX69fF62h9Ub9vCruzAfo/pIFZqW7N rbhzKLpaVl1TZDbByfvXgPQRSZq/RJVTD6Ohg21nlkGXDzoQTVeyToGAXDSDR2ab2Avh cQgQ== X-Gm-Message-State: ALoCoQliNFnFRlzo4Hx2zx4e6sw4ZWLC1nf9bQASQOjHznNHaPhfr3EYyhaebp19uRp+65eGkfG8 X-Received: by 10.180.90.230 with SMTP id bz6mr51012451wib.17.1388669544548; Thu, 02 Jan 2014 05:32:24 -0800 (PST) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id o4sm52488246wiy.2.2014.01.02.05.32.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jan 2014 05:32:23 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: Dmitry Vyal Date: Thu, 2 Jan 2014 14:32:22 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <523172C3.2040309@gmail.com> In-Reply-To: <523172C3.2040309@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201401021432.22215.thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Looks like rte_mempool_free_count() and rte_mempool_count() are swapped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2014 13:31:14 -0000 12/09/2013 09:52, Dmitry Vyal : > If I understand it correctly, the ring contains free buffers and > rte_ring_count() returns a number of entries inside a ring. So this > function actually calculates the number of free entries, not busy. Yes, you're right. mempool's objects are free mbufs. So mempool_count is the number of free mbufs, and mempool_free_count is the number of free slots to store more free mbufs. I agree that the naming is confusing but I'm not sure we should change it. -- Thomas