From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 4633D2B9E for ; Thu, 5 Oct 2017 11:40:34 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 05 Oct 2017 02:40:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,481,1500966000"; d="scan'208";a="1202508367" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 05 Oct 2017 02:40:32 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 5 Oct 2017 10:40:32 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX156.ger.corp.intel.com ([169.254.3.33]) with mapi id 14.03.0319.002; Thu, 5 Oct 2017 10:40:32 +0100 From: "Ananyev, Konstantin" To: "Li, Xiaoyun" , "Richardson, Bruce" CC: "Lu, Wenzhuo" , "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [PATCH v6 3/3] efd: run-time dispatch over x86 EFD functions Thread-Index: AQHTPWSY4QPXzC6sG0+baSpEZVC/BaLVALpw Date: Thu, 5 Oct 2017 09:40:31 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAA48E8@IRSMSX103.ger.corp.intel.com> References: <1507042796-86318-1-git-send-email-xiaoyun.li@intel.com> <1507157911-8702-1-git-send-email-xiaoyun.li@intel.com> <1507157911-8702-4-git-send-email-xiaoyun.li@intel.com> In-Reply-To: <1507157911-8702-4-git-send-email-xiaoyun.li@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzkwZGU5MjctYzFkMy00MTZhLWI5OWYtZTUxOTZhNDdkNDMxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IitkVG84YklKZzlXbWg5MnRKdWc0UENzdkZIZzFJS1FLVGdwNDdjK0JOeFE9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 3/3] efd: run-time dispatch over x86 EFD functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 09:40:35 -0000 > +efd_value_t > +efd_lookup_internal_avx2(const efd_hashfunc_t *group_hash_idx, > + const efd_lookuptbl_t *group_lookup_table, > + const uint32_t hash_val_a, const uint32_t hash_val_b) > +{ > +#ifdef CC_SUPPORT_AVX2 > + efd_value_t value =3D 0; > + uint32_t i =3D 0; > + __m256i vhash_val_a =3D _mm256_set1_epi32(hash_val_a); > + __m256i vhash_val_b =3D _mm256_set1_epi32(hash_val_b); > + > + for (; i < RTE_EFD_VALUE_NUM_BITS; i +=3D 8) { > + __m256i vhash_idx =3D > + _mm256_cvtepu16_epi32(EFD_LOAD_SI128( > + (__m128i const *) &group_hash_idx[i])); > + __m256i vlookup_table =3D _mm256_cvtepu16_epi32( > + EFD_LOAD_SI128((__m128i const *) > + &group_lookup_table[i])); > + __m256i vhash =3D _mm256_add_epi32(vhash_val_a, > + _mm256_mullo_epi32(vhash_idx, vhash_val_b)); > + __m256i vbucket_idx =3D _mm256_srli_epi32(vhash, > + EFD_LOOKUPTBL_SHIFT); > + __m256i vresult =3D _mm256_srlv_epi32(vlookup_table, > + vbucket_idx); > + > + value |=3D (_mm256_movemask_ps( > + (__m256) _mm256_slli_epi32(vresult, 31)) > + & ((1 << (RTE_EFD_VALUE_NUM_BITS - i)) - 1)) << i; > + } > + > + return value; > +#else > + RTE_SET_USED(group_hash_idx); > + RTE_SET_USED(group_lookup_table); > + RTE_SET_USED(hash_val_a); > + RTE_SET_USED(hash_val_b); > + /* Return dummy value, only to avoid compilation breakage */ > + return 0; > +#endif > + > +} #ifdef CC_SUPPORT_AVX2 is still there. Will wait for v7 I guess. Konstantin