[dpdk-users] i40e VF Rx/Tx CRC Bytes Discrepancy
matthew.coppola4 at gmail.com
Thu Feb 8 17:52:55 CET 2018
I am noticing a discrepancy in the Rx/Tx Byte counters when using the
i40e driver as a virtual function. Specifically I am observing that
the Rx bytes are 4 bytes per packet larger than the Tx Bytes.
My application is transmitting a packet and then receiving the same
packet back (in a service function chaining application). I verified
that the packets being transmitted and received were the same by
capturing on the interfaces using pdump and analyzing the output in
I believe the discrepancy comes from correcting for the Ethernet FCS.
I see that in i40e_ethdev.c the CRC bytes are corrected for in the
i40e_update_vsi_stats() and i40e_read_stats_registers() functions by
using the following correction (see below). Note the left-hand side
changes slightly depending on the specific function.
pf->internal_stats.rx_bytes -= (pf->internal_stats.rx_unicast +
pf->internal_stats.rx_multicast + pf->internal_stats.rx_broadcast) *
However I did not see this correction being used in the vf driver
(i40e_ethdev_vf.c). By adding a correction to i40evf_update_stats() as
follows I can reconcile the counters (and make them consistent with
the PF behavior).
nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
nes->rx_broadcast) * ETHER_CRC_LEN;
I would like to know if this is the expected behavior or if this is a
bug in the driver? If this is the expected behavior can you please
explain why I should expect a discrepancy between the Rx and Tx Byte
Some additional information:
The application I am observing this behaviour in is using DPDK 17.08.
(However I don't see any fixes for this in version 17.11).
The NIC is an Intel Corporation XL710/X710 Virtual Function (rev 02)
(output from lspci).
Thank you for your time, and please let me know if you require further
More information about the users