DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Aman Singh <aman.deep.singh@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal: add log to print dpdk version at start
Date: Thu, 2 Sep 2021 11:11:39 +0100	[thread overview]
Message-ID: <557a6cce-a043-357e-9f00-ea15025bf43f@intel.com> (raw)
In-Reply-To: <20210901101253.6991a2f6@hermes.local>

On 9/1/2021 6:12 PM, Stephen Hemminger wrote:
> On Wed,  1 Sep 2021 11:48:21 +0530
> Aman Singh <aman.deep.singh@intel.com> 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 <aman.deep.singh@intel.com>
>> ---
>>  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());
>>  	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;
>>  }
>>  
> 
> NAK
> DPDK is already too chatty at startup.
> 
Is it better if the log is 'debug', so it won't be visible by default?
This can be useful to support customers, sometimes when there are multiple
binaries around, it is hard to say version of them.
As Bruce reminded, '-v' eal option provides this feature, which is better than
nothing, but it is not as useful if you are looking to an old log without actual
binary.

> If your application needs it then do-it-yourself.
> 

Application may have its own versioning, which can be unrelated to the DPDK
version numbers, this can be useful to get just DPDK version.

  reply	other threads:[~2021-09-02 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  6:18 Aman Singh
2021-09-01  6:55 ` Andrew Rybchenko
2021-09-01  9:14 ` Bruce Richardson
2021-09-02 10:02   ` Ferruh Yigit
2021-09-01 17:12 ` Stephen Hemminger
2021-09-02 10:11   ` Ferruh Yigit [this message]
2021-09-02 10:27     ` Bruce Richardson
2021-09-06 13:28       ` Singh, Aman Deep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557a6cce-a043-357e-9f00-ea15025bf43f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).