From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f175.google.com (mail-ua0-f175.google.com [209.85.217.175]) by dpdk.org (Postfix) with ESMTP id EA5223DC for ; Thu, 8 Dec 2016 06:40:40 +0100 (CET) Received: by mail-ua0-f175.google.com with SMTP id 12so438552023uas.2 for ; Wed, 07 Dec 2016 21:40:40 -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 :cc; bh=3/kwmJku56Jtuy0yo1LvR0UzRSmrRFSAtClpv2Pva2s=; b=IbvGZ5puBucyi5PghW6BDpSRRznx/R2ZZ1JiKyakuV5i36qbWx5H5E488iTaqVj7lW 68GJ1ljuv38eIkRSJazYbUvg6D1WnjQdvMPUigiHc1YbSm8Onmg7Xa5BecY0zGdkjII3 IL/wsY1v9SyUJbZ2c8Tiib9Yh5VS8Frax0MWoQp29Q3uewgT3An773WvNMzhpr/cKAO3 +QoDtr6gUvMQF1U985oD5RuCjlh7yU5GrCydBfcf4ZIXJ9iMFN15VPaxPPDq1lXu6BpD tfRCO5/BqfN7O1bQEniDq/SmtdwQZyw7v3jf6laQwtTc/Bil504JFZqc4IUhoREJIjUK +wkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3/kwmJku56Jtuy0yo1LvR0UzRSmrRFSAtClpv2Pva2s=; b=k+Wjou+5l4pr/X4c8DxBqamYnxBe+J0boXeOJLZsoherXdtOAQIOqRhHaitSDqLT63 HWkYrqUBrispE+ih/l05pqriHh3rEnzZklaPKJpf+FUaZ9i/Nq/LZwgRNBe5VCvf58ST 7iqi7ARxV73v7nNZC/of3ulpGy4rZSP3xCeM7CcukMIYrVGogc1oh4nCIqO8aq7ynobf Kv9zzgxZ5sQlEn1PXepnRM8J3875sHDWB6YFXGkT5xAxAVUhYjJBhY0vME9BpecGm7+V V8+U9c5EVcpNEc5dr6GosKf8qdtmTg1M+8kFZOzT/+yo/aVnU31HmSKtgBF1wcZB+tF6 IJ/A== X-Gm-Message-State: AKaTC016HC4STXHPZdS0ggWqjtIq9/gqU2C8yHcOWQ95gjN8V6uTfW4IxTYdaFvRgMmiyjckXYLZp5cyGsaO4w== X-Received: by 10.176.64.3 with SMTP id h3mr53922094uad.176.1481175640387; Wed, 07 Dec 2016 21:40:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.149.212 with HTTP; Wed, 7 Dec 2016 21:40:39 -0800 (PST) In-Reply-To: <80F579B1-9F07-4221-97FF-0C97258EBD9E@intel.com> References: <80F579B1-9F07-4221-97FF-0C97258EBD9E@intel.com> From: =?UTF-8?B?7Zmp6rec66+8?= Date: Thu, 8 Dec 2016 14:40:39 +0900 Message-ID: To: "Wiles, Keith" Cc: "users@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] rte_rxmbuf_alloc() fails X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 05:40:41 -0000 Thank you for your answer. I finally found the culprit. It was my fault. I allocated useless mbufs from a mempool so the mbufs consume the mempool slightly. Thank you Keith :) 2016-12-07 23:16 GMT+09:00 Wiles, Keith : > > > On Dec 7, 2016, at 3:44 AM, =ED=99=A9=EA=B7=9C=EB=AF=BC wrote: > > > > Hi, > > > > When I run my application DPDK doesn't receive any packets after about = 3 > > minutes. > > So I figured out why rte_rx_burst() returned 0 and the reason is > > rte_rxmbuf_alloc() failure. rte_rxmbuf_alloc() =3D=3D NULL. > > I printed some statistics and it showed that the prod's head and cons' > head > > are same. > > What does this mean? > > And rte_mempool_empty and rte_mempool_full always failed. > > To me the basic problem for mbuf allocation fails is the mbufs are not > being freed and there are many reasons for this to happen. > > Here are a few I have hit: > - The number of mbufs created is smaller then the TX flush threshold in > the PMD(s), which does not allow any packets to be freed until the > threshold is hit. > - The next one I have see is not checking the rte_eth_tx_burst() return > code, which is the number of mbufs that were able to be placed on the TX > ring. Then the application just blindly reuses the mbuf array pointer aga= in > not realizing some mbufs are still in the list creating a mbuf leak. > > DPDK is very well tested so I would not expect any of the currently > released code to have any problems or bugs in not freeing mbufs. > > > > > Thanks. > > Regards, > Keith > >