From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 40BE65949 for ; Tue, 12 Jan 2016 10:15:36 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 12 Jan 2016 01:15:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,556,1444719600"; d="scan'208";a="888755194" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.119]) ([10.239.67.119]) by orsmga002.jf.intel.com with ESMTP; 12 Jan 2016 01:15:33 -0800 To: Pavel Fedin , dev@dpdk.org References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-5-git-send-email-jianfeng.tan@intel.com> <009b01d14d0d$47c85540$d758ffc0$@samsung.com> <5694BBC6.3090500@intel.com> From: "Tan, Jianfeng" Message-ID: <5694C434.5070201@intel.com> Date: Tue, 12 Jan 2016 17:15:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5694BBC6.3090500@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: nakajima.yoshihiro@lab.ntt.co.jp, ann.zhuangyanying@huawei.com, mst@redhat.com Subject: Re: [dpdk-dev] [PATCH 4/4] virtio/vdev: add a new vdev named eth_cvio 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: Tue, 12 Jan 2016 09:15:36 -0000 Hi Fedin, On 1/12/2016 4:39 PM, Tan, Jianfeng wrote: > Hi Fedin, > > On 1/12/2016 3:45 PM, Pavel Fedin wrote: >> Hello! >> >> See inline >> >>> ... >>> } >>> >>> + struct rte_mbuf *m = NULL; >>> + if (dev->dev_type == RTE_ETH_DEV_PCI) >>> + vq->offset = (uintptr_t)&m->buf_addr; >>> +#ifdef RTE_VIRTIO_VDEV >>> + else { >>> + vq->offset = (uintptr_t)&m->buf_physaddr; >> Not sure, but shouldn't these be swapped? Originally, for PCI >> devices, we used buf_physaddr. > > Oops, seems that you are right. I'm trying to figure out why I can > rx/tx pkts using the wrong version. > I figure out why. When we run apps without root privilege, mempool's elt_pa is assigned the same of elt_va_start. So it happens to be right value to translate addresses. But it's definitely a bug. Thanks for pointing this out. Thanks, Jianfeng