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

Just a quick one here folks, I spotted this issue when testing the deprecation 
notice patch for vhost zero copy.

Siva had previously submitted an RFC patch to work around the issue in OVS as 
it had not been decided at the time whether it should be resolved at the DPDK 
or the OVS layer.

https://patchwork.ozlabs.org/project/openvswitch/patch/20200519114912.66381-2-sivaprasad.tumm...@intel.com/

Since then it looks like the application layer was selected as the correct 
place to make this change so I've resubmitted the patch with some minor changes.

I figure it makes sense to have this patch in place first before applying the 
deprecation notice (otherwise zero copy cannot be used anyway).

Thoughts?

Ian

> 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
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to