DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] vhost/virtio performance loopback utility
@ 2016-05-05 22:46 Zhihong Wang
  2016-05-05 22:46 ` [dpdk-dev] [PATCH 1/6] testpmd: add io_retry forwarding Zhihong Wang
                   ` (9 more replies)
  0 siblings, 10 replies; 54+ messages in thread
From: Zhihong Wang @ 2016-05-05 22:46 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, bruce.richardson, thomas.monjalon

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, io-fwd is the ideal candidate to perform this loopback
test because it's the fastest possible forwarding engine: Start testpmd
io-fwd in host with 1 vhost pmd port, and start testpmd io-fwd in the
connected guest with 1 corresponding virtio pmd port, and these 2 ports
form a forwarding loop, packets received by the host vhost pmd port are
forwarded to the guest virtio pmd port, and packets received by the guest
virtio pmd port are sent to the host vhost pmd port.

As to traffic generation, "start tx_first" injects a burst of packets into
the loop, which is the ideal way to do that.

However 2 issues remain:

   1. If only 1 burst of packets are injected in the loop, there will
      almost definitely be empty rx operations, e.g. When guest virtio pmd
      port send burst to the host, then it starts the rx immediately, it's
      likely the packets are still being forwarded by host vhost pmd port
      and haven't reached the guest yet.

      We need to fill up the ring to keep all pmds busy.

   2. io-fwd 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 an io_retry-fwd 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.

   2. Show topology at forwarding start: "show config fwd" also does this,
      but show it directly can reduce the possibility of mis-configuration.

   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 pmd port only.

   2. Start testpmd in guest with only 1 virtio pmd port connected to the
      corresponding vhost pmd port.

   3. "set fwd io_retry" in testpmds in both host and guest.

   4. "start" in testpmd in guest.

   5. "start tx_first 8" in testpmd in host.

Then use "show port stats all" to monitor the performance.


Zhihong Wang (6):
  testpmd: add io_retry forwarding
  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
  testpmd: update documentation

 app/test-pmd/Makefile                       |   1 +
 app/test-pmd/cmdline.c                      |  41 ++++++++
 app/test-pmd/config.c                       |  28 ++++--
 app/test-pmd/iofwd-retry.c                  | 139 ++++++++++++++++++++++++++++
 app/test-pmd/testpmd.c                      |  10 +-
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/testpmd_app_ug/run_app.rst       |   1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  10 +-
 8 files changed, 218 insertions(+), 13 deletions(-)
 create mode 100644 app/test-pmd/iofwd-retry.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2016-06-28 11:10 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 22:46 [dpdk-dev] [PATCH 0/6] vhost/virtio performance loopback utility 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   ` [dpdk-dev] [PATCH v3 0/5] vhost/virtio performance loopback utility De Lara Guarch, Pablo
2016-06-16 14:36     ` Thomas Monjalon

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).