From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 48D9118F for ; Thu, 7 Aug 2014 18:11:51 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 07 Aug 2014 09:14:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,819,1400050800"; d="scan'208";a="581500133" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 07 Aug 2014 09:13:48 -0700 Received: from irsmsx109.ger.corp.intel.com (163.33.3.23) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 7 Aug 2014 17:13:45 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.240]) by IRSMSX109.ger.corp.intel.com ([169.254.13.200]) with mapi id 14.03.0195.001; Thu, 7 Aug 2014 17:13:45 +0100 From: "Ananyev, Konstantin" To: Neil Horman Thread-Topic: [dpdk-dev] [PATCH] librte_acl make it build/work for 'default' target Thread-Index: AQHPsZ+kYDcgZzs5/Euw9uO4fMunBZvD2/IAgAF0wrA= Date: Thu, 7 Aug 2014 16:13:44 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725821352032@IRSMSX105.ger.corp.intel.com> References: <1407347625-24646-1-git-send-email-konstantin.ananyev@intel.com> <20140806185524.GB23133@hmsreliant.think-freely.org> In-Reply-To: <20140806185524.GB23133@hmsreliant.think-freely.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] librte_acl make it build/work for 'default' target 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: Thu, 07 Aug 2014 16:11:51 -0000 > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Wednesday, August 06, 2014 7:55 PM > To: Ananyev, Konstantin > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] librte_acl make it build/work for 'defaul= t' target >=20 > On Wed, Aug 06, 2014 at 06:53:45PM +0100, Konstantin Ananyev wrote: > > Make ACL library to build/work on 'default' architecture: > > - make rte_acl_classify_scalar really scalar > > (make sure it wouldn't use sse4 instrincts through resolve_priority())= . > > - Provide two versions of rte_acl_classify code path: > > rte_acl_classify_sse() - could be build and used only on systems with= sse4.2 > > and upper, return -ENOTSUP on lower arch. > > rte_acl_classify_scalar() - a slower version, but could be build and = used > > on all systems. > > - rte_acl_classify() - becomes just a macro pointing to one of the func= tions > > mentioned abovei (highest avaialbe version at build time). > > - keep code common for both version code. > > > > Signed-off-by: Konstantin Ananyev > > --- > > lib/librte_acl/acl_bld.c | 5 +- > > lib/librte_acl/acl_match_check.def | 92 +++++ > > lib/librte_acl/acl_run.c | 692 ++++-------------------------= -------- > > lib/librte_acl/acl_run_sse.h | 629 +++++++++++++++++++++++++++++= ++++ > > lib/librte_acl/rte_acl.h | 12 +- > > 5 files changed, 806 insertions(+), 624 deletions(-) > > create mode 100644 lib/librte_acl/acl_match_check.def > > create mode 100644 lib/librte_acl/acl_run_sse.h > > > This is still compile time selected. You've gone to all the trouble to s= eparate > the scalar and sse vector paths. Why not make it run time selectable bas= ed on > cpu testing? Just because its built for the default machine doesn't mean= it > will run on the default machine. We may as well take advantage of the fa= ster > paths when we're able. >=20 Yes, it is possible to make selection at run-time... Though I suppose it might add some overhead (extra call (or jump), etc.).=20 But ok, I'll see what I can do. Konstantin