[dpdk-dev] [PATCH] virtio: fix packet corruption
Thomas Monjalon
thomas.monjalon at 6wind.com
Fri Jul 22 00:28:15 CEST 2016
2016-07-21 16:28, Yuanhan Liu:
> On Tue, Jul 19, 2016 at 02:31:59PM +0200, Olivier Matz wrote:
> > The support of virtio-user changed the way the mbuf dma address is
> > retrieved, using a physical address in case of virtio-pci and a virtual
> > address in case of virtio-user.
> >
> > This change introduced some possible memory corruption in packets,
> > replacing:
> > m->buf_physaddr + RTE_PKTMBUF_HEADROOM
> > by:
> > m->buf_physaddr + m->data_off (through a macro)
> >
> > This patch fixes this issue, restoring the original behavior.
> >
> > By the way, it also rework the macros, adding a "VIRTIO_" prefix and
> > API comments.
> >
> > Fixes: f24f8f9fee8a ("net/virtio: allow virtual address to fill vring descriptors")
> >
> > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
>
> Thanks for the fix!
>
> Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Applied, thanks
More information about the dev
mailing list