[dpdk-dev] [PATCH] net/i40e: fix VF Tx bytes

Stephen Hemminger stephen at networkplumber.org
Tue Jul 11 21:56:20 CEST 2017


On Sat,  8 Jul 2017 15:54:25 -0400
Qi Zhang <qi.z.zhang at intel.com> wrote:

> CRC size on Tx path is not necessary to be excluded.
> 
> Fixes: 98abce237ba7 ("net/i40e: fix VF statistics")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 71cb7d3..0585869 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -2353,9 +2353,6 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
>  	i40e_stat_update_48(hw, I40E_GLV_BPTCH(idx), I40E_GLV_BPTCL(idx),
>  			    vsi->offset_loaded,  &oes->tx_broadcast,
>  			    &nes->tx_broadcast);
> -	/* exclude CRC bytes */
> -	nes->tx_bytes -= (nes->tx_unicast + nes->tx_multicast +
> -		nes->tx_broadcast) * ETHER_CRC_LEN;
>  	/* GLV_TDPC not supported */
>  	i40e_stat_update_32(hw, I40E_GLV_TEPC(idx), vsi->offset_loaded,
>  			    &oes->tx_errors, &nes->tx_errors);

Whether or not CRC is included in length statistics has been an ongoing
problem in DPDK.  The Linux and BSD standard is to exclude CRC from number
of bytes; Cisco includes it, and Juniper does not.

For application consistency across real and virtual devices, all
statistics for both transmit and receive in DPDK must NOT include CRC bytes.

Is this still an issue in DPDK drivers? Do I need to put it on the
TAB agenda? Is it not clear in the documentation?


More information about the dev mailing list