From: Sivaprasad Tummala <sivaprasad.tumm...@intel.com>

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: 127b6a6eea02 ("dpdk: Update to use DPDK 19.11.")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tumm...@intel.com>
---
 lib/netdev-dpdk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 44ebf96da..b940b1ac2 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -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. */
-- 
2.13.6

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to