diff mbox series

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

Message ID 20200326120920.5427-1-Sivaprasad.Tummala@intel.com
State Superseded
Headers show
Series [ovs-dev,RFC,v1] netdev-dpdk: linear buffer check with zero-copy | expand

Commit Message

Sivaprasad Tummala March 26, 2020, 12:09 p.m. UTC
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.
https://patches.dpdk.org/patch/67200/

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

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

Patch

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. */