[dpdk-dev] [PATCH] examples/vhost: use library routines instead of local copies

Ouyang, Changchun changchun.ouyang at intel.com
Thu Mar 26 04:32:46 CET 2015



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ananyev,
> Konstantin
> Sent: Thursday, March 26, 2015 9:21 AM
> To: Zoltan Kiss; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/vhost: use library routines
> instead of local copies
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zoltan Kiss
> > Sent: Wednesday, March 25, 2015 6:43 PM
> > To: dev at dpdk.org
> > Cc: Zoltan Kiss
> > Subject: [dpdk-dev] [PATCH] examples/vhost: use library routines
> > instead of local copies
> >
> > This macro and function were copies from the mbuf library, no reason
> > to keep them.
> 
> NACK
> You can't use RTE_MBUF_INDIRECT macro here.
> If you'll look at vhost code carefully, you'll realise that we don't use standard
> rte_pktmbuf_attach() here.
> As we attach mbuf not to another mbuf but to external memory buffer,
> passed to us by virtio device.
> Look at attach_rxmbuf_zcp().
> Though I suppose, we can replace pktmbuf_detach_zcp() , with
> rte_pktmbuf_detach() - they are doing identical things.
> BTW, I wonder did you ever  test your patch?
> My guess it would cause vhost with '--zero-copy' to crash or  corrupt the
> packets straightway.
> 
> Konstantin
> 
> >
> > Signed-off-by: Zoltan Kiss <zoltan.kiss at linaro.org>

NACK this patch,
Same reason with Konstantin.
Changchun



More information about the dev mailing list