[dpdk-dev] [PATCH] vhost: add pmd xstats

Yang, Zhiyong zhiyong.yang at intel.com
Thu Sep 1 08:37:26 CEST 2016


Hi, all:

> -----Original Message-----
> From: Yang, Zhiyong
> Sent: Wednesday, August 31, 2016 3:19 PM
> To: dev at dpdk.org
> Cc: Panu Matilainen <pmatilai at redhat.com>; Liu, Yuanhan
> <yuanhan.liu at intel.com>; Thomas Monjalon
> <thomas.monjalon at 6wind.com>; Yao, Lei A <lei.a.yao at intel.com>; Yang,
> Zhiyong <zhiyong.yang at intel.com>; Wang, Zhihong
> <zhihong.wang at intel.com>
> Subject: RE: [dpdk-dev] [PATCH] vhost: add pmd xstats
> 
> Hi, ALL:
> 
> Physical NIC has a set of counters, such as
> u64 prc64;
> u64 prc127;
> u64 prc255; etc.
> but now, DPDK has counted 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. Should Vhost do like
> NIC's behavior or virtio's behavior?
> 
> According to rfc2819 description as referece.
> etherStatsPkts64Octets OBJECT-TYPE
> SYNTAX Counter32
> UNITS "Packets"
> "The total number of packets (including bad packets) received that were
> 64 octets in length (excluding framing bits but including FCS octets)."
>
I consult the requirement from dev at openvswitch.com,  Jesse Gross
<jesse at kernel.org> reply the question as following:
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