[dpdk-dev] [PATCH v4 3/3] app/testpmd: set packet dump based on verbosity level

Ferruh Yigit ferruh.yigit at intel.com
Wed Oct 17 14:34:07 CEST 2018


On 10/11/2018 5:39 PM, Iremonger, Bernard wrote:
> Hi Ferruh
> 
> <snip>
>>>> Subject: Re: [dpdk-dev] [PATCH v4 3/3] app/testpmd: set packet dump
>>>> based on verbosity level
>>>>
>>>> On 10/7/2018 8:38 AM, Raslan Darawsheh wrote:
>>>>> when changing verbosity level it will configure rx/tx callbacks to
>>>>> dump packets based on the verbosity value as following:
>>>>>     1- dump only received packets:
>>>>>        testpmd> set verbose 1
>>>>>     2- dump only sent packets:
>>>>>        testpmd> set verbose 2
>>>>>     3- dump sent and received packets:
>>>>>        testpmd> set verbose (any number > 2)
>>>>>     4- disable dump
>>>>>        testpmd> set verbose 0
>>>>
>>>> It is good to able to enable Rx/Tx separately but you are overloading
>> "verbose"
>>>> meaning here. "verbose" is kind of log_level internal to testpmd and
>>>> can be used by many testpmd debug log.
>>>>
>>>> Why not create a separate setting for it, perhaps like pkt_verbose?
>>>
>>> The original code in rxonly.c used the verbose level, I don't think it is good idea
>> to add a new pkt_verbose.
>>> Users will be expecting it to work as before.
>>
>> In same logic they won't expect verbose=1 only for Rx and verbose=2 only for
>> Tx, previously this was on/off setting.
>>
>> since we are touching here already clarifying this with its own config item makes
>> more sense to me.
>> And user may not be wanting to have testpmd verbose level 3 and related logs
>> but only Rx/Tx packets.
> 
> Previously: 
> Set verbose 1, dumped rx packets.
> Set verbose 0, disabled dump of rx packets.
> 
> Now:
> Set verbose 2, dumps tx packets (new functionality, not dumped previously)
> Set verbose 3, dumps tx and rx packets (new functionality)
> 
> I am ok with this.
> I think more opinions are needed.

OK, what I understand was `verbose` is not for just dumping Rx/Tx packets, it is
a log level for testpmd.
But OK it seems it only used for printing packets and only level 0 & 1 used, so
agreed there won't be any issue to use verbose for this purpose.

But Raslan, can you please document this somewhere proper in testpmd
documentation, this information shouldn't be available only commit log.


More information about the dev mailing list