From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] virtio: fix packet corruption Date: Fri, 22 Jul 2016 00:28:15 +0200 Message-ID: <3319812.8v20LhbOem@xps13> References: <1468931519-7381-1-git-send-email-olivier.matz@6wind.com> <20160721082851.GC28708@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Yuanhan Liu , jianfeng.tan@intel.com, huawei.xie@intel.com To: Olivier Matz Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 78F005A54 for ; Fri, 22 Jul 2016 00:28:17 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id o80so42513554wme.1 for ; Thu, 21 Jul 2016 15:28:17 -0700 (PDT) In-Reply-To: <20160721082851.GC28708@yliu-dev.sh.intel.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" 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 > > Thanks for the fix! > > Acked-by: Yuanhan Liu Applied, thanks