From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m13-42.163.com (m13-42.163.com [220.181.13.42]) by dpdk.org (Postfix) with ESMTP id 2D4101F3 for ; Thu, 12 Sep 2013 09:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Received:Date:From:To:Subject:Content-Type: MIME-Version:Message-ID; bh=qM8XLGrPz+y6Vrl8Oa9leHQHyrLYJ4l+zoxs lmkgEm0=; b=QR4J8xvmH3/bXHDZYU7wGDaBtajdHr8bZJabDbhx/L6ANmxvGDXp XG0twSBJH0maY74r3u1nDwHl/lxghTsYZpYuwszciAqf9vqQLg5fNUCw2nrBEmIu NxesK/HP04gIbmAcUQvQlMb+6/KVtBwL9R9cLXYzmaDwMA0XNcNfy/s= Received: from jinxiu.1006$163.com ( [220.243.139.120] ) by ajax-webmail-wmsvr42 (Coremail) ; Thu, 12 Sep 2013 15:16:50 +0800 (CST) X-Originating-IP: [220.243.139.120] Date: Thu, 12 Sep 2013 15:16:50 +0800 (CST) From: dvr To: dev X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20130822(23259.5548.5550) Copyright (c) 2002-2013 www.mailtech.cn 163com X-CM-CTRLDATA: LMf5F2Zvb3Rlcl9odG09NTQ2Ojgx MIME-Version: 1.0 Message-ID: <79d21721.1dfcb.14111078f7b.Coremail.jinxiu.1006@163.com> X-CM-TRANSID: KsGowGCZQUNjajFS+X0iAA--.6894W X-CM-SenderInfo: xmlq5xbxoriiqw6rljoofrz/1tbiGgOW7FD+LvrFQQAAsd X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] About "Multi-process" sample application 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, 12 Sep 2013 07:16:20 -0000 hi,all I tried to run multi-process sample application step by step according to the document of "sample_application_user_guide.pdf", but encount a problem: only the first rx_queue can receive packages, the other three rx_queue have no package at all. How could this happen? Did I need to do some other configuration? Any help will be appreciate. Best regards. Maria >From dmitryvyal@gmail.com Thu Sep 12 09:52:00 2013 Return-Path: Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) by dpdk.org (Postfix) with ESMTP id ED2E81F3 for ; Thu, 12 Sep 2013 09:51:59 +0200 (CEST) Received: by mail-lb0-f179.google.com with SMTP id x18so556823lbi.10 for ; Thu, 12 Sep 2013 00:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=7FfwMTOZCdrtHq6d1e/dwM+Ny1Y1EYwStFjIJK6N2PA=; b=MNqY+uI+XChTW7Ya+FTmJ6kU2PFvKDIG3Nrj+cAy0eFDX2C4uPBZOlQONBElMNaGFr HlomGDd0wRxZCcFBhLShH70p9SUW/lW31Sv9UXB/4+0izwYok3f1A687SXI4cbLGkEPt T+Cvu8RTN/wC9rF5K8wU1mBsKy6OxJHUv7BlNF9aciFyhF+/Lvy6ZDykTAkD3z0KELsN 7sUvnBrCCf5sJfPAWwzfatUCFPcnFoHkUD45AirCCp0XO1DKThDETxCLu56YICqbXMHo TWS+ijzzjg2YYJka49vTKPthQVB8Heb5FILkhvnnfdwGMi5tfkYtwcVPwgk3hprjOxIL Ta8w== X-Received: by 10.112.40.110 with SMTP id w14mr156908lbk.42.1378972356380; Thu, 12 Sep 2013 00:52:36 -0700 (PDT) Received: from [192.168.15.100] ([91.246.87.40]) by mx.google.com with ESMTPSA id js17sm1016848lab.5.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 00:52:36 -0700 (PDT) Message-ID: <523172C3.2040309@gmail.com> Date: Thu, 12 Sep 2013 11:52:35 +0400 From: Dmitry Vyal User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: dev@dpdk.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [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, 12 Sep 2013 07:52:00 -0000 Greetings. I had a suspect I run into a mbuf depletion issue and decided to check using rte_mempool_free_count(). To my surprise, it returned a value equal to mempool size. I tried calling rte_mempool_count() and it returned zero. I inspected the code in dpdk-1.3.1-7 and dpdk.1.4.1-4: rte_mempool_count(const struct rte_mempool *mp) { unsigned count; count = rte_ring_count(mp->ring); #if RTE_MEMPOOL_CACHE_MAX_SIZE > 0 { unsigned lcore_id; if (mp->cache_size == 0) return count; for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) count += mp->local_cache[lcore_id].len; } #endif /* * due to race condition (access to len is not locked), the * total can be greater than size... so fix the result */ if (count > mp->size) return mp->size; return count; } 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. Moreover, rte_mempool_count() is used in many places. For example it's called in rte_mempool_free_count() and rte_mempool_full(). Can anyone confirm or refute my findings? Regards, Dmitry