From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0A430C592 for ; Tue, 28 Jul 2015 10:49:43 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 28 Jul 2015 01:49:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,561,1432623600"; d="scan'208";a="736981292" Received: from shwdeisgchi017.ccr.corp.intel.com (HELO [10.239.66.47]) ([10.239.66.47]) by orsmga001.jf.intel.com with ESMTP; 28 Jul 2015 01:49:40 -0700 Message-ID: <55B74224.3060505@intel.com> Date: Tue, 28 Jul 2015 16:49:40 +0800 From: "Liang, Cunming" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Ananyev, Konstantin" , Zoltan Kiss , "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: Tue, 28 Jul 2015 08:49:44 -0000 Hi, On 7/28/2015 8:10 AM, 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. It's true, looks too strict condition check. I tend to set "nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP)" instead. And do loop in "pos < nb_pkts" manner. > >> 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. > 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