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 DC487A04B7; Tue, 13 Oct 2020 13:32:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE1071D5C0; Tue, 13 Oct 2020 13:32:13 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 11FED1D3F0 for ; Tue, 13 Oct 2020 13:32:12 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id x7so14988341wrl.3 for ; Tue, 13 Oct 2020 04:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gpBfISbbpjdp4vCDgQe+6e3f6GQj8qQqqRKJ4laNUpI=; b=J5YdSS9CuKTSJVrxwCRs2nF7eCJ4smqHBSdU3oCk0flCl/Pyk0cR1A5TvmtFuvPQGG zTr1AaAuMIIi4GWBnkVsZNrMdmyKrihR/gvLI4JclsKCenB6ZdEakXALMbaRjaUl288Z bKs32CjhdWmYTmemu6rgR0c30eQt4CtJjWh6ePTmnuYChE9yLPrP4hfF+g54DIB1h7Ct 9fitWAizompTgysyNBCTsRX5udm08gJe9xEY4YX8IidATz9wxuAd+1mJVrDHhfuVVPzf 7X0fRZ/vOVex8n6ujrnCEAyb0NaCY0fg4C0R6ZggZK7LyErZmML3hhNuYy6h8pGamKcg a5qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gpBfISbbpjdp4vCDgQe+6e3f6GQj8qQqqRKJ4laNUpI=; b=Gjmjjcff8HQj6jmugJF5eMRsiLXB/W1KMi2WE69bi3UVBSP3DgdDD3CAUzrJtqIuAE iM1RJWxw9bbzjxVilKkPTyCxP89N48PAdI9iJLjVFTB+n7/RDnLCq+rdxzliDGVIEff8 R+HiKuxnmpljtDEsUvj7Nqb7MsH9O8HL7mY1cdwAI9ptUMVTuJsSvSp8UgK8zM0gGpad nGx3kpDXRDGCBmBLdata/imLwaYvBO8aTsc7p8D1s03lrqCS0K1BHjQZ0A6zo64TR2QC t6Mz69Cjjle9byi7rAXo/IrFQLd9vMtQ6FcB35/kpugicnoeGxyDmA/GXy/dTL/B9syr JLgQ== X-Gm-Message-State: AOAM532ydKSQaK4d9DWKQPLEiZD+PlKqy1uu/Gdy9gXVEQRYrFB7Ieq7 vxpqQ9XH0VPsU1mFrbHXvrq1KA== X-Google-Smtp-Source: ABdhPJybdZvQ0W1LGOPMVclo0iDm4ezI8cnEXl/dIiLhHiP7Bqj09Gs3/G/VZ/ljNyRL3feMkXe3mg== X-Received: by 2002:adf:a557:: with SMTP id j23mr11773898wrb.95.1602588730721; Tue, 13 Oct 2020 04:32:10 -0700 (PDT) Received: from 6wind.com (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0]) by smtp.gmail.com with ESMTPSA id v3sm29818272wre.17.2020.10.13.04.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 04:32:09 -0700 (PDT) Date: Tue, 13 Oct 2020 13:32:09 +0200 From: Olivier Matz To: Ciara Power Cc: dev@dpdk.org, viktorin@rehivetech.com, ruifeng.wang@arm.com, jerinj@marvell.com, drc@linux.vnet.ibm.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, Jasvinder Singh Message-ID: <20201013113209.GN21395@platinum> References: <20200807155859.63888-1-ciara.power@intel.com> <20201013110437.309110-1-ciara.power@intel.com> <20201013110437.309110-17-ciara.power@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201013110437.309110-17-ciara.power@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v5 16/17] net: 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 Tue, Oct 13, 2020 at 12:04:36PM +0100, 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. > > The vector path was initially chosen in RTE_INIT, however this is no > longer suitable as we cannot check the max SIMD bitwidth at that time. > Default handlers are now chosen in RTE_INIT, these default handlers > are used the first time the crc calc is called, and they set the suitable > handlers to be used going forward. > > Suggested-by: Jasvinder Singh > Suggested-by: Olivier Matz > > Signed-off-by: Ciara Power > [...] > --- a/lib/librte_net/rte_net_crc.h > +++ b/lib/librte_net/rte_net_crc.h > @@ -7,6 +7,8 @@ > > #include > > +#include > + > #ifdef __cplusplus > extern "C" { > #endif > @@ -25,6 +27,12 @@ enum rte_net_crc_alg { > RTE_NET_CRC_NEON, > }; > > +extern int libnet_logtype; > + > +#define NET_LOG(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n", \ > + __func__, ## args) > + > /** > * This API set the CRC computation algorithm (i.e. scalar version, > * x86 64-bit sse4.2 intrinsic version, etc.) and internal data We should expose this log macro and log type in a public header file. It can stay in the .c file. In the future, we may want to expose it in a private header, but not in a public API. Regards, Olivier