From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by dpdk.org (Postfix) with ESMTP id 8AE954AC7 for ; Wed, 16 Mar 2016 08:51:54 +0100 (CET) Received: by mail-vk0-f51.google.com with SMTP id e6so51731256vkh.2 for ; Wed, 16 Mar 2016 00:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=IyRU9N55GP2rwaJSiKteY/MbKOQ57tRyLShTzVbuDaI=; b=VOv5GZRkc9Q2NMu2qPVcJGhXTqupjoYccZqgXmrUcRCC55S0lwdiSBja7V4Vzux3Df 01DTz5U9FdWC5+DxaK7HytmVOTzg+BQdRSsmomDWFyRc2biNjInmFFN3bxvMdi1fLG4z gmE508wnqjdP9q5J8Hud4jWuOsRt06ARSe4Kg= 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:date :message-id:subject:from:to:cc; bh=IyRU9N55GP2rwaJSiKteY/MbKOQ57tRyLShTzVbuDaI=; b=ZwO/2XZ8latbJHID1GGlzHB23QJpZuBT03rQl6spQvXC72by1D35nCmO4/mkDqrJ+o dUfYfrgBeUKCZKP2sHIVPtnCck9o6PzsjNZ7slcwHi6WWxa0278OIT+aY8z9C+pcRxdW Fs6vUTkwP39H/KaJA1ZjLjBMwhvEZOvfNJtZjmiYKUOdX+VwrTAnrjZq0qu6WGuJDVAM 37phs+7exE5e7Q1YMd5oLb6bPfBQ4PO68xCjMZ5dx3qBI8gZGA8kAkZAkSGLRgENMRv6 eQ/Ysrl5oQTTtDc1yOMWE7u9mkkZJFSSBNDv6RBC5CBSpWerXuSYS9cacVOsmdXle3CV QQNg== X-Gm-Message-State: AD7BkJJTquL5ouF9YnTwWg2SayJn5sR6+K+jUp6/cqDJlU9m+HNHiyD6WPsTx/6hup49hjoHhMBmT1ZVQQ2PcoFM MIME-Version: 1.0 X-Received: by 10.31.54.194 with SMTP id d185mr2355389vka.130.1458114714044; Wed, 16 Mar 2016 00:51:54 -0700 (PDT) Received: by 10.31.65.208 with HTTP; Wed, 16 Mar 2016 00:51:53 -0700 (PDT) In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09090343BBF2@shsmsx102.ccr.corp.intel.com> References: <1457965558-15331-1-git-send-email-jianbo.liu@linaro.org> <6A0DE07E22DDAD4C9103DF62FEBC09090343BBF2@shsmsx102.ccr.corp.intel.com> Date: Wed, 16 Mar 2016 15:51:53 +0800 Message-ID: From: Jianbo Liu To: "Lu, Wenzhuo" Cc: "Zhang, Helin" , "Ananyev, Konstantin" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] ixgbe: avoid unnessary break when checking at the tail of rx hwring 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, 16 Mar 2016 07:51:54 -0000 Hi Wenzhuo, On 16 March 2016 at 14:06, Lu, Wenzhuo wrote: > HI Jianbo, > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jianbo Liu >> Sent: Monday, March 14, 2016 10:26 PM >> To: Zhang, Helin; Ananyev, Konstantin; dev@dpdk.org >> Cc: Jianbo Liu >> Subject: [dpdk-dev] [PATCH] ixgbe: avoid unnessary break when checking at the >> tail of rx hwring >> >> When checking rx ring queue, it's possible that loop will break at the tail while >> there are packets still in the queue header. > Would you like to give more details about in what scenario this issue will be hit? Thanks. > vPMD will place extra RTE_IXGBE_DESCS_PER_LOOP - 1 number of empty descriptiors at the end of hwring to avoid overflow when do checking on rx side. For the loop in _recv_raw_pkts_vec(), we check 4 descriptors each time. If all 4 DD are set, and all 4 packets are received.That's OK in the middle. But if come to the end of hwring, and less than 4 descriptors left, we still need to check 4 descriptors at the same time, so the extra empty descriptors are checked with them. This time, the number of received packets is apparently less than 4, and we break out of the loop because of the condition "var != RTE_IXGBE_DESCS_PER_LOOP". So the problem arises. It is possible that there could be more packets at the hwring beginning that still waiting for being received. I think this fix can avoid this situation, and at least reduce the latency for the packets in the header. Thanks! Jianbo