[dpdk-stable] [PATCH v3] net/i40e: fix Rx packet statistics

Zhang, Qi Z qi.z.zhang at intel.com
Fri Oct 8 08:17:36 CEST 2021



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang at intel.com>
> Sent: Thursday, September 30, 2021 1:20 PM
> To: Xing, Beilei <beilei.xing at intel.com>; Guo, Junfeng
> <junfeng.guo at intel.com>; ktraynor at redhat.com; Zhang, Qi Z
> <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; Zhang, AlvinX <alvinx.zhang at intel.com>; stable at dpdk.org
> Subject: [PATCH v3] net/i40e: fix Rx packet statistics
> 
> Some packets are discarded by the NIC because they are larger than the MTU,
> these packets should be counted as "RX error" instead of "RX packet", for
> example:
> 
>   pkt1 = Ether()/IP()/Raw('x' * 1400)
>   pkt2 = Ether()/IP()/Raw('x' * 1500)
> 
>   ---------------- Forward statistics for port 0 -----------------
>   RX-packets: 2 RX-dropped: 0 RX-total: 2
>   TX-packets: 1 TX-dropped: 0 TX-total: 1
>   ----------------------------------------------------------------
> 
>   Here the packet pkt2 has been discarded, but still was counted
>   by "RX-packets"
> 
> The register 'GL_RXERR1' can count above discarded packets.
> This patch adds reading and calculation of the 'GL_RXERR1' counter when
> reporting DPDK statistics.
> 
> Fixes: f4a91c38b4ad ("i40e: add extended stats")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang at intel.com>

Acked-by: Qi Zhang <qi.z.zhang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi



More information about the stable mailing list