From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 4891BB38D for ; Fri, 29 May 2015 19:00:51 +0200 (CEST) Received: by wgez8 with SMTP id z8so67869081wge.0 for ; Fri, 29 May 2015 10:00:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=1rHq0BI/5Ew+954DtaJaevs4z/1eIOFHG5dbbPV/tzs=; b=GaWYI+3IMNSdg5gvgSyaM2nVlhjG5mOsi5A0GSSljDWAwYJORKXjtMAuApsDCbyUw4 cuYRN5iE2H7jUejlgU2rU6lgiv+3Waw8CMNN/ic23P8/d/M6alFFxKujU4srq1AA5KOW MOeH7NeMHLnc5KmsJwsUkFRGwBeorbD1s3KOzhDQAHmg3oUx8qXfRFbjtpWRWgj+CNeY 4Zez4rnr5Xh1g9n4Xa9dGJWlg4AmuvQXvrSTpjpXocaGlUyjCJctX6dbFz77sVB6l4L/ 8bHTf3CZLp4d1yVAEzV0R+eXJdzY1Tx0sxVv9guAq8ZaiXxvm81nOVxc4OZOZqqiFA/L LM7g== X-Gm-Message-State: ALoCoQnS24+coPwe6qu/7b24tr74xJnqVIbPQgeE419jZHNaJ38gtDvZN5iLFPyT4wZ7otQIDWCk X-Received: by 10.194.248.227 with SMTP id yp3mr16702165wjc.32.1432918851099; Fri, 29 May 2015 10:00:51 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by mx.google.com with ESMTPSA id ha4sm3960321wib.0.2015.05.29.10.00.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 10:00:50 -0700 (PDT) Message-ID: <55689B42.6060800@linaro.org> Date: Fri, 29 May 2015 18:00:50 +0100 From: Zoltan Kiss User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@dpdk.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [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: Fri, 29 May 2015 17:00:51 -0000 Hi, I've came across an another problem while sorting out the one fixed by my patch "ixgbe: fix checking for tx_free_thresh". Even when the threshold check is correct it can happen that the application run out of free buffers, and the only solution would be to get back the ones from the TX rings. But if their number is still less than tx_free_thresh (per queue), currently there is no interface to achieve that. The bad way is to set tx_free_thresh to 1, but it has a very bad performance penalty. The easy way is just to increase your buffer pool's size to make sure that doesn't happen. But there is no bulletproof way to calculate such a number, and based on my experience it's hard to debug if it causes problem. 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. Instead it causes probably worse performance, but at least fools like me will easily see that from e.g. oprofile. How does that sound? Or is there a better way to solve this problem? Regards, Zoli