test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: Yulong Pei <yulong.pei@intel.com>, dts@dpdk.org
Subject: Re: [dts] [PATCH 1/2] tests pmd: do changes due to performance test
Date: Thu, 02 Mar 2017 09:38:15 +0800	[thread overview]
Message-ID: <58B77787.1000109@intel.com> (raw)
In-Reply-To: <1488418539-8237-1-git-send-email-yulong.pei@intel.com>

Yulong,
Some comments below.

Thanks,
Marvin

On 03/02/2017 09:35 AM, Yulong Pei wrote:
> 1. change to tcp stream traffic.
> 2. change duration to 60s.
> 3. using one entry point test_perf_single_core_performance.
>
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>
> ---
>   tests/TestSuite_pmd.py | 42 +++++++++++++++++++++++++++---------------
>   1 file changed, 27 insertions(+), 15 deletions(-)
>
> diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py
> index bc59849..a548496 100644
> --- a/tests/TestSuite_pmd.py
> +++ b/tests/TestSuite_pmd.py
> @@ -68,11 +68,15 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>   
>           self.blacklist = ""
>   
> +        # Update config file and rebuild to get best perf on FVL
> +        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=y/' ./config/common_base", "#", 20)

Not sure this configuration will affect performance, look like it only 
affect legacy Rx code path.
> +        self.dut.build_install_dpdk(self.target)
> +
>           # Based on h/w type, choose how many ports to use
>           self.dut_ports = self.dut.get_ports()
>   
>           self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[
> -            'ip'] + HEADER_SIZE['udp']
> +            'ip'] + HEADER_SIZE['tcp']
>   
>           self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
>   
> @@ -84,15 +88,23 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>           """
>           pass
>   
> -    def test_perf_pmd_performance_4ports(self):
> +    def test_perf_single_core_performance(self):
> +        """
> +        Run single core performance
> +        """
> +        if len(self.dut_ports) == 4:
> +            self.test_pmd_performance_4ports()
> +        else:
> +            self.test_pmd_performance_2ports()
> +
> +
> +    def test_pmd_performance_4ports(self):
>           """
>           PMD Performance Benchmarking with 4 ports.
>           """

Function named like "test_*" will be handled as normal case, please 
change function name without "test_" prefix.
>           all_cores_mask = utils.create_mask(self.dut.get_core_list("all"))
>   
>           # prepare traffic generator input
> -        self.verify(len(self.dut_ports) >= 4,
> -                    "Insufficient ports for 4 ports performance")
>           tgen_input = []
>   
>           tgen_input.append((self.tester.get_local_port(self.dut_ports[0]),
> @@ -126,27 +138,25 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>               self.pmdout.start_testpmd(core_config, " --rxq=%d --txq=%d --portmask=%s --rss-ip --txrst=32 --txfreet=32 --txd=128 --txqflags=0xf01" % (queues, queues, port_mask), socket=self.ports_socket)
>   	    command_line = self.pmdout.get_pmd_cmd()
>   
> -            info = "Executing PMD (mac fwd) using %s\n" % test_cycle['cores']
> +            info = "Executing PMD using %s\n" % test_cycle['cores']
>               self.rst_report(info, annex=True)
>               self.logger.info(info)
> -
>               self.rst_report(command_line + "\n\n", frame=True, annex=True)
>   
>               # self.dut.send_expect("set fwd mac", "testpmd> ", 100)
> -            self.dut.send_expect("start", "testpmd> ")
> -
> +            self.dut.send_expect("start", "testpmd> ", 100)
>               for frame_size in self.frame_sizes:
>                   wirespeed = self.wirespeed(self.nic, frame_size, 4)
>   
>                   # create pcap file
>                   self.logger.info("Running with frame size %d " % frame_size)
> -                payload_size = frame_size - HEADER_SIZE['eth'] - HEADER_SIZE['ip']
> +                payload_size = frame_size - self.headers_size
>                   self.tester.scapy_append(
> -                    'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP(src="1.2.3.4",dst="1.1.1.1")/("X"*%d)])' % payload_size)
> +                    'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP(src="1.2.3.4",dst="1.1.1.1")/TCP()/("X"*%d)])' % payload_size)
>                   self.tester.scapy_execute()
>   
>                   # run traffic generator
> -                _, pps = self.tester.traffic_generator_throughput(tgen_input)
> +                _, pps = self.tester.traffic_generator_throughput(tgen_input, rate_percent=100, delay=60)
>   
>                   pps /= 1000000.0
>                   test_cycle['Mpps'][frame_size] = pps
> @@ -176,7 +186,7 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>   
>           self.result_table_print()
>   
> -    def test_perf_pmd_performance_2ports(self):
> +    def test_pmd_performance_2ports(self):
Same comment as previous.
>           """
>           PMD Performance Benchmarking with 2 ports.
>           """
> @@ -215,8 +225,9 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>               self.logger.info(info)
>               self.rst_report(info, annex=True)
>               self.rst_report(command_line + "\n\n", frame=True, annex=True)
> +
> +            self.dut.send_expect("start", "testpmd> ", 100)
>   
> -            self.dut.send_expect("start", "testpmd> ")
>               for frame_size in self.frame_sizes:
>                   wirespeed = self.wirespeed(self.nic, frame_size, 2)
>   
> @@ -224,11 +235,12 @@ class TestPmd(TestCase,IxiaPacketGenerator):
>                   self.logger.info("Running with frame size %d " % frame_size)
>                   payload_size = frame_size - self.headers_size
>                   self.tester.scapy_append(
> -                    'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP()/UDP()/("X"*%d)])' % payload_size)
> +                    'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP(src="1.2.3.4",dst="1.1.1.1")/TCP()/("X"*%d)])' % payload_size)
>                   self.tester.scapy_execute()
>   
>                   # run traffic generator
> -                _, pps = self.tester.traffic_generator_throughput(tgen_input)
> +                _, pps = self.tester.traffic_generator_throughput(tgen_input, rate_percent=100, delay=60)
> +
>   
>                   pps /= 1000000.0
>                   test_cycle['Mpps'][frame_size] = pps

       reply	other threads:[~2017-03-02  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1488418539-8237-1-git-send-email-yulong.pei@intel.com>
2017-03-02  1:38 ` Liu, Yong [this message]
2017-03-02  1:52   ` Pei, Yulong
     [not found] ` <1488418539-8237-2-git-send-email-yulong.pei@intel.com>
2017-03-02  1:53   ` [dts] [PATCH 2/2] tests l3fwd: fix issue for " Liu, Yong
2017-03-02  2:49     ` Pei, Yulong
2017-03-02  3:10       ` Liu, Yong

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=58B77787.1000109@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yulong.pei@intel.com \
    /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).