From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id AC5465936 for ; Wed, 22 Jul 2015 15:19:50 +0200 (CEST) Received: by wibxm9 with SMTP id xm9so163239600wib.0 for ; Wed, 22 Jul 2015 06:19:50 -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 :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WdWL7WwzTaR8z568hnOigphAG+CI874D1/tekDyDzdQ=; b=G7PMjrq+e8JJmaCF7x4d/TesA7dXNGO1SrOA6ESGbFFNO1KOOnkw4cgNwZRxMzjaN3 c2daeZmVa7JAukFy903cQGcJjlzcr1oC8ynmnBZCkf1CxiJffYpfSXpCmbbxmEdMb7+e kT7QvTEgOnGazdE2vTgod5nRFOldQCCKttk6mK0LdSEzUjeuM1FfL2QU9LvoW3Dr9ATZ uXUghOZpVuXjiFOLHoNv0aP3dAUyS+P9pTHv6osr15zM2ycdB+rCUit4BdJrDccfOaNp yZ8TuMTMC76bpJ+SaRY0W7AyTdt5ChNbzQNT447C7E8XDG940jyxX1DdzfY5Mi09NeBr K7eQ== X-Gm-Message-State: ALoCoQlTF4x8FITqPmTa8Oz70jl/pKXFxanHL2UheB87m6mff21RM4H7OBK3TWvgYg83kcNWeJml X-Received: by 10.180.14.101 with SMTP id o5mr6768910wic.82.1437571190487; Wed, 22 Jul 2015 06:19:50 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id ho10sm2379623wjb.39.2015.07.22.06.19.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 06:19:49 -0700 (PDT) Message-ID: <55AF9875.7010001@linaro.org> Date: Wed, 22 Jul 2015 14:19:49 +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: Bruce Richardson References: <1437492307-29754-1-git-send-email-bruce.richardson@intel.com> <1437556410-14102-1-git-send-email-bruce.richardson@intel.com> <55AF66B6.1000305@linaro.org> <20150722095946.GB11652@bricha3-MOBL3> In-Reply-To: <20150722095946.GB11652@bricha3-MOBL3> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] ixgbe: fix check for split packets 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, 22 Jul 2015 13:19:50 -0000 On 22/07/15 10:59, Bruce Richardson wrote: > On Wed, Jul 22, 2015 at 10:47:34AM +0100, Zoltan Kiss wrote: >> Hi, >> >> And what happens if someone changes RTE_IXGBE_VPMD_RX_BURST to something >> else than 32? I guess this bug were introduced when someone raised it from >> 16 to 32 > > Actually, no, this bug is purely due to me getting my maths wrong when I > wrote this function. The vector PMD has always worked in bursts of 32 at a > time. > >> I think you are better off with a for loop which uses this value. Or at >> least make a comment around RTE_IXGBE_VPMD_RX_BURST that if you change that >> value this check should be modified as well. > > The vector PMD always works off a fixed 32 burst size. Any change to that will > lead to many changes in the code, so I don't believe a loop is necessary. Ok, then I suggest to make a comment around RTE_IXGBE_VPMD_RX_BURST that changing it needs a lot of other changes in the code elsewhere, e.g in this split_flags check. Btw. vPMD was a bit misleading abbreviation for me, it took me a while until I realized 'v' stands for 'vector', not 'virtualization' as in most cases nowadays. > > Regards, > /Bruce > >> >> Regards, >> >> Zoltan >> >> On 22/07/15 10:13, Bruce Richardson wrote: >>> The check for split packets to be reassembled in the vector ixgbe PMD >>> was incorrectly only checking the first 16 elements of the array instead >>> of all 32. This is fixed by changing the uint32_t values to be uint64_t >>> instead. >>> >>> Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx") >>> >>> Reported-by: Zoltan Kiss >>> Signed-off-by: Bruce Richardson >>> >>> --- >>> V2: Rename variable from split_fl32 to split_fl64 to match type change. >>> --- >>> drivers/net/ixgbe/ixgbe_rxtx_vec.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c >>> index d3ac74a..f2052c6 100644 >>> --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c >>> +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c >>> @@ -549,10 +549,10 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, >>> return 0; >>> >>> /* happy day case, full burst + no packets to be joined */ >>> - const uint32_t *split_fl32 = (uint32_t *)split_flags; >>> + const uint64_t *split_fl64 = (uint64_t *)split_flags; >>> if (rxq->pkt_first_seg == NULL && >>> - split_fl32[0] == 0 && split_fl32[1] == 0 && >>> - split_fl32[2] == 0 && split_fl32[3] == 0) >>> + split_fl64[0] == 0 && split_fl64[1] == 0 && >>> + split_fl64[2] == 0 && split_fl64[3] == 0) >>> return nb_bufs; >>> >>> /* reassemble any packets that need reassembly*/ >>>