From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20B72A00C2 for ; Wed, 17 Mar 2021 10:33:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF20A40687; Wed, 17 Mar 2021 10:33:39 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id EF7AF40687; Wed, 17 Mar 2021 10:33:37 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 99EAD5C00EB; Wed, 17 Mar 2021 05:33:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 17 Mar 2021 05:33:36 -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=fm3; bh= YyPTbosBwJu78nSqZsyHZ8ZGlrdfzMDY/WQl+w8FT2I=; b=hIrqDykMBKOB2TBt ABgFUAxfXKFj2pcFRiGYoCtcf0dWp64hZ8Phklbqgqgdt2FSHhhaMTtjGmIj5tmb P5bnVtOJLz7pV0xQnI1kR/mgyaavE0xd1ZGnviU2d6tZ94hmHg0mwoYNxfVUdiIz 9f9KzoO4jhmmRc/iWogoQ8yHcvlST/6QVuneQM8q3v06S5Y2Qhbl3cUlKMcTilxc HGBa05VBXd1+czjbabJ/DWhzvXQTSDRJ6iRkW8qlD7qI1DxjFNtOwA0rPqio7hSk q7kzHojxO2bswPrNHwgaG3eOhfwO5F3XIGFhUtgW7Okv2actqrN42l17ZUK1u6ry T9DWbQ== 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=fm2; bh=YyPTbosBwJu78nSqZsyHZ8ZGlrdfzMDY/WQl+w8FT 2I=; b=quw5UL/SXiUELs7Rrrb3nyevgoQ/5ferl81pO3qUDOxSj2qXUk5GMdqKH 8hTQPkWch8/U8nJfkdOWp1OwwDUW1iE0nwQmCGfJHpH8b3kRFD/t0NQp5ODSZH46 mlhYtvTMx85V5AG/QvsvGw1LU+PUBjLacyQ/1hyxr4BewweEtJF02l1CePdjOJA8 km/O2A4RQDFvXPYXmk54mJ0386EqGPuQDhkEPJLGiDtnePrPzejPqqYmCp1drXwX AbmWnZr7zjj4RVYTwisbA8xEH3RXF88vG9lDYmXWChuJKdLLllr0GAibsEGuj0xw pkh1oTGMqlPPlzbC8vnDsFdaIUsQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepffdvffejueetleefieeludduuefgteejleevfeekjeefieegheet ffdvkeefgedunecuffhomhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrd dvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 BABF2108005C; Wed, 17 Mar 2021 05:33:34 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson , David Marchand Cc: dev , Ray Kinsella , Kevin Laatz , dpdk stable Date: Wed, 17 Mar 2021 10:33:32 +0100 Message-ID: <4276154.ZrgpHEazGl@thomas> In-Reply-To: References: <20210205193933.410011-1-bruce.richardson@intel.com> <20210216151329.290332-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v2] eal: fix querying DPDK version at runtime X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 17/03/2021 09:40, David Marchand: > On Tue, Feb 16, 2021 at 4:13 PM Bruce Richardson > wrote: > > > > For using a DPDK application, such as OVS, which is dynamically linked, the > > DPDK version in use should always report the actual version, not the > > version used at build time. This incorrect behaviour can be seen by > > building OVS against one version of DPDK and running it against a later > > one. Using "ovs-vsctl list Open_vSwitch" to query basic info, the > > dpdk_version returned will be the build version not the currently running > > one - which can be verified using the DPDK telemetry library client. > > > > $ sudo ovs-vsctl list Open_vSwitch | grep dpdk_version > > dpdk_version : "DPDK 20.11.0-rc4" > > > > $ echo quit | sudo dpdk-telemetry.py > > Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 > > {"version": "DPDK 21.02.0-rc2", "pid": 405659, "max_output_len": 16384} > > --> > > > > To fix this, we need to convert the rte_version() function, and any other > > necessary parts of the rte_version.h, to be actual functions in EAL, not > > just inlines/macros. The only complication in doing so is that telemetry > > library cannot call rte_version() directly, and instead needs the version > > string passed in on init. > > > > Fixes: af75078fece3 ("first public release") > > Cc: stable@dpdk.org > > > > diff --git a/lib/librte_eal/include/rte_version.h b/lib/librte_eal/include/rte_version.h > > index f7a3a1ebc..2f3f727b4 100644 > > --- a/lib/librte_eal/include/rte_version.h > > +++ b/lib/librte_eal/include/rte_version.h > > @@ -28,38 +28,47 @@ extern "C" { > > * All version numbers in one to compare with RTE_VERSION_NUM() > > */ > > #define RTE_VERSION RTE_VERSION_NUM( \ > > - RTE_VER_YEAR, \ > > - RTE_VER_MONTH, \ > > - RTE_VER_MINOR, \ > > - RTE_VER_RELEASE) > > + rte_version_year(), \ > > + rte_version_month(), \ > > + rte_version_minor(), \ > > + rte_version_release()) > > It breaks SPDK and applications relying on RTE_VERSION in preprocessor > directives. > RTE_VERSION* macros should be left alone, and applications that need > the runtime value should call rte_version(). Yes, sorry for not catching it before merge. > See logs in https://lab.dpdk.org/results/dashboard/results/results-uploads/test_runs/2f636aaf4ce244eba20844f9ff006033/log_upload_file/2021/3/dpdk_6857cb635821_2021-03-17_06-34-34_NA.zip My bad ignoring SPDK build, probably because of other issues there were. I've sent a fix: https://patches.dpdk.org/project/dpdk/patch/20210317093124.965624-1-thomas@monjalon.net/