DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Wang, Zhihong" <zhihong.wang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"thomas.monjalon@6wind.com" <thomas.monjalon@6wind.com>
Subject: Re: [dpdk-dev] [PATCH v3 0/5] vhost/virtio performance loopback utility
Date: Wed, 15 Jun 2016 10:04:33 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8973C9619B3@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1465945686-142094-1-git-send-email-zhihong.wang@intel.com>



> -----Original Message-----
> From: Wang, Zhihong
> Sent: Wednesday, June 15, 2016 12:08 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin; Richardson, Bruce; De Lara Guarch, Pablo;
> thomas.monjalon@6wind.com
> Subject: [PATCH v3 0/5] vhost/virtio performance loopback utility
> 
> This patch enables vhost/virtio pmd performance loopback test in testpmd.
> All the features are for general usage.
> 
> The loopback test focuses on the maximum full-path packet forwarding
> performance between host and guest, it runs vhost/virtio pmd only without
> introducing extra overhead.
> 
> Therefore, the main requirement is traffic generation, since there's no
> other packet generators like IXIA to help.
> 
> In current testpmd, iofwd is the best candidate to perform this loopback
> test because it's the fastest possible forwarding engine: Start testpmd
> iofwd in host with 1 vhost port, and start testpmd iofwd in the connected
> guest with 1 corresponding virtio port, and these 2 ports form a forwarding
> loop: Host vhost Tx -> Guest virtio Rx -> Guest virtio Tx -> Host vhost Rx.
> 
> As to traffic generation, "start tx_first" injects a burst of packets into
> the loop.
> 
> However 2 issues remain:
> 
>    1. If only 1 burst of packets are injected in the loop, there will
>       definitely be empty Rx operations, e.g. When guest virtio port send
>       burst to the host, then it starts the Rx immediately, it's likely
>       the packets are still being forwarded by host vhost port and haven't
>       reached the guest yet.
> 
>       We need to fill up the ring to keep all pmds busy.
> 
>    2. iofwd doesn't provide retry mechanism, so if packet loss occurs,
>       there won't be a full burst in the loop.
> 
> To address these issues, this patch:
> 
>    1. Add retry option in testpmd to prevent most packet losses.
> 
>    2. Add parameter to enable configurable tx_first burst number.
> 
> Other related improvements include:
> 
>    1. Handle all rxqs when multiqueue is enabled: Current testpmd forces a
>       single core for each rxq which causes inconvenience and confusion.
> 
>       This change doesn't break anything, we can still force a single core
>       for each rxq, by giving the same number of cores with the number of
>       rxqs.
> 
>       One example: One Red Hat engineer was doing multiqueue test, there're
>       2 ports in guest each with 4 queues, and testpmd was used as the
>       forwarding engine in guest, as usual he used 1 core for forwarding, as
>       a results he only saw traffic from port 0 queue 0 to port 1 queue 0,
>       then a lot of emails and quite some time are spent to root cause it,
>       and of course it's caused by this unreasonable testpmd behavior.
> 
>       Moreover, even if we understand this behavior, if we want to test the
>       above case, we still need 8 cores for a single guest to poll all the
>       rxqs, obviously this is too expensive.
> 
>       We met quite a lot cases like this, one recent example:
>       http://openvswitch.org/pipermail/dev/2016-June/072110.html
> 
>    2. Show topology at forwarding start: "show config fwd" also does this,
>       but show it directly can reduce the possibility of mis-configuration.
> 
>       Like the case above, if testpmd shows topology at forwarding start,
>       then probably all those debugging efforts can be saved.
> 
>    3. Add throughput information in port statistics display for "show port
>       stats (port_id|all)".
> 
> Finally there's documentation update.
> 
> Example on how to enable vhost/virtio performance loopback test:
> 
>    1. Start testpmd in host with 1 vhost port only.
> 
>    2. Start testpmd in guest with only 1 virtio port connected to the
>       corresponding vhost port.
> 
>    3. "set fwd io retry" in testpmds in both host and guest.
> 
>    4. "start" in testpmd in guest.
> 
>    5. "start tx_first 16" in testpmd in host.
> 
> Then use "show port stats all" to monitor the performance.
> 
> --------------
> Changes in v2:
> 
>    1. Add retry as an option for existing forwarding engines except rxonly.
> 
>    2. Minor code adjustment and more detailed patch description.
> 
> --------------
> Changes in v3:
> 
>    1. Add more details in commit log.
> 
>    2. Give variables more meaningful names.
> 
>    3. Fix a typo in existing doc.
> 
>    4. Rebase the patches.
> 
> 
> Zhihong Wang (5):
>   testpmd: add retry option
>   testpmd: configurable tx_first burst number
>   testpmd: show throughput in port stats
>   testpmd: handle all rxqs in rss setup
>   testpmd: show topology at forwarding start
> 
>  app/test-pmd/Makefile                       |   1 -
>  app/test-pmd/cmdline.c                      | 116 ++++++++++++++++++-
>  app/test-pmd/config.c                       |  74 ++++++++++--
>  app/test-pmd/csumonly.c                     |  12 ++
>  app/test-pmd/flowgen.c                      |  12 ++
>  app/test-pmd/icmpecho.c                     |  15 +++
>  app/test-pmd/iofwd.c                        |  22 +++-
>  app/test-pmd/macfwd-retry.c                 | 167 ----------------------------
>  app/test-pmd/macfwd.c                       |  13 +++
>  app/test-pmd/macswap.c                      |  12 ++
>  app/test-pmd/testpmd.c                      |  12 +-
>  app/test-pmd/testpmd.h                      |  11 +-
>  app/test-pmd/txonly.c                       |  12 ++
>  doc/guides/testpmd_app_ug/run_app.rst       |   1 -
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  18 +--
>  15 files changed, 299 insertions(+), 199 deletions(-)
>  delete mode 100644 app/test-pmd/macfwd-retry.c
> 
> --
> 2.5.0

Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

  parent reply	other threads:[~2016-06-15 10:04 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 22:46 [dpdk-dev] [PATCH 0/6] " Zhihong Wang
2016-05-05 22:46 ` [dpdk-dev] [PATCH 1/6] testpmd: add io_retry forwarding Zhihong Wang
2016-05-25  9:32   ` Thomas Monjalon
2016-05-26  2:40     ` Wang, Zhihong
2016-05-26  6:27       ` Thomas Monjalon
2016-05-26  9:24         ` Wang, Zhihong
2016-05-05 22:46 ` [dpdk-dev] [PATCH 2/6] testpmd: configurable tx_first burst number Zhihong Wang
2016-05-25  9:35   ` Thomas Monjalon
2016-05-26  2:53     ` Wang, Zhihong
2016-05-26  6:31       ` Thomas Monjalon
2016-05-26  9:31         ` Wang, Zhihong
2016-05-05 22:46 ` [dpdk-dev] [PATCH 3/6] testpmd: show throughput in port stats Zhihong Wang
2016-05-05 22:46 ` [dpdk-dev] [PATCH 4/6] testpmd: handle all rxqs in rss setup Zhihong Wang
2016-05-25  9:42   ` Thomas Monjalon
2016-05-26  2:55     ` Wang, Zhihong
2016-06-03  9:22       ` Wang, Zhihong
2016-05-05 22:47 ` [dpdk-dev] [PATCH 5/6] testpmd: show topology at forwarding start Zhihong Wang
2016-05-25  9:45   ` Thomas Monjalon
2016-05-26  2:56     ` Wang, Zhihong
2016-05-05 22:47 ` [dpdk-dev] [PATCH 6/6] testpmd: update documentation Zhihong Wang
2016-05-25  9:48   ` Thomas Monjalon
2016-05-26  2:54     ` Wang, Zhihong
2016-05-20  8:54 ` [dpdk-dev] [PATCH 0/6] vhost/virtio performance loopback utility Wang, Zhihong
2016-05-25  9:27 ` Thomas Monjalon
2016-06-01  3:27 ` [dpdk-dev] [PATCH v2 0/5] " Zhihong Wang
2016-06-01  3:27   ` [dpdk-dev] [PATCH v2 1/5] testpmd: add retry option Zhihong Wang
2016-06-07  9:28     ` De Lara Guarch, Pablo
2016-06-08  1:29       ` Wang, Zhihong
2016-06-01  3:27   ` [dpdk-dev] [PATCH v2 2/5] testpmd: configurable tx_first burst number Zhihong Wang
2016-06-07  9:43     ` De Lara Guarch, Pablo
2016-06-01  3:27   ` [dpdk-dev] [PATCH v2 3/5] testpmd: show throughput in port stats Zhihong Wang
2016-06-07 10:02     ` De Lara Guarch, Pablo
2016-06-08  1:31       ` Wang, Zhihong
2016-06-01  3:27   ` [dpdk-dev] [PATCH v2 4/5] testpmd: handle all rxqs in rss setup Zhihong Wang
2016-06-07 10:29     ` De Lara Guarch, Pablo
2016-06-08  1:28       ` Wang, Zhihong
2016-06-01  3:27   ` [dpdk-dev] [PATCH v2 5/5] testpmd: show topology at forwarding start Zhihong Wang
2016-06-07 10:56     ` De Lara Guarch, Pablo
2016-06-14 15:13     ` De Lara Guarch, Pablo
2016-06-15  7:05       ` Wang, Zhihong
2016-06-14 23:08 ` [dpdk-dev] [PATCH v3 0/5] vhost/virtio performance loopback utility Zhihong Wang
2016-06-14 23:08   ` [dpdk-dev] [PATCH v3 1/5] testpmd: add retry option Zhihong Wang
2016-06-14 23:08   ` [dpdk-dev] [PATCH v3 2/5] testpmd: configurable tx_first burst number Zhihong Wang
2016-06-14 23:08   ` [dpdk-dev] [PATCH v3 3/5] testpmd: show throughput in port stats Zhihong Wang
2016-06-14 23:08   ` [dpdk-dev] [PATCH v3 4/5] testpmd: handle all rxqs in rss setup Zhihong Wang
2016-06-27 14:23     ` Nélio Laranjeiro
2016-06-27 22:36       ` De Lara Guarch, Pablo
2016-06-28  8:34         ` Nélio Laranjeiro
2016-06-28 11:10           ` Wang, Zhihong
2016-06-14 23:08   ` [dpdk-dev] [PATCH v3 5/5] testpmd: show topology at forwarding start Zhihong Wang
2016-06-16 11:09     ` De Lara Guarch, Pablo
2016-06-16 13:33       ` Thomas Monjalon
2016-06-15 10:04   ` De Lara Guarch, Pablo [this message]
2016-06-16 14:36     ` [dpdk-dev] [PATCH v3 0/5] vhost/virtio performance loopback utility Thomas Monjalon

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=E115CCD9D858EF4F90C690B0DCB4D8973C9619B3@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=zhihong.wang@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).