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 D9D38A04DE; Fri, 30 Oct 2020 17:50:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7BC365947; Fri, 30 Oct 2020 17:50:19 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id B94DD5946 for ; Fri, 30 Oct 2020 17:50:18 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 5D98C58065B; Fri, 30 Oct 2020 12:50:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 30 Oct 2020 12:50:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 1zaojIdeQPXvBH0iHezPXpKv1ZExAvymOcie+L58GqQ=; b=ZO7y7BX+ZB6SpFCf neuMJ/msRI2UzczIp/Bmr8tUDyaT0xOReniBVREK2y3JUSAymw8jyrzAoZEhstLK ZjmtC4pN5mdozG+2ylIGH39f/abn466TZMF9yvwu7VW3PU3tOApQp12BGuegMb+x eMZ8vL+llt2LnhhRFyEHHr0+K4gzXrMLn/YUmgb0EfR4q++nDeiedj7mZYtKEhNp IjVW6RxdYNvXUDFgSiw8lNq7TyWWmZgdhPkegG3+ePNvquTkLI7QnBem9WexCiqy g+VWArEEi+7XIs9QX7VfQStZeYRhv1/uz4MhAhTBTJrHVEcFAo3nAqz8r3J0lLrl JiUyKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=1zaojIdeQPXvBH0iHezPXpKv1ZExAvymOcie+L58G qQ=; b=nLnifIJ/3t5D2utT7JYL5ZP2dQpMaUVt4fhjuK1tVAWWekq3obB1r3HsG wLK92bCOKR+KSnCrHIGAI9kgNIVDTTFsmONvuw0OZQDidUIt1DeUBH4wvL3cXP04 1h5TNbcz/dnfD1mOQ/CMhm6sL01O9Lau0/7UMRURSitMKiVYEK4kQXyqbFcwZjq0 IwJeJJR+A9ULiLxShCEpwfblxbNJofbtOuzO+STKbn9a8SeNTwtBO1E4luYP7lb1 khyVw9+pJu7vwBKxUE/W+40TLRmmtnq0Q0/3Y2KDvsI6SeTfIhMOcldP2LS5vOYz R4y48CEK6yjJ68d85JHNmrqG9G8+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleehgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeehteff vdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefgedrvd dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 74B5B3064685; Fri, 30 Oct 2020 12:50:10 -0400 (EDT) From: Thomas Monjalon To: "Burakov, Anatoly" Cc: David Marchand , Liang Ma , dev , "Ruifeng Wang (Arm Technology China)" , "Wang, Haiyue" , Bruce Richardson , "Ananyev, Konstantin" , David Hunt , Jerin Jacob , Neil Horman , Timothy McDaniel , Gage Eads , Marcin Wojtas , Guy Tzalik , Ajit Khaparde , Harman Kalra , John Daley , "Wei Hu (Xavier)" , Ziyang Xuan , Matan Azrad , Yong Wang , Jerin Jacob , Jan Viktorin , David Christensen , Ray Kinsella , john.mcnamara@intel.com Date: Fri, 30 Oct 2020 17:50:09 +0100 Message-ID: <2254050.zuNrctdbmt@thomas> In-Reply-To: <04906abb-cb4e-ab18-cda5-ef0ea244db0f@intel.com> References: <1603494392-7181-1-git-send-email-liang.j.ma@intel.com> <6443192.ivzhVBn1yn@thomas> <04906abb-cb4e-ab18-cda5-ef0ea244db0f@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v10 3/9] eal: add intrinsics support check infrastructure 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" 30/10/2020 17:36, Burakov, Anatoly: > On 30-Oct-20 3:44 PM, Thomas Monjalon wrote: > > 30/10/2020 16:27, Burakov, Anatoly: > >> On 30-Oct-20 2:09 PM, Thomas Monjalon wrote: > >>> 30/10/2020 14:37, Burakov, Anatoly: > >>>> On 30-Oct-20 10:14 AM, Thomas Monjalon wrote: > >>>>> 30/10/2020 11:09, Burakov, Anatoly: > >>>>>> The intended usage here is to call this function before calling > >>>>>> rte_power_monitor(), such that: > >>>>>> > >>>>>> struct rte_cpu_intrinsics intrinsics; > >>>>>> > >>>>>> rte_cpu_get_intrinsics_support(&intrinsics); > >>>>>> > >>>>>> if (!intrinsics.power_monitor) { > >>>>>> // rte_power_monitor not supported and cannot be used > >>>>>> return; > >>>>>> } > >>>>> [...] > >>> In your example above, you do not call rte_cpu_get_features() > >>> which is documented as required in the EAL doc. > >>> > >> > >> I'm not sure i follow. This is unrelated to rte_cpu_get_features call. > >> The rte_cpu_get_features is a CPUID check, and it was decided not to use > >> it because the WAITPKG CPUID flag is only defined for x86 and not for > >> other archs. This new call (rte_cpu_get_intrinsics_support) is non-arch > >> specific, but will have an arch-specific implementation (which happens > >> to use rte_cpu_get_features to detect support for WAITPKG). I have given > >> the example code of how to detect support for rte_power_monitor using > >> this new code, in the code example you just referred to. > > > > Please read the API again: > > http://git.dpdk.org/dpdk/tree/lib/librte_eal/include/generic/rte_power_intrinsics.h > > " > > * @warning It is responsibility of the user to check if this function is > > * supported at runtime using `rte_cpu_get_features()` API call. > > * Failing to do so may result in an illegal CPU instruction error. > > " > > Why is it referring to rte_cpu_get_features? > > Aw, crap. You're right, it's an artifact of earlier implementation. > We'll fix this. Thanks for letting us know! This is what happens when everybody pushes me to merge a patch that I believe not ready but with a lot of "acked but not reviewed". The context around this patch series is not good to allow good quality. That's why I think we should not merge any more patch on top of it except DLB PMDs and fixes in this release.