DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] net/virtio: Tx path selection and offload improvements
@ 2018-06-01 12:47 Maxime Coquelin
  2018-06-01 12:47 ` [dpdk-dev] [PATCH 1/4] net/virtio: use simple path for Tx even if Rx mergeable Maxime Coquelin
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Maxime Coquelin @ 2018-06-01 12:47 UTC (permalink / raw)
  To: zhihong.wang, tiwei.bie, dev; +Cc: Maxime Coquelin

This series addresses a problem seen when running benchmars,
where we see a big difference in Tx performance depending on
whether Rx mergeable is enabled or not.
With patch 1, Tx simple path is selected even when Rx-mrg is
negotiated.

Digging a bit further, I found that Tx simple path could be
selected even when offload features had been negotiated.
With patch 2, guest does not try to negotiate Tx offload
features that haven't been selected by the application.
It means that without restarting the guest, we can now switch
from Tx simple path when application do no request offloads,
to Tx standard path when the application request offloads.
Note that to do so, one must stop the port first [0].
Another advantage of doing this than using Tx simple path
when guest application does not use offload features, is
that on host side, the virtio net header parsing is skipped
in dequeue function.

Patch 3 fixes an issue with Rx offload, as simple path was
be used if application requested TCP LRO only.

Finally, patch 4 aims at improving the offload feature checks
in the standard paths.

Below are benchmarks results when offloads are enabled at
device level.

Rx-mrg=off benchmarks:
+------------+-------+-------------+-------------+----------+
|    Run     |  PVP  | Guest->Host | Host->Guest | Loopback |
+------------+-------+-------------+-------------+----------+
| v18.05     | 14.47 |       17.02 |       17.57 |    13.15 |
| + series   | 14.88 |       19.64 |       17.63 |    13.11 |
+------------+-------+-------------+-------------+----------+

Rx-mrg=on benchmarks:
+------------+-------+-------------+-------------+----------+
|    Run     |  PVP  | Guest->Host | Host->Guest | Loopback |
+------------+-------+-------------+-------------+----------+
| v18.05     |  9.53 |       13.80 |       16.70 |    13.11 |
| + series   | 12.62 |       19.69 |       16.70 |    13.11 |
+------------+-------+-------------+-------------+----------+

[0]:
testpmd> port start 0
EAL: Error disabling MSI-X interrupts for fd 17
set_rxtx_funcs(): virtio: using mergeable buffer Rx path on port 0
set_rxtx_funcs(): virtio: using simple Tx path on port 0
Port 0: 52:54:00:58:D7:01
Checking link statuses...
Done
testpmd> show port 0 tx_offload capabilities 
Tx Offloading Capabilities of port 0 :
  Per Queue :
  Per Port  : VLAN_INSERT UDP_CKSUM TCP_CKSUM TCP_TSO MULTI_SEGS
         
testpmd> show port 0 tx_offload configuration
Tx Offloading Configuration of port 0 :
  Port :
  Queue[ 0] :

testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done                
testpmd> csum set tcp hw 0
Parse tunnel is off
IP checksum offload is sw
UDP checksum offload is sw
TCP checksum offload is hw
SCTP checksum offload is sw
Outer-Ip checksum offload is sw
testpmd> port start 0
Configuring Port 0 (socket 0)
EAL: Error disabling MSI-X interrupts for fd 17
set_rxtx_funcs(): virtio: using mergeable buffer Rx path on port 0
set_rxtx_funcs(): virtio: using standard Tx path on port 0
Port 0: 52:54:00:58:D7:01
Checking link statuses...
Done                                         
testpmd> show port 0 tx_offload configuration
Tx Offloading Configuration of port 0 :
  Port : TCP_CKSUM
  Queue[ 0] :


Maxime Coquelin (4):
  net/virtio: use simple path for Tx even if Rx mergeable
  net/vhost: improve Tx path selection
  net/virtio: don't use simple Rx path if TCP LRO requested
  net/virtio: improve offload check performance

 drivers/net/virtio/virtio_ethdev.c | 43 ++++++++++++++++++++++++++++++++++----
 drivers/net/virtio/virtio_ethdev.h |  3 ---
 drivers/net/virtio/virtio_pci.h    |  2 ++
 drivers/net/virtio/virtio_rxtx.c   | 29 ++++++-------------------
 4 files changed, 47 insertions(+), 30 deletions(-)

-- 
2.14.3

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

end of thread, other threads:[~2018-06-05 13:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01 12:47 [dpdk-dev] [PATCH 0/4] net/virtio: Tx path selection and offload improvements Maxime Coquelin
2018-06-01 12:47 ` [dpdk-dev] [PATCH 1/4] net/virtio: use simple path for Tx even if Rx mergeable Maxime Coquelin
2018-06-01 12:47 ` [dpdk-dev] [PATCH 2/4] net/vhost: improve Tx path selection Maxime Coquelin
2018-06-04 12:25   ` Tiwei Bie
2018-06-01 12:47 ` [dpdk-dev] [PATCH 3/4] net/virtio: don't use simple Rx path if TCP LRO requested Maxime Coquelin
2018-06-04 11:59   ` Tiwei Bie
2018-06-04 14:32     ` Maxime Coquelin
2018-06-05 13:39       ` Maxime Coquelin
2018-06-01 12:47 ` [dpdk-dev] [PATCH 4/4] net/virtio: improve offload check performance Maxime Coquelin
2018-06-04 11:55   ` Tiwei Bie
2018-06-04 14:29     ` Maxime Coquelin
2018-06-05  3:10       ` Tiwei Bie
2018-06-05  9:43         ` Maxime Coquelin
2018-06-05 11:20           ` Tiwei Bie
2018-06-05 11:58             ` Maxime Coquelin
2018-06-05 12:21               ` Tiwei Bie
2018-06-04  7:42 ` [dpdk-dev] [PATCH 0/4] net/virtio: Tx path selection and offload improvements Maxime Coquelin

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