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

Yang, Zhiyong zhiyong.yang at intel.com
Thu Sep 1 05:55:47 UTC 2016


Hi, Jesse:
	Thanks a lot for your clear reply. Physical NIC  maybe conforms to
RFC2819 as follows:

etherStatsPkts64Octets OBJECT-TYPE
SYNTAX Counter32
UNITS "Packets"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of packets (including bad
packets) received that were 64 octets in length
(excluding framing bits but including FCS octets)."

The definition of prc64 from  Intel® 82599 10 GbE Controller
Datasheet is as following.
Number of good packets received that are 64 bytes in length (from <Destination
Address> through <CRC>, inclusively).
This registers counts packets that pass L2 filtering regardless on receive
enablement and does not include received flow control packets.

Thanks
Zhiyong Yang

> -----Original Message-----
> From: Jesse Gross [mailto:jesse at kernel.org]
> Sent: Thursday, September 1, 2016 12:41 AM
> To: Yang, Zhiyong <zhiyong.yang at intel.com>
> Cc: dev at openvswitch.com
> Subject: Re: [ovs-dev] one issue about vhost xstats with/without CRC
> 
> 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