[dpdk-dev] [PATCH] virtio: fix packet corruption

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu Jul 21 10:28:51 CEST 2016


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>

	--yliu


More information about the dev mailing list