From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 562F5A034F for ; Tue, 11 Jan 2022 13:12:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4762D426F7; Tue, 11 Jan 2022 13:12:30 +0100 (CET) Received: from delivery.mailspamprotection.com (delivery.mailspamprotection.com [185.56.85.148]) by mails.dpdk.org (Postfix) with ESMTP id 9A66A426F6 for ; Tue, 11 Jan 2022 13:12:28 +0100 (CET) Received: from 72.204.214.35.bc.googleusercontent.com ([35.214.204.72] helo=es18.siteground.eu) by se24.mailspamprotection.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1n7G0n-0003qh-Of for users@dpdk.org; Tue, 11 Jan 2022 06:12:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=filipjaniszewski.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=U/y/jfz8LJBFjylO2CpgjhXQTJ6lj2rL2DN/p7pWXc0=; b=cOEmBC02Gi6PWJDeLmCwjhrH9k waisXkVxLNKwYd/d42R75SoQAPfN112kImLuF5yw3x1CdHDOCFtS/HLiP+RX+Nvy0/s3qkDyQPy6o SFl469UEc5F4ttjrt8Z5yIY3wz462DSQ84SQmGfL6aTBo1oS/ExokdFgC0GOfFJFrMOCJx788aa3/ 60InyxvBB1NFbFyYpok7xqbbKtEzVD9IkvGzD/WurF/HIWoWBoDWli3KR5/nT60U30xMndCe+Amiq uusrrB6DvmDz+tPXA7beVbNUDxh41c08GwMu88/tckbGRZjtW0+FrGkosW5Yyc6tCpVf7NOumbr+i H+0Ujy3g==; Received: from [89.64.148.179] (port=43320 helo=[192.168.0.144]) by es18.siteground.eu with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.90-.1) (envelope-from ) id 1n7G0m-000D4N-IR for users@dpdk.org; Tue, 11 Jan 2022 12:12:24 +0000 To: "users@dpdk.org" From: Filip Janiszewski Subject: rte_pktmbuf_free_bulk vs rte_pktmbuf_free Message-ID: <5ecf22af-ac38-7dd5-b3ce-5b2ccf60b32f@filipjaniszewski.com> Date: Tue, 11 Jan 2022 13:12:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: 35.214.204.72 X-SpamExperts-Domain: es18.siteground.eu X-SpamExperts-Username: 35.214.204.72 Authentication-Results: mailspamprotection.com; auth=pass smtp.auth=35.214.204.72@es18.siteground.eu X-SpamExperts-Outgoing-Class: unsure X-SpamExperts-Outgoing-Evidence: Combined (0.42) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT8jZapFqmaVZ7wd0GRmoFXDPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wDtBK3p5VcS6iRNP7EipR8fYzfQXcfqmra3dmoHS4ygiE7 9ruy4RtKgvHw0TIk+t5WuRWrkPihq53YqAd1ENNq6iAM41hAeV/RVyTQeiNgOIMaxvXc9tQ1fZaW Jxab/NLu+GFU0sCml2vPee3sRKccf6uNtfvhlxVIcNsI7TpuMmCm1Mqx/0+DydNzT9K7qSnD/KIZ FjZmfdcVjL2SVfcQjmlJySLkQdPf+nBedSzwCjosfAk4Zlg+iP9gSPcsb+FQREztkDz2QExcNmoc dnlihAClEw4cJ96s6TttplSWB2WLX2ZbQb3UJKihEmoDuwh8ZolFwwybCr3yWDyr1A1P9UuKK2wt u8CG6m9SfMMg0ONwxuyQxxpFBZS72lACfRLGYP/Zj29Dpz4JZGFu9hfzncPlxpSFtW2+oi0GqiLO QWL62gLGsuRdOpr9ahXbn4vSu4V0uFdos+XyMRrtb4AGf6nmte41llVLFJpJnSEgP+vjEfTaJe0W bjDSwI4VsDh/Ak5UMKR5Jabn4uqWeMpVZXNEE1SX+KObD5gMB9uqKJlQuz/H/CJjhs5BUf8fRBA8 F/IJRA8ZF8C5AnJBxSFDD1e76szsWvBsaS+KViusBg4TfS2su/byymSuqTyxp/ZExDyRiioQmvGT re37mWh0chGFHjQ6q190o7vmaHflc2us9jsCtxa+EDhE7r6zCL6pdDFt+nHVIKJs4t2We1eo0IcN I/d6t4zYvHkpNveKefd6jph+47sW7gAObsqXf7BEl4cc6zP1kOqU5D4BL/Jtjz2Yihk829l9ArDY 1fxK5W8/X1IXXOa04RdI1teTm3aA2dcR37Y2B66YMIgMW6Ib2zfpgu2LUdQgOCrcnAagedGEPEtC vtj/W4eTF3+V0eRLUO2dIsc33R8aDHVqBx6p0kcOGqy3qeFdJ1qXjidZUwh8o7Cc8sohuIrX6OqJ RIbRYExqC87yb3MXqXi2Xm4dJQpEro5ufGv8QflwtZAnOpuSu6HyASplJ0H2r/Zb+6cL/wzCdtFG kMNi6UfW3mVmBt5Njs/QdmwNbOKj2jDAiYzIacMilJyGVyjpEgOg2D+e53QSV233OdHvpYrvCQQO E8PmakS5/UIaBiunQGoHJZmvcheNDWTZvkUBCOzHDW0= X-Report-Abuse-To: spam@quarantine1.mailspamprotection.com X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hi, Is there any specific reason why using rte_pktmbuf_free_bulk seems to be much slower than rte_pktmbuf_free in a loop? (DPDK 21.11) I ran a bunch of tests on a 50GbE link where I'm getting packet drops (running with too few RX cores on purpose, to make some performance verification) and when the time comes to release the packets, i did a quick change like this: . //rte_pktmbuf_free_bulk( data, pkt_cnt ); for( idx = 0 ; idx < pkt_cnt ; ++idx ) { rte_pktmbuf_free( data[ idx ] ); } . And suddenly I'm dropping around 10% less packets (The traffic rate is around ~95Mpps). In case that's relevant, RX from the nic is done on a separate core than where the pkts are released (processed and released) I did also the following experiment: Found the MPPs speed value where i get around 2-5% drops using rte_pktmbuf_free_bulk, executed a bunch of readings where I consistently get drops.. Then switched to the loop with rte_pktmbuf_free and executed the same tests again, of a sudden I can't drop anymore. Isn't this strange? I was sure rte_pktmbuf_free_bulk would be kind of optimized for bulk releases so people don't have to loop themselves. Thanks -- BR, Filip +48 666 369 823