[dpdk-dev] [PATCH] [RFC] vhost: inroduce operation to get vDPA queue stats

Maxime Coquelin maxime.coquelin at redhat.com
Fri Apr 10 16:04:12 CEST 2020



On 4/10/20 3:54 PM, Matan Azrad wrote:
> Hi Maxime
> 
> From: Maxime Coquelin
>> Hi Matan,
>>
>> On 3/16/20 4:12 PM, Matan Azrad wrote:
>>> The vDPA device offloads all the datapath of the vhost device to the
>>> HW device.
>>>
>>> In order to expose to the user traffic information this patch
>>> introduce new API to get traffic statistics per virtio queue.
>>>
>>> The statistics are taken directly from the vDPA driver managing the HW
>>> device.
>>
>> Shouldn't the stats be collected from the PF like for "legacy" SR-IOV via the
>> sysfs?
>> Something like:
>> /sys/class/net/<PF name>/device/sriov/<VF ID>/stats/
> 
> Yes, probably, statistics can be taken from sysfs.
> 
> But we are introducing a DPDK API to get the virtio statistics.
> So, driver which can take statistics from there can take them from sysfs in the driver operation.  
> 
> In addition, the API includes per virtio queue statistics and in virtio data-path terms, it is very helpful for debuggability.

Ok, the per queue stats is a valid point for queue debug.

Even if we add this API, I still think we should ensure the stats will
be available through the sysfs, so that it makes Kubernetes integration
seemless wrt to legacy SR-IOV[0].

Also, it would provide a single way to get statistics for both DPDK and
Kernel vDPA.

Thanks,
Maxime

> 
> 
>> Regards,
>> Maxime
> 



More information about the dev mailing list