From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B606A04BB; Tue, 6 Oct 2020 14:17:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CD5D4C8E; Tue, 6 Oct 2020 14:17:17 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F0F1C2BC7 for ; Tue, 6 Oct 2020 14:17:15 +0200 (CEST) IronPort-SDR: /oDGnvjPhf5vkdbcPOOtVLBsNpFkyKuIQmUJ5WjCRriI30XfQWhkNMwsZ0MitTerUHa+T4onju aT91W9W4NkYg== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="228601332" X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208,217";a="228601332" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 05:17:13 -0700 IronPort-SDR: 3Z06BZuFG66uGhbwaThUDpKW+YNZWQPwVdwWfNPX8GcY/fDfxFE2yt7RtEMrmifdNxdMrRdBCZ vsdenJpVMrqw== X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208,217";a="460774795" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.213.193.227]) ([10.213.193.227]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 05:17:13 -0700 To: Ciara Power , dev@dpdk.org References: <20200807155859.63888-1-ciara.power@intel.com> <20200930130415.11211-1-ciara.power@intel.com> <20200930130415.11211-15-ciara.power@intel.com> From: David Hunt Message-ID: <98a66eb2-b6da-97c7-01b3-7e8c58eaefb2@intel.com> Date: Tue, 6 Oct 2020 13:17:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20200930130415.11211-15-ciara.power@intel.com> Content-Language: en-GB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 14/18] distributor: add checks for max SIMD bitwidth 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Ciara, On 30/9/2020 2:04 PM, Ciara Power wrote: > When choosing a vector path to take, an extra condition must be > satisfied to ensure the max SIMD bitwidth allows for the CPU enabled > path. > > Cc: David Hunt > > Signed-off-by: Ciara Power > --- > lib/librte_distributor/rte_distributor.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c > index 1c047f065a..9f0a9b1d48 100644 > --- a/lib/librte_distributor/rte_distributor.c > +++ b/lib/librte_distributor/rte_distributor.c > @@ -636,7 +636,8 @@ rte_distributor_create(const char *name, > > d->dist_match_fn = RTE_DIST_MATCH_SCALAR; > #if defined(RTE_ARCH_X86) > - d->dist_match_fn = RTE_DIST_MATCH_VECTOR; > + if (rte_get_max_simd_bitwidth() >= RTE_MAX_128_SIMD) > + d->dist_match_fn = RTE_DIST_MATCH_VECTOR; > #endif > > /* Acked-by: David Hunt