From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 21 Jul 2016 01:24:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,398,1464678000"; d="scan'208";a="999628741" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 21 Jul 2016 01:24:44 -0700 Date: Thu, 21 Jul 2016 16:28:51 +0800 From: Yuanhan Liu To: Olivier Matz Cc: dev@dpdk.org, jianfeng.tan@intel.com, huawei.xie@intel.com 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 Content-Disposition: inline In-Reply-To: <1468931519-7381-1-git-send-email-olivier.matz@6wind.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] virtio: fix packet corruption X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 08:24:46 -0000 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