From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] virtio: fix packet corruption Date: Thu, 21 Jul 2016 16:28:51 +0800 Message-ID: <20160721082851.GC28708@yliu-dev.sh.intel.com> References: <1468931519-7381-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, jianfeng.tan@intel.com, huawei.xie@intel.com To: Olivier Matz Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4318E4CE7 for ; Thu, 21 Jul 2016 10:24:46 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1468931519-7381-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Thanks for the fix! Acked-by: Yuanhan Liu --yliu