From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 3E553594B for ; Wed, 22 Jul 2015 11:47:36 +0200 (CEST) Received: by wibud3 with SMTP id ud3so146242039wib.1 for ; Wed, 22 Jul 2015 02:47:36 -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=qwe3ufE6Whs4eTb7F3jMIIX4XL0mms/cLmmzv1ZkMlE=; b=Aoan3lXlEWtG7ywJdYmwoJVgdJSKtHXiN7gL9JNQancT7LBNAmaotQm8L2qP43yFn0 X+e5fxheGrGD0IoystAwkg2e52J0jRKyQEwQMawMrX68lF+ozte7REApmHG3nYyBrIsR oRmJGqj9zvsHuh/lTE9rrQWN/M7Lx5Y4T/YdYgn1+H3StSeqfGwCTRGlGWIAr9TIJpSY dyHvUmoLD+HD/iQVQ13K/aGeeX5bAge1wYpLk3LqqVEKqVy+XgjE76YvnUfUdZw/VlTY 7MEBQ3v+BUeJl6jPYiwxeKIcSskYBVYZtsfvU36jre2FMy41E8Hzvfb6yCSQH5sjcnEc 3TNQ== X-Gm-Message-State: ALoCoQl7e5NYA+jqxKWBsH2hCRVed+/6CsTAWUSJXKHlSiX+la471DEz+vZI4iweMME7kOayKSYi X-Received: by 10.180.187.167 with SMTP id ft7mr39192608wic.26.1437558456030; Wed, 22 Jul 2015 02:47:36 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id fs8sm1499117wjb.7.2015.07.22.02.47.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 02:47:35 -0700 (PDT) Message-ID: <55AF66B6.1000305@linaro.org> Date: Wed, 22 Jul 2015 10:47:34 +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 , dev@dpdk.org References: <1437492307-29754-1-git-send-email-bruce.richardson@intel.com> <1437556410-14102-1-git-send-email-bruce.richardson@intel.com> In-Reply-To: <1437556410-14102-1-git-send-email-bruce.richardson@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 09:47:36 -0000 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 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. 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*/ >