From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id BEBD83B5 for ; Tue, 8 Mar 2016 21:00:49 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id l68so148151346wml.0 for ; Tue, 08 Mar 2016 12:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Emz4yfOOhm6LtJhkMlkHs1/0TpMO7lnv1kNlwi/EZ7s=; b=CxDVdox1UOzmVY4OqTWFsxG07PJJ/hd+1D1fIJdrdqnxq7mvxe56ER+TXCcZAF8pf2 htEIKudiF2n6GgnwKvmiD66pSnHFAVAna8TvnhwkucAM91VGJYwbrtqAZH80X9p+C2Fa M115N8AXbxOLYjmXgBAs13SOjIFsUxeIMiHe5egbesy3Qd6LmuyICxRbY3ofnpWrCIut fdAZV9kU2rAIx5DUNKZK7tWCHqjB4fSLE7vJh1q1ULCBqqKRDUjQBxbtd+Lq7+033XHt Q7MgGDoSRlePaJ/LAcJN31dxepEZ1pdcjYNZb4RtMib7Rkje5YTDXZZF3YNNSoSzTteW 97sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=Emz4yfOOhm6LtJhkMlkHs1/0TpMO7lnv1kNlwi/EZ7s=; b=Ej2WiJpdGKlU8MU+gZxURwTavROfcDtWaC9iOSXpVghK3/2/jv0MHKUxCaOoDWjFri juZW5U1pjMmswVCDv0TlXYUf9cHppAoBhWqmiMLdkrLCg3jHE7i7hNTD17IdBEf1bhFb WbEKpIGSuKyBWlXyoSfo6+Z9DnScqQgx8WqqwfROvry++QD1wIaJRHaVuDNGtDfa86Zd X6yQoSPzmNPCAjfKFaD2oDtesaPQ0XzcUIhz/OxCLk78TGfxww2+K52J7HAQrWykZKpz 1YOL9qbydvWooQ5wPA9lCPJQiUErhx6Kzc7kx71pOL4zNSWM42kxVuNOD0TVvlotXwv7 6Wfg== X-Gm-Message-State: AD7BkJKjqkpyPJ4WnL2JucyUUw2qciQCbAm3drNU4f+nM8q2lzBm1vEViJxqt+frbf3O0qov X-Received: by 10.28.174.8 with SMTP id x8mr21686392wme.49.1457467249579; Tue, 08 Mar 2016 12:00:49 -0800 (PST) Received: from xps13.localnet (171.36.101.84.rev.sfr.net. [84.101.36.171]) by smtp.gmail.com with ESMTPSA id g126sm20346468wmf.16.2016.03.08.12.00.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2016 12:00:44 -0800 (PST) From: Thomas Monjalon To: Liming Sun Date: Tue, 08 Mar 2016 20:59:06 +0100 Message-ID: <1561679.Mbe3omy2mz@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1455077070-6666-1-git-send-email-lsun@ezchip.com> References: <1452263948-22485-1-git-send-email-lsun@ezchip.com> <1455077070-6666-1-git-send-email-lsun@ezchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 1/2] eal/tile: add rte_vect.h and enable CONFIG_RTE_LIBRTE_LPM 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, 08 Mar 2016 20:00:49 -0000 2016-02-09 23:04, Liming Sun: > rte_vect.h was missing earlier thus LPM was disabled and l3fwd is > not able to compile. This commit implements the vector api and > enable LPM in the tilegx configuration by default. > > Signed-off-by: Liming Sun > Acked-by: Zhigang Lu [...] > # This following libraries are not available on the tile architecture. > # So they're turned off. > -CONFIG_RTE_LIBRTE_LPM=n > +CONFIG_RTE_LIBRTE_LPM=y You just have to remove the disabling line. > +typedef union rte_xmm { > + __m128i x; > + uint32_t u32[XMM_SIZE / sizeof(uint32_t)]; > + uint64_t u64[XMM_SIZE / sizeof(uint64_t)]; > +} rte_xmm_t; Why do you mimic SSE? > +/* Shifts right the 4 32-bit integers by count bits with zeros. */ > +#define _mm_srli_epi32(v, cnt) ({ \ > + rte_xmm_t m; \ > + m.u64[0] = __insn_v4shru(((rte_xmm_t*)&(v))->u64[0], cnt); \ > + m.u64[1] = __insn_v4shru(((rte_xmm_t*)&(v))->u64[1], cnt); \ > + (m.x); \ > +}) Please check the work in progress to have arch-specific implementation of rte_lpm_lookupx4(): http://dpdk.org/dev/patchwork/patch/10478/