[ovs-dev] [RFC PATCH v1] netdev-dpdk: linear buffer check with zero-copy

Sivaprasad Tummala Sivaprasad.Tummala at intel.com
Thu Mar 26 12:09:20 UTC 2020

In order to use dequeue-zero-copy in DPDK Vhost library, application
has to disable linear buffer option. Hence dequeue-zero-copy is not
supported for vhost application thats requries linear buffers.

This patch is a workaround to support dq-zero-copy in OVS by overcoming
the current limitation in DPDK.

Note: The patch needs to be removed once the fix is integrated in DPDK.

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala at intel.com>
 lib/netdev-dpdk.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 6187129c0..4a302ad89 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -5217,6 +5217,14 @@ 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
+             * currently. Hence disabling the Linear buffer check until the
+             * issue is fixed in DPDK.
+             */
+            vhost_flags &= ~RTE_VHOST_USER_LINEARBUF_SUPPORT;
+            VLOG_WARN("Zero copy enabled and hence disabling linear buffer"
+                         " check  for vHost port %s", dev->up.name);
         /* Enable External Buffers if TCP Segmentation Offload is enabled. */

More information about the dev mailing list