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 D75D4A0C53; Wed, 1 Sep 2021 08:55:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A12A74013F; Wed, 1 Sep 2021 08:55:32 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id AE9AD40041 for ; Wed, 1 Sep 2021 08:55:31 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 491DF7F523; Wed, 1 Sep 2021 09:55:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 491DF7F523 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1630479331; bh=QyOXoHhH5pjoHplXt/rK8JlT0ujUJg6+nyaGe2BOqVI=; h=Subject:To:References:From:Date:In-Reply-To; b=SwoPCr/R+tfyIEKnl8FGDK1aSXQsMi4ahXkjQE7eYjSmud4thvOr0QKuyKmleANVi JI95NYezoUMeG7MPr4RFjvSGeSq+Fscxy58PQ82ZDLlQMJ37eYpjnAEGisN5UHzZ83 ljXQtTS7Zg/s4DYbAEuLj1cZSEJjVUX1gufA6NfE= To: Aman Singh , dev@dpdk.org References: <20210901061821.5259-1-aman.deep.singh@intel.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <92725656-3010-6718-d365-838b8a78afe0@oktetlabs.ru> Date: Wed, 1 Sep 2021 09:55:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210901061821.5259-1-aman.deep.singh@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: add log to print dpdk version at start X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 9/1/21 9:18 AM, Aman Singh wrote: >>>From the logs it is difficult to get the DPDK version > that was used. So added a debug log to print the same. > The log has been added in eal_init so it gets printed > at startup for any application. > > Signed-off-by: Aman Singh > --- > lib/eal/freebsd/eal.c | 2 +- > lib/eal/linux/eal.c | 2 +- > lib/eal/windows/eal.c | 1 + > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c > index 6cee5ae369..a14a205f4d 100644 > --- a/lib/eal/freebsd/eal.c > +++ b/lib/eal/freebsd/eal.c > @@ -958,7 +958,7 @@ rte_eal_init(int argc, char **argv) > } > > eal_mcfg_complete(); > - > + rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_EAL, "DPDK version: %s\n", rte_version()); I'd say that it should be logged as the very first message. I'd consider INFO or even NOTICE level for the message. INFO if we don't want to see it by default. NOTICE if we want. I'd vote for the notice. May be a bit out of topic, but I'm a bit surprised that there is no common entry point for all OS and it is required to make it in 3 places. > return fctret; > } > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > index 3577eaeaa4..a50960cc78 100644 > --- a/lib/eal/linux/eal.c > +++ b/lib/eal/linux/eal.c > @@ -1332,7 +1332,7 @@ rte_eal_init(int argc, char **argv) > } > > eal_mcfg_complete(); > - > + rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_EAL, "DPDK version: %s\n", rte_version()); > return fctret; > } > > diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c > index 3d8c520412..5e6d5d8930 100644 > --- a/lib/eal/windows/eal.c > +++ b/lib/eal/windows/eal.c > @@ -419,6 +419,7 @@ rte_eal_init(int argc, char **argv) > */ > rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN); > rte_eal_mp_wait_lcore(); > + rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_EAL, "DPDK version: %s\n", rte_version()); > return fctret; > } > >