[ovs-dev] [PATCH 1/1] netdev-dpdk: linear buffer check with zero-copy

Stokes, Ian ian.stokes at intel.com
Wed Aug 12 18:07:59 UTC 2020


> On 8/12/20 6:16 PM, Stokes, Ian wrote:
> >> From: Sivaprasad Tummala <Sivaprasad.Tummala at 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.Tummala at 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?
> 
> Ugh... This feature is broken.
> 
> As for now, I think it's ok to not ask for linear buffers, just because this feature is
> experimental and users are aware of possible issues.
> i.e. guests should be trusted to not provide segmented buffers.
> 
> I'd say let's apply this along with deprecation notice.   Another option
> is to just completely remove the feature right away without deprecation which is
> kind of not user friendly.

Agreed, it's broken, lets give the one release notice for 2.14 and then remove would be my thoughts.

Applied to master and 2.14

Thanks
Ian
> 
> Acked-by: Ilya Maximets <i.maximets at ovn.org>
> 
> >
> > 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.Tummala at 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
> >> dev at openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list