2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-dpdk: linear buffer check with zero-copy

As of DPDK 19.11, in order to use dequeue-zero-copy in DPDK Vhost library,
the application has to disable the linear buffer option. Hence
dequeue-zero-copy is not supported for vhost application that requires
linear buffers.

An alternative DPDK based approach to disable the linear buffers within
the vhost library itself was proposed in [1], however the consensus was
that application should be responsible for disabling linear buffers.

As such this patch disables linear buffers when zero-copy is enabled.

[1]    https://patches.dpdk.org/patch/67200/

Fixes: 127b6a6eea ("dpdk: Update to use DPDK 19.11.")
Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Sivaprasad Tummala
2020-03-26 12:09:20 +00:00
committed by Ian Stokes
parent b8d42f875c
commit 71417ef011

View File

@@ -5059,6 +5059,12 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev)
/* Enable zero copy flag, if requested */
if (zc_enabled) {
vhost_flags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
/* DPDK vHost library doesn't allow zero-copy with linear buffers.
* Hence disable Linear buffer.
*/
vhost_flags &= ~RTE_VHOST_USER_LINEARBUF_SUPPORT;
VLOG_WARN("Zero copy enabled, disabling linear buffer"
" check for vHost port %s", dev->up.name);
}
/* Enable External Buffers if TCP Segmentation Offload is enabled. */