patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Meunier, Julien (Nokia - FR/Paris-Saclay)" <julien.meunier@nokia.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"cunming.liang@intel.com" <cunming.liang@intel.com>
Subject: Re: [dpdk-stable] [PATCH v2] test/pmd_perf: fix the way to drain the port
Date: Mon, 18 Feb 2019 11:25:46 +0000	[thread overview]
Message-ID: <1becf962-0d3b-0536-be9a-1838d1eb1cf7@nokia.com> (raw)
In-Reply-To: <18e7f9d6-f42e-d569-b26a-30c61b98adca@intel.com>

Hi,

Sorry for the delay. Inline reply.

On 07/02/2019 13:28, Ferruh Yigit wrote:
> On 2/3/2019 7:42 PM, Julien Meunier wrote:
>> If the port has received less than ``pkt_per_port`` packets (for
>> example, the port has missed some packets), the test is in an infinite
>> loop.
>>
>> Instead of expecting a number of packet to receive, let the port to be
>> drained by itself. If no more packets are received, the test can
>> continue.
>>
>> Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
>> ---
>> v2:
>> * rename commit title
>> * fix nb_free display
>> ---
>>   test/test/test_pmd_perf.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
>> index f5095c8..c7e2df3 100644
>> --- a/test/test/test_pmd_perf.c
>> +++ b/test/test/test_pmd_perf.c
>> @@ -493,16 +493,16 @@ main_loop(__rte_unused void *args)
>>   
>>   	for (i = 0; i < conf->nb_ports; i++) {
>>   		portid = conf->portlist[i];
>> -		int nb_free = pkt_per_port;
>> +		int nb_free = 0;
>>   		do { /* dry out */
>>   			nb_rx = rte_eth_rx_burst(portid, 0,
>>   						 pkts_burst, MAX_PKT_BURST);
>>   			nb_tx = 0;
>>   			while (nb_tx < nb_rx)
>>   				rte_pktmbuf_free(pkts_burst[nb_tx++]);
>> -			nb_free -= nb_rx;
>> -		} while (nb_free != 0);
>> -		printf("free %d mbuf left in port %u\n", pkt_per_port, portid);
>> +			nb_free += nb_rx;
>> +		} while (nb_rx != 0);
>> +		printf("free %d mbuf left in port %u\n", nb_free, portid);
> 
> 
> In the test logic there is an expectation that 'pkt_per_port' packets will be
> received.
> We are losing that intention here with this update. What do you think updating
> the log to include it, like:
> "free %d (expected %d) mbuf left in port %u\n", nb_free, pkt_per_port, portid
> 

OK. But, after thinking, I should add a little timeout in order to drain 
the port during N cycles (like it was already done in the function 
poll_burst - timeout), just to be sure that all packets are dequeued.

I will upload a new patch today.

Best regards,
Julien Meunier

  reply	other threads:[~2019-02-18 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 15:55 [dpdk-stable] [PATCH] test/pmd_perf: change " Julien Meunier
2019-01-08 17:33 ` Ferruh Yigit
2019-01-08 21:16   ` Meunier, Julien (Nokia - FR/Paris-Saclay)
2019-02-03 19:42 ` [dpdk-stable] [PATCH v2] test/pmd_perf: fix " Julien Meunier
2019-02-07 12:28   ` Ferruh Yigit
2019-02-18 11:25     ` Meunier, Julien (Nokia - FR/Paris-Saclay) [this message]
2019-02-18 12:28       ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2019-02-20 21:06   ` [dpdk-stable] [PATCH v3] " Julien Meunier
2019-02-21 16:46     ` Ferruh Yigit

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=1becf962-0d3b-0536-be9a-1838d1eb1cf7@nokia.com \
    --to=julien.meunier@nokia.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.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).