From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hunt, David" Subject: Re: [PATCH v10 02/18] lib: create private header file Date: Thu, 16 Mar 2017 10:43:08 +0000 Message-ID: References: <1488791433-186137-2-git-send-email-david.hunt@intel.com> <1489558767-56329-1-git-send-email-david.hunt@intel.com> <1489558767-56329-3-git-send-email-david.hunt@intel.com> <11064293.gTtyHWn9o3@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, bruce.richardson@intel.com, nelio.laranjeiro@6wind.com To: Thomas Monjalon Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C762B37B0 for ; Thu, 16 Mar 2017 11:43:11 +0100 (CET) In-Reply-To: <11064293.gTtyHWn9o3@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 15/3/2017 5:18 PM, Thomas Monjalon wrote: > 2017-03-15 06:19, David Hunt: >> +/** >> + * Number of packets to deal with in bursts. Needs to be 8 so as to >> + * fit in one cache line. >> + */ >> +#define RTE_DIST_BURST_SIZE (sizeof(rte_xmm_t) / sizeof(uint16_t)) > error: 'rte_xmm_t' undeclared here (arm compilation) > > Can it be fixed by including rte_vect.h? > > Ideally I would prefer we stop using XMM types in a generic code. > XMM are x86-only registers. It has been translated for other arches > but we should use a more generic name. > > What was the intention here? SSE-optimized code or 128-bit size? > Please check lib/librte_eal/common/include/generic/rte_vect.h > for a generic type. Thomas, Including rte_vect.h does indeed resolve the issue. I had originally had "#define RTE_DIST_BURST_SIZE 8" but thought that latest definition would give further clarity as to why it's set to 8. There are 2 reasons. 1. The vector instruction I use for the matching works on 8 uint16s at a time 2. The (x86) cache lines communicating with the worker cores fit 8 mbuf pointers at a time. So there are 2 options to resolve: 1. #include at the top of rte_distributor_private.h 2. revert back to "#define RTE_DIST_BURST_SIZE 8" Personally, I'd probably lean towards option 2 (with additional comment) , as it removes the mention of xmm from the generic header file, as well as being valid for both reasons, whereas the xmm #define really only helps to explain one reason. Do you have any preference? Let me know and I can push up a v11. Regards, Dave. P.S. Suggested change: /* * Transfer up to 8 mbufs at a time to/from workers, and * flow matching algorithm optimised for 8 flow IDs at a time */ #define RTE_DIST_BURST_SIZE 8