[dpdk-dev] [PATCH 4/4] virtio/vdev: add a new vdev named eth_cvio

Tan, Jianfeng jianfeng.tan at intel.com
Tue Jan 12 10:15:32 CET 2016


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




More information about the dev mailing list