From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1989C5A44 for ; Tue, 21 Jul 2015 17:17:22 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 21 Jul 2015 08:17:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,516,1432623600"; d="scan'208";a="732805903" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.62]) by orsmga001.jf.intel.com with SMTP; 21 Jul 2015 08:17:16 -0700 Received: by (sSMTP sendmail emulation); Tue, 21 Jul 2015 16:17:14 +0025 Date: Tue, 21 Jul 2015 16:17:14 +0100 From: Bruce Richardson To: Zoltan Kiss Message-ID: <20150721151714.GA5712@bricha3-MOBL3> References: <55AE60C7.8050406@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55AE60C7.8050406@linaro.org> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] ixgbe_recv_scattered_pkts_vec split_flags question 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, 21 Jul 2015 15:17:23 -0000 On Tue, Jul 21, 2015 at 04:09:59PM +0100, Zoltan Kiss wrote: > Hi, > > I have a question regarding split_flags in this question. It's defined as an > array of 1 byte unsigned ints: > > uint8_t split_flags[RTE_IXGBE_VPMD_RX_BURST] = {0}; > > RTE_IXGBE_VPMD_RX_BURST is 32, so it will be 32 bytes. Then we cast it into > a pointer for 4 byte values, and check the first 4 elements of that array > > const uint32_t *split_fl32 = (uint32_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) > > So we only check the first half of this 32 byte array. But > _recv_raw_pkts_vec() seems to use the whole array. Is this a bug or a > feature? Or am I mistaken in the math somewhere? > > Regards, > > Zoltan Kiss Yes, you are right, this does look like a bug. The uint32_t's should probably be uint64_t's. :-( /Bruce