[ovs-dev] one issue about vhost xstats with/without CRC

Jesse Gross jesse at kernel.org
Wed Aug 31 16:40:51 UTC 2016


On Wed, Aug 31, 2016 at 2:30 AM, Yang, Zhiyong <zhiyong.yang at intel.com> wrote:
> Hi, all:
>
> Physical NIC has a set of hardware counters, such as
> u64 prc64;
> u64 prc127;
> u64 prc255; etc.
> DPDK counts the prc64 in two ways. Physical NIC counts prc64 with CRC by
> hardware. Virtio computes the counter like prc64 without CRC. This will cause
> the conflict, when a 64 packet from outer network is sent to VM(virtio), NIC
> will show prc64 + 1, virtio will actually receive the 64-4(CRC) = 60 bytes pkt,
> undersize(<64) counter will be increased, since the Length of the packet will
> be subtracted CRC by hardware(NIC offload enable) or software((NIC offload
> disable)).
>
> if vhost xstats implements like NIC, It will solve the  consistency issue. But when
> running vm to vm or virtio/vhost loopback test, xstats counters will count
> non-existent CRC bytes .
>
> How should Packets length of virtio/vhost be counted from OVS perspective?
> With or without CRC?

All other stats in OVS (including flows and other counters that don't
come from hardware) count bytes without the CRC. Presumably it would
be best to adjust the physical NIC stats with DPDK to do the same.



More information about the dev mailing list