[dpdk-dev] [PATCH] virtio: fix the vq size issue

Xie, Huawei huawei.xie at intel.com
Fri Jul 10 16:05:45 CEST 2015


Thomas:
Could we roll back that commit or apply Changchun's patch?

/Huawei

On 7/1/2015 11:53 PM, Xie, Huawei wrote:
> On 7/1/2015 3:49 PM, Ouyang Changchun wrote:
>> This commit breaks virtio basic packets rx functionality:
>>   d78deadae4dca240e85054bf2d604a801676becc
>>
>> The QEMU use 256 as default vring size, also use this default value to calculate the virtio
>> avail ring base address and used ring base address, and vhost in the backend use the ring base
>> address to do packet IO.
>>
>> Virtio spec also says the queue size in PCI configuration is read-only, so virtio front end
>> can't change it. just need use the read-only value to allocate space for vring and calculate the
>> avail and used ring base address. Otherwise, the avail and used ring base address will be different
>> between host and guest, accordingly, packet IO can't work normally.
> virtio driver could still use the vq_size to initialize avail ring and
> use ring so that they still have the same base address.
> The other issue is vhost use  index & (vq->size -1) to index the ring.
>
>
> Thomas:
> This fix works but introduces slight change with original code. Could we
> just rollback that commit?
>
> d78deadae4dca240e85054bf2d604a801676becc
>
>
>> Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
>> ---
>>  drivers/net/virtio/virtio_ethdev.c | 14 +++-----------
>>  1 file changed, 3 insertions(+), 11 deletions(-)
>>
>>
>
>



More information about the dev mailing list