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 49AADC418 for ; Wed, 29 Jul 2015 11:40:16 +0200 (CEST) Received: by wicgb10 with SMTP id gb10so191985663wic.1 for ; Wed, 29 Jul 2015 02:40:16 -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:references:in-reply-to:content-type :content-transfer-encoding; bh=oKZ7770iylSW10YjNJTlhwTwQqzBtrZ7zlqgZyt9Jk8=; b=OLtDm4+Y/k5UgNwFttS+p1m835AW7dptB6hRz7oJxBvzXMde2qKyxpJ3dUrR2DS7jW coJP/P1Va2Mbt6nvDckBc801aZ/naUEzvCQdQP/WX8NWR5mRZxu5g/luR/MJtEX4iD96 +35NlkM3HI/H0xO0r1hGGg3ky/w2F4uSMiLKXt4MNqx6FP9PrE2hwtMGs1z2i1OPr9e1 ttzoG0KtkSlhaaABYVr3a9XVcVObgMZP24eTr2qRoOmhAHRpXtf/7OTYsnqPdpkbuuSe 2kUIhDJIYrGgJ+Wb71Ztae3IFdP2vYqUE7ypkWI2UIA/k042FtW9uMY2bA1cVcc3tP/Z aL5g== X-Gm-Message-State: ALoCoQk80wnTdo0mGLWZwBKtCuExnX6ClOlWUN+1+5QvZccAIv6Pz5w/mRxg7s8iqttJB1Rk3gB5 X-Received: by 10.194.2.51 with SMTP id 19mr80077961wjr.40.1438162816105; Wed, 29 Jul 2015 02:40:16 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id d17sm37587732wjs.32.2015.07.29.02.40.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jul 2015 02:40:15 -0700 (PDT) Message-ID: <55B89F7E.9070102@linaro.org> Date: Wed, 29 Jul 2015 10:40:14 +0100 From: Zoltan Kiss User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: "Ananyev, Konstantin" , "Richardson, Bruce" , "dev@dpdk.org" References: <55B252EE.9060306@linaro.org> <2601191342CEEE43887BDE71AB97725836A68558@irsmsx105.ger.corp.intel.com> <55B61835.9010908@linaro.org> <2601191342CEEE43887BDE71AB97725836A692B3@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836A692B3@irsmsx105.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] ixgbe vPMD RX functions and buffer number minimum requirement 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: Wed, 29 Jul 2015 09:40:16 -0000 Hi, On 28/07/15 01:10, Ananyev, Konstantin wrote: > Hi Zoltan, > >> -----Original Message----- >> From: Zoltan Kiss [mailto:zoltan.kiss@linaro.org] >> Sent: Monday, July 27, 2015 12:38 PM >> To: Ananyev, Konstantin; Richardson, Bruce; dev@dpdk.org >> Subject: Re: [dpdk-dev] ixgbe vPMD RX functions and buffer number minimum requirement >> >> Hi Konstantin, >> >> Thanks! Another question I would have: why does _recv_raw_pkts_vec() >> insist on (nb_pkts > RTE_IXGBE_VPMD_RX_BURST)? Looking at the code it >> should be able to return packets when nb_pkts >= >> RTE_IXGBE_DESCS_PER_LOOP. > > Yes, that seems pretty trivial modification. > Don't know any good reason why it wasn't done that way. > >> The split_flags check in >> ixgbe_recv_scattered_pkts_vec() would be a bit more complicated, and >> therefore maybe would have a tiny performance overhead as well, but I >> don't it would be anything serious. > > I think, if the performance wouldn't be affected, that will be really useful change. > So it is definitely worth to try. > Probably even _recv_raw_pkts_vec() for first nb_pkts & ~(RTE_IXGBE_VPMD_RX_BURST - 1), > and then sort of scalar analog for the remainder. Ok, I'll give it a go. Another question, regarding performance: what setup you used to show a performance difference? I've tried to compare the vector function with the normal bulk alloc with receiving a 10 Gbps stream of 64 bytes UDP packets (and forward them out on the other port), but both yielded ~14 Mpps. I have a i5-4570 CPU @ 3.20GHz, maybe I should limit the clock speed? Regards, Zoltan > Konstantin > >> >> Regards, >> >> Zoltan >> >> >> On 24/07/15 17:43, Ananyev, Konstantin wrote: >>> Hi Zoltan, >>> >>>> -----Original Message----- >>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zoltan Kiss >>>> Sent: Friday, July 24, 2015 4:00 PM >>>> To: Richardson, Bruce; dev@dpdk.org >>>> Subject: [dpdk-dev] ixgbe vPMD RX functions and buffer number minimum requirement >>>> >>>> Hi, >>>> >>>> I was thinking how to handle the situation when you call >>>> rte_eth_rx_burst with less than RTE_IXGBE_VPMD_RX_BURST buffers. In >>>> ODP-DPDK unfortunately we can't force this requirement onto the calling >>>> application. >>>> One idea I had to check in ixgbe_recv_pkts_vec() if nb_pkts < >>>> RTE_IXGBE_VPMD_RX_BURST, and call ixgbe_recv_pkts_bulk_alloc in that >>>> case. Accordingly, in ixgbe_recv_scattered_pkts_vec() we could call >>>> ixgbe_recv_scattered_pkts() in this case. A branch predictor can easily >>>> eliminate the performance penalty of this, and applications can use >>>> whatever burst size feasible for them. >>>> The obvious problem could be whether you can mix the receive functions >>>> this way. I have a feeling it wouldn't fly, but I wanted to ask first >>>> before spending time investigate this option further. >>> >>> No, it is not possible to mix different RX functions, they setup/use ixgbe_rx_queue >>> fields in a different manner. >>> Konstantin >>> >>>> >>>> Regards, >>>> >>>> Zoltan