From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id 6EB855A37 for ; Mon, 1 Jun 2015 10:50:31 +0200 (CEST) Received: by wifw1 with SMTP id w1so95594393wif.0 for ; Mon, 01 Jun 2015 01:50:31 -0700 (PDT) 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:content-type; bh=QXB1Lfik9AOabLcnUbeTkKoElU4f5XhfEgUJjk851oc=; b=fIwjmMUpPSQ3tFtYnOTAxzokz624vUXyJTXyHqDscb6iWMbJjMUI7IkkRVmGf8bhQa S6YzGHwjsVDMgUunSGjROXPngrqN51LrWJeJ2xdYOKpqQfYYGqecGtSTK2sBLFkAIuIk /pkef/2SYYGBzRx7wR6NNATuabU1KmulYWdnb4vS8BYNsP4j3aK7s5tEqtttxWcHaO1K NBv/eMGdUlXf0iC+hGvbvwfKDkacaz5OiQK1g/p4/Bzn2R2mfujKSkRst8QpeTk8J3Bv OJnocrdHiMOShEgBn7gQR+SuTPwPfrLYtP0ZgncxfCoLQI57HSQq1uF1lUGKuTTfjQK1 EkYA== X-Gm-Message-State: ALoCoQnxgAI5yYFmB44nwrOl+CAxQcIy1JHX/fCnrWFApwGMX5SWoQESnsTtlclmMVQyqVtkLCzC X-Received: by 10.180.39.147 with SMTP id p19mr18761767wik.15.1433148631312; Mon, 01 Jun 2015 01:50:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.229.202 with HTTP; Mon, 1 Jun 2015 01:50:11 -0700 (PDT) In-Reply-To: <55689B42.6060800@linaro.org> References: <55689B42.6060800@linaro.org> From: Andriy Berestovskyy Date: Mon, 1 Jun 2015 10:50:11 +0200 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] Free up completed TX buffers 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: Mon, 01 Jun 2015 08:50:32 -0000 Hi Zoltan, On Fri, May 29, 2015 at 7:00 PM, Zoltan Kiss wrote: > The easy way is just to increase your buffer pool's size to make > sure that doesn't happen. Go for it! > But there is no bulletproof way to calculate such > a number Yeah, there are many places for mbufs to stay :( I would try: Mempool size = sum(numbers of all TX descriptors) + sum(rx_free_thresh) + (mempool cache size * (number of lcores - 1)) + (burst size * number of lcores) > I'm thinking about a foolproof way, which is exposing functions like > ixgbe_tx_free_bufs from the PMDs, so the application can call it as a last > resort to avoid deadlock. Have a look at rte_eth_dev_tx_queue_stop()/start(). Some NICs (i.e. ixgbe) do reset the queue and free all the mbufs. Regards, Andriy